mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +03:00
Fix pin message not accepting Message objects
This commit is contained in:
parent
3d1ce845be
commit
1c7947c03a
|
@ -1212,6 +1212,10 @@ class MessageMethods:
|
|||
"""
|
||||
if not message:
|
||||
message = 0
|
||||
elif hasattr(message, 'id'):
|
||||
message = message.id
|
||||
elif not isinstance(message, int):
|
||||
raise ValueError('Incorrect message argument')
|
||||
|
||||
entity = await self.get_input_entity(entity)
|
||||
await self(functions.messages.UpdatePinnedMessageRequest(
|
||||
|
|
Loading…
Reference in New Issue
Block a user