From 9fb009ecf6dceafe1cdd15d08d5fe90f677d5f5c Mon Sep 17 00:00:00 2001 From: Eldinnie Date: Mon, 17 Jun 2019 16:22:49 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20118cef89453eb673ced073ed1b276d3f92a0ff?= =?UTF-8?q?d3...76b75ab5c608d6689dd67baa70fcb32a000dc341=20on=20Extensions?= =?UTF-8?q?=20=E2=80=93=20Your=20first=20Bot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Extensions-–-Your-first-Bot.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Extensions-–-Your-first-Bot.md b/Extensions-–-Your-first-Bot.md index 1002181..2a60c6e 100644 --- a/Extensions-–-Your-first-Bot.md +++ b/Extensions-–-Your-first-Bot.md @@ -76,7 +76,7 @@ But our Bot can now only answer to the `/start` command. Let's add another handl ```python def echo(update, context): - update.send_message(chat_id=context.message.chat_id, text=context.message.text) + context.bot.send_message(chat_id=update.message.chat_id, text=update.message.text) from telegram.ext import MessageHandler, Filters echo_handler = MessageHandler(Filters.text, echo) @@ -95,7 +95,7 @@ Let's add some actual functionality to your bot. We want to implement a `/caps` ```python def caps(update, context): text_caps = ' '.join(context.args).upper() - update.send_message(chat_id=context.message.chat_id, text=text_caps) + context.bot.send_message(chat_id=update.message.chat_id, text=text_caps) caps_handler = CommandHandler('caps', caps) dispatcher.add_handler(caps_handler)