Init commit
This commit is contained in:
1
handlers/errors/__init__.py
Normal file
1
handlers/errors/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import main
|
11
handlers/errors/main.py
Normal file
11
handlers/errors/main.py
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
Reference in New Issue
Block a user