1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-07-07 04:20:49 +00:00

Fix code to work on this decade 1/x

This commit is contained in:
Christer Warén
2024-02-10 09:33:59 +02:00
parent 99ecd9787d
commit 86b4676159
61 changed files with 3842 additions and 471 deletions

12
src/funcs/end.js Normal file
View File

@ -0,0 +1,12 @@
module.exports = async function (client, msg, pos, command) {
const seek = parseInt(pos);
const queue = client.queue.get(msg.guild.id);
if (command.name === "seek") {
queue.time = seek * 1000;
} else {
queue.time = queue.connection.dispatcher.streamTime + queue.time;
}
queue.connection.dispatcher.end();
queue.endReason = "seek";
client.funcs.play(msg.guild, queue.songs[0], client, seek, false);
};