Allow Rich Presence from web apps
Im building on a web browser game and i decided to use discord 2oauth as a login
Then i thought that having people to be able to invite and join games using discord rich presence would be a nice way to let users connect with each other
the problem is rich presence is currently only allowed to be reported to the local discord client in the user machine
I would like to suggest a way to report rich presence from the browser (Maybe a rest call) since i already have the discord login i got the user information
-
I feel like this is an impossible feature to add. As most browsers will not leak that info to discord to display. Which is why it only works in the Desktop version
-1 -
The reason it's impossible as of right now is because the only way to set any status is through an ONGOING and ACTIVE websocket connection to Discord, which requires the users auth token, which you will not be getting from oauth2. https://discordapp.com/developers/docs/topics/gateway#update-status
Having it going through a REST call would make a mess, since they can't tell if the user has gone idle, internet connection died, they closed everything, etc so it can't properly do anything with their status
Also, a rest endpoint would likely be just quietly sending a command to websockets in the background.
-1 -
I do not clearly see why WebSocket/REST API cannot be used to revalidate information from web application with Discord.
I'm working on PWA game and would love to see it implemented 😍1 -
Nothing is truly stopping you from sending the presence updates for rich presence
0 -
Other than websockets being a whitelisted feature you can't use?
0
サインインしてコメントを残してください。
コメント
5件のコメント