Fix function calls

This commit is contained in:
Klaus-Uwe Mitterer 2017-02-08 13:06:58 +01:00
parent 8d56dc7ae3
commit 1900d516a9

4
bot.py
View file

@ -7,14 +7,14 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s
updater = telegram.ext.Updater(token=setuptools.token())
def start(bot, update):
bot.sendMessage(chat_id=update.message.chat_id, text=strings.start % (setuptools.botname, setuptools.botname))
bot.sendMessage(chat_id=update.message.chat_id, text=strings.start % (setuptools.botname(), setuptools.botname()))
def auth(bot, update):
bot.sendMessage(chat_id=update.message.chat_id, text="Ooops. Not implemented yet.")
def unauth(bot, update):
dbtools.deleteUser(update.message.chat_id)
bot.sendMessage(chat_id=update.message.chat_id, text=strings.unauth % setuptools.url)
bot.sendMessage(chat_id=update.message.chat_id, text=strings.unauth % setuptools.url())
updater.dispatcher.add_handler(telegram.ext.CommandHandler("start", start))
updater.dispatcher.add_handler(telegram.ext.CommandHandler("auth", auth))