diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts index 26029b2..0ed8c94 100644 --- a/src/events/messageDelete.ts +++ b/src/events/messageDelete.ts @@ -8,7 +8,12 @@ export default { if (msg.guild?.id != client.config.mainServer.id) return; if (msg.partial) return; if (msg.author.bot) return; - 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}>`) + 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,1020)}\n\`\`\``}); + embed.addFields( + { name: 'Channel', value: `<#${msg.channelId}>` }, + { name: 'Sent at', value: `\n` } + ) const attachments: Array = []; msg.attachments.forEach((x) => attachments.push(x.url)); channel.send({embeds: [embed], files: attachments})