File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11from telegram .ext import Updater , CommandHandler
22
33def start (bot , update ):
4- bot .sendMessage (update .message .chat_id , text = 'Hello World!' )
4+ bot .send_message (update .message .chat_id , text = 'Hello World!' )
55
66def hello (bot , update ):
7- bot .sendMessage (update .message .chat_id ,
7+ bot .send_message (update .message .chat_id ,
88 text = 'Hello {0}' .format (update .message .from_user .first_name ))
99
1010updater = Updater ('YOUR TOKEN HERE' )
1111
12- updater .dispatcher .addHandler (CommandHandler ('start' , start ))
13- updater .dispatcher .addHandler (CommandHandler ('hello' , hello ))
12+ updater .dispatcher .add_handler (CommandHandler ('start' , start ))
13+ updater .dispatcher .add_handler (CommandHandler ('hello' , hello ))
1414
1515updater .start_polling ()
1616updater .idle ()
You can’t perform that action at this time.
0 commit comments