From 540987f5b1c21e54749deb8bf850e7c9090f4e23 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 23 May 2017 01:19:08 +0000 Subject: [PATCH] Remove User's Own Reactions --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 0c12389a..5a82e7d5 100644 --- a/index.js +++ b/index.js @@ -105,6 +105,10 @@ client.on('messageReactionAdd', (reaction, user) => { const channel = msg.guild.channels.get(msg.guild.settings.get('starboard')); if (!channel) return; if (!channel.permissionsFor(client.user).has(['SEND_MESSAGES', 'EMBED_LINKS'])) return; + if (user.id === msg.author.id) { + reaction.remove(user); + return msg.reply('You cannot star your own messages, idiot.'); + } const embed = new RichEmbed() .setColor(0xFFFF00) .setAuthor(msg.author.tag, msg.author.displayAvatarURL)