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:
12
src/funcs/end.js
Normal file
12
src/funcs/end.js
Normal 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);
|
||||
};
|
Reference in New Issue
Block a user