add register handlers

This commit is contained in:
Jannes Höke 2016-02-29 00:00:32 +01:00
parent 00e52ad35f
commit 29a6ac8b07

8
bot.py
View file

@ -23,7 +23,7 @@ def start(bot, update, args):
else:
bot.sendMessage(update.message.chat_id,
text="Please invite me to a group and "
"issue the /start command there.")
"issue the /new command there.")
def inline(bot, update):
@ -45,3 +45,9 @@ def inline(bot, update):
user_id = update.chosen_inline_result.from_user.id
game = gm.userid_game[user_id]
game.play_card(c.from_str(update.chosen_inline_result.id))
dp.addTelegramInlineHandler(inline)
dp.addTelegramCommandHandler('start', start)
dp.addTelegramCommandHandler('new', new_game)
u.start_polling()