RazgrizX

request for help

Oct 22nd, 2021
726
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on("messageReactionAdd", async (reaction, user) => {
  2.     if (user.bot) return;
  3.  
  4.     const isRelevant = await reactionController.isRelevant(reaction); // Checks if the reaction was to a specific message
  5.  
  6.     if (isRelevant) {
  7.         // Saves user to the DB.
  8.     } else {
  9.         reaction.users.remove(user); // Fires messageReactionRemove indistinguishable from a manual removal
  10.     }
  11. });
  12.  
  13. client.on("messageReactionRemove", async (reaction, user) => {
  14.     // user.bot is always false here, because the event registers whose emoji or reaction emoji was removed. None reaction nor user are partials.
  15.     const isRelevant = await reactionController.isRelevant(reaction);
  16.  
  17.     if (isRelevant) {
  18.         // Remove user from the database
  19.     }
  20. });
RAW Paste Data