mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 02:00:20 +00:00
Update seek.js
This commit is contained in:
parent
860d68162d
commit
5eb85500ed
@ -7,12 +7,10 @@ module.exports = {
|
||||
permission: "MANAGE_MESSAGES",
|
||||
category: "music",
|
||||
async execute(msg, args, client, Discord, command) {
|
||||
const ytdl = require("ytdl-core");
|
||||
const queue = client.queue.get(msg.guild.id);
|
||||
if (client.funcs.check(client, msg, command)) {
|
||||
if (queue.nigthCore)
|
||||
return msg.channel.send(client.messages.disableNigthCore);
|
||||
let data = await Promise.resolve(ytdl.getInfo(queue.songs[0].url));
|
||||
if (!args[1])
|
||||
return msg.channel.send(
|
||||
`${client.messages.correctUsage}\`${
|
||||
@ -26,9 +24,9 @@ module.exports = {
|
||||
let message;
|
||||
message = client.messages.seekMax.replace(
|
||||
"%LENGTH%",
|
||||
data.videoDetails.lengthSeconds
|
||||
queue.songs[0].info.lengthSeconds
|
||||
);
|
||||
if (pos > data.videoDetais.lengthSeconds) return msg.channel.send(message);
|
||||
if (pos > queue.songs[0].info.lengthSeconds) return msg.channel.send(message);
|
||||
}
|
||||
client.funcs.end(client, msg, pos, command);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user