Fix music queue numerotation (#86)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

Co-authored-by: Mylloon <kennel.anri@tutanota.com>
Reviewed-on: #86
This commit is contained in:
Mylloon 2023-03-18 19:27:18 +01:00
parent 087f68c239
commit f1d4abff23
Signed by: Forgejo
GPG key ID: E72245C752A07631

View file

@ -26,7 +26,7 @@ export const embedListQueue = (
tracks.slice((page - 1) * limit_fields, page * limit_fields).forEach((t, idx) => { tracks.slice((page - 1) * limit_fields, page * limit_fields).forEach((t, idx) => {
const name = idx == 0 ? loc.get("c_queue10") : idx == 1 ? loc.get("c_queue11") : "\u200b"; const name = idx == 0 ? loc.get("c_queue10") : idx == 1 ? loc.get("c_queue11") : "\u200b";
const idx_track = idx == 0 ? "" : `${idx * page}. `; const idx_track = idx == 0 ? "" : `${idx + limit_fields * page}. `;
embed.addFields({ embed.addFields({
name, name,
value: `${idx_track}[${t.title}${t.author}](${t.url}) (${t.duration})`, value: `${idx_track}[${t.title}${t.author}](${t.url}) (${t.duration})`,