mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 06:45:39 +00:00
Update examples
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user