nyx/commands/Music/skip.js
2021-09-06 18:38:25 +08:00

18 lines
715 B
JavaScript

module.exports = {
name: "skip",
aliases: ["sk"],
description: "Skips the current playing music",
category: "Music",
run: async (client, message, args) => {
const player = message.client.manager.get(message.guild.id);
if (!player) return client.err(message, "Music", "skip", 34);
const { channel } = message.member.voice;
if (!channel) return client.err(message, "Music", "skip", 35);
if (channel.id !== player.voiceChannel)
return client.err(message, "Music", "skip", 55);
if (!player.queue.current) return client.err(message, "Music", "skip", 34);
const { title } = player.queue.current;
player.stop();
return message.reply(`**${title}** was skipped`);
},
};