2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-01 06:45:39 +00:00

Update examples

This commit is contained in:
Dan
2018-04-14 18:46:54 +02:00
parent 4965e0b4f8
commit b5a78ed1d4
13 changed files with 80 additions and 248 deletions

View File

@@ -1,15 +1,15 @@
from pyrogram import Client
# Create a new Client
client = Client("example")
app = Client("my_account")
# Start the Client
client.start()
app.start()
# Get bot results for "Fuzz Universe" from the inline bot @vid
bot_results = client.get_inline_bot_results("vid", "Fuzz Universe")
bot_results = app.get_inline_bot_results("vid", "Fuzz Universe")
# Send the first result (bot_results.results[0]) to your own chat (Saved Messages)
client.send_inline_bot_result("me", bot_results.query_id, bot_results.results[0].id)
app.send_inline_bot_result("me", bot_results.query_id, bot_results.results[0].id)
# Stop the client
client.stop()
app.stop()