Option to add a music now
All checks were successful
Lint and Format Check / lint-and-format (pull_request) Successful in 25s
All checks were successful
Lint and Format Check / lint-and-format (pull_request) Successful in 25s
This commit is contained in:
parent
7e65220467
commit
788e83cd3d
3 changed files with 53 additions and 9 deletions
|
@ -27,6 +27,14 @@ export default {
|
||||||
.setNameLocalizations(getLocalizations(client, `c_${filename}_name`, true))
|
.setNameLocalizations(getLocalizations(client, `c_${filename}_name`, true))
|
||||||
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_desc`))
|
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_desc`))
|
||||||
|
|
||||||
|
// Normal
|
||||||
|
.addSubcommand((subcommand) =>
|
||||||
|
subcommand
|
||||||
|
.setName(loc_default.get(`c_${filename}_sub1_name`)!.toLowerCase())
|
||||||
|
.setDescription(loc_default.get(`c_${filename}_sub1_desc`)!)
|
||||||
|
.setNameLocalizations(getLocalizations(client, `c_${filename}_sub1_name`, true))
|
||||||
|
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_sub1_desc`))
|
||||||
|
|
||||||
// Command option
|
// Command option
|
||||||
.addStringOption((option) =>
|
.addStringOption((option) =>
|
||||||
option
|
option
|
||||||
|
@ -35,6 +43,26 @@ export default {
|
||||||
.setNameLocalizations(getLocalizations(client, `c_${filename}_opt1_name`, true))
|
.setNameLocalizations(getLocalizations(client, `c_${filename}_opt1_name`, true))
|
||||||
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_opt1_desc`))
|
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_opt1_desc`))
|
||||||
.setAutocomplete(true),
|
.setAutocomplete(true),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
// Play now
|
||||||
|
.addSubcommand((subcommand) =>
|
||||||
|
subcommand
|
||||||
|
.setName(loc_default.get(`c_${filename}_sub2_name`)!.toLowerCase())
|
||||||
|
.setDescription(loc_default.get(`c_${filename}_sub2_desc`)!)
|
||||||
|
.setNameLocalizations(getLocalizations(client, `c_${filename}_sub2_name`, true))
|
||||||
|
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_sub2_desc`))
|
||||||
|
|
||||||
|
// Command option
|
||||||
|
.addStringOption((option) =>
|
||||||
|
option
|
||||||
|
.setName(loc_default.get(`c_${filename}_opt1_name`)!.toLowerCase())
|
||||||
|
.setDescription(loc_default.get(`c_${filename}_opt1_desc`)!)
|
||||||
|
.setNameLocalizations(getLocalizations(client, `c_${filename}_opt1_name`, true))
|
||||||
|
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_opt1_desc`))
|
||||||
|
.setAutocomplete(true),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -133,7 +161,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
const track = result.tracks[0];
|
const track = result.tracks[0];
|
||||||
|
|
||||||
|
if (
|
||||||
|
interaction.options.getSubcommand() ===
|
||||||
|
loc_default?.get(`c_${filename}_sub2_name`)?.toLowerCase()
|
||||||
|
) {
|
||||||
|
queue.insertTrack(track, 0);
|
||||||
|
} else {
|
||||||
queue.addTrack(track);
|
queue.addTrack(track);
|
||||||
|
}
|
||||||
|
|
||||||
title = track.title;
|
title = track.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,10 @@
|
||||||
|
|
||||||
"c_play_name": "play",
|
"c_play_name": "play",
|
||||||
"c_play_desc": "Plays a song/playlist, no query displays the now playing song",
|
"c_play_desc": "Plays a song/playlist, no query displays the now playing song",
|
||||||
|
"c_play_sub1_name": "add",
|
||||||
|
"c_play_sub1_desc": "Adds song/playlist to the queue",
|
||||||
|
"c_play_sub2_name": "now",
|
||||||
|
"c_play_sub2_desc": "Adds the song/playlist to the beginning of the queue",
|
||||||
"c_play_opt1_name": "query",
|
"c_play_opt1_name": "query",
|
||||||
"c_play_opt1_desc": "What you want to listen to",
|
"c_play_opt1_desc": "What you want to listen to",
|
||||||
"c_play1": "You're not on any vocal channels.",
|
"c_play1": "You're not on any vocal channels.",
|
||||||
|
|
|
@ -81,6 +81,10 @@
|
||||||
|
|
||||||
"c_play_name": "play",
|
"c_play_name": "play",
|
||||||
"c_play_desc": "Joue une chanson/playlist, pas de requête affiche la chanson en cours actuellement",
|
"c_play_desc": "Joue une chanson/playlist, pas de requête affiche la chanson en cours actuellement",
|
||||||
|
"c_play_sub1_name": "ajouter",
|
||||||
|
"c_play_sub1_desc": "Ajoute la chanson/playlist à la file d'attente",
|
||||||
|
"c_play_sub2_name": "maintenant",
|
||||||
|
"c_play_sub2_desc": "Ajoute la chanson/playlist au début de la file",
|
||||||
"c_play_opt1_name": "requête",
|
"c_play_opt1_name": "requête",
|
||||||
"c_play_opt1_desc": "Ce que vous voulez écouter",
|
"c_play_opt1_desc": "Ce que vous voulez écouter",
|
||||||
"c_play1": "Tu n'es dans aucun salon vocal.",
|
"c_play1": "Tu n'es dans aucun salon vocal.",
|
||||||
|
|
Loading…
Reference in a new issue