From 77f02676d284d623a47f13726cd9a0071e69cf17 Mon Sep 17 00:00:00 2001 From: Toast <96593068+AnxietyisReal@users.noreply.github.com> Date: Fri, 25 Nov 2022 20:52:31 +1100 Subject: [PATCH] bru #5 --- src/events/messageUpdate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/messageUpdate.ts b/src/events/messageUpdate.ts index 3e5464d..d72c631 100644 --- a/src/events/messageUpdate.ts +++ b/src/events/messageUpdate.ts @@ -4,6 +4,7 @@ export default { name: 'messageUpdate', execute: async(client:TClient, oldMsg:Discord.Message, newMsg:Discord.Message)=>{ if (!client.config.botSwitches.logs) return; + if (oldMsg.guild?.id != client.config.mainServer.id) return; if (oldMsg.author == null) return; if (oldMsg?.author.bot) return; if (oldMsg.partial) return; @@ -15,4 +16,4 @@ export default { const embed = new client.embed().setColor(client.config.embedColor).setTimestamp().setAuthor({name: `Author: ${oldMsg.author.tag} (${oldMsg.author.id})`, iconURL: `${oldMsg.author.displayAvatarURL()}`}).setTitle('Message edited').setDescription(`<@${oldMsg.author.id}>\nOld content:\n\`\`\`\n${oldMsg.content}\n\`\`\`\nNew content:\n\`\`\`\n${newMsg.content}\`\`\`\nChannel: <#${oldMsg.channelId}>`); (client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel).send({embeds: [embed], components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setStyle(5).setURL(`${oldMsg.url}`).setLabel('Jump to message'))]}); } -} \ No newline at end of file +}