From aa920b65b6f5bdb1062532d125c52f34990a2174 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 31 Mar 2021 21:23:15 -0500 Subject: [PATCH] Fix all role request issues --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 829a101..e99e566 100644 --- a/index.js +++ b/index.js @@ -35,18 +35,19 @@ async function roleRequest(message) { message.react('👍'); message.react('👎'); const filter = (reaction, member) => { - return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.cache.members.get(user.id).hasPermission('ADMINISTRATOR'); + return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR'); }; message.awaitReactions(filter, { max: 1, time: 600000000, errors: ['time'] }) .then(userReaction => { const reaction = userReaction.first(); if (reaction.emoji === '👍') { + message.reply("wow I guess you ARE worthy! ||mods must be real mistaken||"); if (role === 'reader') { message.member.roles.add(readerRole).catch(console.error); } else if (role === 'writer') { message.member.roles.add(writerRole).catch(console.error); } else if (role === 'spectator' || role === 'spec') { - message.member.roles.add(writerRole).catch(console.error); + message.member.roles.add(specRole).catch(console.error); } } else { message.reply("I guess you won't be getting that role!");