private void AddDiscordBot(string apiToken)
        {
            SysCordInstance.Runner = this;
            var bot = new SysCord(Hub);

            Task.Run(() => bot.MainAsync(apiToken, CancellationToken.None));
        }
Beispiel #2
0
        private void AddDiscordBot(string apiToken)
        {
            if (string.IsNullOrWhiteSpace(apiToken))
            {
                return;
            }
            var bot = new SysCord <T>(this);

            Task.Run(() => bot.MainAsync(apiToken, CancellationToken.None));
        }
Beispiel #3
0
        private void AddDiscordBot(string apiToken)
        {
            if (SysCordInstance.Self != null)
            {
                SysCordInstance.Self.Hub = Hub;
                return;
            }
            var bot = new SysCord(Hub);

            Task.Run(() => bot.MainAsync(apiToken, CancellationToken.None));
        }
Beispiel #4
0
        private void AddDiscordBot(DiscordSettings config)
        {
            var token = config.Token;

            if (string.IsNullOrWhiteSpace(token))
            {
                return;
            }

            var bot = new SysCord <T>(this);

            Task.Run(() => bot.MainAsync(token, CancellationToken.None), CancellationToken.None);
        }