Skip to content

Commit 89c70f0

Browse files
committed
Whitelisting more prominent, clarification of necessary data fields
1 parent 2856cbb commit 89c70f0

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

docs/topics/Rich_Presence.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,12 @@ When you send the relevant payload data in the `Discord_UpdatePresence()` call,
134134
135135
Other Discord users can click "Join" on the invitation. Their game will then launch, and the `joinGame()` callback will fire in their client with the inviting player's `joinSecret`. The client should reverse hash or otherwise unencrypt this secret and match the players together.
136136
137-
To enable the Ask to Join button on your players' profiles, you'll need to be whitelisted by us—send an email to [gamedevs@discordapp.com](mailto:gamedevs@discordapp.com) to request access. Once whitelisted, you'll have access to the `joinRequest()` callback which sends the following data:
137+
### Ask to Join
138+
139+
>warn
140+
>To enable the Ask to Join button on your players' profiles, you'll need to be whitelisted by us—send an email to [gamedevs@discordapp.com](mailto:gamedevs@discordapp.com) to request access. Once whitelisted, you'll see the button.
141+
142+
When Player B clicks the Ask to Join button on Player A's profile, the `joinRequest()` callback fires for Player A, sending the following data:
138143
139144
###### Ask to Join Payload
140145
@@ -144,10 +149,13 @@ To enable the Ask to Join button on your players' profiles, you'll need to be wh
144149
| username | char* | the username of the player asking to join |
145150
| avatarUrl | char* | the url from which the avatar of the player asking to join can be retrieved |
146151
147-
When it fires, your game should surface this data with a Yes or No choice for the player to accept whether or not they wish to play with the other user. If no, return false. If yes, return true and the `userId` from the request.
152+
When it fires, your game should surface this data with a Yes or No choice for Player A to accept whether or not they wish to play with Player B. If no, return `false`. If yes, return `true` and Player B's `userId` from the request.
148153
149154
## Spectating
150155
156+
>warn
157+
>To enable the Spectate button on your players' profiles, you'll need to be whitelisted by us—send an email to [gamedevs@discordapp.com](mailto:gamedevs@discordapp.com) to request access. Once whitelisted the profile button will appear.
158+
151159
Relevant Callbacks:
152160
153161
- `spectateGame()`
@@ -159,9 +167,7 @@ Relevant Payload Data:
159167
160168
When you send the relevant payload data in the `Discord_UpdatePresence()` call, your player will gain the ability to invite a Discord chat channel to spectate their game. This invite is tied to the `matchSecret` and will expire when it changes.
161169
162-
Other Discord users can click "Spectate" on the invitation. Their game will launch, and the `spectateGame()` callback will fire in their client with the inviting player's `spectateSecret`. The client should reverse hash or otherwise unencrypt this secret and spectate the player's game.
163-
164-
To enable the Spectate button on your players' profiles, you'll need to be whitelisted by us—send an email to [gamedevs@discordapp.com](mailto:gamedevs@discordapp.com) to request access. Once whitelisted, you'll have access to the `spectateGame()` callback, and the profile button will appear.
170+
Other Discord users can click "Spectate" on the invitation. Their game will launch, and the `spectateGame()` callback will fire in their client with the original player's `spectateSecret`. The client should reverse hash or otherwise unencrypt this secret and spectate that player's game.
165171
166172
## Secrets
167173
@@ -188,8 +194,8 @@ All fields in the `DiscordRichPresence` object are entirely optional. Anything y
188194
| largeImageText | x | | | | |
189195
| smallImageText | x | | | | |
190196
| partyId | | | | x | x |
191-
| partySize | | | | | |
192-
| partyMax | | | | | |
197+
| partySize | | | | x | x |
198+
| partyMax | | | | x | x |
193199
| matchSecret | | x | | | |
194200
| joinSecret | | | | x | x |
195201
| spectateSecret | | | x | | |
@@ -202,7 +208,7 @@ Included with the launch of Rich Presence is an overhaul of Discord's Developer
202208
OK, well, not entirely. But! Discord _will_ host any and all artwork that you need to have the very richest of presences. Upload an image, tag it with a key—preferrably one you can remember—and **bam**. It's ready for Rich Presence use. Head over to your [applications page](#MY_APPLICATIONS/top) to check it out!
203209
204210
>warn
205-
>Asset keys are automatically stored as **all lowercase** strings. Be mindful of this when referring to them in your code.
211+
>**Asset keys are automatically normalized to lowercase**. Be mindful of this when referring to them in your code.
206212
207213
## A final note on testing and Game Detection
208214

0 commit comments

Comments
 (0)