User.client.presence is null

HI! I want to detect if user is on discord mobile version or on desktop/ web one. In documentation I try to get it through such line in my commancbuilder interaction.user.client.presence.clientStatus But i can only see if user is online, rest is null. I looked up what only presence return and here is result
presence: ClientPresence {
userId: null,
guild: null,
status: 'online',
activities: [],
clientStatus: null
},
presence: ClientPresence {
userId: null,
guild: null,
status: 'online',
activities: [],
clientStatus: null
},
Can i fetch somehow clientstatus?
9 Replies
d.js toolkit
d.js toolkit13mo 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!
treble/luna
treble/luna13mo ago
do you have the GuildPresences intent
SzyMoon
SzyMoonOP13mo ago
Yup! Still nothing
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildPresences,
duck
duck13mo ago
just to clarify, are you looking for the clientStatus of your bot or the user who used this command?
SzyMoon
SzyMoonOP13mo ago
of the user who uses this command I want to know if user is on mobile version or desktop
duck
duck13mo ago
<User>.client is your Client instance, so <User>.client.presence is your bot's presence you'd be looking to access <Interaction>.member.presence
SzyMoon
SzyMoonOP13mo ago
That works! Thank you! I have got one question. Can i get clientStatus of user in DM or not? There is no GatewayIntentBit of DMPresences as far as i know in documentation
duck
duck13mo ago
there is no means of accessing presence through a User you would need a GuildMember
SzyMoon
SzyMoonOP13mo ago
That's so smart! Thank you so much! Case closed
Want results from more Discord servers?
Add your server