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

@@ -42,7 +42,7 @@ namespace NadekoBot.Modules.Permissions
var channel = (ITextChannel)ctx.Channel;
if (secs < 0 || secs > 3600)
{
await ReplyErrorLocalizedAsync("invalid_second_param_between", 0, 3600).ConfigureAwait(false);
await ReplyErrorLocalizedAsync(strs.invalid_second_param_between(0, 3600));
return;
}
@@ -72,14 +72,13 @@ namespace NadekoBot.Modules.Permissions
{
var activeCds = ActiveCooldowns.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<ActiveCooldown>());
activeCds.RemoveWhere(ac => ac.Command == name);
await ReplyConfirmLocalizedAsync("cmdcd_cleared",
Format.Bold(name)).ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.cmdcd_cleared(Format.Bold(name)));
}
else
{
await ReplyConfirmLocalizedAsync("cmdcd_add",
await ReplyConfirmLocalizedAsync(strs.cmdcd_add(
Format.Bold(name),
Format.Bold(secs.ToString())).ConfigureAwait(false);
Format.Bold(secs.ToString())));
}
}
@@ -91,7 +90,7 @@ namespace NadekoBot.Modules.Permissions
var localSet = CommandCooldowns.GetOrAdd(channel.Guild.Id, new ConcurrentHashSet<CommandCooldown>());
if (!localSet.Any())
await ReplyConfirmLocalizedAsync("cmdcd_none").ConfigureAwait(false);
await ReplyConfirmLocalizedAsync(strs.cmdcd_none).ConfigureAwait(false);
else
await channel.SendTableAsync("", localSet.Select(c => c.CommandName + ": " + c.Seconds + GetText(strs.sec)), s => $"{s,-30}", 2).ConfigureAwait(false);
}