Advertisement
HelloDearSir

Untitled

Jan 5th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. const Discord = require ("discord.js");
  2. const commando = require ('discord.js-commando');
  3.  
  4.  
  5. module.exports.run = async(client, message, args) =>{
  6. if(!message.member.voiceChannel) return message.channel.send("please connect to a voice channel");
  7.  
  8. if(!message.member.guild.me.voiceChannel) return message.channel.send("Sorry the bot isnt conntected to the voice chat");
  9.  
  10. if(message.guild.me.voiceChannelID !==message.member.voiceChannelID) return message.channel.send("Sorry you aint in the same channel");
  11.  
  12. message.guild.me.voiceChannel.leave();
  13.  
  14. message.channel.send("left");
  15. }
  16. module.exports.help = {
  17.  
  18. name:"stop"
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement