TurboWarp / desktop

A better offline editor for Scratch 3.
https://desktop.turbowarp.org/
GNU General Public License v3.0
344 stars 71 forks source link

Add Discord Rich Presence Support #1000

Closed CubesterYT closed 1 month ago

CubesterYT commented 1 month ago

Adds support for Discord Rich Presence natively in TurboWarp Desktop.

https://github.com/TurboWarp/desktop/assets/78769806/66cab77a-8e14-4928-a43a-71014b69cc8f

At the moment, it's completely done, but here's some notes:

GarboMuffin commented 1 month ago

This will also need a privacy policy update

GarboMuffin commented 1 month ago

can you see if this still works for you after my changes

i dont see a reason to not put the project title there, as you should already be able to do effectively that by just registering it as a game in discord

CubesterYT commented 1 month ago

I've looked over the changes, it seems fine, and actually accomplishes some of the things I was trying to figure out as well, but I will test it soon.

LSPECTRONIZTAR commented 1 month ago

1000th pull request 🥳

CubesterYT commented 1 month ago

Okay, I've tested the changes so far, it's actually great, but I've come across some notable things:

GarboMuffin commented 1 month ago

The new file in art is useful if the discord application ever has to be recreated

The 15s delay is based on https://github.com/discord/discord-api-docs/blob/main/docs/rich_presence/How_To.md#updating-presence but from https://github.com/discord/discord-api-docs/blob/main/docs/game_sdk/Activities.md#updateactivity it sounds like we can afford to send it more often

CubesterYT commented 1 month ago

Alright, tested it, the smaller delay is perfectly fine now. I did some more brute force testing, It withstands against the previous issues. I'm guessing it's ready. I'll check everything one more time, in case something is missed.