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