Browse Source

Use user.bot instead of message.author.bot

master
Abheek Dhawan 4 years ago
parent
commit
8c8a72d61a
  1. 2
      index.js

2
index.js

@ -132,7 +132,7 @@ async function roleRequest(message) {
message.react('👍'); message.react('👍');
message.react('👎'); message.react('👎');
const filter = (reaction, user) => { 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'] }) message.awaitReactions(filter, { max: 1, time: 600000000, errors: ['time'] })
.then(userReaction => { .then(userReaction => {

Loading…
Cancel
Save