added commando

This commit is contained in:
Hazem Krimi
2020-05-01 02:08:33 +01:00
parent 3acb006f43
commit 1e2c6e2a8b
9 changed files with 213 additions and 57 deletions
+23
View File
@@ -0,0 +1,23 @@
const { Command } = require('discord.js-commando');
module.exports = class Play extends Command {
constructor(client) {
super(client, {
name: 'stop',
memberName: 'stop',
group: 'music',
description: 'stops the player and leaves the channel',
guildOnly: true
});
}
async run(message) {
if (!message.member.voice.channel) return message.reply('you need to join a channel!');
const voiceChannel = message.member.voice.channel;
voiceChannel.leave();
return message.say('stopped!');
}
}