From a6f7dca6c06e51b6a9d9c5d161f9deff615a8383 Mon Sep 17 00:00:00 2001 From: zhiyan114 Date: Sun, 26 May 2024 21:23:39 -0400 Subject: [PATCH] Update in the same channel should not consitute a log --- src/events/discordEvents.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/discordEvents.ts b/src/events/discordEvents.ts index ed20f26..cab032d 100644 --- a/src/events/discordEvents.ts +++ b/src/events/discordEvents.ts @@ -116,8 +116,9 @@ export class DiscordEvents extends baseEvent { const config = this.client.config.VCJoinLog; const channel = await this.client.channels.fetch(config.channelID); if(!channel || channel.type !== ChannelType.GuildText) return; - if(!now.member || now.member.user.bot) return; if(!now.channel) return; + if(old.channel?.id === now.channel.id) return; + if(!now.member || now.member.user.bot) return; if(config.excludeChannels.includes(now.channel.id)) return; // Prepare embed