mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 18:28:27 -04:00
Added many more braces for multiline if's, Improved .crypto command quite a bit and applied locale-specific format
This commit is contained in:
@@ -57,10 +57,12 @@ public partial class Utility
|
||||
user.ToString());
|
||||
|
||||
if (action == AddRemove.Add)
|
||||
{
|
||||
if (success)
|
||||
await ReplyConfirmLocalizedAsync(strs.stream_role_bl_add(Format.Bold(user.ToString())));
|
||||
else
|
||||
await ReplyConfirmLocalizedAsync(strs.stream_role_bl_add_fail(Format.Bold(user.ToString())));
|
||||
}
|
||||
else if (success)
|
||||
await ReplyConfirmLocalizedAsync(strs.stream_role_bl_rem(Format.Bold(user.ToString())));
|
||||
else
|
||||
@@ -80,10 +82,12 @@ public partial class Utility
|
||||
user.ToString());
|
||||
|
||||
if (action == AddRemove.Add)
|
||||
{
|
||||
if (success)
|
||||
await ReplyConfirmLocalizedAsync(strs.stream_role_wl_add(Format.Bold(user.ToString())));
|
||||
else
|
||||
await ReplyConfirmLocalizedAsync(strs.stream_role_wl_add_fail(Format.Bold(user.ToString())));
|
||||
}
|
||||
else if (success)
|
||||
await ReplyConfirmLocalizedAsync(strs.stream_role_wl_rem(Format.Bold(user.ToString())));
|
||||
else
|
||||
|
@@ -90,9 +90,7 @@ public class StreamRoleService : INService
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
success = streamRoleSettings.Whitelist.Add(userObj);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -109,9 +107,7 @@ public class StreamRoleService : INService
|
||||
success = streamRoleSettings.Blacklist.Remove(toRemove);
|
||||
}
|
||||
else
|
||||
{
|
||||
success = streamRoleSettings.Blacklist.Add(userObj);
|
||||
}
|
||||
}
|
||||
|
||||
await uow.SaveChangesAsync();
|
||||
@@ -270,6 +266,7 @@ public class StreamRoleService : INService
|
||||
{
|
||||
//check if user is in the addrole
|
||||
if (user.RoleIds.Contains(setting.AddRoleId))
|
||||
{
|
||||
try
|
||||
{
|
||||
addRole ??= user.Guild.GetRole(setting.AddRoleId);
|
||||
@@ -287,6 +284,7 @@ public class StreamRoleService : INService
|
||||
Log.Warning(ex, "Error removing stream role(s). Forcibly disabling stream role feature");
|
||||
throw new StreamRolePermissionException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user