From cbe52831cf3ccaddd10f4a43d61d6455908c70c1 Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Wed, 19 Apr 2023 22:22:53 +0900 Subject: [PATCH] Fix leave command (#408) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同じVCにいるBot以外は落とせないように修正 --- src/commands/leave.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/commands/leave.ts b/src/commands/leave.ts index ae9d0004..e11e4495 100644 --- a/src/commands/leave.ts +++ b/src/commands/leave.ts @@ -38,6 +38,17 @@ export class JoinCommand extends Command { ], ephemeral: true, }) + } else if (ctx.voiceChannel !== interaction.member.voice.channel) { + return interaction.reply({ + embeds: [ + { + color: 0xff0000, + title: 'エラー', + description: 'BOTと同じVCに参加している必要があります。', + }, + ], + ephemeral: true, + }) } await ctx.leave()