diff --git a/src/NadekoBot.Generators/LocalizedStringsGenerator.cs b/src/NadekoBot.Generators/LocalizedStringsGenerator.cs index fff279bb0..742620d19 100644 --- a/src/NadekoBot.Generators/LocalizedStringsGenerator.cs +++ b/src/NadekoBot.Generators/LocalizedStringsGenerator.cs @@ -25,7 +25,7 @@ namespace NadekoBot.Generators public readonly struct LocStr { public readonly string Key; - public readonly object[] Parms; + public readonly object[] Params; public LocStr(string key, params object[] data) { @@ -59,7 +59,7 @@ namespace NadekoBot.Generators foreach (var field in fields) { - var matches = Regex.Matches(field.Value, @"{(?\d)}"); + var matches = Regex.Matches(field.Value, @"{(?\d)[}:]"); var max = 0; foreach (Match match in matches) { diff --git a/src/NadekoBot/Modules/Administration/ProtectionCommands.cs b/src/NadekoBot/Modules/Administration/ProtectionCommands.cs index ad0c13991..aefce0dbc 100644 --- a/src/NadekoBot/Modules/Administration/ProtectionCommands.cs +++ b/src/NadekoBot/Modules/Administration/ProtectionCommands.cs @@ -266,10 +266,10 @@ namespace NadekoBot.Modules.Administration add = $" ({TimeSpan.FromMinutes(settings.MuteTime):hh\\hmm\\m})"; } - return GetText(strs.spam_stats, + return GetText(strs.spam_stats( Format.Bold(settings.MessageThreshold.ToString()), - Format.Bold(settings.Action.ToString() + add), - ignoredString); + Format.Bold(settings.Action + add), + ignoredString)); } private string GetAntiRaidString(AntiRaidStats stats) @@ -280,11 +280,11 @@ namespace NadekoBot.Modules.Administration { actionString += $" **({TimeSpan.FromMinutes(stats.AntiRaidSettings.PunishDuration):hh\\hmm\\m})**"; } - - return GetText(strs.raid_stats, + + return GetText(strs.raid_stats( Format.Bold(stats.AntiRaidSettings.UserThreshold.ToString()), Format.Bold(stats.AntiRaidSettings.Seconds.ToString()), - actionString); + actionString)); } } } diff --git a/src/NadekoBot/Modules/Administration/UserPunishCommands.cs b/src/NadekoBot/Modules/Administration/UserPunishCommands.cs index 2a9142481..4be1f2e6a 100644 --- a/src/NadekoBot/Modules/Administration/UserPunishCommands.cs +++ b/src/NadekoBot/Modules/Administration/UserPunishCommands.cs @@ -96,13 +96,12 @@ namespace NadekoBot.Modules.Administration .WithOkColor(); if (punishment is null) { - embed.WithDescription(GetText(strs.user_warned, - Format.Bold(user.ToString()))); + embed.WithDescription(GetText(strs.user_warned(Format.Bold(user.ToString())))); } else { - embed.WithDescription(GetText(strs.user_warned_and_punished(Format.Bold(user.ToString())), - Format.Bold(punishment.Punishment.ToString()))); + embed.WithDescription(GetText(strs.user_warned_and_punished(Format.Bold(user.ToString()), + Format.Bold(punishment.Punishment.ToString())))); } if (dmFailed) @@ -233,10 +232,10 @@ namespace NadekoBot.Modules.Administration foreach (var w in warnings) { i++; - var name = GetText(strs.warned_on_by, + var name = GetText(strs.warned_on_by( w.DateAdded.Value.ToString("dd.MM.yyy"), w.DateAdded.Value.ToString("HH:mm"), - w.Moderator); + w.Moderator)); if (w.Forgiven) name = $"{Format.Strikethrough(name)} {GetText(strs.warn_cleared_by(w.ForgivenBy))}"; @@ -685,7 +684,7 @@ namespace NadekoBot.Modules.Administration try { - await user.SendErrorAsync(_eb, GetText(strs.sbdm(Format.Bold(ctx.Guild.Name), msg)).ConfigureAwait(false)); + await user.SendErrorAsync(_eb, GetText(strs.sbdm(Format.Bold(ctx.Guild.Name), msg))); } catch { @@ -784,7 +783,7 @@ namespace NadekoBot.Modules.Administration //send a message but don't wait for it var banningMessageTask = ctx.Channel.EmbedAsync(_eb.Create() .WithDescription(GetText(strs.mass_kill_in_progress(bans.Count()))) - .AddField(GetText(strs.invalid(missing), missStr)) + .AddField(GetText(strs.invalid(missing)), missStr) .WithOkColor()); //do the banning @@ -801,7 +800,7 @@ namespace NadekoBot.Modules.Administration await banningMessage.ModifyAsync(x => x.Embed = _eb.Create() .WithDescription(GetText(strs.mass_kill_completed(bans.Count()))) - .AddField(GetText(strs.invalid(missing), missStr)) + .AddField(GetText(strs.invalid(missing)), missStr) .WithOkColor() .Build()).ConfigureAwait(false); } diff --git a/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs b/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs index 7f1803c6d..641872f01 100644 --- a/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs +++ b/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs @@ -411,9 +411,10 @@ namespace NadekoBot.Modules.CustomReactions.Services { if (pc.Verbose) { - var returnMsg = _strings.GetText(strs.perm_prevent, sg.Id, - index + 1, - Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), sg))); + var returnMsg = _strings.GetText( + strs.perm_prevent(index + 1, + Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), sg))), + sg.Id); try { diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs b/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs index 1d830f16b..af48b465b 100644 --- a/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs +++ b/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs @@ -77,8 +77,10 @@ namespace NadekoBot.Modules.Gambling if (race.FinishedUsers[0].Bet > 0) { return SendConfirmAsync(GetText(strs.animal_race), - GetText(strs.animal_race_won_money(Format.Bold(winner.Username)), - winner.Animal.Icon, (race.FinishedUsers[0].Bet * (race.Users.Count - 1)) + CurrencySign)); + GetText(strs.animal_race_won_money( + Format.Bold(winner.Username), + winner.Animal.Icon, + (race.FinishedUsers[0].Bet * (race.Users.Count - 1)) + CurrencySign))); } else { @@ -153,9 +155,9 @@ namespace NadekoBot.Modules.Gambling var user = await ar.JoinRace(ctx.User.Id, ctx.User.ToString(), amount) .ConfigureAwait(false); if (amount > 0) - await SendConfirmAsync(GetText(strs.animal_race_join_bet(ctx.User.Mention, user.Animal.Icon, amount + CurrencySign)).ConfigureAwait(false)); + await SendConfirmAsync(GetText(strs.animal_race_join_bet(ctx.User.Mention, user.Animal.Icon, amount + CurrencySign))); else - await SendConfirmAsync(GetText(strs.animal_race_join(ctx.User.Mention, user.Animal.Icon)).ConfigureAwait(false)); + await SendConfirmAsync(GetText(strs.animal_race_join(ctx.User.Mention, user.Animal.Icon))); } catch (ArgumentOutOfRangeException) { @@ -176,7 +178,7 @@ namespace NadekoBot.Modules.Gambling } catch (NotEnoughFundsException) { - await SendErrorAsync(GetText(strs.not_enough(CurrencySign)).ConfigureAwait(false)); + await SendErrorAsync(GetText(strs.not_enough(CurrencySign))); } } } diff --git a/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs b/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs index 598a00463..ccc48398d 100644 --- a/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs +++ b/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs @@ -72,10 +72,10 @@ namespace NadekoBot.Modules.Gambling string potSizeStr = Format.Bold(potSize == 0 ? "∞" + CurrencySign : potSize.ToString() + CurrencySign); - return GetText(strs.new_reaction_event, - CurrencySign, - Format.Bold(amount + CurrencySign), - potSizeStr); + return GetText(strs.new_reaction_event( + CurrencySign, + Format.Bold(amount + CurrencySign), + potSizeStr)); } private string GetGameStatusDescription(long amount, long potSize) @@ -83,10 +83,10 @@ namespace NadekoBot.Modules.Gambling string potSizeStr = Format.Bold(potSize == 0 ? "∞" + CurrencySign : potSize.ToString() + CurrencySign); - return GetText(strs.new_gamestatus_event, - CurrencySign, - Format.Bold(amount + CurrencySign), - potSizeStr); + return GetText(strs.new_gamestatus_event( + CurrencySign, + Format.Bold(amount + CurrencySign), + potSizeStr)); } } } diff --git a/src/NadekoBot/Modules/Gambling/CurrencyRaffleCommands.cs b/src/NadekoBot/Modules/Gambling/CurrencyRaffleCommands.cs index 4bc7645e6..d6acc3b6a 100644 --- a/src/NadekoBot/Modules/Gambling/CurrencyRaffleCommands.cs +++ b/src/NadekoBot/Modules/Gambling/CurrencyRaffleCommands.cs @@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Gambling return; async Task OnEnded(IUser arg, long won) { - await SendConfirmAsync(GetText(strs.rafflecur_ended(CurrencyName, Format.Bold(arg.ToString()), won + CurrencySign)).ConfigureAwait(false)); + await SendConfirmAsync(GetText(strs.rafflecur_ended(CurrencyName, Format.Bold(arg.ToString()), won + CurrencySign))); } var res = await _service.JoinOrCreateGame(ctx.Channel.Id, ctx.User, amount, mixed, OnEnded) @@ -45,7 +45,7 @@ namespace NadekoBot.Modules.Gambling { await SendConfirmAsync(GetText(strs.rafflecur(res.Item1.GameType.ToString())), string.Join("\n", res.Item1.Users.Select(x => $"{x.DiscordUser} ({x.Amount})")), - footer: GetText(strs.rafflecur_joined(ctx.User.ToString())).ConfigureAwait(false)); + footer: GetText(strs.rafflecur_joined(ctx.User.ToString()))); } else { diff --git a/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs b/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs index bf1b6e4fc..ed0acf098 100644 --- a/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs +++ b/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs @@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Gambling { await ctx.Channel.SendFileAsync(ms, $"dice.{format.FileExtensions.First()}", - Format.Bold(ctx.User.ToString()) + " " + GetText(strs.dice_rolled(Format.Code(gen.ToString()))).ConfigureAwait(false)); + Format.Bold(ctx.User.ToString()) + " " + GetText(strs.dice_rolled(Format.Code(gen.ToString())))); } } @@ -129,9 +129,9 @@ namespace NadekoBot.Modules.Gambling await ctx.Channel.SendFileAsync(ms, $"dice.{format.FileExtensions.First()}", Format.Bold(ctx.User.ToString()) + " " + GetText(strs.dice_rolled_num(Format.Bold(values.Count.ToString()))) + - " " + GetText(strs.total_average, + " " + GetText(strs.total_average( Format.Bold(values.Sum().ToString()), - Format.Bold((values.Sum() / (1.0f * values.Count)).ToString("N2")))).ConfigureAwait(false); + Format.Bold((values.Sum() / (1.0f * values.Count)).ToString("N2"))))); } } diff --git a/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs b/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs index 1f981d30e..5cd7ef8a6 100644 --- a/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs +++ b/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs @@ -68,9 +68,9 @@ namespace NadekoBot.Modules.Gambling } var msg = count != 1 ? Format.Bold(ctx.User.ToString()) + " " + GetText(strs.flip_results(count, headCount, tailCount)) - : Format.Bold(ctx.User.ToString()) + " " + GetText(strs.flipped, headCount > 0 + : Format.Bold(ctx.User.ToString()) + " " + GetText(strs.flipped(headCount > 0 ? Format.Bold(GetText(strs.heads)) - : Format.Bold(GetText(strs.tails))); + : Format.Bold(GetText(strs.tails)))); await ctx.Channel.SendFileAsync(stream, $"{count} coins.{format.FileExtensions.First()}", msg).ConfigureAwait(false); } } diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index e85c95b00..31d3ae1e1 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -196,8 +196,8 @@ namespace NadekoBot.Modules.Gambling } var embed = _eb.Create() - .WithTitle(GetText(strs.transactions, - ((SocketGuild)ctx.Guild)?.GetUser(userId)?.ToString() ?? $"{userId}")) + .WithTitle(GetText(strs.transactions( + ((SocketGuild)ctx.Guild)?.GetUser(userId)?.ToString() ?? $"{userId}"))) .WithOkColor(); var desc = ""; @@ -480,9 +480,9 @@ namespace NadekoBot.Modules.Gambling if (result.Multiplier > 0) { var win = (long)(amount * result.Multiplier); - str += GetText(strs.br_win, + str += GetText(strs.br_win( n(win) + CurrencySign, - result.Threshold + (result.Roll == 100 ? " 👑" : "")); + result.Threshold + (result.Roll == 100 ? " 👑" : ""))); await _cs.AddAsync(ctx.User, "Betroll Gamble", win, false, gamble: true).ConfigureAwait(false); } @@ -652,15 +652,13 @@ namespace NadekoBot.Modules.Gambling "Rps-win", amount, gamble: true).ConfigureAwait(false); embed.WithOkColor(); embed.AddField(GetText(strs.won), n(amount)); - msg = GetText(strs.rps_win, ctx.User.Mention, - getRpsPick(pick), getRpsPick(nadekoPick)); + msg = GetText(strs.rps_win(ctx.User.Mention, getRpsPick(pick), getRpsPick(nadekoPick))); } else { embed.WithErrorColor(); amount = 0; - msg = GetText(strs.rps_win(ctx.Client.CurrentUser.Mention, getRpsPick(nadekoPick)), - getRpsPick(pick)); + msg = GetText(strs.rps_win(ctx.Client.CurrentUser.Mention, getRpsPick(nadekoPick), getRpsPick(pick))); } embed diff --git a/src/NadekoBot/Modules/Gambling/ShopCommands.cs b/src/NadekoBot/Modules/Gambling/ShopCommands.cs index e374131b2..b49bd1a58 100644 --- a/src/NadekoBot/Modules/Gambling/ShopCommands.cs +++ b/src/NadekoBot/Modules/Gambling/ShopCommands.cs @@ -433,7 +433,7 @@ namespace NadekoBot.Modules.Gambling var embed = _eb.Create().WithOkColor(); if (entry.Type == ShopEntryType.Role) - return embed.AddField(GetText(strs.name), GetText(strs.shop_role(Format.Bold(ctx.Guild.GetRole(entry.RoleId)?.Name ?? "MISSING_ROLE")), true)) + return embed.AddField(GetText(strs.name), GetText(strs.shop_role(Format.Bold(ctx.Guild.GetRole(entry.RoleId)?.Name ?? "MISSING_ROLE"))), true) .AddField(GetText(strs.price), entry.Price.ToString(), true) .AddField(GetText(strs.type), entry.Type.ToString(), true); else if (entry.Type == ShopEntryType.List) diff --git a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs b/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs index 47a6cb8cc..dfa530c84 100644 --- a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs +++ b/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs @@ -68,9 +68,9 @@ namespace NadekoBot.Modules.Gambling await ReplyErrorLocalizedAsync("not_enough", CurrencySign); return; } - var msg = GetText(strs.waifu_claimed, + var msg = GetText(strs.waifu_claimed( Format.Bold(target.ToString()), - amount + CurrencySign); + amount + CurrencySign)); if (w.Affinity?.UserId == ctx.User.Id) msg += "\n" + GetText(strs.waifu_fulfilled(target, w.Price + CurrencySign)); else @@ -292,7 +292,7 @@ namespace NadekoBot.Modules.Gambling .AddField(GetText(strs.changes_of_heart), $"{wi.AffinityCount} - \"the {affInfo}\"", true) .AddField(GetText(strs.divorces), wi.DivorceCount.ToString(), true) .AddField("\u200B", "\u200B", true) - .AddField(GetText(strs.fans(wi.Fans.Count), fansStr, true)) + .AddField(GetText(strs.fans(wi.Fans.Count)), fansStr, true) .AddField($"Waifus ({wi.ClaimCount})", wi.ClaimCount == 0 ? nobody : string.Join("\n", wi.Claims.Shuffle().Take(30)), true) diff --git a/src/NadekoBot/Modules/Games/AcropobiaCommands.cs b/src/NadekoBot/Modules/Games/AcropobiaCommands.cs index 198ed0307..8dd6e2761 100644 --- a/src/NadekoBot/Modules/Games/AcropobiaCommands.cs +++ b/src/NadekoBot/Modules/Games/AcropobiaCommands.cs @@ -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); diff --git a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs b/src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs index c8320c981..dd625a70c 100644 --- a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs +++ b/src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs @@ -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(); diff --git a/src/NadekoBot/Modules/Games/HangmanCommands.cs b/src/NadekoBot/Modules/Games/HangmanCommands.cs index 1332bd3fa..5123486d6 100644 --- a/src/NadekoBot/Modules/Games/HangmanCommands.cs +++ b/src/NadekoBot/Modules/Games/HangmanCommands.cs @@ -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] diff --git a/src/NadekoBot/Modules/Games/PollCommands.cs b/src/NadekoBot/Modules/Games/PollCommands.cs index 2e70ed235..76dede1ed 100644 --- a/src/NadekoBot/Modules/Games/PollCommands.cs +++ b/src/NadekoBot/Modules/Games/PollCommands.cs @@ -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()) diff --git a/src/NadekoBot/Modules/Games/Services/ChatterbotService.cs b/src/NadekoBot/Modules/Games/Services/ChatterbotService.cs index 7a33354e8..ab3409fd2 100644 --- a/src/NadekoBot/Modules/Games/Services/ChatterbotService.cs +++ b/src/NadekoBot/Modules/Games/Services/ChatterbotService.cs @@ -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); diff --git a/src/NadekoBot/Modules/Games/Services/PollService.cs b/src/NadekoBot/Modules/Games/Services/PollService.cs index e85685192..529754741 100644 --- a/src/NadekoBot/Modules/Games/Services/PollService.cs +++ b/src/NadekoBot/Modules/Games/Services/PollService.cs @@ -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 { } diff --git a/src/NadekoBot/Modules/Music/PlaylistCommands.cs b/src/NadekoBot/Modules/Music/PlaylistCommands.cs index 2b8d8c66f..fe5186e9f 100644 --- a/src/NadekoBot/Modules/Music/PlaylistCommands.cs +++ b/src/NadekoBot/Modules/Music/PlaylistCommands.cs @@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Music var embed = _eb .Create(ctx) - .WithAuthor(GetText(strs.playlists_page(num), MusicIconUrl)) + .WithAuthor(GetText(strs.playlists_page(num)), MusicIconUrl) .WithDescription(string.Join("\n", playlists.Select(r => GetText(strs.playlists(r.Id, r.Name, r.Author, r.Songs.Count))))) .WithOkColor(); diff --git a/src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs b/src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs index 44b670246..7e4b495a4 100644 --- a/src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs +++ b/src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs @@ -128,10 +128,10 @@ namespace NadekoBot.Modules.Permissions.Services { try { - await channel.SendErrorAsync(_eb, - _strings.GetText(strs.perm_prevent, guild.Id, index + 1, - Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), (SocketGuild) guild)))) - .ConfigureAwait(false); + await channel.SendErrorAsync(_eb, + _strings.GetText(strs.perm_prevent(index + 1, + Format.Bold(pc.Permissions[index] + .GetCommand(_cmd.GetPrefix(guild), (SocketGuild)guild))), guild.Id)); } catch { diff --git a/src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs b/src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs index 1e5cbe6c4..add5f6238 100644 --- a/src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs @@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Searches .WithDescription(p.BaseStats.ToString()) .WithThumbnailUrl($"https://assets.pokemon.com/assets/cms2/img/pokedex/detail/{p.Id.ToString("000")}.png") .AddField(GetText(strs.types), string.Join("\n", p.Types), true) - .AddField(GetText(strs.height_weight), GetText(strs.height_weight_val(p.HeightM, p.WeightKg), true)) + .AddField(GetText(strs.height_weight), GetText(strs.height_weight_val(p.HeightM, p.WeightKg)), true) .AddField(GetText(strs.abilities), string.Join("\n", p.Abilities.Select(a => a.Value)), true)).ConfigureAwait(false); return; } diff --git a/src/NadekoBot/Modules/Utility/CalcCommands.cs b/src/NadekoBot/Modules/Utility/CalcCommands.cs index e4fd92f08..c254dc340 100644 --- a/src/NadekoBot/Modules/Utility/CalcCommands.cs +++ b/src/NadekoBot/Modules/Utility/CalcCommands.cs @@ -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)); } } diff --git a/src/NadekoBot/Modules/Utility/InfoCommands.cs b/src/NadekoBot/Modules/Utility/InfoCommands.cs index 18afe0e95..54257cfb0 100644 --- a/src/NadekoBot/Modules/Utility/InfoCommands.cs +++ b/src/NadekoBot/Modules/Utility/InfoCommands.cs @@ -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() diff --git a/src/NadekoBot/Modules/Utility/InviteCommands.cs b/src/NadekoBot/Modules/Utility/InviteCommands.cs index 112e3a1b5..6a4656e77 100644 --- a/src/NadekoBot/Modules/Utility/InviteCommands.cs +++ b/src/NadekoBot/Modules/Utility/InviteCommands.cs @@ -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)))); } } } diff --git a/src/NadekoBot/Modules/Utility/RemindCommands.cs b/src/NadekoBot/Modules/Utility/RemindCommands.cs index c95860d28..d6d14f8f7 100644 --- a/src/NadekoBot/Modules/Utility/RemindCommands.cs +++ b/src/NadekoBot/Modules/Utility/RemindCommands.cs @@ -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 { diff --git a/src/NadekoBot/Modules/Utility/UnitConversionCommands.cs b/src/NadekoBot/Modules/Utility/UnitConversionCommands.cs index ae3975c1f..c4b7a2025 100644 --- a/src/NadekoBot/Modules/Utility/UnitConversionCommands.cs +++ b/src/NadekoBot/Modules/Utility/UnitConversionCommands.cs @@ -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()))); } } } diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index ea745d6e1..432135cb1 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -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); } diff --git a/src/NadekoBot/Modules/Xp/Services/XpService.cs b/src/NadekoBot/Modules/Xp/Services/XpService.cs index ea6f19fad..8197db7ff 100644 --- a/src/NadekoBot/Modules/Xp/Services/XpService.cs +++ b/src/NadekoBot/Modules/Xp/Services/XpService.cs @@ -264,16 +264,19 @@ namespace NadekoBot.Modules.Xp.Services { var chan = await x.User.GetOrCreateDMChannelAsync(); if (chan != null) - await chan.SendConfirmAsync(_eb, _strings.GetText(strs.level_up_dm, - x.Guild.Id, - x.User.Mention, Format.Bold(x.Level.ToString()), - Format.Bold(x.Guild.ToString() ?? "-"))); + await chan.SendConfirmAsync(_eb, + _strings.GetText(strs.level_up_dm( + x.User.Mention, Format.Bold(x.Level.ToString()), + Format.Bold(x.Guild.ToString() ?? "-")), + x.Guild.Id)); } else if (x.MessageChannel != null) // channel { - await x.MessageChannel.SendConfirmAsync(_eb, _strings.GetText(strs.level_up_channel, - x.Guild.Id, - x.User.Mention, Format.Bold(x.Level.ToString()))); + await x.MessageChannel.SendConfirmAsync(_eb, + _strings.GetText(strs.level_up_channel( + x.User.Mention, + Format.Bold(x.Level.ToString())), + x.Guild.Id)); } } else @@ -288,9 +291,11 @@ namespace NadekoBot.Modules.Xp.Services chan = x.MessageChannel; } - await chan.SendConfirmAsync(_eb, _strings.GetText(strs.level_up_global, - x.Guild.Id, - x.User.Mention, Format.Bold(x.Level.ToString()))); + await chan.SendConfirmAsync(_eb, + _strings.GetText(strs.level_up_global( + x.User.Mention, + Format.Bold(x.Level.ToString())), + x.Guild.Id)); } })); } diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/src/NadekoBot/_Extensions/Extensions.cs index 6c3bf579e..22315a0b2 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/src/NadekoBot/_Extensions/Extensions.cs @@ -380,6 +380,6 @@ namespace NadekoBot.Extensions public static string GetText(this IBotStrings strings, in LocStr str, ulong? guildId = null) => strings.GetText(str.Key, guildId); public static string GetText(this IBotStrings strings, in LocStr str, CultureInfo culture) - => strings.GetText(str.Key, culture, str.Parms); + => strings.GetText(str.Key, culture, str.Params); } }