#Activity Filtering

13 messages · Page 1 of 1 (latest)

bold garden
#

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)
        });

Djs version: "discord.js": "^14.11.0",

balmy joltBOT
#

• 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.

elfin cedar
#

newPresence.activites[0]?.name would get the activity name (like VSCode, Roblox, as you said)

#

You could also check for each activity if you really wanted to

#

Not sure what you mean as activity type but if you mean like "Playing", "Listening to", "Watching", etc it's .type

bold garden
# elfin cedar Not sure what you mean as activity type but if you mean like "Playing", "Listeni...

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 is a simple Node/Deno module that brings up to date typings for Discord's API

elfin cedar
#

When you say Discord Activities you mean those things in VCs like putt party, watch together, etc?

elfin cedar
versed juncoBOT
bold garden