From a60e000d14e4e1389169674921a747059e53750b Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Thu, 1 Apr 2021 22:14:37 -0500 Subject: [PATCH] Check if bot reacts to rolerequest --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0647fd2..f6673fb 100644 --- a/index.js +++ b/index.js @@ -132,7 +132,7 @@ async function roleRequest(message) { message.react('👍'); message.react('👎'); const filter = (reaction, user) => { - return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR'); + return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !message.author.bot; }; message.awaitReactions(filter, { max: 1, time: 600000000, errors: ['time'] }) .then(userReaction => {