Browse Source

Check if bot reacts to rolerequest

master
Abheek Dhawan 4 years ago
parent
commit
a60e000d14
  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'); 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'] }) message.awaitReactions(filter, { max: 1, time: 600000000, errors: ['time'] })
.then(userReaction => { .then(userReaction => {

Loading…
Cancel
Save