mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 05:10:17 +00:00
Update seek.js
This commit is contained in:
parent
4e271b107e
commit
208b535da0
@ -7,6 +7,7 @@ module.exports = {
|
||||
permission: "MANAGE_MESSAGES",
|
||||
category: "music control",
|
||||
async execute(msg, args, client, Discord, command) {
|
||||
console.log("seek")
|
||||
const queue = client.queue.get(msg.guild.id);
|
||||
if (client.funcs.check(client, msg, command)) {
|
||||
if (queue.nightCore)
|
||||
@ -18,7 +19,7 @@ module.exports = {
|
||||
}seek ${command.usage}\``
|
||||
);
|
||||
const pos = parseInt(args[1]);
|
||||
if (isNaN(pos)) {
|
||||
if (isNaN(pos)) return msg.channel.send(client.messages.validNumber);
|
||||
if (pos < 0)
|
||||
return msg.channel.send(client.messages.seekingPointPositive);
|
||||
const totalLength = parseInt(queue.songs[0].info.lengthSeconds);
|
||||
@ -30,7 +31,7 @@ module.exports = {
|
||||
);
|
||||
return msg.channel.send(message);
|
||||
}
|
||||
}
|
||||
|
||||
client.funcs.end(client, msg, pos, command);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user