UNPKG

naar-music-bot

Version:

Simple JavaScript Music Discord Bot Powerd By: NAAR Studio.

36 lines (35 loc) 1.46 kB
const { MessageEmbed } = require("discord.js"); module.exports = { name: "skip", aliases: ["s"], cooldown: 5, description: `Skip song for you!.`, run: async(client, message, args) => { if (client.skip_command == true) { if (!message.guild) return; message.react("✅").catch(err => { throw new TypeError(err) }); const queue = message.client.queue.get(message.guild.id); if (!queue) return message.channel.send( new MessageEmbed() .setTitle("Thare is nothing in the music queue!") .setColor("RED")).catch(err => { throw new TypeError(err) }); queue.playing = true; queue.connection.dispatcher.end(); queue.textChannel.send( new MessageEmbed().setColor("#c219d8").setAuthor(`**${message.author.username}** skipped the song.`) ).catch(err => { throw new TypeError(err) }); } else if (client.help_command == false) { message.channel.send( new MessageEmbed() .setTitle(`\`${module.exports.name}\` Has Been Disabled From The Music System`) ) } else throw new TypeError(`❌ | "${module.exports.name}_command" value must be true or false`) } };