This commit is contained in:
Alex 2021-05-03 02:21:14 -07:00
parent 509cadea67
commit 83a583557f

View file

@ -12,6 +12,7 @@ exports.enter = function(msg, channelName) {
}) })
const voiceChannel = msg.guild.channels.cache.find(channel => channel.name.toLowerCase() === channelName); const voiceChannel = msg.guild.channels.cache.find(channel => channel.name.toLowerCase() === channelName);
//if there is no voice channel at all or the channel is not voice or stage
if (!voiceChannel || (voiceChannel.type !== 'voice' && voiceChannel.type !== 'stage')) if (!voiceChannel || (voiceChannel.type !== 'voice' && voiceChannel.type !== 'stage'))
return msg.reply(`The channel #${channelName} doesn't exist or isn't a voice channel.`); return msg.reply(`The channel #${channelName} doesn't exist or isn't a voice channel.`);