コード例 #1
0
 public QuizExpiryChecker(IContextFactory contextFactory, FatalErrorNotifier fatalNotifier)
 {
     this.contextFactory = contextFactory;
     this.logger         = LogManager.GetCurrentClassLogger();
     this.cancellation   = new CancellationTokenSource();
     this.fatalNotifier  = fatalNotifier;
 }
コード例 #2
0
        public TipBot(
            IOptionsMonitor <TipBotSettings> options,
            IServiceProvider services,
            DiscordSocketClient client,
            INodeIntegration nodeIntegration,
            QuizExpiryChecker quizExpiryChecker,
            CommandService commandService,
            DiscordConnectionKeepAlive discordConnectionKeepAlive,
            CommandHandlingService commandHandlingService,
            FatalErrorNotifier fatalErrorNotifier
            )
        {
            this.settings                   = options.CurrentValue;
            this.services                   = services;
            this.client                     = client;
            this.nodeIntegration            = nodeIntegration;
            this.quizExpiryChecker          = quizExpiryChecker;
            this.commandService             = commandService;
            this.discordConnectionKeepAlive = discordConnectionKeepAlive;
            this.commandHandlingService     = commandHandlingService;
            this.fatalErrorNotifier         = fatalErrorNotifier;

            options.OnChange(config =>
            {
                this.settings = config;
            });
        }
コード例 #3
0
        public CommandsManager(IContextFactory contextFactory, INodeIntegration nodeIntegration, IOptionsMonitor <TipBotSettings> options, FatalErrorNotifier fatalNotifier)
        {
            this.contextFactory  = contextFactory;
            this.nodeIntegration = nodeIntegration;
            this.settings        = options.CurrentValue;
            this.fatalNotifier   = fatalNotifier;
            this.random          = new Random();

            this.logger = LogManager.GetCurrentClassLogger();
        }
コード例 #4
0
        public CommandsManager(IContextFactory contextFactory, INodeIntegration nodeIntegration, Settings settings, FatalErrorNotifier fatalNotifier)
        {
            this.contextFactory  = contextFactory;
            this.nodeIntegration = nodeIntegration;
            this.settings        = settings;
            this.fatalNotifier   = fatalNotifier;
            this.random          = new Random();

            this.logger = LogManager.GetCurrentClassLogger();
        }