From c5abae79eb8501d9a41a528bb20c44a66a44c063 Mon Sep 17 00:00:00 2001 From: Kevin Rode Date: Mon, 4 Jan 2021 22:16:57 -0500 Subject: [PATCH] Added fuzzy search back --- the_prestige.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/the_prestige.py b/the_prestige.py index 525ec88..82d4901 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -1211,5 +1211,12 @@ async def history_pages(msg, all_games, search_term=None): await teams_list.edit(embed=pages[current_page]) except asyncio.TimeoutError: return +def get_team_fuzzy_search(team_name): + team = games.get_team(team_name) + if team is None: + teams = games.search_team(team_name.lower()) + if len(teams) == 1: + team = teams[0] + return client.run(config()["token"])