Example #1
0
        private async Task <bool> InitializeInternal()
        {
            this.botService = new DiscordBotService(this.baseAddress, ChannelSession.SecretManager.GetSecret("DiscordBotToken"));

            this.User = await this.GetCurrentUser();

            if (!string.IsNullOrEmpty(ChannelSession.Settings.DiscordServer))
            {
                this.Server = await this.GetServer(ChannelSession.Settings.DiscordServer);

                return(true);
            }
            return(false);
        }
        private async Task InitializeInternal()
        {
            this.botService = new DiscordBotService(this.baseAddress, ChannelSession.SecretManager.GetSecret("DiscordBotToken"));

            this.User = await this.GetCurrentUser();

            if (!string.IsNullOrEmpty(this.serverID))
            {
                this.Server = await this.GetServer(this.serverID);
            }

            //DiscordGateway gateway = await this.GetBotGateway();
            //if (gateway != null)
            //{
            //    DiscordWebSocket webSocket = new DiscordWebSocket();
            //    await webSocket.Connect(gateway.WebSocketURL, gateway.Shards);
            //}
        }