We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90fc23a commit e7b9877Copy full SHA for e7b9877
1 file changed
website/static/website/example.py
@@ -1,16 +1,16 @@
1
from telegram.ext import Updater, CommandHandler
2
3
def start(bot, update):
4
- bot.sendMessage(update.message.chat_id, text='Hello World!')
+ bot.send_message(update.message.chat_id, text='Hello World!')
5
6
def hello(bot, update):
7
- bot.sendMessage(update.message.chat_id,
+ bot.send_message(update.message.chat_id,
8
text='Hello {0}'.format(update.message.from_user.first_name))
9
10
updater = Updater('YOUR TOKEN HERE')
11
12
-updater.dispatcher.addHandler(CommandHandler('start', start))
13
-updater.dispatcher.addHandler(CommandHandler('hello', hello))
+updater.dispatcher.add_handler(CommandHandler('start', start))
+updater.dispatcher.add_handler(CommandHandler('hello', hello))
14
15
updater.start_polling()
16
updater.idle()
0 commit comments