user presence

How can I get a user presence status with slash commands?
4 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
CanineData
CanineData2y ago
Iirc you need to force fetch the member with withPresences: true in the options
vlad vollar
vlad vollarOP2y ago
If I use
const user = interaction.options.getUser('target') || interaction.user;
console.log(interaction.user.presence)
const user = interaction.options.getUser('target') || interaction.user;
console.log(interaction.user.presence)
I am getting undefined If I use
const member = interaction.options.getUser('target') || interaction.user;
console.log(interaction.member.presence)
const member = interaction.options.getUser('target') || interaction.user;
console.log(interaction.member.presence)
I am getting null
CanineData
CanineData2y ago
Users don’t have presences, members do. Like I said you have to force fetch the member
Want results from more Discord servers?
Add your server