Improve edit_message message type hint

This also allows utils.get_message_id to get the ID of InputMessageID.
This commit is contained in:
Nick80835
2025-01-19 10:40:11 +01:00
committed by Lonami
parent 792adb78b3
commit 455acc43f6
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -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