From 8c8a72d61ae1f855615b396153ccfdce880b272f Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Thu, 1 Apr 2021 22:16:06 -0500 Subject: [PATCH] Use user.bot instead of message.author.bot --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1c62cb5..fe28e26 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') && !message.author.bot; + return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; }; message.awaitReactions(filter, { max: 1, time: 600000000, errors: ['time'] }) .then(userReaction => {