You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docfx/articles/features/joining.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,24 +84,28 @@ The `Lobby.current.ID` and `Lobby.CreateJoinToken()` will be up to your implemen
84
84
> Consult your engine's manual or check out [Steams Documentation](https://partner.steamgames.com/doc/features/multiplayer/matchmaking) for their lobbies.
85
85
86
86
### Joining
87
-
When a Party and Secret are set and the **viewing** user has had the URI Scheme registered, Discord will display a "Join" button on the presence.
87
+
Users can join directly into a lobby from the Discord client via a "Join" button. The host must have the following set in their presence for this to be available:
When a user clicks the Join button, Discord will launch the application.
94
+
When a joining user clicks the "Join" button, Discord will launch the application via the URI Scheme.
92
95
93
-
Once loaded, your application needs to subscribe to the [EventType.Join](xref:DiscordRPC.EventType).
94
-
Then Discord will then send a Join message via the [OnJoin](xref:DiscordRPC.DiscordRpcClient.OnJoin) event which contains the secret that was set earlier.
96
+
Once loaded, the application will subscribe to the [EventType.Join](xref:DiscordRPC.EventType), which will make Discord send a Join message via the [OnJoin](xref:DiscordRPC.DiscordRpcClient.OnJoin) event. This message will contain the secret set in the host's presence.
95
97
96
-
Use that secret to then connect to the lobby:
98
+
The application can use that secret to then join the lobby. As a basic example:
The `Lobby.JoinWithToken` will be dependant on your implementation. However, using a JWT as described earlier, you can extract the target Lobby ID and verify the signing signature when attempting to connect:
107
+
108
+
> [!NOTE]
105
109
> We do not automatically subscribe to events. This library is primarily uesd for simple Rich Presence and the Joining is a feature generally only useful for Games.
106
110
>
107
111
> Because of this, by default this app will not receive Discord Join events. You must call the [DiscordRpcClient.Subscribe](xref:DiscordRPC.DiscordRpcClient.Subscribe(DiscordRPC.EventType)).
0 commit comments