Fix some stuff

This commit is contained in:
Klaus-Uwe Mitterer 2017-02-07 23:11:59 +01:00
parent 33ade5451a
commit 67ef0e448d

15
bot.py
View file

@ -1,12 +1,17 @@
#!/usr/bin/env python3
import logging, telegram.ext
import logging, setuptools, telegram.ext
updater = telegram.ext.Updater(token=setuptools.token)
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
updater = telegram.ext.Updater(token=setuptools.token())
def start(bot, update):
bot.sendMessage(chat_id=update.message.chat_id, text="Heeeeeeey! :3")
bot.sendMessage(chat_id=update.message.chat_id, text="Heeeeeeey! :3\n\nWelcome to the Boooooooooot!")
updater.dispatch.add_handler(telegram.ext.CommandHandler("start", start)
updater.dispatcher.add_handler(telegram.ext.CommandHandler("start", start))
updater.start_polling()
try:
updater.start_polling()
except KeyboardInterrupt:
updater.stop()