diff --git a/examples/echo_bot.py b/examples/echo_bot.py index adda52c7..70e26f9d 100644 --- a/examples/echo_bot.py +++ b/examples/echo_bot.py @@ -20,9 +20,8 @@ from pyrogram import Client, Filters """This simple echo bot replies to every private text message. -It uses the @on_message decorator to register a MessageHandler -and applies two filters on it, Filters.text and Filters.private to make -sure it will only reply to private text messages. +It uses the @on_message decorator to register a MessageHandler and applies two filters on it: +Filters.text and Filters.private to make sure it will reply to private text messages only. """ app = Client("my_account") @@ -30,10 +29,7 @@ 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 - ) + message.reply(message.text, quote=True) app.run() # Automatically start() and idle()