2020-01-25 10:02:43 +00:00
|
|
|
const Discord = require("discord.js");
|
|
|
|
|
|
|
|
exports.run = async (client, message) => {
|
|
|
|
let guild = client.music.getGuild(message.guild.id);
|
|
|
|
|
|
|
|
if(guild.queue.length < 1 || !guild.playing || !guild.dispatcher) return message.channel.send("<:error:466995152976871434> Nothing is playing.");
|
2020-03-09 01:11:33 +00:00
|
|
|
if(!message.member.voice.channel) return message.channel.send('<:error:466995152976871434> You need to be in voice channel to use this command!');
|
2020-01-25 10:02:43 +00:00
|
|
|
|
|
|
|
guild.playing = false;
|
|
|
|
guild.paused = false;
|
|
|
|
guild.queue = [];
|
|
|
|
|
|
|
|
guild.dispatcher.end("silent");
|
|
|
|
|
|
|
|
message.channel.send("<:stop:467639381390262284> Playback stopped!");
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.conf = {
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: true,
|
|
|
|
aliases: [],
|
|
|
|
permLevel: "Moderator",
|
|
|
|
requiredPerms: []
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.help = {
|
|
|
|
name: "stop",
|
|
|
|
category: "Music",
|
|
|
|
description: "Clears the queue and disconnects from the voice channel. (run this if music stopS working)",
|
|
|
|
usage: "stop"
|
|
|
|
};
|
|
|
|
|