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)