Members not a valid property on channels.fetch?
I am trying to make my bot leave a voice channel when there are no more people in there, looking through the docs my code should be correct, but .members is returning undefined so I am not sure how to check how many people are left in the voice channel?

5 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes. Because .fetch() returns a Promise. And <Promise>.members isn't a thing. Btw you should have Guilds intent for dsicord.js and all channel should be cached so you don't need to fetch them.
Thanks, I have updated my code to this:

I can see the object fine in the console when I log it, but when I try to access channel.members it says it's null
Accomplished what I wanted to do with this:
