From 5a9454de692864e35b82a9782c7a02f086789d55 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 25 Apr 2016 18:21:38 +0200 Subject: [PATCH] aggiornato a telegramcoso 4.0 --- main.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index 901aa9e..84f866f 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -from telegram.ext import Updater +from telegram.ext import Updater, CommandHandler import filemanager import logging @@ -356,14 +356,14 @@ def power(bot, update): else: bot.sendMessage(update.message.chat['id'], "Per usare /power, scrivimi in chat privata a @mifiabot!") -updater.dispatcher.addTelegramCommandHandler('ping', ping) -updater.dispatcher.addTelegramCommandHandler('newgame', newgame) -updater.dispatcher.addTelegramCommandHandler('join', join) -updater.dispatcher.addTelegramCommandHandler('debug', debug) -updater.dispatcher.addTelegramCommandHandler('endjoin', endjoin) -updater.dispatcher.addTelegramCommandHandler('vote', vote) -updater.dispatcher.addTelegramCommandHandler('endday', endday) -updater.dispatcher.addTelegramCommandHandler('power', power) -updater.dispatcher.addTelegramCommandHandler('status', status) +updater.dispatcher.addHandler(CommandHandler('ping', ping)) +updater.dispatcher.addHandler(CommandHandler('newgame', newgame)) +updater.dispatcher.addHandler(CommandHandler('join', join)) +updater.dispatcher.addHandler(CommandHandler('debug', debug)) +updater.dispatcher.addHandler(CommandHandler('endjoin', endjoin)) +updater.dispatcher.addHandler(CommandHandler('vote', vote)) +updater.dispatcher.addHandler(CommandHandler('endday', endday)) +updater.dispatcher.addHandler(CommandHandler('power', power)) +updater.dispatcher.addHandler(CommandHandler('status', status)) updater.start_polling() updater.idle()