public DiscordGuildDownloadQuartzHandler(ILogger <DiscordGuildDownloadQuartzHandler> logger, IConfiguration configuration, IScheduler scheduler, IDiscordGuildRoleService roleService) { _logger = logger; _configuration = configuration; _scheduler = scheduler; _roleService = roleService; }
public void Setup() { _appFixture = new ApplicationFixture(); _roleService = Substitute.For <IDiscordGuildRoleService>(); _dateTime = Substitute.For <IDateTime>(); _roleConfiguration = Substitute.For <IRoleConfiguration>(); _directMessageService = Substitute.For <IDiscordDirectMessageService>(); _dbContext = Substitute.For <IApplicationDbContext>(); _actionLogMock = _dbContext.ConfigureMockDbSet(x => x.ModerationActionLogs); _activeMuteMock = _dbContext.ConfigureMockDbSet(x => x.ModerationActiveMutes); _currentUserService = Substitute.For <ICurrentUserService>(); _currentUserId = 14245; _currentUserService.UserId.Returns(_currentUserId.ToString()); _roleId = 14245; _roleConfiguration.MuteRoleId.Returns(_roleId); _appFixture.OnConfigureServices += (_, services) => { services.AddSingleton(_roleService); services.AddSingleton(_dbContext); services.AddSingleton(_dateTime); services.AddSingleton(_currentUserService); services.AddSingleton(_roleConfiguration); services.AddSingleton(_directMessageService); }; }
public ApplyReactionRolesCommandHandler(IApplicationDbContext context, IDiscordGuildRoleService roleService, ILogger <ApplyReactionRolesCommandHandler> logger) { _context = context; _roleService = roleService; _logger = logger; }
public ApplyJoinRolesCommandHandler(IApplicationDbContext applicationDbContext, IDiscordGuildService discordGuildService, IDiscordGuildRoleService discordGuildRoleService, IDiscordGuildMemberService discordGuildMemberService, ILogger <ApplyJoinRolesCommandHandler> logger) { _applicationDbContext = applicationDbContext; _discordGuildService = discordGuildService; _discordGuildRoleService = discordGuildRoleService; _discordGuildMemberService = discordGuildMemberService; _logger = logger; }
public void Setup() { _appFixture = new ApplicationFixture(); _dbContext = Substitute.For <IApplicationDbContext>(); _roleService = Substitute.For <IDiscordGuildRoleService>(); _appFixture.OnConfigureServices += (_, services) => { services.AddSingleton(_dbContext); services.AddSingleton(_roleService); }; }
public UnMuteExpiredMutesCommandHandler(IApplicationDbContext dbContext, IDiscordGuildRoleService roleService, IDiscordConfiguration discordConfiguration, IRoleConfiguration roleConfiguration, IDateTime dateTime, ILogger <UnMuteExpiredMutesCommandHandler> logger) { _dbContext = dbContext; _roleService = roleService; _discordConfiguration = discordConfiguration; _roleConfiguration = roleConfiguration; _dateTime = dateTime; _logger = logger; }
public MuteCommandHandler(IDiscordGuildRoleService roleService, IDateTime dateTime, IApplicationDbContext dbContext, IRoleConfiguration roleConfiguration, IDiscordDirectMessageService directMessageService, ICurrentUserService currentUserService) { _roleService = roleService; _dateTime = dateTime; _dbContext = dbContext; _roleConfiguration = roleConfiguration; _directMessageService = directMessageService; _currentUserService = currentUserService; }
public void Setup() { _appFixture = new ApplicationFixture(); _dateTime = Substitute.For <IDateTime>(); _dbContext = Substitute.For <IApplicationDbContext>(); _roleService = Substitute.For <IDiscordGuildRoleService>(); _discordConfiguration = Substitute.For <IDiscordConfiguration>(); _roleConfiguration = Substitute.For <IRoleConfiguration>(); _roleConfiguration.MuteRoleId.Returns(_roleId); _appFixture.OnConfigureServices += (_, services) => { services.AddSingleton(_dbContext); services.AddSingleton(_dateTime); services.AddSingleton(_roleService); services.AddSingleton(_discordConfiguration); services.AddSingleton(_roleConfiguration); }; }
public ApplyConditionalRolesJob(IMediator mediator, IDiscordGuildRoleService roleService) { _mediator = mediator; _roleService = roleService; }
public ApplyLevelRolesCommandHandler(IApplicationDbContext context, IDiscordGuildRoleService roleService) { _context = context; _roleService = roleService; }