Убрал бардак из разных скобок. Изменил импорты в app.py
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import logging
|
||||
from aiogram.utils.exceptions import (Unauthorized, InvalidQueryID, TelegramAPIError,
|
||||
CantDemoteChatCreator, MessageNotModified, MessageToDeleteNotFound,
|
||||
MessageTextIsEmpty, RetryAfter,
|
||||
CantParseEntities, MessageCantBeDeleted)
|
||||
|
||||
|
||||
from loader import dp
|
||||
|
||||
@@ -12,10 +17,6 @@ async def errors_handler(update, exception):
|
||||
:param exception:
|
||||
:return: stdout logging
|
||||
"""
|
||||
from aiogram.utils.exceptions import (Unauthorized, InvalidQueryID, TelegramAPIError,
|
||||
CantDemoteChatCreator, MessageNotModified, MessageToDeleteNotFound,
|
||||
MessageTextIsEmpty, RetryAfter,
|
||||
CantParseEntities, MessageCantBeDeleted)
|
||||
|
||||
if isinstance(exception, CantDemoteChatCreator):
|
||||
logging.debug("Can't demote chat creator")
|
||||
@@ -53,4 +54,5 @@ async def errors_handler(update, exception):
|
||||
if isinstance(exception, CantParseEntities):
|
||||
logging.exception(f'CantParseEntities: {exception} \nUpdate: {update}')
|
||||
return True
|
||||
|
||||
logging.exception(f'Update: {update} \n{exception}')
|
||||
|
||||
Reference in New Issue
Block a user