Skip to content

Commit bd121be

Browse files
committed
Update echo_bot.py
1 parent 3fa738d commit bd121be

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

examples/echo_bot.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,16 @@
2020

2121
"""This simple echo bot replies to every private text message.
2222
23-
It uses the @on_message decorator to register a MessageHandler
24-
and applies two filters on it, Filters.text and Filters.private to make
25-
sure it will only reply to private text messages.
23+
It uses the @on_message decorator to register a MessageHandler and applies two filters on it:
24+
Filters.text and Filters.private to make sure it will reply to private text messages only.
2625
"""
2726

2827
app = Client("my_account")
2928

3029

3130
@app.on_message(Filters.text & Filters.private)
3231
def echo(client, message):
33-
client.send_message(
34-
message.chat.id, message.text,
35-
reply_to_message_id=message.message_id
36-
)
32+
message.reply(message.text, quote=True)
3733

3834

3935
app.run() # Automatically start() and idle()

0 commit comments

Comments
 (0)