Conversation
|
It should be noted that the ActivityType enum is discarded in outgoing transport. It is solely for use of incoming messages (e.g. reading friend's activity From the official docs:
|
|
@afoxie I think you're looking at the wrong docs, if you start from https://discord.com/developers/docs/topics/rpc#setactivity (what is used internally), you land at https://discord.com/developers/docs/topics/gateway#activity-object-activity-types, which doesn't have this restriction. |
|
Have any of you even checked to see if this PR works? this literally doesn't work. first of all child "activity" fails because [child "type" fails because ["type" must be one of [0, 3]]]second of all even if you input type |
|
PR doesn't work, but this is an issue that needs to be looked into. |
| exports.ActivityTypes = { | ||
| PLAYING: 0, | ||
| STREAMING: 1, | ||
| LISTENING: 2, | ||
| WATCHING: 3, | ||
| CUSTOM: 4, | ||
| COMPETING: 5 | ||
| } |
There was a problem hiding this comment.
| exports.ActivityTypes = { | |
| PLAYING: 0, | |
| STREAMING: 1, | |
| LISTENING: 2, | |
| WATCHING: 3, | |
| CUSTOM: 4, | |
| COMPETING: 5 | |
| } | |
| exports.ActivityTypes = { | |
| PLAYING: 0, | |
| WATCHING: 3 | |
| } |
Only PLAYING and WATCHING are allowed by RPC. Everything else results in an error.
|
Just to clarify something: This PR was only meant to provide feature-complete integration according to the API docs (https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types), assuming in the future the use of these constants would open up to the public. I'm aware it's not working right now (since there is no public access to most of the constants) and I'm willing to close this request if there's no need for it. |
Co-authored-by: advaith <advaithj1@gmail.com>
|
Activity Types are now supported in discord rpc - see https://x.com/advaithj1/status/1816655583107510517 (Jul 26, 2024) code example: https://github.com/th-ch/youtube-music/blob/f2b1e6b6bfa748c82c144d76140248c77bea7569/src/plugins/discord/main.ts#L183-L190 ActivityType typescript definition here: https://github.com/discordjs/discord-api-types/blob/a59f9f002f2fad7cdc6ce8aa9cf04081db2e0da8/payloads/v10/gateway.ts#L251-L276 |
Is this still the case? |
|
no, you can use playing, listening, watching, and competing |

This allows for sending activity types described here.
I also included some handy constants to use.
This fixes #146