fix: remove Promise.resolve() return and fix queue type

This commit is contained in:
Marius Begby committed 2023-08-29 15:04:37 +02:00
1 parent d5cc5b8741
commit 67e45729a3
23 files changed
+102 -117

No files matched your search

+4 -4
View File
@@ -1,5 +1,5 @@
import config from 'config';
import { NodeResolvable, useQueue } from 'discord-player';
import { GuildQueue, useQueue } from 'discord-player';
import { EmbedBuilder, GuildMember, SlashCommandBuilder } from 'discord.js';
import loggerModule from '../../../services/logger';
@@ -28,10 +28,10 @@ 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 (!queue) {
logger.debug('There is already no queue.');
@@ -49,7 +49,7 @@ const command: CustomSlashCommandInteraction = {
}
if (await notInSameVoiceChannel({ interaction, queue, executionId })) {
return Promise.resolve();
return;
}
if (!queue.deleted) {