forked from test/mau_mau_bot
add register handlers
This commit is contained in:
parent
00e52ad35f
commit
29a6ac8b07
1 changed files with 7 additions and 1 deletions
8
bot.py
8
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()
|
||||
|
|
Loading…
Reference in a new issue