Browse Source

Only log message.content if there is any (külboard)

master
Abheek Dhawan 4 years ago
parent
commit
8c119caaac
  1. 4
      bot.js

4
bot.js

@ -819,13 +819,15 @@ client.on('messageReactionAdd', (messageReaction, user) => {
.addField("Link", `[Click here!](${message.url})`) .addField("Link", `[Click here!](${message.url})`)
.setAuthor(message.author.tag, message.author.avatarURL()) .setAuthor(message.author.tag, message.author.avatarURL())
.addField(`Max 😎 Reactions`, `${numEmoji}`) .addField(`Max 😎 Reactions`, `${numEmoji}`)
.addField("Message", message.content)
.addField("Channel", message.channel) .addField("Channel", message.channel)
.setThumbnail(message.author.avatarURL()) .setThumbnail(message.author.avatarURL())
.setFooter("Message ID: " + message.id) .setFooter("Message ID: " + message.id)
.setColor("00c5ff") .setColor("00c5ff")
.setTimestamp(); .setTimestamp();
if (message.content) {
kulboardEmbed.addField("Message", message.content)
}
collection.findOne({ guild_id: messageReaction.message.guild.id }, (error, result) => { collection.findOne({ guild_id: messageReaction.message.guild.id }, (error, result) => {
let kulboardChannel; let kulboardChannel;
let botLogsChannel; let botLogsChannel;

Loading…
Cancel
Save