mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 15:59:18 +00:00
18 lines
350 B
Python
18 lines
350 B
Python
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()
|