How can I pull up the person's status?

I'm trying member.presence it's giving null
23 Replies
d.js toolkit
d.js toolkit7mo ago
- 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 staff
monbrey
monbrey7mo ago
Do you have the guild presences intent?
Joãozinho
Joãozinho7mo ago
yes
Joãozinho
Joãozinho7mo ago
No description
Joãozinho
Joãozinho7mo ago
@ʎǝɹquoɯ
monbrey
monbrey7mo ago
Would rather you didn't ping me
monbrey
monbrey7mo ago
Whatever member you checked just isn't present right now it would seem. null is valid, if theyre offline or similar
Joãozinho
Joãozinho7mo ago
No description
Joãozinho
Joãozinho7mo ago
I wanted to pull this from his personalized status
monbrey
monbrey7mo ago
I dont need to see the member object, I need to know where you're getting it from
Joãozinho
Joãozinho7mo ago
guildMemberAdd
monbrey
monbrey7mo ago
So they're joining the guild? I actually would have thought that would include a presence Thonk
Joãozinho
Joãozinho7mo ago
I want to pull his status
Joãozinho
Joãozinho7mo ago
No description
Joãozinho
Joãozinho7mo ago
How can I do it?
monbrey
monbrey7mo ago
Well you need his presence first
Joãozinho
Joãozinho7mo ago
I want to pull this status when the person joins the guild Can you send me the documentation where I can get this or a code example
monbrey
monbrey7mo ago
You can try force-fetching the guild member, not sure if that will grab it, or wait for a presenceUpdate event
d.js docs
d.js docs7mo ago
method GuildMember#fetch() Fetches this event (event) Client#presenceUpdate Emitted whenever a guild member's presence (e.g. status, activity) is changed.
Joãozinho
Joãozinho7mo ago
No description
Joãozinho
Joãozinho7mo ago
member22.presence gives null
duck
duck7mo ago
that isn't force fetching the member normally you'd want to specify force: true in the fetch options to force fetch a single member (specifying the member to fetch with the user option instead of as its own param), but in this case you'd specifically want to use withPresences: true which requests members over the gateway (rather than via REST) requesting members over the gateway does not check the cache first anyways
Want results from more Discord servers?
Add your server
More Posts