Added a message about exceptions for a user
This commit is contained in:
parent
d79b57b1f0
commit
3686195396
@ -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
|
||||
|
Reference in New Issue
Block a user