comments
This commit is contained in:
parent
509cadea67
commit
83a583557f
|
@ -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.`);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue