Add wrapper for DeleteValue

This commit is contained in:
Daniel_I_Am 2020-10-16 18:04:04 +02:00
parent f0d01f1a65
commit 80a8a5f6db
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84
2 changed files with 8 additions and 1 deletions

View File

@ -84,6 +84,12 @@ namespace ChaosBot.ConfigHelpers
return _appSettingsWrapper.GetSection(key); return _appSettingsWrapper.GetSection(key);
} }
public void DeleteValue(string key, ulong guildId)
{
ConfigurationRepository.DeleteValue(key, guildId);
}
/** /**
* Get the available configuration flags * Get the available configuration flags
* <returns>Immutable dictionary of config-key/type pairs</returns> * <returns>Immutable dictionary of config-key/type pairs</returns>

View File

@ -170,8 +170,9 @@ namespace ChaosBot.Discord.Modules.Admin
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
EmbedBuilder embed = new EmbedBuilder(); 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.WithColor(new Color(255, 255, 0));
embed.Title = $"Configuration Reset"; embed.Title = $"Configuration Reset";