mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
test
This commit is contained in:
1 parent
549f808a22
commit
b031cbaeaf
2 files changed
+98
-30
No files matched your search
+8
-5
@@ -67,13 +67,16 @@ export async function run(message, data) {
|
||||
const { items, start } = p.queue.getPage(safePage, PAGE_SIZE);
|
||||
|
||||
items.forEach((vid, i) => {
|
||||
const index = String(start + i + 1).padStart(2, " ");
|
||||
const dur = vid.duration ? p.getDuration(vid.duration) : "?:??";
|
||||
const link = vid.spotifyUrl || vid.url || "";
|
||||
let title = vid.title;
|
||||
const index = String(start + i + 1).padStart(2, " ");
|
||||
const dur = vid.duration ? p.getDuration(vid.duration) : "?:??";
|
||||
const link = vid.spotifyUrl || vid.url || "";
|
||||
let title = vid.title;
|
||||
if (title.length > 45) title = title.slice(0, 42) + "...";
|
||||
title = link ? `[${title}](${link})` : title;
|
||||
desc += `\`${index}.\` ${title} • \`${dur}\`\n`;
|
||||
// Mark the very first item in the queue as "Up Next" — useful after
|
||||
// a bot recovery or shuffle so the next song's position is obvious.
|
||||
const upNext = (start + i === 0) ? " ▶" : "";
|
||||
desc += `\`${index}.\` ${title}${upNext} • \`${dur}\`\n`;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user