Skip to content

Commit

Permalink
Fix leave command (#408)
Browse files Browse the repository at this point in the history
同じVCにいるBot以外は落とせないように修正
  • Loading branch information
Mogyuchi authored Apr 19, 2023
1 parent 2abcf56 commit cbe5283
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/commands/leave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cbe5283

Please sign in to comment.