Client as GuildMember
Hello, this has probably been asked a million times, and I'm sorry for probably re-opening a topic.
I tried my best to use Google but didn't find the best way.
I want to fetch the client for a given guild (from a message object) as the GuildMember.
What is the best way?
Is it
guild.members.fetchMe
?10 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPor
but this may not return anything
so you might as well jsut use this
Aha, and how can I access this GuildMemberManager?
<Guild>.members
Ah, so the .members is an Instace of that.
Cool.
So I can use
message.guild.members.fetchMe()
Thanks a bunch!yes
keep in mind that it's a promise
Yup, I saw works great