1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00

cant reproduce it but removed '?' for now.

This commit is contained in:
AnxietyisReal 2022-12-01 03:02:55 +11:00
parent b25d890205
commit 879435c3e8

View File

@ -7,7 +7,7 @@ export default {
if (!client.config.botSwitches.logs) return; if (!client.config.botSwitches.logs) return;
let msgArray: Array<string> = []; let msgArray: Array<string> = [];
messages.forEach((m)=>{ messages.forEach((m)=>{
msgArray.push(`${m.author?.username}: ${m.content}`); msgArray.push(`${m.author.username}: ${m.content}`);
}); });
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setTitle(`${messages.size} messages were purged`).setDescription(`\`\`\`${msgArray.reverse().join('\n')}\`\`\``.slice(0,3900)).addFields({name: 'Channel', value: `<#${(messages.first() as Discord.Message).channel.id}>`}); const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setTitle(`${messages.size} messages were purged`).setDescription(`\`\`\`${msgArray.reverse().join('\n')}\`\`\``.slice(0,3900)).addFields({name: 'Channel', value: `<#${(messages.first() as Discord.Message).channel.id}>`});
channel.send({embeds: [embed]}) channel.send({embeds: [embed]})