diff --git a/bin/commands.js b/bin/commands.js index 6cc23ba..a392035 100644 --- a/bin/commands.js +++ b/bin/commands.js @@ -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'))