From 9541d9cc39e946499d0b469cff05a75685d687f4 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Sun, 16 Apr 2023 07:55:09 +1000 Subject: [PATCH] Not sure where the error came from but ok. --- src/events/messageDelete.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts index 3c63e63..00e043a 100644 --- a/src/events/messageDelete.ts +++ b/src/events/messageDelete.ts @@ -6,6 +6,7 @@ export default { const channel = client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel; const disabledChannels = [ '548032776830582794', '541677709487505408', '949380187668242483'] if (msg.guild?.id != client.config.mainServer.id || msg.partial || msg.author.bot || disabledChannels.includes(msg.channelId)) return; + if (Discord.DiscordAPIError.name === '10008') return console.log(client.logTime(), 'Caught an unexpected error returned by Discord API. (Unknown Message)'); 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}>\n\`${msg.author.id}\``); if (msg.content.length != 0) embed.addFields({name: 'Content', value: `\`\`\`\n${msg.content.slice(0,1000)}\n\`\`\``}); embed.addFields(