Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require('dotenv').config();
- const { Client, Intents } = require('discord.js');
- const client = new Client({
- intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS],
- });
- client.once('ready', () => {
- console.log('Ready!');
- });
- client.on('interactionCreate', async interaction => {
- if (!interaction.isCommand()) return;
- const { commandName } = interaction;
- if (commandName === 'fruits') {
- interaction.reply('Reacting with fruits!');
- const message = await interaction.fetchReply();
- message.react('🍎');
- message.react('🍊');
- message.react('🍇');
- }
- });
- client.login(process.env.TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement