- 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

@@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Utility
"GetHashCode",
"GetType"
});
await SendConfirmAsync(GetText(strs.calcops(Prefix), string.Join(", ", selection)).ConfigureAwait(false));
await SendConfirmAsync(GetText(strs.calcops(Prefix)), string.Join(", ", selection));
}
}

View File

@@ -135,10 +135,10 @@ namespace NadekoBot.Modules.Utility
StringBuilder str = new StringBuilder();
foreach (var kvp in CmdHandler.UserMessagesSent.OrderByDescending(kvp => kvp.Value).Skip(page * activityPerPage).Take(activityPerPage))
{
str.AppendLine(GetText(strs.activity_line,
str.AppendLine(GetText(strs.activity_line(
++startCount,
Format.Bold(kvp.Key.ToString()),
kvp.Value / _stats.GetUptime().TotalSeconds, kvp.Value));
kvp.Value / _stats.GetUptime().TotalSeconds, kvp.Value)));
}
await ctx.Channel.EmbedAsync(_eb.Create()

View File

@@ -99,7 +99,7 @@ namespace NadekoBot.Modules.Utility
var inv = invites.ElementAt(index);
await inv.DeleteAsync().ConfigureAwait(false);
await ReplyAsync(GetText(strs.invite_deleted(Format.Bold(inv.Code.ToString()))).ConfigureAwait(false));
await ReplyAsync(GetText(strs.invite_deleted(Format.Bold(inv.Code))));
}
}
}

View File

@@ -190,11 +190,11 @@ namespace NadekoBot.Modules.Utility
try
{
await SendConfirmAsync(
"⏰ " + GetText(strs.remind,
"⏰ " + GetText(strs.remind(
Format.Bold(!isPrivate ? $"<#{targetId}>" : ctx.User.Username),
Format.Bold(message),
$"{ts.Days}d {ts.Hours}h {ts.Minutes}min",
gTime, gTime)).ConfigureAwait(false);
gTime, gTime))).ConfigureAwait(false);
}
catch
{

View File

@@ -89,7 +89,7 @@ namespace NadekoBot.Modules.Utility
}
res = Math.Round(res, 4);
await SendConfirmAsync(GetText(strs.convert(value, originUnit.Triggers.Last(), res, targetUnit.Triggers.Last())).ConfigureAwait(false));
await SendConfirmAsync(GetText(strs.convert(value, originUnit.Triggers.Last(), res, targetUnit.Triggers.Last())));
}
}
}

View File

@@ -259,8 +259,8 @@ namespace NadekoBot.Modules.Utility
.AddField(GetText(strs.owner_ids), ownerIds, true)
.AddField(GetText(strs.uptime), _stats.GetUptimeString("\n"), true)
.AddField(GetText(strs.presence),
GetText(strs.presence_txt,
_coord.GetGuildCount(), _stats.TextChannels, _stats.VoiceChannels), true))
GetText(strs.presence_txt(
_coord.GetGuildCount(), _stats.TextChannels, _stats.VoiceChannels)), true))
.ConfigureAwait(false);
}