Skip to content

Commit 6696a15

Browse files
committed
echobot2.py: use Message.reply_text
1 parent be508f1 commit 6696a15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/echobot2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
# Define a few command handlers. These usually take the two arguments bot and
3030
# update. Error handlers also receive the raised TelegramError object in error.
3131
def start(bot, update):
32-
bot.sendMessage(update.message.chat_id, text='Hi!')
32+
update.message.reply_text('Hi!')
3333

3434

3535
def help(bot, update):
36-
bot.sendMessage(update.message.chat_id, text='Help!')
36+
update.message.reply_text('Help!')
3737

3838

3939
def echo(bot, update):
40-
bot.sendMessage(update.message.chat_id, text=update.message.text)
40+
update.message.reply_text(update.message.text)
4141

4242

4343
def error(bot, update, error):

0 commit comments

Comments
 (0)