Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. exports.run = async (client, message) => {
  2. const voiceChannel = message.member.voiceChannel;
  3. if (!message.member.voiceChannel) { return message.channel.send("You are not in a voice channel, baka! Don't force me to be lonely!"); }
  4.  
  5. const permissions = message.member.voiceChannel.permissionsFor(message.guild.me);
  6. if (permissions.has("CONNECT") === false) { return message.channel.send(":x: I do not have enough permissions to connect to your voice channel. I am missing the Connect permission."); }
  7. if (permissions.has("SPEAK") === false) { return message.channel.send("Wow. Invite me to play music for you, yet I can't speak in the channel. You're more heartless than my owner. Give me the channel permission to speak and then come back and invite me."); }
  8.  
  9. message.member.voiceChannel.join();
  10. return message.channel.send(`Now tuned into: ${message.member.voiceChannel}. Ready and awaiting orders!`);
  11. };
  12.  
  13. exports.conf = {
  14. enabled: true,
  15. runIn: ["text"],
  16. aliases: [],
  17. permLevel: 0,
  18. botPerms: [],
  19. requiredFuncs: [],
  20. };
  21.  
  22. module.exports.help = {
  23. name: "join",
  24. description: "Joins the VC that you are in.",
  25. usage: ""
  26. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement