- Fixed counting parameters which have formats in response strings

- Almost finished porting localized string keys as methods
- Compiles
This commit is contained in:
Kwoth
2021-07-27 13:07:23 +02:00
parent 0115d35247
commit 4484732f5d
29 changed files with 94 additions and 95 deletions

View File

@@ -105,9 +105,7 @@ namespace NadekoBot.Modules.Games
if (submissions.Length == 1)
{
await ctx.Channel.EmbedAsync(_eb.Create().WithOkColor()
.WithDescription(
GetText(strs.acro_winner_only,
Format.Bold(submissions.First().Key.UserName)))
.WithDescription(GetText(strs.acro_winner_only(Format.Bold(submissions.First().Key.UserName))))
.WithFooter(submissions.First().Key.Input))
.ConfigureAwait(false);
return;
@@ -138,8 +136,8 @@ $@"--
var winner = table.First();
var embed = _eb.Create().WithOkColor()
.WithTitle(GetText(strs.acrophobia))
.WithDescription(GetText(strs.acro_winner(Format.Bold(winner.Key.UserName)),
Format.Bold(winner.Value.ToString())))
.WithDescription(GetText(strs.acro_winner(Format.Bold(winner.Key.UserName),
Format.Bold(winner.Value.ToString()))))
.WithFooter(winner.Key.Input);
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);

View File

@@ -277,7 +277,7 @@ namespace NadekoBot.Modules.Games.Common.Trivia
foreach (var kvp in Users.OrderByDescending(kvp => kvp.Value))
{
sb.AppendLine(GetText(strs.trivia_points(Format.Bold(kvp.Key.ToString()), kvp.Value).SnPl(kvp.Value)));
sb.AppendLine(GetText(strs.trivia_points(Format.Bold(kvp.Key.ToString()), kvp.Value)).SnPl(kvp.Value));
}
return sb.ToString();

View File

@@ -27,7 +27,7 @@ namespace NadekoBot.Modules.Games
[RequireContext(ContextType.Guild)]
public async Task Hangmanlist()
{
await SendConfirmAsync(Format.Code(GetText(strs.hangman_types(Prefix)) + "\n" + string.Join("\n", _service.TermPool.Data.Keys)).ConfigureAwait(false));
await SendConfirmAsync(Format.Code(GetText(strs.hangman_types(Prefix)) + "\n" + string.Join("\n", _service.TermPool.Data.Keys)));
}
[NadekoCommand, Aliases]

View File

@@ -109,10 +109,10 @@ namespace NadekoBot.Modules.Games
for (int i = 0; i < stats.Length; i++)
{
var (Index, votes, Text) = stats[i];
sb.AppendLine(GetText(strs.poll_result,
sb.AppendLine(GetText(strs.poll_result(
Index + 1,
Format.Bold(Text),
Format.Bold(votes.ToString())));
Format.Bold(votes.ToString()))));
}
return eb.WithDescription(sb.ToString())

View File

@@ -122,12 +122,8 @@ namespace NadekoBot.Modules.Games.Services
{
if (pc.Verbose)
{
var returnMsg = _strings.GetText(
strs.perm_prevent(
guild.Id,
index + 1,
Format.Bold(pc.Permissions[index]
.GetCommand(_cmd.GetPrefix(guild), (SocketGuild)guild))));
var returnMsg = _strings.GetText(strs.perm_prevent(index + 1,
Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), (SocketGuild)guild))));
try { await usrMsg.Channel.SendErrorAsync(_eb, returnMsg).ConfigureAwait(false); } catch { }
Log.Information(returnMsg);

View File

@@ -99,8 +99,8 @@ namespace NadekoBot.Modules.Games.Services
private async Task Pr_OnVoted(IUserMessage msg, IGuildUser usr)
{
var toDelete = await msg.Channel.SendConfirmAsync(_eb, _strs.GetText(strs.poll_voted,
usr.Guild.Id, Format.Bold(usr.ToString())))
var toDelete = await msg.Channel.SendConfirmAsync(_eb,
_strs.GetText(strs.poll_voted(Format.Bold(usr.ToString())), usr.GuildId))
.ConfigureAwait(false);
toDelete.DeleteAfter(5);
try { await msg.DeleteAsync().ConfigureAwait(false); } catch { }