music.queue: fix timestamps
This commit is contained in:
parent
d033366c6c
commit
a377ee2020
1 changed files with 3 additions and 2 deletions
|
@ -607,7 +607,8 @@ command.callback = async function (msg, line) {
|
||||||
const nowPlaying = connection._music_nowplaying;
|
const nowPlaying = connection._music_nowplaying;
|
||||||
|
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
let nextTrack = now + (nowPlaying.length - (now - nowPlaying.start));
|
let nextTrack =
|
||||||
|
now + (nowPlaying.length / 1000 - (now - nowPlaying.start));
|
||||||
const fields = [];
|
const fields = [];
|
||||||
for (const index in queue.slice(0, 8)) {
|
for (const index in queue.slice(0, 8)) {
|
||||||
const item = queue[index];
|
const item = queue[index];
|
||||||
|
@ -618,7 +619,7 @@ command.callback = async function (msg, line) {
|
||||||
}>\n<t:${nextTrack}:R>`,
|
}>\n<t:${nextTrack}:R>`,
|
||||||
inline: true,
|
inline: true,
|
||||||
});
|
});
|
||||||
nextTrack += item.length;
|
nextTrack += item.length / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue