diff --git a/src/commands/music/play.ts b/src/commands/music/play.ts index 29ea8e3..88fe6e0 100644 --- a/src/commands/music/play.ts +++ b/src/commands/music/play.ts @@ -63,8 +63,28 @@ export default { }); } - const query = - interaction.options.getString(loc_default?.get(`c_${filename}_opt1_name`) as string) ?? ""; + const query = interaction.options.getString( + loc_default?.get(`c_${filename}_opt1_name`) as string + ); + + if (!query) { + // Now playing + + const queue = client.player.queues.get(interaction.guildId ?? ""); + + if (queue) { + const track = queue.current; + if (track) { + // TODO: Pretty embed + return await interaction.reply( + `${loc.get("c_play_7")} \`${track.title}\` - *${track.author}*` + ); + } + } + + // TODO: Pretty embed + return await interaction.reply(loc.get("c_play_6")); + } const queue = client.player.createQueue(interaction.guild as GuildResolvable, { metadata: { @@ -91,6 +111,7 @@ export default { .then((x) => x); if (!result.tracks[0]) { + // TODO: Pretty embed return await interaction.followUp({ content: `❌ | \`${query}\` ${loc.get("c_play4")}.` }); } @@ -110,6 +131,7 @@ export default { queue.play(); } + // TODO: Pretty embed return await interaction.followUp({ content: `⏱️ | \`${title}\` ${loc.get("c_play5")}.`, }); diff --git a/src/locales/fr.json b/src/locales/fr.json index b127721..23d7570 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -79,7 +79,7 @@ "c_reminder18": "Pas de message", "c_play_name": "play", - "c_play_desc": "Joue une chanson/playlist", + "c_play_desc": "Joue une chanson/playlist, pas de requête affiche la chanson en cours actuellement", "c_play_opt1_name": "requête", "c_play_opt1_desc": "Ce que vous voulez écouter", "c_play1": "Tu n'es dans aucun salon vocal.", @@ -87,6 +87,8 @@ "c_play3": "Impossible de rejoindre le salon vocal.", "c_play4": "introuvable", "c_play5": "ajouté à la file d'attente", + "c_play_6": "Le bot ne joue rien en ce moment.", + "c_play_7": "Joue actuellement", "c_stop_name": "stop", "c_stop_desc": "Stop la musique", "c_stop1": "Le bot ne joue pas de musique.",