Esempio n. 1
0
        public async Task Connect()
        {
            DiscordClient.MessageReceived += MessageReceived;
            await DiscordClient.Connect(Config.BotKey);

            IDatabaseContext dbContext = new SqliteDatabaseContext(new System.IO.FileInfo(Config.DatabasePath));
            await dbContext.Initialize();

            RateMonitor = new MessageRateMonitor(DiscordClient, dbContext);
            await RateMonitor.LoadFromDb();
        }