Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on('voiceStateUpdate', (oldMember, newMember) => {
- // 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.
- // If the user left the voice channel, we are just going to ignore it
- if (!newMember.voiceChannel) return
- // Create the new voice channel
- newMember.guild.createChannel('name', { type: 'voice' })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement