edited message handler experimental

This commit is contained in:
mihalin 2022-06-16 03:53:19 +03:00
parent 27fe37bd6b
commit e3d579fa02

View File

@ -276,7 +276,7 @@ class CustomRequestHandler(WebhookRequestHandler):
db_bot_instance.set(bot) db_bot_instance.set(bot)
dp = Dispatcher(AioBot(bot.decrypted_token())) dp = Dispatcher(AioBot(bot.decrypted_token()))
dp.register_message_handler(message_handler, content_types=[types.ContentType.TEXT, supported_messages = [types.ContentType.TEXT,
types.ContentType.CONTACT, types.ContentType.CONTACT,
types.ContentType.ANIMATION, types.ContentType.ANIMATION,
types.ContentType.AUDIO, types.ContentType.AUDIO,
@ -284,7 +284,10 @@ class CustomRequestHandler(WebhookRequestHandler):
types.ContentType.PHOTO, types.ContentType.PHOTO,
types.ContentType.STICKER, types.ContentType.STICKER,
types.ContentType.VIDEO, types.ContentType.VIDEO,
types.ContentType.VOICE]) types.ContentType.VOICE]
dp.register_message_handler(message_handler, content_types=supported_messages)
dp.register_edited_message_handler(message_handler, content_types=supported_messages)
dp.register_message_handler(receive_invite, content_types=[types.ContentType.NEW_CHAT_MEMBERS]) dp.register_message_handler(receive_invite, content_types=[types.ContentType.NEW_CHAT_MEMBERS])
dp.register_message_handler(receive_left, content_types=[types.ContentType.LEFT_CHAT_MEMBER]) dp.register_message_handler(receive_left, content_types=[types.ContentType.LEFT_CHAT_MEMBER])
dp.register_message_handler(receive_migrate, content_types=[types.ContentType.MIGRATE_TO_CHAT_ID]) dp.register_message_handler(receive_migrate, content_types=[types.ContentType.MIGRATE_TO_CHAT_ID])