Add wrapper for DeleteValue
This commit is contained in:
parent
f0d01f1a65
commit
80a8a5f6db
@ -84,6 +84,12 @@ namespace ChaosBot.ConfigHelpers
|
||||
return _appSettingsWrapper.GetSection(key);
|
||||
}
|
||||
|
||||
public void DeleteValue(string key, ulong guildId)
|
||||
{
|
||||
ConfigurationRepository.DeleteValue(key, guildId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the available configuration flags
|
||||
* <returns>Immutable dictionary of config-key/type pairs</returns>
|
||||
|
||||
@ -170,8 +170,9 @@ namespace ChaosBot.Discord.Modules.Admin
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
EmbedBuilder embed = new EmbedBuilder();
|
||||
Configuration config = new Configuration();
|
||||
|
||||
ConfigurationRepository.DeleteValue(key, Context.Guild.Id);
|
||||
config.DeleteValue(key, Context.Guild.Id);
|
||||
|
||||
embed.WithColor(new Color(255, 255, 0));
|
||||
embed.Title = $"Configuration Reset";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user