public CheckForUrlsMiddleware(IMiddleware next) : base(next)
        {
            var oldbotConfig = new OldbotConfig();

            _client         = new SlackTaskClientExtensions(oldbotConfig.SlackApiKeySlackApp, oldbotConfig.SlackApiKeyBotUser);
            HandlerMappings = new[]
            {
                new HandlerMapping
                {
                    ValidHandles             = new IValidHandle[] { new AlwaysMatchHandle() },
                    Description              = "Annoys the heck out of everyone",
                    EvaluatorFunc            = RespondIfLinkFound,
                    MessageShouldTargetBot   = false,
                    ShouldContinueProcessing = true,
                    VisibleInHelp            = false
                }
            };
        }
Esempio n. 2
0
 public NoobotConfig(IOptions <OldbotConfig> config)
 {
     _config = config.Value;
 }