fix: change addNumberOption to addIntegerOption

This commit is contained in:
Marius Begby committed 2023-12-13 02:16:50 +01:00
1 parent 47f45a559f
commit 6ca7ce3e4b
8 files changed
+11 -9

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ class BackCommand extends BaseSlashCommandInteraction {
const data = new SlashCommandBuilder()
.setName('back')
.setDescription('Go back to previous track or specified position in history.')
.addNumberOption((option) =>
.addIntegerOption((option) =>
option.setName('position').setDescription('The position in history to go back to.').setMinValue(1)
);
super(data);
+1 -1
View File
@@ -22,7 +22,7 @@ class HistoryCommand extends BaseSlashCommandInteraction {
const data = new SlashCommandBuilder()
.setName('history')
.setDescription('Show history of tracks that have been played.')
.addNumberOption((option) =>
.addIntegerOption((option) =>
option.setName('page').setDescription('Page number to display for the history').setMinValue(1)
);
super(data);
+3 -3
View File
@@ -4,7 +4,7 @@ import {
EmbedBuilder,
Message,
SlashCommandBuilder,
SlashCommandNumberOption
SlashCommandIntegerOption
} from 'discord.js';
import { Logger } from 'pino';
import { BaseSlashCommandInteraction } from '../../../classes/interactions';
@@ -17,8 +17,8 @@ class LoopCommand extends BaseSlashCommandInteraction {
const data = new SlashCommandBuilder()
.setName('loop')
.setDescription('Toggle looping a track, the whole queue or autoplay.')
.addNumberOption(() =>
new SlashCommandNumberOption()
.addIntegerOption(() =>
new SlashCommandIntegerOption()
.setName('mode')
.setDescription('Loop mode: Track, queue, autoplay or disabled.')
.setRequired(false)
+1 -1
View File
@@ -23,7 +23,7 @@ class QueueCommand extends BaseSlashCommandInteraction {
const data = new SlashCommandBuilder()
.setName('queue')
.setDescription('Show tracks that have been added to the queue.')
.addNumberOption((option) =>
.addIntegerOption((option) =>
option.setName('page').setDescription('Page number to display for the queue').setMinValue(1)
);
super(data);
@@ -31,12 +31,14 @@ class RemoveCommand extends BaseSlashCommandInteraction {
option
.setName('start')
.setDescription('The starting position of the range to remove')
.setMinValue(1)
.setRequired(true)
)
.addIntegerOption((option) =>
option
.setName('end')
.setDescription('The ending position of the range to remove')
.setMinValue(1)
.setRequired(true)
)
)
+1 -1
View File
@@ -11,7 +11,7 @@ class SkipCommand extends BaseSlashCommandInteraction {
const data = new SlashCommandBuilder()
.setName('skip')
.setDescription('Skip track to next or specified position in queue.')
.addNumberOption((option) =>
.addIntegerOption((option) =>
option.setName('position').setDescription('The position in queue to skip to.').setMinValue(1)
);
super(data);
+1 -1
View File
@@ -11,7 +11,7 @@ class VolumeCommand extends BaseSlashCommandInteraction {
const data = new SlashCommandBuilder()
.setName('volume')
.setDescription('Show or change the playback volume for tracks.')
.addNumberOption((option) =>
.addIntegerOption((option) =>
option
.setName('percentage')
.setDescription('Volume percentage: From 1% to 100%.')
+1 -1
View File
@@ -31,7 +31,7 @@ class ShardsCommand extends BaseSlashCommandInteraction {
{ name: 'Members', value: 'members' }
)
)
.addNumberOption((option) =>
.addIntegerOption((option) =>
option.setName('page').setDescription('Page number to display for the shards').setMinValue(1)
);
const isSystemCommand: boolean = true;