From d190957c7f4cf87073c0906df7bc826b2459ceec Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Fri, 20 Aug 2021 19:01:47 +0200 Subject: [PATCH 1/2] Check if VC actually changed --- backend/src/plugins/Logs/events/LogsVoiceChannelEvts.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/plugins/Logs/events/LogsVoiceChannelEvts.ts b/backend/src/plugins/Logs/events/LogsVoiceChannelEvts.ts index 0abfadc8..51e349e7 100644 --- a/backend/src/plugins/Logs/events/LogsVoiceChannelEvts.ts +++ b/backend/src/plugins/Logs/events/LogsVoiceChannelEvts.ts @@ -30,6 +30,7 @@ export const LogsVoiceStateUpdateEvt = logsEvt({ channel: newChannel, }); } else if (oldChannel && newChannel) { + if (oldChannel.id === newChannel.id) return; logVoiceChannelMove(meta.pluginData, { member, oldChannel, From a72dc89293fd2b5d9eec83cd021d629bfd3adc6d Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Fri, 20 Aug 2021 19:05:59 +0200 Subject: [PATCH 2/2] Same fix for Spam plugin --- backend/src/plugins/Spam/events/SpamVoiceEvt.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/plugins/Spam/events/SpamVoiceEvt.ts b/backend/src/plugins/Spam/events/SpamVoiceEvt.ts index 36aba638..558216b9 100644 --- a/backend/src/plugins/Spam/events/SpamVoiceEvt.ts +++ b/backend/src/plugins/Spam/events/SpamVoiceEvt.ts @@ -9,6 +9,7 @@ export const SpamVoiceStateUpdateEvt = spamEvt({ if (!member) return; const channel = meta.args.newState.channel; if (!channel) return; + if (channel.id === meta.args.oldState?.id) return; const config = await meta.pluginData.config.getMatchingConfig({ member, channelId: channel.id }); const maxVoiceMoves = config.max_voice_moves;