From 7824db434226163c832e1c838d1485cec4287ced Mon Sep 17 00:00:00 2001 From: insert Date: Mon, 2 Jun 2025 13:24:27 -0400 Subject: [PATCH] fix: use new cashews endpoint for autocomplete --- cogs/team.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/team.py b/cogs/team.py index b879ac8..3afea16 100644 --- a/cogs/team.py +++ b/cogs/team.py @@ -13,12 +13,12 @@ from nextcord import TextInputStyle, IntegrationType teams_dict = {} teams_list = [] def get_all_teams(): - data = requests.get("https://freecashe.ws/api/allteams").json() + data = requests.get("https://freecashe.ws/api/teams").json() teams_dict.clear() teams_list.clear() - for index in data: - teams_list.append(f"{data[index]["Location"]} {data[index]["Name"]}") - teams_dict.update({f"{data[index]["Location"]} {data[index]["Name"]}": index}) + for index in data["items"]: + teams_list.append(f"{index["location"]} {index["name"]}") + teams_dict.update({f"{index["location"]} {index["name"]}": index["team_id"]}) print(teams_dict) print(teams_list)