I want to get the status of a member not the actual presence what am i doing wrong?
Error:
Uncaught Exception:
Error:
TypeError: Cannot read properties of null (reading 'presence')
Stack Trace
TypeError: Cannot read properties of null (reading 'presence')
at module.exports (/home/container/src/events/presenceUpdate/vanity.js:11:35)
at CommandHandler.<anonymous> (/home/container/node_modules/djs-commander/dist/index.js:314:38)
at Generator.next (<anonymous>)
at /home/container/node_modules/djs-commander/dist/index.js:68:61
at new Promise (<anonymous>)
at __async (/home/container/node_modules/djs-commander/dist/index.js:52:10)
at Client.<anonymous> (/home/container/node_modules/djs-commander/dist/index.js:311:46)
at Client.emit (node:events:519:28)
at PresenceUpdateAction.handle (/home/container/node_modules/discord.js/src/client/actions/PresenceUpdate.js:40:19)
at module.exports [as PRESENCE_UPDATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js:4:33)
3 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 OP:event: (event) Client#presenceUpdate
[email protected]
Emitted whenever a guild member's presence (e.g. status, activity) is changed.Thank you