Exemplo n.º 1
0
        public SchedulingService(DiscordShardedClient client, StorageService storage, LoggingService logger, GameService games)
        {
            this.client  = client;
            this.storage = storage;
            this.logger  = logger;
            this.games   = games;

            timers = new List <Timer>
            {
                new Timer(CheckConnection, null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5)),
                new Timer(DeleteOldGames, null, TimeSpan.Zero, TimeSpan.FromSeconds(5))
            };

            // Events
            client.ShardConnected += OnShardConnected;
        }
Exemplo n.º 2
0
        public SchedulingService(IHostApplicationLifetime app, BotConfig config, LoggingService log, GameService games)
        {
            _app   = app;
            _log   = log;
            _games = games;

            _scheduledRestart = config.scheduledRestart;
        }
Exemplo n.º 3
0
        public SchedulingService(PmConfig config, PmDiscordClient client, LoggingService log, GameService games)
        {
            this.client = client;
            this.log    = log;
            this.games  = games;

            scheduledRestart = config.scheduledRestart;
        }