Changed (almost) all responses to make them use the new system instead of raw strings

- Fixed many invalid string keys
This commit is contained in:
Kwoth
2021-07-30 22:42:10 +02:00
parent 4484732f5d
commit 919bedeae6
80 changed files with 883 additions and 859 deletions

View File

@@ -25,14 +25,14 @@ namespace NadekoBot.Modules.Administration
// the user can't aar the role which is higher or equal to his highest role
if (ctx.User.Id != guser.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= role.Position)
{
await ReplyErrorLocalizedAsync("hierarchy");
await ReplyErrorLocalizedAsync(strs.hierarchy);
return;
}
var roles = await _service.ToggleAarAsync(ctx.Guild.Id, role.Id);
if (roles.Count == 0)
{
await ReplyConfirmLocalizedAsync("aar_disabled");
await ReplyConfirmLocalizedAsync(strs.aar_disabled);
}
else if (roles.Contains(role.Id))
{
@@ -40,7 +40,7 @@ namespace NadekoBot.Modules.Administration
}
else
{
await ReplyConfirmLocalizedAsync("aar_role_removed", Format.Bold(role.ToString()));
await ReplyConfirmLocalizedAsync(strs.aar_role_removed(Format.Bold(role.ToString())));
}
}
@@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Administration
{
if (!_service.TryGetRoles(ctx.Guild.Id, out var roles))
{
await ReplyConfirmLocalizedAsync("aar_none");
await ReplyConfirmLocalizedAsync(strs.aar_none);
return;
}
@@ -63,9 +63,9 @@ namespace NadekoBot.Modules.Administration
await _service.SetAarRolesAsync(ctx.Guild.Id, existing.Select(x => x.Id));
}
await ReplyConfirmLocalizedAsync("aar_roles",
await ReplyConfirmLocalizedAsync(strs.aar_roles(
'\n' + existing.Select(x => Format.Bold(x.ToString()))
.JoinWith(",\n"));
.JoinWith(",\n")));
}
}
}