eximiabots-radiox/commands/stop.js
2020-04-04 07:32:25 +03:00

17 lines
448 B
JavaScript

module.exports = {
name: 'stop',
description: 'Stop command.',
alias: 's',
usage: '',
permission: 'none',
category: 'music',
execute(msg, args, client, Discord, prefix, command) {
const radio = client.radio.get(msg.guild.id);
if (client.funcs.check(client, msg, command)) {
radio.connection.dispatcher.destroy();
radio.voiceChannel.leave();
client.radio.delete(msg.guild.id);
msg.channel.send(client.messages.stop);
}
}
};