Open iTakeshi opened 4 years ago
First off, why are you trying to just lobby search? Your just searching and grabbing arbitrary data, the user has to input themselves a secret if they want to actually "connectlobby". ConnectVoice is returning ok since it is firing and receiving like it is supposed too, your just not actually IN a lobby...? Doesn't mean the callback itself failed, Ok just means it is working as intended firing to Discord -> Api and back.
Sorry if my explanation was not completely clear, but just like I wrote it was a "pseudo" code, I was not trying to do exactly what the pseudo code looked like --- it is much simplified for "reproducing" the situation.
I know the pseudo-code itself contains a bug that (like you pointed out) it is attempting to ConncectVoice without ConnectLobby, but what I meant was that we (especially for beginners like me) CAN accidentally mistakenly write such code. In such cases, it would be helpful to detect the bug if ConnectVoice returns an error indicating "NotConnectedToLobby", instead of just returning Ok which only implies the API call itself was successful.
A simple fix for this could be to add a Result that states "NotConnectedToLobby" (Apologies for not responding to this issue sooner a year later now!) I don't think it would take that much work to add a new result for that.
Describe the bug
I'm completely new to the game sdk and got confused with the behavior of
LobbyManager.ConnectVoice
Suppose I got a lobby struct byGetLobby
, but I didn't callConnectLobby
. When I calledConnectVoice
for this lobby, even though the current user is not connected to the lobby, the callback function for theConnectVoice
received Discord.Results.Ok (but seemed not "really" connected to the voice).Steps to reproduce
pseudo-C# code is like:
Expected behavior
I think it is more natural if
ConnectVoice
returns some error when the current user is not connected to the lobby.Implementation specifics