diff --git a/assets/locales/it.json b/assets/locales/it.json index 45cfa41..0ae6413 100644 --- a/assets/locales/it.json +++ b/assets/locales/it.json @@ -1,5 +1,5 @@ { - "minigames_hangman_game": "Parola: {display_word()}\nErrori: {wrong_guesses}/{max_wrong}", + "minigames_hangman_game": "Parola: {display_word}\nErrori: {wrong_guesses}/{max_wrong}", "minigames_hangman_lost": "Hai perso! La parola era:", "minigames_hangman_won": "Hai vinto! La parola era:", "minigames_hangman_already_guessed": "Hai giĆ  indovinato", diff --git a/bot.py b/bot.py index 3af7e5e..dcd777f 100644 --- a/bot.py +++ b/bot.py @@ -49,7 +49,7 @@ from modules.version import * from modules.sentenceprocessing import * from modules.unhandledexception import handle_exception from modules.image import gen_meme, gen_demotivator -from modules.minigames import guessthenumber, hangman +# from modules.minigames import guessthenumber, hangman sys.excepthook = handle_exception check_for_update() # Check for updates (from modules/version.py) diff --git a/modules/minigames.py b/modules/minigames.py index 363c1e9..0a74a82 100644 --- a/modules/minigames.py +++ b/modules/minigames.py @@ -7,7 +7,7 @@ import asyncio from modules.globalvars import bot from modules.volta.main import _ -@bot.hybrid_command(description=_('minigames_guess_the_number')) +# @bot.hybrid_command(description=_('minigames_guess_the_number')) async def guessthenumber(ctx: commands.Context): number = random.randint(1, 10) class GuessModal(ui.Modal, title=_('minigames_guess_the_number')): @@ -30,7 +30,7 @@ async def guessthenumber(ctx: commands.Context): view.add_item(button) await ctx.send(_('minigames_click_to_guess'), view=view) -@bot.hybrid_command(description=_('minigames_hangman')) +# @bot.hybrid_command(description=_('minigames_hangman')) nope nope nope fuck no nope no thanks no nuh uh not today nope async def hangman(ctx: commands.Context): async with aiohttp.ClientSession() as session: async with session.get("https://random-word-api.herokuapp.com/word?number=1") as resp: @@ -61,11 +61,11 @@ async def hangman(ctx: commands.Context): elif wrong_guesses >= max_wrong: await interaction.response.edit_message(content=f"{_('minigames_hangman_lost')} **{word}**", view=None) else: - await interaction.response.edit_message(content=_('minigames_hangman_game').format(display_word=display_word,wrong_guesses=wrong_guesses,max_wrong=max_wrong), view=view) + await interaction.response.edit_message(content=_('minigames_hangman_game').format(display_word=display_word(),wrong_guesses=wrong_guesses,max_wrong=max_wrong), view=view) async def button_callback(interaction: Interaction): await interaction.response.send_modal(GuessModal()) - button = ui.Button(label="Guess a letter", style=discord.ButtonStyle.primary) + button = ui.Button(label=_('minigames_click_to_guess'), style=discord.ButtonStyle.primary) button.callback = button_callback view = ui.View() view.add_item(button) - await ctx.send(f"Word: {display_word()}\nWrong guesses: {wrong_guesses}/{max_wrong}\nClick the button to guess a letter.", view=view) \ No newline at end of file + await ctx.send(_('minigames_hangman_game').format(display_word=display_word,wrong_guesses=wrong_guesses,max_wrong=max_wrong), view=view) \ No newline at end of file