music.queue: fix timestamps

This commit is contained in:
Cynthia Foxwell 2022-04-24 11:38:06 -06:00
parent d033366c6c
commit a377ee2020
1 changed files with 3 additions and 2 deletions

View File

@ -607,7 +607,8 @@ command.callback = async function (msg, line) {
const nowPlaying = connection._music_nowplaying;
const now = Date.now();
let nextTrack = now + (nowPlaying.length - (now - nowPlaying.start));
let nextTrack =
now + (nowPlaying.length / 1000 - (now - nowPlaying.start));
const fields = [];
for (const index in queue.slice(0, 8)) {
const item = queue[index];
@ -618,7 +619,7 @@ command.callback = async function (msg, line) {
}>\n<t:${nextTrack}:R>`,
inline: true,
});
nextTrack += item.length;
nextTrack += item.length / 1000;
}
return {