2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-06 17:25:40 +00:00

Add send_bot_keyboards.py example

This commit is contained in:
Dan
2018-05-06 12:51:48 +02:00
parent b35b1a8e74
commit 07c37cd94c
3 changed files with 53 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
from pyrogram import Client
"""This example shows how to query an inline bot"""
# Create a new Client
app = Client("my_account")
# Start the Client
app.start()
# 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)
# Stop the client
app.stop()