diff --git a/src/classes/interactions.ts b/src/classes/interactions.ts index 79308571..710652fa 100644 --- a/src/classes/interactions.ts +++ b/src/classes/interactions.ts @@ -122,7 +122,7 @@ abstract class BaseInteraction { return { text: 'Page 1 of 1 (0 tracks)' }; } - const pageIndex: number = (interaction.options.getNumber('page') || 1) - 1; + const pageIndex: number = (interaction.options.getInteger('page') || 1) - 1; const totalPages: number = Math.ceil(queue.tracks.data.length / 10) || 1; return { text: `Page ${pageIndex + 1} of ${totalPages} (${queue.tracks.data.length} tracks)` diff --git a/src/interactions/commands/player/back.ts b/src/interactions/commands/player/back.ts index 39135a86..4eec50a6 100644 --- a/src/interactions/commands/player/back.ts +++ b/src/interactions/commands/player/back.ts @@ -30,7 +30,7 @@ class BackCommand extends BaseSlashCommandInteraction { checkQueueCurrentTrack ]); - const backToTrackInput: number = interaction.options.getNumber('position')!; + const backToTrackInput: number = interaction.options.getInteger('position')!; if (backToTrackInput) { return await this.handleBackToTrackPosition(logger, interaction, history, backToTrackInput); diff --git a/src/interactions/commands/player/history.ts b/src/interactions/commands/player/history.ts index 9da40031..d049917d 100644 --- a/src/interactions/commands/player/history.ts +++ b/src/interactions/commands/player/history.ts @@ -182,7 +182,7 @@ class HistoryCommand extends BaseSlashCommandInteraction { } private getPageIndex(interaction: ChatInputCommandInteraction): number { - return (interaction.options.getNumber('page') || 1) - 1; + return (interaction.options.getInteger('page') || 1) - 1; } private getTotalPages(history: GuildQueueHistory): number { diff --git a/src/interactions/commands/player/loop.ts b/src/interactions/commands/player/loop.ts index 8c86b209..5ce0b140 100644 --- a/src/interactions/commands/player/loop.ts +++ b/src/interactions/commands/player/loop.ts @@ -44,7 +44,7 @@ class LoopCommand extends BaseSlashCommandInteraction { checkQueueExists ]); - const userInputRepeatMode: QueueRepeatMode = interaction.options.getNumber('mode')!; + const userInputRepeatMode: QueueRepeatMode = interaction.options.getInteger('mode')!; const currentRepeatMode: QueueRepeatMode = queue.repeatMode; if (!userInputRepeatMode && userInputRepeatMode !== 0) { diff --git a/src/interactions/commands/player/queue.ts b/src/interactions/commands/player/queue.ts index bd752ffa..97e8595c 100644 --- a/src/interactions/commands/player/queue.ts +++ b/src/interactions/commands/player/queue.ts @@ -173,7 +173,7 @@ class QueueCommand extends BaseSlashCommandInteraction { } private getPageIndex(interaction: ChatInputCommandInteraction): number { - return (interaction.options.getNumber('page') || 1) - 1; + return (interaction.options.getInteger('page') || 1) - 1; } private getTotalPages(queue: GuildQueue): number { diff --git a/src/interactions/commands/player/skip.ts b/src/interactions/commands/player/skip.ts index 978242a8..11adf5d1 100644 --- a/src/interactions/commands/player/skip.ts +++ b/src/interactions/commands/player/skip.ts @@ -30,7 +30,7 @@ class SkipCommand extends BaseSlashCommandInteraction { checkQueueCurrentTrack ]); - const trackPositionInput: number = interaction.options.getNumber('position')!; + const trackPositionInput: number = interaction.options.getInteger('position')!; if (trackPositionInput) { return await this.handleSkipToTrackPosition(logger, interaction, queue, trackPositionInput); diff --git a/src/interactions/commands/player/volume.ts b/src/interactions/commands/player/volume.ts index c87ebeca..e1df671e 100644 --- a/src/interactions/commands/player/volume.ts +++ b/src/interactions/commands/player/volume.ts @@ -33,7 +33,7 @@ class VolumeCommand extends BaseSlashCommandInteraction { checkQueueExists ]); - const volume: number = interaction.options.getNumber('percentage')!; + const volume: number = interaction.options.getInteger('percentage')!; if (!volume && volume !== 0) { return await this.handleShowCurrentVolume(queue, logger, interaction); diff --git a/src/interactions/commands/system/shards.ts b/src/interactions/commands/system/shards.ts index 642118d4..5bbd180d 100644 --- a/src/interactions/commands/system/shards.ts +++ b/src/interactions/commands/system/shards.ts @@ -189,7 +189,7 @@ class ShardsCommand extends BaseSlashCommandInteraction { } private getPageIndex(interaction: ChatInputCommandInteraction): number { - return (interaction.options.getNumber('page') || 1) - 1; + return (interaction.options.getInteger('page') || 1) - 1; } private getTotalPages(shardCount: number): number {