chore: merge dev to main #177

Merged
Anri merged 6 commits from dev into main 2024-09-23 17:51:22 +02:00
3 changed files with 53 additions and 9 deletions
Showing only changes of commit 788e83cd3d - Show all commits

View file

@ -27,6 +27,14 @@ export default {
.setNameLocalizations(getLocalizations(client, `c_${filename}_name`, true))
.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
.addStringOption((option) =>
option
@ -35,6 +43,26 @@ export default {
.setNameLocalizations(getLocalizations(client, `c_${filename}_opt1_name`, true))
.setDescriptionLocalizations(getLocalizations(client, `c_${filename}_opt1_desc`))
.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 {
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);
}
title = track.title;
}

View file

@ -81,6 +81,10 @@
"c_play_name": "play",
"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_desc": "What you want to listen to",
"c_play1": "You're not on any vocal channels.",

View file

@ -81,6 +81,10 @@
"c_play_name": "play",
"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_desc": "Ce que vous voulez écouter",
"c_play1": "Tu n'es dans aucun salon vocal.",