Add split command (#363)

Co-authored-by: Max Isom <hi@maxisom.me>
Co-authored-by: Max Isom <codetheweb@users.noreply.github.com>
This commit is contained in:
Hellyson Rodrigo Parteka 2022-03-09 23:47:52 -03:00 committed by GitHub
parent d438d46c09
commit 3dd1f21945
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 188 additions and 61 deletions

View file

@ -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,
});
}