forked from test/mau_mau_bot
adjust for python-telegram-bot 4.0.1
This commit is contained in:
parent
6a0f3cd8c5
commit
3b590d9fca
2 changed files with 3 additions and 3 deletions
|
@ -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:
|
To run the bot yourself, you will need:
|
||||||
- Python (tested with 3.4)
|
- 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`
|
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
4
bot.py
|
@ -8,7 +8,7 @@ from telegram import InlineQueryResultArticle, ParseMode, Message, Chat, \
|
||||||
InlineQueryResultCachedSticker as Sticker, InlineKeyboardMarkup, \
|
InlineQueryResultCachedSticker as Sticker, InlineKeyboardMarkup, \
|
||||||
InlineKeyboardButton
|
InlineKeyboardButton
|
||||||
from telegram.ext import Updater, InlineQueryHandler, \
|
from telegram.ext import Updater, InlineQueryHandler, \
|
||||||
ChosenInlineResultHandler, CommandHandler, MessageHandler, filters, \
|
ChosenInlineResultHandler, CommandHandler, MessageHandler, Filters, \
|
||||||
CallbackQueryHandler
|
CallbackQueryHandler
|
||||||
from telegram.ext.dispatcher import run_async
|
from telegram.ext.dispatcher import run_async
|
||||||
from telegram.utils.botan import Botan
|
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('skip', skip_player))
|
||||||
dp.addHandler(CommandHandler('help', help))
|
dp.addHandler(CommandHandler('help', help))
|
||||||
dp.addHandler(CommandHandler('news', news))
|
dp.addHandler(CommandHandler('news', news))
|
||||||
dp.addHandler(MessageHandler([filters.STATUS_UPDATE], status_update))
|
dp.addHandler(MessageHandler([Filters.status_update], status_update))
|
||||||
dp.addErrorHandler(error)
|
dp.addErrorHandler(error)
|
||||||
|
|
||||||
start_bot(u)
|
start_bot(u)
|
||||||
|
|
Loading…
Reference in a new issue