private void Awake()
 {
     Environment.SetEnvironmentVariable("DISCORD_INSTANCE_ID", usePTB ? "1" : "0");
     try
     {
         discordClient = new Discord.Discord(discordGameID, (ulong)createFlags);
     }catch (ResultException result)
     {
         Debug.LogError("Failed initializing Discord! Reason: " + result.ToString());
         return;
     }
     lobbyManager = discordClient.GetLobbyManager();
     userManager  = discordClient.GetUserManager();
     SetupCallbacks();
 }
        public DiscordLobbyManager(DiscordIntegrationClient integrationClient)
        {
            _connectedLobbies  = new Dictionary <long, DiscordLobby>();
            _integrationClient = integrationClient;
            var client = _integrationClient._discordClient;

            _lobbyManager    = client.GetLobbyManager();
            _activityManager = client.GetActivityManager();

            _lobbyManager.OnNetworkMessage += OnNetworkMessage;
            _lobbyManager.OnLobbyMessage   += OnLobbyMessage;
            _lobbyManager.OnLobbyUpdate    += OnLobbyUpdate;

            _lobbyManager.OnMemberConnect    += OnMemberConnect;
            _lobbyManager.OnMemberDisconnect += OnMemberDisconnect;
            _lobbyManager.OnMemberUpdate     += OnMemberUpdate;
        }
 public LobbySearchBuilder(DiscordApp.LobbyManager manager)
 {
     _query = manager.GetSearchQuery();
 }
Beispiel #4
0
 private void Start()
 {
     lobbyManager = DiscordLobbyService.INSTANCE.lobbyManager;
     lobbyManager.OnLobbyUpdate += UpdateWithLobbyMembers;
 }