Update results.py
This commit is contained in:
parent
d5a3376eff
commit
7d3be19196
1 changed files with 20 additions and 3 deletions
23
results.py
23
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))
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue