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