Advertisement
gaber-elsayed

autoreaction

Sep 30th, 2021
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. const { Client, Intents } = require('discord.js');
  2. const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
  3.  
  4. client.on("ready", () => {
  5.  
  6. console.log(`${client.user.tag} is online!`);
  7.  
  8. });
  9.  
  10.  
  11. /*
  12. Confing
  13. */
  14.  
  15. let channelID = "CHANNEL_ID";
  16. let reactions = ["👍", "👎"];
  17.  
  18. client.on("message", async message => {
  19.  
  20. if(message.author.bot || message.author.system)return;
  21. if(message.channel.id != channelID)return;
  22.  
  23. reactions.forEach(async (r) => {
  24.  
  25. await message.react(r);
  26.  
  27. })
  28.  
  29. });
  30.  
  31. client.login("BOT_TOKEN");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement