Skip to content

Discord: show the game you play and the party, with a Join button - #37

Merged
utkuhalis merged 3 commits into
mainfrom
parity/discord
Nov 1, 2026
Merged

utkuhalis merged 3 commits into
mainfrom
parity/discord

Conversation

@utkuhalis

@utkuhalis utkuhalis commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

The Mac launcher's Discord "Playing …" status, on Windows and Linux.

What it does:

  • With Discord open, the profile shows the running game and for how long. A game Discord knows (its public detectable list, cached for a week) shows as itself, with "AnyPS5 Launcher · Windows" or "· Linux" under it. Any other game shows under AnyPS5.
  • In a party it says "In a party" with the party's size (of 8), even with no game.
  • A "Join on AnyTogether" button opens the party's join code page. The party's leader gets a code made for the button when none works, but not after stopping the code themselves. Family rules that turn off public matchmaking also stop it.
  • Settings › Behaviour gets two switches after Show Hidden Trophies, as on the Mac: "Show the game you play on Discord" and "Show a Join button on Discord". Both are on by default and kept per profile.
  • Cleared when the game stops, the setting goes off, or the launcher quits.

How it talks to Discord:

  • Linux: the Unix socket discord-ipc-0 to 9 in the runtime folder (and its Flatpak and Snap folders), the temporary folder, then /tmp.
  • Windows: the named pipe \.\pipe\discord-ipc-0 to 9 through kernel32 (CreateFileW, WriteFile, ReadFile, PeekNamedPipe for a read timeout). A silent Discord never holds the launcher up.
  • ANYPS5_DISCORD_APP_ID puts another application in place of AnyPS5's own, and set but empty turns the status off.

Not in this PR: the Mac also offers the share play it hosts for the button. The Port's share play (now on main) has no join codes, so only the party's code counts.

Tests: frame codec, game names, the activity JSON and button limits, the join plan, the application ID, a fake Discord in memory, and a real Unix socket fake Discord (not on Windows). A UI test covers the settings rows, the party's activity and button, the switch clearing it, and a stopped code not made again.

The Windows named pipe is compiled by the Windows build here but has not been run against a real Discord.

The Mac launcher's Discord presence on Windows and Linux: the running game
from when it started, the party as In a party with its size, and a Join on
AnyTogether button that opens the party's join page. A game Discord knows
shows as itself. Linux talks to Discord's Unix socket (runtime folder,
Flatpak, Snap, temp, /tmp), Windows to its named pipe through kernel32.
Settings > Behaviour gets both switches, on by default and kept per profile.
@utkuhalis
utkuhalis merged commit df1f01a into main Nov 1, 2026
5 checks passed
@utkuhalis
utkuhalis deleted the parity/discord branch November 1, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant