From 5c753d8c77228dc1c30e497f70a6d4a69c12006a Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 27 Feb 2018 14:57:00 +0100 Subject: [PATCH] Add inline_bots example --- examples/inline_bots.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/inline_bots.py diff --git a/examples/inline_bots.py b/examples/inline_bots.py new file mode 100644 index 00000000..d5bd43fb --- /dev/null +++ b/examples/inline_bots.py @@ -0,0 +1,15 @@ +from pyrogram import Client + +# Create a new Client +client = Client("example") + +# Start the Client +client.start() + +# Get bot results for "Fuzz Universe" from the inline bot @vid +bot_results = client.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) + +# Stop the client +client.stop()