From c0243690fbc3cef72cdc53712f8e1f7b3fd6492d Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sat, 26 Nov 2022 07:05:41 +1100 Subject: [PATCH] temporary workaround until theres a fix for invalidated images --- src/events/messageDelete.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts index 01cca7f..53dc2d3 100644 --- a/src/events/messageDelete.ts +++ b/src/events/messageDelete.ts @@ -11,9 +11,8 @@ export default { const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setAuthor({name: `Author: ${msg.author.tag} (${msg.author.id})`, iconURL: `${msg.author.displayAvatarURL()}`}).setTitle('Message deleted').setDescription(`<@${msg.author.id}>\nContent:\n\`\`\`\n${msg?.content}\n\`\`\`\nChannel: <#${msg.channelId}>`) let image; if (msg.attachments?.first()?.width && ['png', 'jpeg', 'jpg', 'gif', 'webp'].some(x=>((msg.attachments.first() as Discord.Attachment).name as string).endsWith(x))) { - image = msg.attachments?.first().proxyURL - embed.setImage(image) + image = msg.attachments?.first().attachment } - channel.send({embeds: [embed]}) + channel.send({embeds: [embed], files: [image]}) } }