Create an application at discord.com/developers/applications and note the Application ID (also called Client ID); upload assets (images) under Rich Presence > Art Assets — asset keys are used in presence payloads.
Add the Discord GameSDK or a supported community wrapper to your game; initialize it with Discord.Create(applicationId, Discord.CreateFlags.Default).
Obtain an ActivityManager via discord.GetActivityManager() and construct an Activity struct with State (what the player is doing), Details (secondary info), party size, and image keys matching your uploaded assets.
Call activityManager.UpdateActivity(activity, callback) to set the presence; call discord.RunCallbacks() on your game loop to process SDK events.
Update the activity whenever game state changes (e.g., in a lobby vs. in a match, current map, party size) — Discord throttles updates to avoid spam, so batch changes where possible.
For join/spectate buttons, implement activityManager.OnActivityJoinRequest and activityManager.OnActivityJoin to handle incoming requests and pass join secrets to your matchmaking.
Known gotchas
Rich Presence only displays when the user is running Discord alongside the game; if Discord is not running, Discord.Create will fail — use the NoRequireDiscord flag and handle the error gracefully so the game still launches.
Asset images must be uploaded to the Developer Portal and can take a few minutes to propagate before they appear in the presence overlay — placeholder keys show no image rather than an error.
The 'Join Game' button requires implementing the join/spectate flow end-to-end (join secrets, invite handling); simply setting a party size without implementing OnActivityJoin causes the button to appear but do nothing.
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