Closed TheQazwsx closed 3 years ago
channel names require either caching channels or fetching them.
to cache all channels, set cacheChannels:true
in your client options.
to fetch the channel only when you need it, use let channel = await client.channels.fetch(message.channel.id)
if you want to keep it in the cache afterwards, or let channel = await client.channels.fetch(message.channel.id, false)
if you want to fetch it without caching.
I'm trying to check if a channel name is what I want, but.channel.name doesn't return a name, just undefined