diff --git a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs index fc2b6f8c..c65c24e6 100644 --- a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs +++ b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs @@ -261,7 +261,7 @@ $@"-- return; _votes.AddOrUpdate(kvp.Key, 1, (key, old) => ++old); await _channel.SendConfirmAsync(GetText("acrophobia"), - GetText("vote_cast", Format.Bold(guildUser.ToString()))).ConfigureAwait(false); + GetText("acro_vote_cast", Format.Bold(guildUser.ToString()))).ConfigureAwait(false); await msg.DeleteAsync().ConfigureAwait(false); } diff --git a/src/NadekoBot/Modules/Games/Commands/HangmanCommands.cs b/src/NadekoBot/Modules/Games/Commands/HangmanCommands.cs index 0fb8e2f3..9726eb65 100644 --- a/src/NadekoBot/Modules/Games/Commands/HangmanCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/HangmanCommands.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Concurrent; using System.Threading.Tasks; using NadekoBot.Modules.Games.Hangman; +using Discord; namespace NadekoBot.Modules.Games { @@ -15,23 +16,12 @@ namespace NadekoBot.Modules.Games [Group] public class HangmanCommands : NadekoSubmodule { - private static Logger _log { get; } - //channelId, game public static ConcurrentDictionary HangmanGames { get; } = new ConcurrentDictionary(); - private static string typesStr { get; } = ""; - - static HangmanCommands() - { - _log = LogManager.GetCurrentClassLogger(); - typesStr = - string.Format("`List of \"{0}hangman\" term types:`\n", NadekoBot.ModulePrefixes[typeof(Games).Name]) + String.Join(", ", HangmanTermPool.data.Keys); - } - [NadekoCommand, Usage, Description, Aliases] public async Task Hangmanlist() { - await Context.Channel.SendConfirmAsync(typesStr); + await Context.Channel.SendConfirmAsync(Format.Code(GetText("hangman_types", Prefix)) + "\n" + String.Join(", ", HangmanTermPool.data.Keys)); } [NadekoCommand, Usage, Description, Aliases] @@ -41,7 +31,7 @@ namespace NadekoBot.Modules.Games if (!HangmanGames.TryAdd(Context.Channel.Id, hm)) { - await Context.Channel.SendErrorAsync("Hangman game already running on this channel.").ConfigureAwait(false); + await ReplyErrorLocalized("hangman_running").ConfigureAwait(false); return; } @@ -56,14 +46,14 @@ namespace NadekoBot.Modules.Games } catch (Exception ex) { - try { await Context.Channel.SendErrorAsync($"Starting errored: {ex.Message}").ConfigureAwait(false); } catch { } + try { await Context.Channel.SendErrorAsync(GetText("hangman_start_errored") + " " + ex.Message).ConfigureAwait(false); } catch { } HangmanGame throwaway; HangmanGames.TryRemove(Context.Channel.Id, out throwaway); throwaway.Dispose(); return; } - await Context.Channel.SendConfirmAsync("Hangman game started", hm.ScrambledWord + "\n" + hm.GetHangman()); + await Context.Channel.SendConfirmAsync(GetText("hangman_game_started"), hm.ScrambledWord + "\n" + hm.GetHangman()); } } }