user presence

How can I get a user presence status with slash commands?
4 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
CanineData
CanineData3y ago
Iirc you need to force fetch the member with withPresences: true in the options
vlad vollar
vlad vollarOP3y 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
CanineData3y ago
Users don’t have presences, members do. Like I said you have to force fetch the member

Did you find this page helpful?