Change thing to use channel ID mayhaps?
This commit is contained in:
parent
276d2dc74f
commit
ad246f5ff0
|
@ -9,9 +9,7 @@ exports.enter = function(msg, channelName) {
|
|||
channelName = channelName.toLowerCase();
|
||||
|
||||
//filter out all channels that aren't voice or stage
|
||||
const voiceChannel = msg.guild.channels.cache
|
||||
.filter(c => c.type === "voice" || c.type === "stage")
|
||||
.find(channel => channel.name.toLowerCase() === channelName);
|
||||
const voiceChannel = msg.guild.channels.cache.get(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'))
|
||||
|
|
Loading…
Reference in a new issue