mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-24 16:24:15 +03:00
Fix send_message using the incorrect type to return the msg_id (#156)
This commit is contained in:
parent
3585fb8cc6
commit
9bb6353fa3
|
@ -50,7 +50,7 @@ class TelegramBareClient:
|
|||
"""
|
||||
|
||||
# Current TelegramClient version
|
||||
__version__ = '0.11.2'
|
||||
__version__ = '0.11.3'
|
||||
|
||||
# region Initialization
|
||||
|
||||
|
|
|
@ -382,13 +382,16 @@ class TelegramClient(TelegramBareClient):
|
|||
no_web_page=False):
|
||||
"""Sends a message to the given entity (or input peer)
|
||||
and returns the sent message ID"""
|
||||
result = self(SendMessageRequest(
|
||||
request = SendMessageRequest(
|
||||
peer=get_input_peer(entity),
|
||||
message=message,
|
||||
entities=[],
|
||||
no_webpage=no_web_page
|
||||
))
|
||||
return result.random_id
|
||||
)
|
||||
result = self(request)
|
||||
for handler in self._update_handlers:
|
||||
handler(result)
|
||||
return request.random_id
|
||||
|
||||
def get_message_history(self,
|
||||
entity,
|
||||
|
|
Loading…
Reference in New Issue
Block a user