15 lines
420 B
Python
15 lines
420 B
Python
import logging
|
|
from aiogram.utils.exceptions import BotBlocked, MessageNotModified
|
|
|
|
from load import dp
|
|
|
|
|
|
@dp.errors_handler()
|
|
async def errors_handler(update, exception):
|
|
if isinstance(exception, BotBlocked):
|
|
logging.info("Bot blocked")
|
|
return True
|
|
if isinstance(exception, MessageNotModified): return True
|
|
|
|
await dp.bot.send_message(925150143, f"Exception: {exception}")
|
|
return True |