Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. client.on('voiceStateUpdate', (oldMember, newMember) => {
  2. // As this command applies for both joining and leaving a voice channel, we have to filter out only join events. If newMember has the voiceChannel property, it means that it is a join event.
  3. // If the user left the voice channel, we are just going to ignore it
  4. if (!newMember.voiceChannel) return
  5. // Create the new voice channel
  6. newMember.guild.createChannel('name', { type: 'voice' })
  7. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement