From d81db0d826e47ed1652c8add136e4f7270d55279 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 11:12:11 -0500 Subject: [PATCH] Fix message author issue and remove logging --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 445a7a3..a170df6 100644 --- a/index.js +++ b/index.js @@ -697,11 +697,11 @@ client.on('message', message => { const collector = message.createReactionCollector(filter); collector.on('collect', (reaction, user) => { - if (reaction.get("😎").count === 1) { + if (reaction.count === 1) { const kulboardEmbed = new Discord.MessageEmbed() .setTitle("Very kül message") .setURL(message.url) - .setAuthor(message.author ? message.author.tag : "Unknown: click on the link to find out", message.author ? messageReaction.message.author.avatarURL() : client.user.defaultAvatarURL) + .setAuthor(message.author ? message.author.tag : "Unknown: click on the link to find out", message.author ? message.author.avatarURL() : client.user.defaultAvatarURL) .addField("Message", message.content) .addField("Channel", message.channel) .setFooter("Message ID: " + message.id) @@ -719,7 +719,6 @@ client.on('message', message => { } }); } - console.log(`Collected ${reaction.emoji.name} from ${user.tag}`); }); });