From acaab124500341a8274b6b3b2b76abac2ab1b878 Mon Sep 17 00:00:00 2001 From: Anri Kennel Date: Sat, 18 Mar 2023 19:50:08 +0100 Subject: [PATCH] Label of following songs showed only on second element of first page or first element of other pages (#89) Co-authored-by: Mylloon Reviewed-on: https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/pulls/89 --- src/utils/music.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/music.ts b/src/utils/music.ts index 4705253..db40104 100644 --- a/src/utils/music.ts +++ b/src/utils/music.ts @@ -26,7 +26,11 @@ export const embedListQueue = ( tracks.slice((page - 1) * limit_fields, page * limit_fields).forEach((t, idx) => { const now_playing = idx == 0 && page == 1; - const name = now_playing ? loc.get("c_queue10") : idx == 1 ? loc.get("c_queue11") : "\u200b"; + const name = now_playing + ? loc.get("c_queue10") + : (idx == 1 && page == 1) || (idx == 0 && page > 1) + ? loc.get("c_queue11") + : "\u200b"; const idx_track = now_playing ? "" : `${idx + limit_fields * (page - 1)}. `; embed.addFields({ name,