cache members

let getguild = await client.guilds.fetch("ID")
let getmembers = await c.members.fetch()
let getguild = await client.guilds.fetch("ID")
let getmembers = await c.members.fetch()
once i got all members fetch, how can i loop thorugh each one? is it through .cache.get?
5 Replies
chewie 🌈
chewie 🌈•2y ago
getmembers is a collection so either forEach or a normal for loop
Mulo
Mulo•2y ago
so i need to get specific users from a separate list i have. So you are saying normal for loop through getmembers tho in other occasions i just used member.cache.get("ID") Is it possible to do that instead of looping though getmembers?
chewie 🌈
chewie 🌈•2y ago
yes member.cache would be a collection as well .get is a method of collection
Mulo
Mulo•2y ago
is it getmembers.cache.get("ID")?
chewie 🌈
chewie 🌈•2y ago
no, again, getmembers is a collection .get is a method of collection what do we get from that? getmembers.get()