File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 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
2827app = Client ("my_account" )
2928
3029
3130@app .on_message (Filters .text & Filters .private )
3231def 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
3935app .run () # Automatically start() and idle()
You can’t perform that action at this time.
0 commit comments