aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorHellyson Rodrigo Parteka <[email protected]>2022-03-09 23:47:52 -0300
committerGitHub <[email protected]>2022-03-09 20:47:52 -0600
commit3dd1f219457c56a3b182fa1919cf182ab780426c (patch)
tree7ab8bfdf96e94e66d8c556b196346e19ae210f33 /src/commands
parentd438d46c09c236b34d5cecf75662ae94e7eca9cf (diff)
downloadmuse-3dd1f219457c56a3b182fa1919cf182ab780426c.tar.xz
muse-3dd1f219457c56a3b182fa1919cf182ab780426c.zip
Add `split` command (#363)
Co-authored-by: Max Isom <[email protected]> Co-authored-by: Max Isom <[email protected]>
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');