mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +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
@@ -18,12 +18,6 @@ class QueueCommand extends BaseSlashCommandInteraction {
|
||||
option.setName('page').setDescription('Page number to display for the queue').setMinValue(1)
|
||||
);
|
||||
super(data);
|
||||
|
||||
this.validators = [
|
||||
(args) => checkInVoiceChannel(args),
|
||||
(args) => checkSameVoiceChannel(args),
|
||||
(args) => checkQueueExists(args)
|
||||
];
|
||||
}
|
||||
|
||||
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
|
||||
@@ -32,7 +26,11 @@ class QueueCommand extends BaseSlashCommandInteraction {
|
||||
|
||||
const queue: GuildQueue = useQueue(interaction.guild!.id)!;
|
||||
|
||||
await this.runValidators({ interaction, queue, executionId });
|
||||
await this.runValidators({ interaction, queue, executionId }, [
|
||||
checkInVoiceChannel,
|
||||
checkSameVoiceChannel,
|
||||
checkQueueExists
|
||||
]);
|
||||
|
||||
const pageIndex: number = (interaction.options.getNumber('page') || 1) - 1;
|
||||
let queueString: string = '';
|
||||
|
||||
Reference in new issue
Block a user