diff --git a/src/frame_service/wavu/utils.py b/src/frame_service/wavu/utils.py index e32b535..fd3946e 100644 --- a/src/frame_service/wavu/utils.py +++ b/src/frame_service/wavu/utils.py @@ -98,7 +98,7 @@ def _convert_json_move(move_json: Any) -> WavuMove: name = html.unescape(_process_links(move_json["name"])) - input = html.unescape(html.unescape(_normalize_data(move_json["input"]))).replace("*", "\\*") + input = html.unescape(html.unescape(_normalize_data(move_json["input"]))) target = _normalize_data(move_json["target"]) diff --git a/src/framedb/framedb.py b/src/framedb/framedb.py index d5b3d2d..cad2f4d 100644 --- a/src/framedb/framedb.py +++ b/src/framedb/framedb.py @@ -142,6 +142,9 @@ def get_move_by_input(self, character: CharacterName, input_query: str) -> Move for entry in character_movelist if FrameDb._simplify_input(entry.input) == FrameDb._simplify_input(input_query) ] + # simple_inputs = [FrameDb._simplify_input(entry.input) for entry in character_movelist] + # simplified_input_query = FrameDb._simplify_input(input_query) + # import code; code.interact(local=locals()) if result: return result[0] diff --git a/src/heihachi/embed.py b/src/heihachi/embed.py index 94fa682..851e26c 100644 --- a/src/heihachi/embed.py +++ b/src/heihachi/embed.py @@ -30,7 +30,7 @@ def get_similar_moves_embed( # TODO: look into improving the similar moves flow ) if len(similar_moves) > 0: - embed.add_field(name="Similar Moves", value="\n".join([move.input for move in similar_moves])) + embed.add_field(name="Similar Moves", value="\n".join([move.input.replace("*", "\\*") for move in similar_moves])) else: embed.add_field(name="No similar moves found", value="") embed.set_thumbnail(url=character.portrait) @@ -47,7 +47,7 @@ def get_success_movelist_embed( For e.g., to a move type """ - desc_string = "\n".join(sorted([move.input for move in moves])) + desc_string = "\n".join(sorted([move.input.replace("*", "\\*") for move in moves])) embed = discord.Embed( title=f"{title}\n", @@ -73,8 +73,9 @@ def get_success_embed(message: Any | None) -> discord.Embed: def get_move_embed(frame_service: FrameService, character: Character, move: Move) -> discord.Embed: """Returns the embed message for character and move.""" + escaped_input = move.input.replace("*", "\\*") embed = discord.Embed( - title=f"**{move.input}**", + title=f"**{escaped_input}**", colour=SUCCESS_COLOR, description=move.name, url=frame_service.get_move_url(character, move),