Remove User's Own Reactions

This commit is contained in:
Daniel Odendahl Jr
2017-05-23 01:19:08 +00:00
parent 4ee80dd9d9
commit 540987f5b1
+4
View File
@@ -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)