Skip to content

Commit

Permalink
fix unknown intent error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bomzheg committed Sep 11, 2023
1 parent a2d8d43 commit 94692d8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions shvatka/tgbot/handlers/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from aiogram.filters import ExceptionTypeFilter
from aiogram.types.error_event import ErrorEvent
from aiogram.utils.markdown import html_decoration as hd
from aiogram_dialog import DialogManager
from aiogram_dialog.api.exceptions import UnknownIntent

from shvatka.core.utils.exceptions import SHError
Expand Down Expand Up @@ -37,8 +36,7 @@ async def handle_sh_error(error: ErrorEvent, log_chat_id: int, bot: Bot):
await handle(error=error, log_chat_id=log_chat_id, bot=bot)


async def clear_unknown_intent(error: ErrorEvent, dialog_manager: DialogManager, bot: Bot):
await dialog_manager.reset_stack(True)
async def clear_unknown_intent(error: ErrorEvent, bot: Bot):
assert error.update.callback_query
assert error.update.callback_query.message
await bot.edit_message_reply_markup(
Expand Down

0 comments on commit 94692d8

Please sign in to comment.