Change thing to use channel ID mayhaps?

This commit is contained in:
Christopher Cookman 2025-06-07 08:14:07 -06:00
parent 276d2dc74f
commit ad246f5ff0

View file

@ -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'))