Skip to content

Fix Social SDK leaving lobby #7540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ client->CreateOrJoinLobby("your-unique-lobby-secret",[client](discordpp::ClientR
To remove a user from a lobby, use the [`Client::LeaveLobby`] function. Only lobbies created with [`Client::CreateOrJoinLobby`] can be left using [`Client::LeaveLobby`].

```cpp
uint64_t lobbyId = 01234567890;

// Leaving a lobby from the client
client->LeaveLobby(01234567890, [](discordpp::ClientResult result, uint64_t lobbyId) {
client->LeaveLobby(lobbyId, [&](discordpp::ClientResult result) {
if(result.Successful()) {
std::cout << "🎮 Left lobby successfully! Lobby Id: " << lobbyId << std::endl;
} else {
Expand Down Expand Up @@ -121,7 +123,9 @@ Once you have a lobby created, lobby members can send messages to it using the [
Clients can send messages to lobbies they are members of regardless of whether they joined the lobby using the client or server-side method.

```cpp
client->SendLobbyMessage(01234567890, "Hello", [](discordpp::ClientResult result, uint64_t messageId) {
uint64_t lobbyId = 01234567890;

client->SendLobbyMessage(lobbyId, "Hello", [](discordpp::ClientResult result, uint64_t messageId) {
if(result.Successful()) {
std::cout << "📨 Message sent successfully!\n";
} else {
Expand Down