Skip to content

Commit

Permalink
Removed restrictions for map size.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Jul 17, 2024
1 parent 29a7cd5 commit cfa7aab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit cfa7aab

Please sign in to comment.