


If(!permissions.has('SPEAK')) return ('You are missing the required permissions') If(!permissions.has('CONNECT')) return ('You are missing the required permissions') If(!voiceChannel) return ('You need to get in a Voice channel first') Ĭonst permissions = voiceChannel.permissionsFor() The code I have right now is as follows: const ytdl = require('ytdl-core') ĭescription: 'Joins a Voice channel and plays media from YouTube', Then, it started giving an error stating that joinChannel() is not a function, and now it's all the way back to square one (not joining the VC) despite the overall code having barely any changes. Today, it wasn't recognising that part of the code at all, only going to stating the missing permissions or prompting the user to enter a song (and would do nothing if they do so). Since yesterday, it only went up to the message to be printed when the user isn't in a voice channel (even if they are). I was trying a tutorial yesterday to make a personal music bot but the code to make the bot join a channel that the user is in upon using the "play" command isn't working.
