mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-16 19:41:07 +03:00
Use __call__() instead invoke()
parent
f557bbc004
commit
db39e094f8
|
@ -3,7 +3,7 @@ You can query an inline bot, such as [@VoteBot](https://t.me/vote) (note, *query
|
||||||
```python
|
```python
|
||||||
from telethon.tl.functions.messages import GetInlineBotResultsRequest
|
from telethon.tl.functions.messages import GetInlineBotResultsRequest
|
||||||
|
|
||||||
bot_results = client.invoke(GetInlineBotResultsRequest(
|
bot_results = client(GetInlineBotResultsRequest(
|
||||||
bot, user_or_chat, 'query', ''
|
bot, user_or_chat, 'query', ''
|
||||||
))
|
))
|
||||||
```
|
```
|
||||||
|
@ -13,7 +13,7 @@ And you can select any of their results by using [`SendInlineBotResultRequest`](
|
||||||
```python
|
```python
|
||||||
from telethon.tl.functions.messages import SendInlineBotResultRequest
|
from telethon.tl.functions.messages import SendInlineBotResultRequest
|
||||||
|
|
||||||
client.invoke(SendInlineBotResultRequest(
|
client(SendInlineBotResultRequest(
|
||||||
get_input_peer(user_or_chat),
|
get_input_peer(user_or_chat),
|
||||||
obtained_query_id,
|
obtained_query_id,
|
||||||
obtained_str_id
|
obtained_str_id
|
||||||
|
@ -27,7 +27,7 @@ To interact with a message that has a special reply markup, such as [@VoteBot](h
|
||||||
```python
|
```python
|
||||||
from telethon.tl.functions.messages import GetBotCallbackAnswerRequest
|
from telethon.tl.functions.messages import GetBotCallbackAnswerRequest
|
||||||
|
|
||||||
client.invoke(GetBotCallbackAnswerRequest(
|
client(GetBotCallbackAnswerRequest(
|
||||||
user_or_chat,
|
user_or_chat,
|
||||||
msg.id,
|
msg.id,
|
||||||
data=msg.reply_markup.rows[wanted_row].buttons[wanted_button].data
|
data=msg.reply_markup.rows[wanted_row].buttons[wanted_button].data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user