Browse Source

Fix attachments on message edit

master
Abheek Dhawan 4 years ago
parent
commit
6e5ca1fb9e
  1. 4
      bot.js

4
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) {

Loading…
Cancel
Save