From cfa7aabffda205c28659df6dce17e865bdf6f764 Mon Sep 17 00:00:00 2001 From: iwatkot Date: Wed, 17 Jul 2024 19:15:36 +0200 Subject: [PATCH] Removed restrictions for map size. --- bot/bot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bot/bot.py b/bot/bot.py index 616a379c..49f5eb8f 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -207,7 +207,7 @@ async def coordinates(message: types.Message) -> None: indicators = ["🟢", "🟢", "🟡", "🔴"] buttons = {} # * Slice sizes because VPS can not handle large images. - for size, indicator in zip(sizes[:2], indicators[:2]): + for size, indicator in zip(sizes, indicators): buttons[f"map_size_{size}"] = f"{indicator} {size} x {size} meters" dp.message_handlers.unregister(coordinates) @@ -283,6 +283,12 @@ async def max_height_callback(callback_query: types.CallbackQuery) -> None: reply_markup=await keyboard(Buttons.MAIN_MENU.value), ) + try: + os.remove(preview) + os.remove(result) + except FileNotFoundError as e: + logger.error(e) + async def keyboard( buttons: list[str] | dict[str, str]