Activity Filtering

If I wanted to filters those discord activities, like the games you can play, would I need to filter via activity type or something else? Because things such as applications that show up on users statuses e.g. Vs code, roblox, and other games are the same activity type as the activities you can play on discord. Current Code:
botClient.on('presenceUpdate', (oldPresence, newPresence) => {
console.log(newPresence)
});
botClient.on('presenceUpdate', (oldPresence, newPresence) => {
console.log(newPresence)
});
Djs version: "discord.js": "^14.11.0",
10 Replies
d.js toolkit
d.js toolkit12mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
victorr
victorr12mo ago
Yep that is what I meant: https://discord-api-types.dev/api/discord-api-types-v10/enum/ActivityType#Playing The name method would work but it seems a little underhanded, is there not anything else that differentiates between discord activities and any other activities?
discord-api-types documentation
discord-api-types - Imagine typings
discord-api-types is a simple Node/Deno module that brings up to date typings for Discord's API
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
victorr
victorr12mo ago
Yep
victorr
victorr12mo ago
victorr
victorr12mo ago
These
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs12mo ago
property Activity#flags Flags that describe the activity
victorr
victorr12mo ago
Sorry about the delay, I had to do something else but; newPresence.activities[0].flags logs: ActivityFlagsBitField { bitfield: 256 } Nevermind, I think I can just filter it out by checking the activity array length