mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
edited message handler experimental
This commit is contained in:
parent
27fe37bd6b
commit
e3d579fa02
@ -276,15 +276,18 @@ 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,
|
||||||
types.ContentType.DOCUMENT,
|
types.ContentType.DOCUMENT,
|
||||||
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])
|
||||||
|
Loading…
Reference in New Issue
Block a user