Skip to content

Commit 27becb5

Browse files
erge branch 'dev'
2 parents 4d6c124 + f2df597 commit 27becb5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/frame_service/wavu/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _convert_json_move(move_json: Any) -> WavuMove:
9898

9999
name = html.unescape(_process_links(move_json["name"]))
100100

101-
input = html.unescape(html.unescape(_normalize_data(move_json["input"]))).replace("*", "\\*")
101+
input = html.unescape(html.unescape(_normalize_data(move_json["input"])))
102102

103103
target = _normalize_data(move_json["target"])
104104

src/framedb/framedb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def get_move_by_input(self, character: CharacterName, input_query: str) -> Move
142142
for entry in character_movelist
143143
if FrameDb._simplify_input(entry.input) == FrameDb._simplify_input(input_query)
144144
]
145+
# simple_inputs = [FrameDb._simplify_input(entry.input) for entry in character_movelist]
146+
# simplified_input_query = FrameDb._simplify_input(input_query)
147+
# import code; code.interact(local=locals())
145148
if result:
146149
return result[0]
147150

src/heihachi/embed.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_similar_moves_embed( # TODO: look into improving the similar moves flow
3030
)
3131

3232
if len(similar_moves) > 0:
33-
embed.add_field(name="Similar Moves", value="\n".join([move.input for move in similar_moves]))
33+
embed.add_field(name="Similar Moves", value="\n".join([move.input.replace("*", "\\*") for move in similar_moves]))
3434
else:
3535
embed.add_field(name="No similar moves found", value="")
3636
embed.set_thumbnail(url=character.portrait)
@@ -47,7 +47,7 @@ def get_success_movelist_embed(
4747
For e.g., to a move type
4848
"""
4949

50-
desc_string = "\n".join(sorted([move.input for move in moves]))
50+
desc_string = "\n".join(sorted([move.input.replace("*", "\\*") for move in moves]))
5151

5252
embed = discord.Embed(
5353
title=f"{title}\n",
@@ -73,8 +73,9 @@ def get_success_embed(message: Any | None) -> discord.Embed:
7373
def get_move_embed(frame_service: FrameService, character: Character, move: Move) -> discord.Embed:
7474
"""Returns the embed message for character and move."""
7575

76+
escaped_input = move.input.replace("*", "\\*")
7677
embed = discord.Embed(
77-
title=f"**{move.input}**",
78+
title=f"**{escaped_input}**",
7879
colour=SUCCESS_COLOR,
7980
description=move.name,
8081
url=frame_service.get_move_url(character, move),

0 commit comments

Comments
 (0)