replace-bot/handlers/errors/main.py

11 lines
249 B
Python
Raw Normal View History

2022-02-16 18:13:44 +03:00
import logging
from aiogram.utils.exceptions import BotBlocked
from load import dp
@dp.errors_handler()
async def errors_handler(update, exception):
if isinstance(exception, BotBlocked):
logging.info("Bot blocked")
return True