From 29a6ac8b0744e8569928dbdf3648485f0fe78ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Mon, 29 Feb 2016 00:00:32 +0100 Subject: [PATCH] add register handlers --- bot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 441ef09..3f2c422 100644 --- a/bot.py +++ b/bot.py @@ -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()