mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: remove Promise.resolve() return and fix queue type
This commit is contained in:
1 parent
d5cc5b8741
commit
67e45729a3
23 files changed
+102
-117
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import config from 'config';
|
||||
import { NodeResolvable, Track, useQueue } from 'discord-player';
|
||||
import { GuildQueue, Track, useQueue } from 'discord-player';
|
||||
import {
|
||||
APIActionRowComponent,
|
||||
APIMessageActionRowComponent,
|
||||
@@ -38,21 +38,21 @@ const command: CustomSlashCommandInteraction = {
|
||||
});
|
||||
|
||||
if (await notInVoiceChannel({ interaction, executionId })) {
|
||||
return Promise.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
const queue: NodeResolvable = useQueue(interaction.guild!.id)!;
|
||||
const queue: GuildQueue = useQueue(interaction.guild!.id)!;
|
||||
|
||||
if (await queueDoesNotExist({ interaction, queue, executionId })) {
|
||||
return Promise.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
if (await notInSameVoiceChannel({ interaction, queue, executionId })) {
|
||||
return Promise.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
if (await queueNoCurrentTrack({ interaction, queue, executionId })) {
|
||||
return Promise.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
const sourceStringsFormatted = new Map([
|
||||
|
||||
Reference in new issue
Block a user