Fetching a Member by id.

Pretty simple, trying to figure out how to get a member in a specific guild by the member's id (member.id). Ideally, I would like to use fetch, the cache hasn't been super reliable for me.
12 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Tyranasaurus
TyranasaurusOP3y ago
How, exactly? I tried await client.guild.members.fetch(id); and it didn't work
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Tyranasaurus
TyranasaurusOP3y ago
oh wait duh
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Tyranasaurus
TyranasaurusOP3y ago
because bots have multiple guilds
d.js docs
d.js docs3y ago
Explaining <Class> and Class#method notation: learn more
Tyranasaurus
TyranasaurusOP3y ago
so could I do
client.guilds.fetch(guild_id).members.fetch(member_id)
client.guilds.fetch(guild_id).members.fetch(member_id)
?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Tyranasaurus
TyranasaurusOP3y ago
ah okay, thanks
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Tyranasaurus
TyranasaurusOP3y ago
Ah okay that's helpful to know Thank you!
Want results from more Discord servers?
Add your server