From 209a1c94cdf7d8c7a9d416e6441ea5c40db5b707 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Fri, 25 Nov 2022 20:29:26 +1100 Subject: [PATCH] proxify the image --- src/events/messageDelete.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts index 1a5b100..3a326c5 100644 --- a/src/events/messageDelete.ts +++ b/src/events/messageDelete.ts @@ -10,9 +10,9 @@ 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().url + image = msg.attachments?.first().proxyURL embed.setImage(image) } channel.send({embeds: [embed]}) } -} \ No newline at end of file +}