mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
fix: Updated sending in checks for validation runner
This commit is contained in:
1 parent
8da6f44ebb
commit
56056cd73d
17 files changed
+76
-110
No files matched your search
@@ -11,12 +11,6 @@ class LeaveCommand extends BaseSlashCommandInteraction {
|
||||
.setName('leave')
|
||||
.setDescription('Clear the queue and remove bot from voice channel.');
|
||||
super(data);
|
||||
|
||||
this.validators = [
|
||||
(args) => checkInVoiceChannel(args),
|
||||
(args) => checkSameVoiceChannel(args),
|
||||
(args) => checkQueueExists(args)
|
||||
];
|
||||
}
|
||||
|
||||
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
|
||||
@@ -25,7 +19,11 @@ class LeaveCommand extends BaseSlashCommandInteraction {
|
||||
|
||||
const queue: GuildQueue = useQueue(interaction.guild!.id)!;
|
||||
|
||||
await this.runValidators({ interaction, queue, executionId });
|
||||
await this.runValidators({ interaction, queue, executionId }, [
|
||||
checkInVoiceChannel,
|
||||
checkSameVoiceChannel,
|
||||
checkQueueExists
|
||||
]);
|
||||
|
||||
logger.info('Validators passed, clearing queue.');
|
||||
|
||||
|
||||
Reference in new issue
Block a user