public CommunityRunnable(ILogger <CommunityRunnable> logger, ISeenItemRepository seenItemRepository, HttpClient httpClient, Function.FunctionConfig config, Scraper scraper)
 {
     slack = new SlackClient(new SlackConfig {
         WebHookUrl = config.EstrangedDiscordCommunityWebhook, HttpClient = httpClient
     });
     this.scraper = scraper;
 }
 public SlackUserAvatar(ISecrets secrets, IPokerRepository pokerRepository, PokerDBContext pokerDBContext, ISlackClient slackClient)
 {
     _secrets     = secrets;
     _pokerRepo   = pokerRepository;
     _pokerDB     = pokerDBContext;
     _slackClient = slackClient;
 }
 public AnswerMessageActionExecutor(
     ISlackClient slackClient,
     string value)
 {
     _slackClient = slackClient;
     _value       = value;
 }
 public SubscriptionCleaner(ILogger <SubscriptionCleaner> logger, IAzure azureConnection, ISlackClient slackClient, CleanupConfiguration cleanupConfiguration)
 {
     _logger               = logger ?? throw new ArgumentNullException(nameof(logger));
     _azureConnection      = azureConnection ?? throw new ArgumentNullException(nameof(azureConnection));
     _slackClient          = slackClient ?? throw new ArgumentNullException(nameof(slackClient));
     _cleanupConfiguration = cleanupConfiguration ?? throw new ArgumentNullException(nameof(cleanupConfiguration));
 }
Beispiel #5
0
 public DeleteResponse(ISlackClient client) : base(client)
 {
     DeleteRegexs = new List <DeleteResponseEntry>();
     DeleteRegexs.Add(new DeleteResponseEntry(@"(ur|y..r|'s)\s*(m.m|m..h.r|m.t.rnal)+"));
     DeleteRegexs.Add(new DeleteResponseEntry(@"(m.m|m..h.r|m.t.rnal)'?s (box|face|butt|ass|c**t)"));
     DeleteRegexs.Add(new DeleteResponseEntry(@"(schl...)|(fourth leg)|(fifth leg)"));
 }
Beispiel #6
0
 public ScopedBalance(ISecrets secrets, IPokerRepository pokerRepository, PokerDBContext pokerDBContext, ISlackClient slackClient)
 {
     _secrets     = secrets;
     _pokerRepo   = pokerRepository;
     _pokerDB     = pokerDBContext;
     _slackClient = slackClient;
 }
Beispiel #7
0
 public BountyController(ApplicationDbContext context, ILogger <CabinetController> logger, ISlackClient slackClient, UserManager <ApplicationUser> userManager)
     : base(context)
 {
     _logger      = logger;
     _slackClient = slackClient;
     _userManager = userManager;
 }
        public void SetUp()
        {
            var token          = ConfigurationManager.AppSettings["userToken"];
            var clientSettings = new ClientSettings(token);

            SUT = new Nuget.SlackClient.Services.SlackClient(clientSettings);
        }
Beispiel #9
0
        public Setup(ITestOutputHelper helper)
        {
            var services = new ServiceCollection();

            services.AddSlackbotOauthClient(c =>
            {
                c.OauthToken = Environment.GetEnvironmentVariable("Slackbot_SlackApiKey_SlackApp");
            });

            services.AddSlackHttpClient(c =>
            {
                c.BotToken = Environment.GetEnvironmentVariable("Slackbot_SlackApiKey_BotUser");
            });

            services.AddSlackbotOauthAccessHttpClient();

            services.AddSingleton <ILogger <ISlackClient> >(new XUnitLogger <ISlackClient>(helper));

            var provider = services.BuildServiceProvider();

            SearchClient     = provider.GetService <ISearchClient>();
            SlackClient      = provider.GetService <ISlackClient>();
            SlackOAuthClient = provider.GetService <ISlackOAuthAccessClient>();
            Channel          = "#testss";
            Text             = "Test";
        }
Beispiel #10
0
 public HappyBirthday(Smartinger smartinger, SlackChannels channels, ISlackClient client)
 {
     _smartinger = smartinger;
     _channels   = channels;
     _client     = client;
     _timing     = new Timing();
 }
Beispiel #11
0
 public ConferenceService(string[] conferenceIds, Dictionary <string, Conference> conferences, ThumbnailService thumbnailService, ConferencePersistence conferencePersistence, ISlackClient slackClient)
 {
     this.conferenceIds         = conferenceIds;
     this.conferences           = conferences;
     this.thumbnailService      = thumbnailService;
     this.conferencePersistence = conferencePersistence;
     this.slackClient           = slackClient;
 }
Beispiel #12
0
 public SpeakerService(string[] conferenceIds, Dictionary <string, Conference> conferences, Users users, ConferencePersistence conferencePersistence, ThumbnailService thumbnailService, ISlackClient slackClient)
     : base(conferenceIds, conferences, thumbnailService, conferencePersistence, slackClient)
 {
     this.conferenceIds         = conferenceIds;
     this.users                 = users;
     this.conferencePersistence = conferencePersistence;
     this.slackClient           = slackClient;
 }
Beispiel #13
0
 public SlackStartup(
     IOptions <SlackConfiguration> slackConfiguration,
     ISlackClient slackClient
     )
 {
     _slackConfiguration = slackConfiguration;
     _slackClient        = slackClient;
 }
Beispiel #14
0
 public StorsdagInviter(IEventsStorage eventStorage, IInvitationsStorage inviteStorage, ISlackClient slackClient, SlackQuestionClient questioner, ILogger <StorsdagInviter> logger)
 {
     _eventStorage  = eventStorage;
     _inviteStorage = inviteStorage;
     _slackClient   = slackClient;
     _questioner    = questioner;
     _logger        = logger;
 }
Beispiel #15
0
 public HomeController(ILogger <HomeController> logger, IPokerRepository PokerRepository, ISecrets Secrets, ISlackClient SlackClient, IGameState GameState)
 {
     _logger          = logger;
     _pokerRepository = PokerRepository;
     _secrets         = Secrets;
     _slackClient     = SlackClient;
     _gameState       = GameState;
 }
Beispiel #16
0
        public HubPageViewModel(ISlackClient slackClient, ISettings settings)
        {
            _slackClient = slackClient;
            _settings    = settings;

            Channels   = new ObservableCollection <SlackItem>();
            ImChannels = new ObservableCollection <SlackItem>();
        }
Beispiel #17
0
 public TalkService(TalkPersistence talkPersistence, Users users, ContentService contentService, ThumbnailService thumbnailService, ISlackClient slackClient)
 {
     this.talkPersistence  = talkPersistence;
     this.users            = users;
     this.contentService   = contentService;
     this.thumbnailService = thumbnailService;
     this.slackClient      = slackClient;
 }
Beispiel #18
0
        protected override async Task <IMessageProcessor> Given()
        {
            _company = string.Format("comapy{0}", Fixture.Create <string>());
            _token   = string.Format("token{0}", Fixture.Create <string>());
            _client  = Fixture.Freeze <ISlackClient>();

            return(new MessageProcessor(_container, _client));
        }
    public PublishViaWebHookCommandHandler(IConfiguration config, ISlackClientBuilder builder)
    {
        var token = config.GetValue <string>("SlackToken_FplBot_Workspace");
        var env   = config.GetValue <string>("DOTNET_ENVIRONMENT");

        _prefix = env == "Production" ? "" : $"{env}: ";
        _client = builder.Build(token);
    }
 public DeployToClusterCommandHandler(
     IProvisioningService provisioningService,
     IMediator mediator,
     ISlackClient slackClient)
 {
     this.provisioningService = provisioningService;
     this.mediator            = mediator;
     this.slackClient         = slackClient;
 }
Beispiel #21
0
        public IndexModule(IBuildSlackMessages slackMessageBuilder,
            ISlackClient slackClient)
        {
            _slackMessageBuilder = slackMessageBuilder;
            _slackClient = slackClient;

            Get["/"] = _ => "pong";
            Post["/"] = _ => PostAlert();
        }
Beispiel #22
0
        public SlackMessageHandler(ISlackClient slack)
        {
            if (slack == null)
            {
                throw new ArgumentNullException("slack");
            }

            _slack = slack;
        }
Beispiel #23
0
        /// <summary>
        /// Constructs an instance with a preconfigured S3 client. This can be used for testing the outside of the Lambda environment.
        /// </summary>
        /// <param name="amazonS3Client"></param>
        /// <param name="slackClient"></param>
        /// <param name="webHookUri"></param>
        /// <param name="message"></param>
        public AWSS3EventNotification(IAmazonS3 amazonS3Client, ISlackClient slackClient, Uri webHookUri, SlackMessage message)
        {
            _amazonS3Client = amazonS3Client;
            _slackClient    = slackClient;
            _webHookUri     = webHookUri;
            _message        = message;

            _log.DebugFormat("In S3EventNotification parameterized constructor, initialized S3 client instance");
        }
 public HomeController(ApplicationDbContext context,
                       IStringLocalizer <HomeController> localizer,
                       IEmailSender emailSender,
                       ISlackClient slack)
 {
     _context     = context;
     _localizer   = localizer;
     _emailSender = emailSender;
     _slack       = slack;
 }
Beispiel #25
0
 public AppMentionHandler(
     ISlackClient slackClient,
     ISlackCommandDispatcher slackCommandDispatcher,
     ISlackApiClient slackApiClient
     )
 {
     _slackClient            = slackClient;
     _slackCommandDispatcher = slackCommandDispatcher;
     _slackApiClient         = slackApiClient;
 }
Beispiel #26
0
        public HelpHandler(ISlackClient slack, ILifetimeScope scope)
            : base(slack)
        {
            if (scope == null)
            {
                throw new ArgumentNullException("scope");
            }

            _scope = scope;
        }
        public async Task <IActionResult> Post([FromServices] ISlackClient slackClient, [FromForm] SlackRequest slackRequest, CancellationToken cancellationToken)
        {
            await slackClient.PostOnChannelAsync(slackRequest.TeamDomain, slackRequest.ChannelId, "command [list]", cancellationToken);

            return(Ok(new SlackResponse
            {
                ResponseType = SlackResponseType.InChannel,
                Text = "teste"
            }));
        }
 public GetCurrentApplicationTags(
     IApplicationService applicationService,
     IApplicationImageInstanceService applicationImageInstanceService,
     ISlackClient slackClient
     )
 {
     _applicationService = applicationService;
     _applicationImageInstanceService = applicationImageInstanceService;
     _slackClient = slackClient;
 }
Beispiel #29
0
 public DeploymentService(
     ILogger <DeploymentService> log,
     IApplicationService applicationService,
     ISlackClient slackClient
     )
 {
     _log = log;
     _applicationService = applicationService;
     _slackClient        = slackClient;
 }
Beispiel #30
0
 public HomeController(TokenSaleContract contract,
                       ApplicationDbContext context,
                       IEmailSender emailSender,
                       ISlackClient slack)
 {
     _contract    = contract;
     _context     = context;
     _emailSender = emailSender;
     _slack       = slack;
 }
Beispiel #31
0
        public TeamCityHandler(ISlackClient slack, ITeamCityClient client)
            : base(slack)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            _client = client;
        }
 public AllUsersViewModel(ISlackClient slack)
 {
     _slack = slack;
 }
Beispiel #33
0
 public SlackOutput(ISlackClient slackClient)
 {
     _slackClient = slackClient;
 }
 public WebHookExceptionReporter(ISlackClient client)
 {
     _client = client;
 }
 public UserDetailsViewModel(ISlackClient slack, IImageCache imageCache)
 {
     _slack = slack;
     _imageCache = imageCache;
 }
 /// <summary>
 /// Creates a new instance of the exception filter with optional arguments.
 /// </summary>
 /// <param name="options">The options for configuring the webhook.</param>
 /// <param name="client">The webhook client to use for posting the error report messages. 
 /// If no options are provided here, they will need to be provided by an OnExceptionReporting handler.</param>
 public WebHookErrorReportFilter(WebHookOptions options = null, ISlackClient client = null)
 {
     Options = options;
     _client = client;
     ThrowOnFailure = true;
 }