From 086d1d50c66a1b679efa463141300c7d2be61dcf Mon Sep 17 00:00:00 2001 From: smyalygames Date: Wed, 1 Mar 2023 23:45:16 +0000 Subject: [PATCH] feat(arabot): add disconnect from vc for restrictions --- src/commands/mod/restriction/restrict.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands/mod/restriction/restrict.ts b/src/commands/mod/restriction/restrict.ts index d0ba3bb..f338a6e 100644 --- a/src/commands/mod/restriction/restrict.ts +++ b/src/commands/mod/restriction/restrict.ts @@ -229,6 +229,11 @@ export async function restrictRun( } } + if (member !== undefined + && member.voice.channelId !== null) { + await member.voice.disconnect(); + } + // Restrict the user on the database await restrict(userId, modId, reason, section);