コード例 #1
0
        /// <summary>
        /// Constructs a new <see cref="PromotionLoggingHandler"/> object, with injected dependencies.
        /// </summary>
        public PromotionLoggingHandler(IServiceProvider serviceProvider, IDiscordClient discordClient, IDesignatedChannelService designatedChannelService)
        {
            DiscordClient            = discordClient;
            DesignatedChannelService = designatedChannelService;

            _lazyPromotionsService = new Lazy <IPromotionsService>(() => serviceProvider.GetRequiredService <IPromotionsService>());
        }
コード例 #2
0
 public ModerationService(
     IDiscordClient discordClient,
     IAuthorizationService authorizationService,
     IChannelService channelService,
     IUserService userService,
     IModerationActionRepository moderationActionRepository,
     IDesignatedRoleMappingRepository designatedRoleMappingRepository,
     IInfractionRepository infractionRepository,
     IDeletedMessageRepository deletedMessageRepository,
     IDeletedMessageBatchRepository deletedMessageBatchRepository,
     IRoleService roleService,
     IDesignatedChannelService designatedChannelService,
     IDogStatsd dogStatsd)
 {
     _discordClient                   = discordClient;
     _authorizationService            = authorizationService;
     _channelService                  = channelService;
     _userService                     = userService;
     _moderationActionRepository      = moderationActionRepository;
     _designatedRoleMappingRepository = designatedRoleMappingRepository;
     _infractionRepository            = infractionRepository;
     _deletedMessageRepository        = deletedMessageRepository;
     _deletedMessageBatchRepository   = deletedMessageBatchRepository;
     _roleService                     = roleService;
     _designatedChannelService        = designatedChannelService;
     _dogStatsd = dogStatsd;
 }
コード例 #3
0
 /// <summary>
 /// Creates a new <see cref="ModerationService"/>, with the given injected dependencies.
 /// </summary>
 public ModerationService(
     IDiscordClient discordClient,
     IAuthorizationService authorizationService,
     IChannelService channelService,
     IUserService userService,
     IModerationActionRepository moderationActionRepository,
     IDesignatedRoleMappingRepository designatedRoleMappingRepository,
     IInfractionRepository infractionRepository,
     IDeletedMessageRepository deletedMessageRepository,
     IDeletedMessageBatchRepository deletedMessageBatchRepository,
     IRoleService roleService,
     IDesignatedChannelService designatedChannelService,
     IDogStatsd stats = null)
 {
     DiscordClient                   = discordClient;
     AuthorizationService            = authorizationService;
     ChannelService                  = channelService;
     UserService                     = userService;
     ModerationActionRepository      = moderationActionRepository;
     DesignatedRoleMappingRepository = designatedRoleMappingRepository;
     InfractionRepository            = infractionRepository;
     DeletedMessageRepository        = deletedMessageRepository;
     DeletedMessageBatchRepository   = deletedMessageBatchRepository;
     RoleService                     = roleService;
     DesignatedChannelService        = designatedChannelService;
     Stats = stats;
 }
コード例 #4
0
ファイル: StarboardService.cs プロジェクト: ofcith/MODiX
 public StarboardService(
     IDesignatedChannelService designatedChannelService,
     IMessageRepository messageRepository)
 {
     _designatedChannelService = designatedChannelService;
     _messageRepository        = messageRepository;
 }
コード例 #5
0
 public GiveawayModule(
     IGiveawayService giveawayService,
     IDesignatedChannelService designatedChannelService)
 {
     _giveawayService          = giveawayService;
     _designatedChannelService = designatedChannelService;
 }
コード例 #6
0
        /// <summary>
        /// Constructs a new <see cref="ModerationLoggingBehavior"/> object, with injected dependencies.
        /// </summary>
        public ModerationLoggingBehavior(IServiceProvider serviceProvider, IDiscordClient discordClient, IDesignatedChannelService designatedChannelService)
        {
            DiscordClient            = discordClient;
            DesignatedChannelService = designatedChannelService;

            _lazyModerationService = new Lazy <IModerationService>(() => serviceProvider.GetRequiredService <IModerationService>());
        }
コード例 #7
0
 public MessageLoggingBehavior(
     IDesignatedChannelService designatedChannelService,
     IDiscordSocketClient discordSocketClient,
     ILogger <MessageLoggingBehavior> logger)
 {
     _designatedChannelService = designatedChannelService;
     _discordSocketClient      = discordSocketClient;
     _logger = logger;
 }
コード例 #8
0
ファイル: StarboardHandler.cs プロジェクト: Foxtrek64/MODiX
 public StarboardHandler(
     IStarboardService starboardService,
     IDesignatedChannelService designatedChannelService,
     IQuoteService quoteService)
 {
     _starboardService         = starboardService;
     _designatedChannelService = designatedChannelService;
     _quoteService             = quoteService;
 }
コード例 #9
0
 public UserMetricsBehavior(
     IDesignatedChannelService designatedChannelService,
     IDesignatedRoleService designatedRoleService,
     IDogStatsd dogStatsd,
     ILogger <UserMetricsBehavior> logger)
 {
     _designatedChannelService = designatedChannelService;
     _designatedRoleService    = designatedRoleService;
     _dogStatsd = dogStatsd;
     _logger    = logger;
 }
コード例 #10
0
 /// <summary>
 /// Constructs a new <see cref="ModerationInvitePurgingHandler"/> object, with the given injected dependencies.
 /// </summary>
 /// <param name="designatedChannelService"></param>
 /// <param name="authorizationService"></param>
 /// <param name="moderationService"></param>
 /// <param name="botUser">The Discord user that the bot is running as.</param>
 public ModerationInvitePurgingHandler(
     IDesignatedChannelService designatedChannelService,
     IAuthorizationService authorizationService,
     IModerationService moderationService,
     ISelfUser botUser)
 {
     _designatedChannelService = designatedChannelService;
     _authorizationService     = authorizationService;
     _moderationService        = moderationService;
     _botUser = botUser;
 }
コード例 #11
0
 public AttachmentBlacklistBehavior(
     IDesignatedChannelService designatedChannelService,
     IDiscordSocketClient discordSocketClient,
     ILogger <AttachmentBlacklistBehavior> logger,
     IModerationService moderationService)
 {
     _designatedChannelService = designatedChannelService;
     _discordSocketClient      = discordSocketClient;
     _logger            = logger;
     _moderationService = moderationService;
 }
コード例 #12
0
 /// <summary>
 /// Constructs a new <see cref="InvitePurgingBehavior"/> object, with the given injected dependencies.
 /// </summary>
 public InvitePurgingBehavior(
     IDesignatedChannelService designatedChannelService,
     IDiscordSocketClient discordSocketClient,
     IAuthorizationService authorizationService,
     IModerationService moderationService)
 {
     DesignatedChannelService = designatedChannelService;
     _discordSocketClient     = discordSocketClient;
     AuthorizationService     = authorizationService;
     ModerationService        = moderationService;
 }
コード例 #13
0
 /// <summary>
 /// Constructs a new <see cref="InvitePurgingBehavior"/> object, with the given injected dependencies.
 /// </summary>
 public InvitePurgingBehavior(
     IDesignatedChannelService designatedChannelService,
     IAuthorizationService authorizationService,
     IModerationService moderationService,
     ISelfUserProvider selfUserProvider)
 {
     DesignatedChannelService = designatedChannelService;
     AuthorizationService     = authorizationService;
     ModerationService        = moderationService;
     SelfUserProvider         = selfUserProvider;
 }
コード例 #14
0
 public MessageContentCheckBehaviour(
     IDesignatedChannelService designatedChannelService,
     IDiscordSocketClient discordSocketClient,
     IAuthorizationService authorizationService,
     IModerationService moderationService, IMessageContentPatternService messageContentPatternService)
 {
     _designatedChannelService     = designatedChannelService;
     _discordSocketClient          = discordSocketClient;
     _authorizationService         = authorizationService;
     _moderationService            = moderationService;
     _messageContentPatternService = messageContentPatternService;
 }
コード例 #15
0
        /// <summary>
        /// Constructs a new <see cref="ModerationLoggingBehavior"/> object, with injected dependencies.
        /// </summary>
        public ModerationLoggingBehavior(
            IServiceProvider serviceProvider,
            IDiscordClient discordClient,
            IDesignatedChannelService designatedChannelService,
            IOptions <ModixConfig> config)
        {
            DiscordClient            = discordClient;
            DesignatedChannelService = designatedChannelService;
            Config = config.Value;

            _lazyModerationService = new Lazy <IModerationService>(() => serviceProvider.GetRequiredService <IModerationService>());
        }
コード例 #16
0
 public MuteRoleConfigurationResponder(
     IAuthorizationService authorizationService,
     IAuthorizationContextService authorizationContextService,
     IDiscordRestChannelAPI channelApi,
     IDesignatedChannelService designatedChannelService,
     IModerationService moderationService)
 {
     _authorizationService        = authorizationService;
     _authorizationContextService = authorizationContextService;
     _channelApi = channelApi;
     _designatedChannelService = designatedChannelService;
     _moderationService        = moderationService;
 }
コード例 #17
0
 public MessageLoggingResponder(ILogger <MessageLoggingResponder> logger,
                                IDiscordRestChannelAPI channelApi,
                                IDesignatedChannelService designatedChannelService,
                                IAuthorizationContextService authService,
                                IThreadService threadService,
                                CacheService cache)
 {
     _logger     = logger;
     _channelApi = channelApi;
     _designatedChannelService = designatedChannelService;
     _authService = authService;
     _threadSvc   = threadService;
     _cache       = cache;
 }
コード例 #18
0
 /// <summary>
 /// Constructs a new <see cref="PromotionLoggingHandler"/> object, with injected dependencies.
 /// </summary>
 public PromotionLoggingHandler(
     IAuthorizationService authorizationService,
     IDiscordSocketClient discordSocketClient,
     IDesignatedChannelService designatedChannelService,
     IUserService userService,
     IPromotionsService promotionsService,
     IOptions <ModixConfig> modixConfig)
 {
     AuthorizationService     = authorizationService;
     DiscordSocketClient      = discordSocketClient;
     DesignatedChannelService = designatedChannelService;
     UserService       = userService;
     PromotionsService = promotionsService;
     ModixConfig       = modixConfig.Value;
 }
コード例 #19
0
 /// <summary>
 /// Constructs a new <see cref="PromotionLoggingHandler"/> object, with injected dependencies.
 /// </summary>
 public PromotionLoggingHandler(
     IAuthorizationService authorizationService,
     IDiscordClient discordClient,
     IDesignatedChannelService designatedChannelService,
     IUserService userService,
     IPromotionsService promotionsService,
     ISelfUserProvider selfUserProvider)
 {
     AuthorizationService     = authorizationService;
     DiscordClient            = discordClient;
     DesignatedChannelService = designatedChannelService;
     UserService       = userService;
     PromotionsService = promotionsService;
     SelfUserProvider  = selfUserProvider;
 }
コード例 #20
0
 public MessageCheckResponder(
     IMessageContentPatternService msgContentPatternSvc,
     IDiscordRestChannelAPI channelApi,
     IDiscordRestUserAPI userApi,
     IDesignatedChannelService designatedChannelService,
     IAuthorizationService authService,
     IAuthorizationContextService remoraAuthService,
     IDeletedMessageRepository deletedRepository,
     IThreadService threadService
     )
 {
     _msgContentPatternSvc = msgContentPatternSvc;
     _channelApi           = channelApi;
     _userApi = userApi;
     _designatedChannelService = designatedChannelService;
     _authService              = authService;
     _remoraAuthService        = remoraAuthService;
     _deletedMessageRepository = deletedRepository;
     _threadSvc = threadService;
 }
コード例 #21
0
 public DesignatedChannelModule(IAuthorizationService authorizationService, IDesignatedChannelService designatedChannelService)
 {
     AuthorizationService     = authorizationService;
     DesignatedChannelService = designatedChannelService;
 }
コード例 #22
0
 public ChannelController(DiscordSocketClient client, IAuthorizationService modixAuth, IDesignatedChannelService channelService) : base(client, modixAuth)
 {
     ChannelService = channelService;
 }
コード例 #23
0
 public DesignatedChannelModule(IAuthorizationService authorizationService, IDesignatedChannelService designatedChannelService, IOptions <ModixConfig> config)
 {
     AuthorizationService     = authorizationService;
     DesignatedChannelService = designatedChannelService;
     Config = config.Value;
 }