We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deb9de0 commit e10fa66Copy full SHA for e10fa66
examples/echobot.py
@@ -43,13 +43,10 @@ def echo(bot):
43
# chat_id is required to reply to any message
44
chat_id = update.message.chat_id
45
update_id = update.update_id + 1
46
- if not update.message: # we ignore updates without messages
47
- continue
48
- message = update.message.text
49
50
- if message:
+ if update.message: # your bot can receive updates without messages
51
# Reply to the message
52
- bot.sendMessage(chat_id=chat_id, text=message)
+ bot.sendMessage(chat_id=chat_id, text=update.message.text)
53
54
55
if __name__ == '__main__':
0 commit comments