public static async Task SetPermittedStateAsync(this GuildSettingsService service, Snowflake guildId, bool state) { var settings = await service.GetGuildSettingsAsync(guildId); settings.IsPermitted = state; await service.UpdateGuildSettingsAsync(settings); }
public static async Task RemovePrefixAsync(this GuildSettingsService service, Snowflake guildId, IPrefix prefix) { var guildSettings = await service.GetGuildSettingsAsync(guildId); guildSettings.Prefixes.Remove(prefix); await service.UpdateGuildSettingsAsync(guildSettings); }
public AdminModule( ILogger <AdminModule> logger, BotUserRolesRepository botUserRolesRepo, GuildSettingsService guildSettingsService) { _logger = logger; _botUserRolesRepo = botUserRolesRepo; _guildSettingsService = guildSettingsService; }
public CommandRequestPipelineBehaviour( ILogger <CommandRequestPipelineBehaviour <TRequest, TResponse> > logger, DiscordErrorLogger discordErrorLogger, GuildSettingsService guildSettingsService ) { _logger = logger; _discordErrorLogger = discordErrorLogger; _guildSettingsService = guildSettingsService; }
public CommandEventHandler( IOptions <BotOptions> options, ILogger <CommandEventHandler> logger, DiscordErrorLogger discordErrorLogger, GuildSettingsService guildSettingsService ) { _options = options.Value; _logger = logger; _discordErrorLogger = discordErrorLogger; _guildSettingsService = guildSettingsService; }
public SetLocalQuotesHandler(GuildSettingsService guildSettingsService) { _guildSettingsService = guildSettingsService; }
public static async Task <IReadOnlyList <IPrefix> > GetGuildPrefixesAsync(this GuildSettingsService service, Snowflake guildId) { var settings = await service.GetGuildSettingsAsync(guildId); return(settings.Prefixes); }
public static async Task <bool> GuildIsPermittedAsync(this GuildSettingsService service, Snowflake guildId) { var settings = await service.GetGuildSettingsAsync(guildId); return(settings.IsPermitted); }
public CheeseBotPrefixProvider(GuildSettingsService guildSettings, DefaultGuildSettingsProvider defaultGuildSettingsProvider) { _guildSettings = guildSettings; _defaultGuildSettingsProvider = defaultGuildSettingsProvider; }
protected override async ValueTask BeforeExecutedAsync() { CurrentGuildSettings = await GuildSettingsService.GetGuildSettingsAsync(Context.GuildId); }
public SettingsCommands(GuildSettingsService guildSettingsService) { _guildSettingsService = guildSettingsService; }
public GetGuildSettingsHandler(GuildSettingsService guildSettingsService) { _guildSettingsService = guildSettingsService; }
public SetSaveReactionHandler(GuildSettingsService guildSettingsService) { _guildSettingsService = guildSettingsService; }