aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/favorites.ts6
-rw-r--r--src/commands/play.ts6
-rw-r--r--src/commands/skip.ts2
3 files changed, 11 insertions, 3 deletions
diff --git a/src/commands/favorites.ts b/src/commands/favorites.ts
index 4dbf943..31b1f79 100644
--- a/src/commands/favorites.ts
+++ b/src/commands/favorites.ts
@@ -24,7 +24,10 @@ export default class implements Command {
.setDescription('add track to the front of the queue'))
.addBooleanOption(option => option
.setName('shuffle')
- .setDescription('shuffle the input if you\'re adding multiple tracks')))
+ .setDescription('shuffle the input if you\'re adding multiple tracks'))
+ .addBooleanOption(option => option
+ .setName('split')
+ .setDescription('if a track has chapters, split it')))
.addSubcommand(subcommand => subcommand
.setName('list')
.setDescription('list all favorites'))
@@ -116,6 +119,7 @@ export default class implements Command {
query: favorite.query,
shuffleAdditions: interaction.options.getBoolean('shuffle') ?? false,
addToFrontOfQueue: interaction.options.getBoolean('immediate') ?? false,
+ shouldSplitChapters: interaction.options.getBoolean('split') ?? false,
});
}
diff --git a/src/commands/play.ts b/src/commands/play.ts
index a1dd84b..ca23d61 100644
--- a/src/commands/play.ts
+++ b/src/commands/play.ts
@@ -26,7 +26,10 @@ export default class implements Command {
.setDescription('add track to the front of the queue'))
.addBooleanOption(option => option
.setName('shuffle')
- .setDescription('shuffle the input if you\'re adding multiple tracks'));
+ .setDescription('shuffle the input if you\'re adding multiple tracks'))
+ .addBooleanOption(option => option
+ .setName('split')
+ .setDescription('if a track has chapters, split it'));
public requiresVC = true;
@@ -49,6 +52,7 @@ export default class implements Command {
query: query.trim(),
addToFrontOfQueue: interaction.options.getBoolean('immediate') ?? false,
shuffleAdditions: interaction.options.getBoolean('shuffle') ?? false,
+ shouldSplitChapters: interaction.options.getBoolean('split') ?? false,
});
}
diff --git a/src/commands/skip.ts b/src/commands/skip.ts
index a580775..eb2746a 100644
--- a/src/commands/skip.ts
+++ b/src/commands/skip.ts
@@ -25,7 +25,7 @@ export default class implements Command {
}
public async execute(interaction: CommandInteraction): Promise<void> {
- const numToSkip = interaction.options.getInteger('skip') ?? 1;
+ const numToSkip = interaction.options.getInteger('number') ?? 1;
if (numToSkip < 1) {
throw new Error('invalid number of songs to skip');