discord / gamesdk-and-dispatch

Public issue tracker for the Discord Game SDK and Dispatch
22 stars 7 forks source link

[Feature Request] api for check if the user is connected to a lobby or its voice #30

Open iTakeshi opened 4 years ago

iTakeshi commented 4 years ago

Currently, it seems there are no API to check if the current user is connected to a lobby (or its voice). If there exist, please tell me which API I should use.

If not, I believe it's useful if there were API like

LobbyManager.IsConnected(Int64 lobbyId);
LobbyManager.IsVoiceConnected(Int64 lobbyId);
Jump-Suit commented 4 years ago

What do you mean no API check? https://discordapp.com/developers/docs/game-sdk/lobbies#connectvoice It has a Result? You can even check if a user is Speaking https://discordapp.com/developers/docs/game-sdk/lobbies#onspeaking

iTakeshi commented 4 years ago

I mean, there are no api to check the connection to lobby AT arbitrary timings --- checking the connection by the Result passed to the callback function for ConnectLobby or ConnectVoice is available only in the callback function, but under some situations we may want to check it afterwards.

For example, I'm now creating a game which uses multiple lobbies with connecting to / disconnecting from them frequently. After a number of times connecting/disconnecting multiple lobbies, perhaps it might be difficult to track exactly which lobbies the user is connecting to currently, and thus testing and debugging the behavior of the application is difficult. API for checking lobby connection status available at arbitrary timing would be helpful for such situation.