Example #1
0
 public CyberPatriotEventHandlingService(IServiceProvider provider, DiscordSocketClient discord,
                                         IDataPersistenceService database, IConfiguration config, ScoreboardMessageBuilderService messageBuilder,
                                         IScoreRetrievalService scoreRetriever, ICompetitionRoundLogicService competitionLogic, LogService logService)
 {
     _discord          = discord;
     _provider         = provider;
     _database         = database;
     _config           = config;
     _messageBuilder   = messageBuilder;
     _scoreRetriever   = scoreRetriever;
     _competitionLogic = competitionLogic;
     _logService       = logService;
 }
Example #2
0
        public CyberPatriotEventHandlingService(IServiceProvider provider, DiscordSocketClient discord,
                                                IDataPersistenceService database, IConfiguration config, ScoreboardMessageBuilderService messageBuilder,
                                                IScoreRetrievalService scoreRetriever, ICompetitionRoundLogicService competitionLogic, LogService logService)
        {
            _discord          = discord;
            _provider         = provider;
            _database         = database;
            _config           = config;
            _messageBuilder   = messageBuilder;
            _scoreRetriever   = scoreRetriever;
            _competitionLogic = competitionLogic;
            _logService       = logService;

            _discord.MessageReceived += MessageReceived;
            _teamUrlRegex             = new Regex("https?://" + _config["httpConfig:defaultHostname"].Replace(".", "\\.") +
                                                  "/team\\.php\\?team=([0-9]{2}-[0-9]{4})");
        }