mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 12:53:44 +03:00
Add hide_via to InlineResult.click (#1084)
This commit is contained in:
parent
ca2c8687c8
commit
eda4178333
|
@ -98,7 +98,7 @@ class InlineResult:
|
||||||
return self.result.document
|
return self.result.document
|
||||||
|
|
||||||
async def click(self, entity, reply_to=None,
|
async def click(self, entity, reply_to=None,
|
||||||
silent=False, clear_draft=False):
|
silent=False, clear_draft=False, hide_via=False):
|
||||||
"""
|
"""
|
||||||
Clicks this result and sends the associated `message`.
|
Clicks this result and sends the associated `message`.
|
||||||
|
|
||||||
|
@ -115,6 +115,10 @@ class InlineResult:
|
||||||
clear_draft (`bool`, optional):
|
clear_draft (`bool`, optional):
|
||||||
Whether the draft should be removed after sending the
|
Whether the draft should be removed after sending the
|
||||||
message from this result or not. Defaults to ``False``.
|
message from this result or not. Defaults to ``False``.
|
||||||
|
|
||||||
|
hide_via (`bool`, optional):
|
||||||
|
Whether the "via @bot" should be hidden or not.
|
||||||
|
Only works with certain bots (like @bing or @gif).
|
||||||
"""
|
"""
|
||||||
entity = await self._client.get_input_entity(entity)
|
entity = await self._client.get_input_entity(entity)
|
||||||
reply_id = None if reply_to is None else utils.get_message_id(reply_to)
|
reply_id = None if reply_to is None else utils.get_message_id(reply_to)
|
||||||
|
@ -124,6 +128,7 @@ class InlineResult:
|
||||||
id=self.result.id,
|
id=self.result.id,
|
||||||
silent=silent,
|
silent=silent,
|
||||||
clear_draft=clear_draft,
|
clear_draft=clear_draft,
|
||||||
|
hide_via=hide_via,
|
||||||
reply_to_msg_id=reply_id
|
reply_to_msg_id=reply_id
|
||||||
)
|
)
|
||||||
return self._client._get_response_message(
|
return self._client._get_response_message(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user