Ejemplo n.º 1
0
        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
                }
            };
        }
Ejemplo n.º 2
0
 public NoobotConfig(IOptions <OldbotConfig> config)
 {
     _config = config.Value;
 }