From 908d459a5c9f681ff4bff9f27dfa1d39d4aea67c Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sun, 26 Feb 2023 11:23:53 -0800 Subject: [PATCH] Fix error spamming from no GuildMember --- src/events/messageDeleteBulk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/messageDeleteBulk.ts b/src/events/messageDeleteBulk.ts index a3c37b9..b917f4e 100644 --- a/src/events/messageDeleteBulk.ts +++ b/src/events/messageDeleteBulk.ts @@ -5,6 +5,6 @@ export default { if (!client.config.botSwitches.logs) return; if (client.config.mainServer.id != '468835415093411861') return; const channel = client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel; - channel.send({embeds: [new client.embed().setColor(client.config.embedColorRed).setTimestamp().setTitle(`${messages.size} messages were purged`).setDescription(`\`\`\`${messages.map((msgs)=>`${msgs.member.displayName}: ${msgs.content}`).reverse().join('\n').slice(0,3900)}\`\`\``).addFields({name: 'Channel', value: `<#${messages.first().channel.id}>`})]}) + channel.send({embeds: [new client.embed().setColor(client.config.embedColorRed).setTimestamp().setTitle(`${messages.size} messages were purged`).setDescription(`\`\`\`${messages.map((msgs)=>`${msgs.member?.displayName}: ${msgs.content}`).reverse().join('\n').slice(0,3900)}\`\`\``).addFields({name: 'Channel', value: `<#${messages.first().channel.id}>`})]}) } } \ No newline at end of file