Let get_input_peer do its magic

Lonami 2017-06-15 17:14:36 +02:00
parent 3623496fb9
commit ad521b3163

@ -2,10 +2,9 @@ You can query an inline bot, such as [@vote](https://t.me/vote), by making use o
```python ```python
from telethon.tl.functions.messages import GetInlineBotResultsRequest from telethon.tl.functions.messages import GetInlineBotResultsRequest
from telethon.helpers import get_input_peer
bot_results = client.invoke(GetInlineBotResultsRequest( bot_results = client.invoke(GetInlineBotResultsRequest(
get_input_peer(bot), get_input_peer(user_or_chat), 'query', '' bot, user_or_chat, 'query', ''
)) ))
``` ```
@ -13,11 +12,9 @@ And you can reply to their results by using [`SendInlineBotResultRequest`](https
```python ```python
from telethon.tl.functions.messages import SendInlineBotResultRequest from telethon.tl.functions.messages import SendInlineBotResultRequest
from telethon.utils import generate_random_long
client.invoke(SendInlineBotResultRequest( client.invoke(SendInlineBotResultRequest(
get_input_peer(user_or_chat), get_input_peer(user_or_chat),
generate_random_long(),
obtained_query_id, obtained_query_id,
obtained_str_id obtained_str_id
)) ))