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