Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const commando = require('discord.js-commando');
- class JoinChannelCommand extends commando.Command
- {
- constructor(client)
- {
- super(client,{
- name: 'join',
- group: 'General',
- memberName: 'join',
- description: 'joins the voice channel of the commander'
- });
- }
- async run(message, args)
- {
- if(message.member.voiceChannel)
- {
- if(!message.guild.voiceConnectionLive)
- {
- message.member.voiceChannel.join()
- .then(connection =>{
- message.reply("Zzz");
- })
- }
- }
- else
- {
- message.reply("(You must be a channel to summon me)");
- }
- }
- }
- module.exports = JoinChannelCommand;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement