Added a message about exceptions for a user

This commit is contained in:
StNicolay 2023-01-06 17:32:44 +03:00
parent d79b57b1f0
commit 3686195396

View File

@ -697,4 +697,13 @@ async def message_handler(bot: AsyncTeleBot, mes: Message) -> None:
"Вы отправили не корректное сообщение",
)
return
try:
await handler(mes)
except Exception:
await send_tmp_message(
bot,
mes.chat.id,
"Произошла непредвиденная ошибка",
)
raise