1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -05:00

Fix error spamming from no GuildMember

This commit is contained in:
toast-ts 2023-02-26 11:23:53 -08:00
parent 1924a9850a
commit 908d459a5c

View File

@ -5,6 +5,6 @@ export default {
if (!client.config.botSwitches.logs) return; if (!client.config.botSwitches.logs) return;
if (client.config.mainServer.id != '468835415093411861') return; if (client.config.mainServer.id != '468835415093411861') return;
const channel = client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel; 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}>`})]})
} }
} }