From 7d7677d6767b494abc5b623b15d0d6d9a7a54cae Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sat, 3 Apr 2021 14:23:21 -0500 Subject: [PATCH] Try using animated emoji --- index.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 1c1d426..7d1ddb7 100644 --- a/index.js +++ b/index.js @@ -307,15 +307,15 @@ async function addRole(message) { .setTimestamp(); message.channel.send(verificationEmbed) .then(verificationEmbed => { - verificationEmbed.react('👍'); + verificationEmbed.react(''); verificationEmbed.react('👎'); const filter = (reaction, user) => { - return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; + return ['', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; }; verificationEmbed.awaitReactions(filter, { max: 1, time: 600000000, errors: ['time'] }) .then(userReaction => { const reaction = userReaction.first(); - if (reaction.emoji.name === '👍') { + if (reaction.emoji.name === '') { member.roles.add(role).then(message.reply(`${member.user} has been given the **${role}** role!`)).catch(() => { message.reply("It seems I don't have permissions to give that role, as it's likely above me :(") }); } else { message.reply("I guess you won't be getting that role!"); @@ -359,15 +359,15 @@ async function ban(message) { .setTimestamp(); message.channel.send(verificationEmbed) .then(verificationEmbed => { - verificationEmbed.react('👍'); + verificationEmbed.react(''); verificationEmbed.react('👎'); const filter = (reaction, user) => { - return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; + return ['', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; }; verificationEmbed.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] }) .then(userReaction => { const reaction = userReaction.first(); - if (reaction.emoji.name === '👍') { + if (reaction.emoji.name === '') { message.guild.members.ban(member.user).then(user => message.reply(`<@${user.id}> has been banned!`)).catch(() => message.channel.send(`Unfortunately, I don't have the ability to ban ${member.user.username}, likely because their role is higher than mine.`)); } else { message.reply(`phew! ${member}'s safe!`); @@ -411,15 +411,15 @@ async function kick(message) { .setTimestamp(); message.channel.send(verificationEmbed) .then( verificationEmbed => { - verificationEmbed.react('👍'); + verificationEmbed.react(''); verificationEmbed.react('👎'); const filter = (reaction, user) => { - return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; + return ['', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; }; verificationEmbed.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] }) .then(userReaction => { const reaction = userReaction.first(); - if (reaction.emoji.name === '👍') { + if (reaction.emoji.name === '') { member.kick().then(user => message.reply(`<@${user.id}> has been kicked!`)).catch(() => message.channel.send(`Unfortunately, I don't have the ability to kick ${member.user.username}, likely because their role is higher than mine.`)); } else { message.reply(`phew! ${member}'s safe!`); @@ -524,15 +524,15 @@ async function roleRequest(message) { .setTimestamp(); message.channel.send(verificationEmbed) .then(verificationEmbed => { - verificationEmbed.react('👍'); + verificationEmbed.react(''); verificationEmbed.react('👎'); const filter = (reaction, user) => { - return ['👍', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; + return ['', '👎'].includes(reaction.emoji.name) && message.guild.members.cache.get(user.id).hasPermission('ADMINISTRATOR') && !user.bot; }; verificationEmbed.awaitReactions(filter, { max: 1, time: 600000000, errors: ['time'] }) .then(userReaction => { const reaction = userReaction.first(); - if (reaction.emoji.name === '👍') { + if (reaction.emoji.name === '') { message.member.roles.add(role).then(message.reply("wow I guess you ARE worthy! ||mods must be real mistaken||")).catch(() => { message.reply("It seems I don't have permissions to give that role, as it's likely above me :(") }); } else { message.reply("I guess you won't be getting that role!");