diff --git a/bot.js b/bot.js index 5410205..ed8a7bf 100644 --- a/bot.js +++ b/bot.js @@ -726,8 +726,8 @@ client.on('messageUpdate', (originalMessage, editedMessage) => { if (editedMessage !== originalMessage) { editEmbed.addField("Message", `<< ${originalMessage}\n>> ${editedMessage}`) } - if (editedMessage.attachments) { - editEmbed.addField("Attachments", editedMessage.attachments.array().map(`[${a.name}](${a.url})`).join(' • ')) + if (editedMessage.attachments.array().length) { + editEmbed.addField("Attachments", editedMessage.attachments.array().map(a => `[${a.name}](${a.url})`).join(' • ')) } collection.findOne({ guild_id: editedMessage.guild.id }, (error, result) => { if (error) {