From a504d38418a5c1596c4278e6615cc7f5c34b8730 Mon Sep 17 00:00:00 2001 From: mihalin Date: Sun, 23 Jan 2022 00:25:49 +0300 Subject: [PATCH] handle deactivated error --- server/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/custom.py b/server/custom.py index 7a5315a..540014b 100644 --- a/server/custom.py +++ b/server/custom.py @@ -86,7 +86,7 @@ async def message_handler(message: types.Message, *args, **kwargs): try: await message.copy_to(chat_id) - except (exceptions.MessageError, exceptions.BotBlocked): + except (exceptions.MessageError, exceptions.Unauthorized): await message.reply("Невозможно переслать сообщение (автор заблокировал бота?)", parse_mode="HTML") return