fix: Updated sending in checks for validation runner

This commit is contained in:
Marius Begby committed 2023-09-06 20:40:25 +02:00
1 parent 8da6f44ebb
commit 56056cd73d
17 files changed
+76 -110

No files matched your search

+6 -8
View File
@@ -14,13 +14,6 @@ class SkipCommand extends BaseSlashCommandInteraction {
option.setName('tracknumber').setDescription('The position in queue to skip to.').setMinValue(1)
);
super(data);
this.validators = [
(args) => checkInVoiceChannel(args),
(args) => checkSameVoiceChannel(args),
(args) => checkQueueExists(args),
(args) => checkQueueCurrentTrack(args)
];
}
async execute(params: BaseSlashCommandParams): BaseSlashCommandReturnType {
@@ -29,7 +22,12 @@ class SkipCommand extends BaseSlashCommandInteraction {
const queue: GuildQueue = useQueue(interaction.guild!.id)!;
await this.runValidators({ interaction, queue, executionId });
await this.runValidators({ interaction, queue, executionId }, [
checkInVoiceChannel,
checkSameVoiceChannel,
checkQueueExists,
checkQueueCurrentTrack
]);
const skipToTrack: number = interaction.options.getNumber('tracknumber')!;