Error when removing non-existing role from whitelist
This commit is contained in:
parent
ffaedfa962
commit
91d178049b
1 changed files with 10 additions and 2 deletions
|
@ -134,8 +134,16 @@ namespace Geekbot.net.Commands
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_redis.HashDelete($"{Context.Guild.Id}:RoleWhitelist", roleName);
|
|
||||||
|
var success = _redis.HashDelete($"{Context.Guild.Id}:RoleWhitelist", roleName.ToLower());
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
await ReplyAsync($"Removed {roleName} from the whitelist");
|
await ReplyAsync($"Removed {roleName} from the whitelist");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await ReplyAsync("There is not whitelisted role with that name...");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue