mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
14 lines
462 B
Python
14 lines
462 B
Python
|
"""This example shows how to query an inline bot (as user)"""
|
||
|
|
||
|
from pyrogram import Client
|
||
|
|
||
|
# Create a new Client
|
||
|
app = Client("my_account")
|
||
|
|
||
|
with app:
|
||
|
# Get bot results for "Fuzz Universe" from the inline bot @vid
|
||
|
bot_results = app.get_inline_bot_results("vid", "Fuzz Universe")
|
||
|
|
||
|
# Send the first result (bot_results.results[0]) to your own chat (Saved Messages)
|
||
|
app.send_inline_bot_result("me", bot_results.query_id, bot_results.results[0].id)
|