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?
tleylan
#2
Your code is attempting to access the client.channels.cache prior to your having logged in.
This may not be true, we are not shown the entire function this code is inside of, it seems to be some setTimeout/Interval?
tleylan
#4
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.