Invites And Join Requests
Discord invite flows use a joinable Rich Presence activity. DiscordPulse transports the join secret; your game decides what the secret means and how to join the correct lobby, server, or session.
Invite features depend on the Discord Social SDK connection and your Discord application configuration. First confirm normal Rich Presence works.
Publish A Joinable Activity
Create a full activity with:
PartyId = "lobby-eu-42"
PartySize = 2
PartyMax = 4
JoinSecret = "opaque-join-token"Recommended rules:
- Keep
PartyIdstable for the lobby lifetime. - Keep
JoinSecretopaque. - Ensure
PartySize < PartyMaxwhile the party is joinable. - Validate every received secret in your own game/session system.
- Update the activity when party size changes.
Local User Accepts An Invite
Bind:
On Discord Join RequestedThe event supplies the join secret:
On Discord Join Requested(Secret)
-> Validate Secret
-> Resolve Lobby Or Server
-> Join SessionNever trust the secret without application-side validation.
Another User Requests To Join
Bind:
On Discord Join Request ReceivedThe current wrapper populates UserId from the Social SDK invite. Other FDiscordPresenceUser fields may be empty.
Respond with:
Respond To Discord Join Request(UserId, Response)| Response | Behavior |
|---|---|
Yes | Sends a positive reply through the Social SDK |
No | Removes the pending request locally |
Ignore | Removes the pending request locally |
The SDK helper used by DiscordPulse exposes a positive reply operation but no distinct reject reply. Therefore, No and Ignore are local dismissals.
Pending Request Lifetime
Pending requests:
- Exist only in the current subsystem session
- Are matched by
UserId - Are removed after a successful positive reply
- Are removed after
NoorIgnore - Are cleared during shutdown
Spectate And Match Secrets
SpectateSecret and MatchSecret remain in FDiscordPresenceActivity for migration compatibility. The current Social SDK Rich Presence API does not publish them.
On Discord Spectate Requested is retained for compatibility and is not expected to fire from the current activity implementation.
Invite Verification
Use two Discord accounts when possible:
- Publish a joinable activity.
- Confirm normal activity visibility first.
- Send or accept an invite.
- Confirm
On Discord Join Requestedreceives the expected secret. - Confirm incoming join requests trigger
On Discord Join Request Received. - Test
Yes,No, andIgnore.