music.queue: timestamps try 3
This commit is contained in:
parent
b20344e2a3
commit
a3f32a8954
1 changed files with 5 additions and 4 deletions
|
@ -607,8 +607,7 @@ command.callback = async function (msg, line) {
|
|||
const nowPlaying = connection._music_nowplaying;
|
||||
|
||||
const now = Date.now();
|
||||
let nextTrack =
|
||||
now + (Math.floor(nowPlaying.length / 1000) - (now - nowPlaying.start));
|
||||
let nextTrack = now + (nowPlaying.length - (now - nowPlaying.start));
|
||||
const fields = [];
|
||||
for (const index in queue.slice(0, 8)) {
|
||||
const item = queue[index];
|
||||
|
@ -616,10 +615,12 @@ command.callback = async function (msg, line) {
|
|||
name: item.title ?? item.url,
|
||||
value: `${item.title ? `[Link](${item.url}) - ` : ""}${formatTime(
|
||||
item.length
|
||||
)}\nAdded by: <@${item.addedBy}>\n<t:${nextTrack}:R>`,
|
||||
)}\nAdded by: <@${item.addedBy}>\n<t:${Math.floor(
|
||||
nextTrack / 1000
|
||||
)}:R>`,
|
||||
inline: true,
|
||||
});
|
||||
nextTrack += Math.floor(item.length / 1000);
|
||||
nextTrack += item.length;
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue