Create an application in the Discord Developer Portal and note the Application ID; enable Rich Presence in the application settings and upload cover art assets.
Initialize the Discord Game SDK by loading the library and calling Discord_Create with your Application ID and the create flags; obtain an ActivityManager handle.
Construct a DiscordActivity struct with fields including state, details, large/small image keys (matching assets uploaded to the portal), and timestamps for elapsed or remaining time.
Call ActivityManager::UpdateActivity with the struct to push the presence update; call RunCallbacks in your game loop (e.g., every frame or on a timer) to process Discord SDK events.
For join/spectate functionality, populate the party and secrets fields in the activity: set party ID, party size/max, and a joinSecret or spectateSecret that encodes enough info to connect to the session.
Handle the ActivityManager::OnActivityJoin callback in the joining client; parse the joinSecret and connect the player to the specified session.
Known gotchas
Rich Presence assets (large_image, small_image) must be uploaded to the Developer Portal before they appear; using an unregistered key results in a broken image in the profile.
The Discord Game SDK must have RunCallbacks called regularly; if your game pauses the loop (e.g., during a loading screen), presence updates and join callbacks will be delayed or dropped.
Join and spectate secrets should encode session connection info but must not contain user credentials; treat them as short-lived tokens that expire when the session ends.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp