music.queue: add total length
This commit is contained in:
parent
10f1a178bc
commit
3897182797
1 changed files with 8 additions and 1 deletions
|
@ -652,13 +652,20 @@ command.callback = async function (msg, line) {
|
|||
nextTrack += item.length;
|
||||
}
|
||||
|
||||
let totalLength = 0;
|
||||
for (const item of queue) {
|
||||
totalLength += item.length;
|
||||
}
|
||||
|
||||
return {
|
||||
embed: {
|
||||
title: ":inbox_tray: Currently Queued",
|
||||
color: 0x0088cc,
|
||||
fields,
|
||||
footer: {
|
||||
text: queue.length > 9 ? `Showing 9/${queue.length} items` : "",
|
||||
text:
|
||||
(queue.length > 9 ? `Showing 9/${queue.length} items | ` : "") +
|
||||
`Total length: ${formatTime(totalLength)}`,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue