Discord Presence
Discord.js Version 14.14.1
NodeJS Version: 18.15.0
Been working on my logs for discord trying to get a presence log so when someone changes there custom status/online indicator it logs it in my logs channel, when when i inspect the guild/user object the presence isnt there its just
i have a presence set, i even tryed changing my custom status and clearing it, nothing seems to change it, i do have the intent for presence but still nothing
guildMemberUpdate Code: https://gist.github.com/SkullGaming31/cde25fbc5b8bc7d5b0e05a8c368770bd
Console.log for old and newMember: https://gist.github.com/SkullGaming31/16ee4796294ee1ee79a3e9064f5933adGist
guildMemberUpdate Code
guildMemberUpdate Code. GitHub Gist: instantly share code, notes, and snippets.
13 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 OPdo you have GuildPresences intent
can u show the client constructor
yes i do have it
not all properties are enumerable
consider logging
<GuildMember>.presence
directly, or if you're just trying to see what properties are available, consider reading the docsAlso
<GuildMember>.presense
is an object, so having that in your embed won't work as you expect it to.
If you're after the custom status of a member you need to look at <Presense>.activities
which is an array of activities.
A custom status has a type of 4
just finished writing as you sent this
Only issue here is
activities[0]
might not always be a custom status, could be one of the other types too. You would need to filter for that typeokay, atm i just wanna get it actually posting into discord then i will start refining it down
im not sure why it wont detect a custom status change, the old member and newmember both have the same state but i have changed it so it would trigger an update
I think you want the
presenceUpdate
eventwould the setting a presence trigger for the guildMemberUpdate? cause that doesnt get picked up either
I guess not, presenceUpdate will though
okay thank you, ill look into that now
that has more of what i want Thank You