mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 19:12:29 +00:00
Improve edit_message message type hint
This also allows utils.get_message_id to get the ID of InputMessageID.
This commit is contained in:
@@ -600,6 +600,9 @@ def get_message_id(message):
|
||||
if isinstance(message, int):
|
||||
return message
|
||||
|
||||
if isinstance(message, types.InputMessageID):
|
||||
return message.id
|
||||
|
||||
try:
|
||||
if message.SUBCLASS_OF_ID == 0x790009e3:
|
||||
# hex(crc32(b'Message')) = 0x790009e3
|
||||
|
Reference in New Issue
Block a user