2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-31 06:16:06 +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

17
examples/echo_bot.py Normal file
View File

@@ -0,0 +1,17 @@
from pyrogram import Client, Filters
"""This simple echo bot replies to every private text message"""
app = Client("my_account")
@app.on_message(Filters.text & Filters.private)
def echo(client, message):
client.send_message(
message.chat.id, message.text,
reply_to_message_id=message.message_id
)
app.start()
app.idle()