Hi i have error TypeError: Canot Read property
get of undefinded
My code with error:
let channel = client.channels.cache.get(CHANNEL) || await client.channels.fetch(CHANNEL)
if(!channel) return;
const connection = await channel.join()
connection.play(ytdl(LIVE))
}
}, 20000)
client.login(TOKEN);```
Someone help?
Your code is attempting to access the client.channels.cache prior to your having logged in.
Callum
3
This may not be true, we are not shown the entire function this code is inside of, it seems to be some setTimeout/Interval?
I can accept that… the cache property is likely null at that moment.
system
Closed
5
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.