vionya / discord-rich-presence

A cross-platform Discord Rich Presence library written in Rust
MIT License
96 stars 22 forks source link

Implementation of ActivityType Enum #7

Closed afonsojramos closed 2 years ago

afonsojramos commented 2 years ago

The ActivityType enum is present in the SDK Docs and, even if it says "ActivityType [...] will be discarded and will not change anything in the client." I can find cases online where such has been said to be possible (here).

Has this been changed recently? Would it be possible to have this implemented?

image
ghost commented 2 years ago

What would this be useful for? I did some brief testing and found that, if provided anything other than 0 or 3, the payload is actually rejected with an error. Furthermore, providing 3 results in the type being changed to 0 anyways.

I'm happy to oblige if I can understand the use case, but right now, I don't see the point.

afonsojramos commented 2 years ago

In my view, this would be useful just as another way of customising what is displayed in Discord. I have build a Rich Presence for Trakt (https://github.com/afonsojramos/discrakt/) which enables integration with all the services that Trakt is able to connect to, such as all of the ones below:

image

As this is for TV/Movies, the "Watching" verb would apply much more than the "Playing" one does!

ghost commented 2 years ago

I see where you're coming from now - the issue is that it won't work. As stated in my previous comment, Discord does not let rich presence applications actually change their ActivityType; it will always be Playing.

afonsojramos commented 2 years ago

But you mentioned that it could be 0 or 3, which is already better than just the current 0, wouldn't you say?

ghost commented 2 years ago

I said it could be 0 or 3, but I also said passing 3 is changed to 0 by Discord when the request is received.

Regardless of whether 0 or 3 is sent, it's treated as a 0 by Discord, so it makes no difference.

afonsojramos commented 2 years ago

Oh well, that's unfortunate, thanks anyway!

wxllow commented 4 months ago

Discord supports setting additional activity types now!