diff --git a/results.py b/results.py index 1203154..c93ed37 100644 --- a/results.py +++ b/results.py @@ -130,6 +130,18 @@ def add_mode_wild(results): ) +def add_mode_text(results): + """Change mode to text""" + results.append( + InlineQueryResultArticle( + "mode_text", + title=_("✍️ Text mode"), + input_message_content= + InputTextMessageContent(_('Text ✍️')) + ) + ) + + def add_draw(player, results): """Add option to draw""" n = player.game.draw_counter or 1 @@ -187,9 +199,14 @@ def add_card(game, card, results, can_play): """Add an option that represents a card""" if can_play: - results.append( - Sticker(str(card), sticker_file_id=c.STICKERS[str(card)]) + if game.mode != "text": + results.append( + Sticker(str(card), sticker_file_id=c.STICKERS[str(card)]) ) + if game.mode == "text": + results.append( + Sticker(str(card), sticker_file_id=c.STICKERS[str(card)], input_message_content=InputTextMessageContent("Card Played: {card}".format(card=repr(card))) + )) else: results.append( Sticker(str(uuid4()), sticker_file_id=c.STICKERS_GREY[str(card)], @@ -209,4 +226,4 @@ def game_info(game): "Players: {player_list}", len(players)) .format(player_list=" -> ".join(players)) - ) \ No newline at end of file + )