From 0f4f7b446d9c13c3fa8bb8103e09461f3debf7be Mon Sep 17 00:00:00 2001 From: Almeida Date: Sat, 8 May 2021 14:14:44 +0100 Subject: [PATCH] added move_voice_channel trigger --- backend/src/plugins/Automod/triggers/joinVoiceChannel.ts | 2 +- backend/src/plugins/Automod/triggers/leaveVoiceChannel.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/Automod/triggers/joinVoiceChannel.ts b/backend/src/plugins/Automod/triggers/joinVoiceChannel.ts index 9064fb45..16723584 100644 --- a/backend/src/plugins/Automod/triggers/joinVoiceChannel.ts +++ b/backend/src/plugins/Automod/triggers/joinVoiceChannel.ts @@ -13,7 +13,7 @@ export const JoinVoiceChannelTrigger = automodTrigger()( async match({ triggerConfig, context }) { const matchedChannelId = context.voiceChannel?.joined?.id; - if (!context.member || !matchedChannelId) { + if (!context.member || !matchedChannelId || context.voiceChannel?.left) { return; } diff --git a/backend/src/plugins/Automod/triggers/leaveVoiceChannel.ts b/backend/src/plugins/Automod/triggers/leaveVoiceChannel.ts index d4125d6f..4c8d2e09 100644 --- a/backend/src/plugins/Automod/triggers/leaveVoiceChannel.ts +++ b/backend/src/plugins/Automod/triggers/leaveVoiceChannel.ts @@ -13,7 +13,7 @@ export const LeaveVoiceChannelTrigger = automodTrigger( async match({ triggerConfig, context }) { const matchedChannelId = context.voiceChannel?.left?.id; - if (!context.member || !matchedChannelId) { + if (!context.member || !matchedChannelId || context.voiceChannel?.joined) { return; }