Added type hint to NewMessage.Event.message

Before, when retrieving a message from the event, the type was "Unknown".
This commit is contained in:
Andrew Voynov 2023-05-11 17:02:38 +03:00 committed by GitHub
parent 6a7a981b7a
commit 374b38db8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,7 @@ class NewMessage(EventBuilder):
... ...
>>> >>>
""" """
def __init__(self, message): def __init__(self, message: types.Message):
self.__dict__['_init'] = False self.__dict__['_init'] = False
super().__init__(chat_peer=message.peer_id, super().__init__(chat_peer=message.peer_id,
msg_id=message.id, broadcast=bool(message.post)) msg_id=message.id, broadcast=bool(message.post))