From bfbe376f41c4fce75e048cc8108c23dcad23c1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sch=C3=BCrrle?= Date: Fri, 8 Dec 2017 20:04:24 +0100 Subject: [PATCH] Remove start() and indent code properly Removed start() as requested by Jannes (https://t.me/pythontelegrambotgroup/97225) --- website/templates/website/index.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/website/templates/website/index.html b/website/templates/website/index.html index 28afcfa..c43247c 100644 --- a/website/templates/website/index.html +++ b/website/templates/website/index.html @@ -13,20 +13,18 @@

It's fun

{% endcomment %}
from telegram.ext import Updater, CommandHandler
 
-def start(bot, update):
-    update.message.reply_text('Hello World!')
 
 def hello(bot, update):
     update.message.reply_text(
         'Hello {}'.format(update.message.from_user.first_name))
 
-    updater = Updater('YOUR TOKEN HERE')
 
-    updater.dispatcher.add_handler(CommandHandler('start', start))
-    updater.dispatcher.add_handler(CommandHandler('hello', hello))
+updater = Updater('YOUR TOKEN HERE')
 
-    updater.start_polling()
-    updater.idle()
+updater.dispatcher.add_handler(CommandHandler('hello', hello))
+
+updater.start_polling()
+updater.idle()
 

Easy to setup