channel-block-tg/handlers/errors/__init__.py
Forden 2bbbee4651 Added usage example of errors_handler
Optimized generation of default/inline keyboard
Customizing webhook path has become more flexible
Updated aiogram version to 2.7 (BotAPI 4.7)
2020-04-07 01:44:05 +03:00

10 lines
374 B
Python

from aiogram import Dispatcher
from aiogram.utils import exceptions
from .not_modified import message_not_modified, message_to_delete_not_found
def setup(dp: Dispatcher):
dp.register_errors_handler(message_not_modified, exception=exceptions.MessageNotModified)
dp.register_errors_handler(message_to_delete_not_found, exception=exceptions.MessageToDeleteNotFound)