adjust for python-telegram-bot 4.0.1

This commit is contained in:
Jannes Höke 2016-04-29 11:12:56 +02:00
parent 6a0f3cd8c5
commit 3b590d9fca
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ Telegram Bot that allows you to play the popular card game UNO via inline querie
To run the bot yourself, you will need:
- Python (tested with 3.4)
- The [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) module (currently using ``dispatcher-rework`` beta branch)
- The [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) module version 4.0.1
Get a bot token from [@BotFather](http://telegram.me/BotFather), place it in `credentials.py` and run the bot with `python3 bot.py`

4
bot.py
View file

@ -8,7 +8,7 @@ from telegram import InlineQueryResultArticle, ParseMode, Message, Chat, \
InlineQueryResultCachedSticker as Sticker, InlineKeyboardMarkup, \
InlineKeyboardButton
from telegram.ext import Updater, InlineQueryHandler, \
ChosenInlineResultHandler, CommandHandler, MessageHandler, filters, \
ChosenInlineResultHandler, CommandHandler, MessageHandler, Filters, \
CallbackQueryHandler
from telegram.ext.dispatcher import run_async
from telegram.utils.botan import Botan
@ -640,7 +640,7 @@ dp.addHandler(CommandHandler('close', close_game))
dp.addHandler(CommandHandler('skip', skip_player))
dp.addHandler(CommandHandler('help', help))
dp.addHandler(CommandHandler('news', news))
dp.addHandler(MessageHandler([filters.STATUS_UPDATE], status_update))
dp.addHandler(MessageHandler([Filters.status_update], status_update))
dp.addErrorHandler(error)
start_bot(u)