public DiscordBot(ChallongeDiscordBotConfig config)
        {
            Channels     = new Dictionary <string, Channel>();
            discordToken = config.DiscordToken;
            Bot          = new DiscordClient();

            AttachEvents();
        }
        public ChallongeDiscordBot(ChallongeDiscordBotConfig config)
        {
            this.DiscordBot      = new DiscordBot(config);
            this.ChallongeClient = new ChallongeClient(config);

            AttachEvents();

            DiscordBot.StartDiscordBotThread();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            while (true)
            {
                try
                {
                    ChallongeDiscordBotConfig config = LoadConfig();
                    new ChallongeDiscordBot(config);

                    string TurnOffCommand = "DIE";
                    string readline;
                    while ((readline = Console.ReadLine()) != TurnOffCommand)
                    {
                        ;
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("Exception.." + e.Message);
                }
            }
        }
Beispiel #4
0
 public ChallongeClient(ChallongeDiscordBotConfig config)
     : this(config.ApiKey, config.Subdomain, config.CreatedAfter)
 {
 }