mirror of
https://github.com/insertapp/mmolbbot.git
synced 2025-07-01 14:27:03 +00:00
fix: use new cashews endpoint for autocomplete
This commit is contained in:
parent
b73f38daaa
commit
7824db4342
1 changed files with 4 additions and 4 deletions
|
@ -13,12 +13,12 @@ from nextcord import TextInputStyle, IntegrationType
|
||||||
teams_dict = {}
|
teams_dict = {}
|
||||||
teams_list = []
|
teams_list = []
|
||||||
def get_all_teams():
|
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_dict.clear()
|
||||||
teams_list.clear()
|
teams_list.clear()
|
||||||
for index in data:
|
for index in data["items"]:
|
||||||
teams_list.append(f"{data[index]["Location"]} {data[index]["Name"]}")
|
teams_list.append(f"{index["location"]} {index["name"]}")
|
||||||
teams_dict.update({f"{data[index]["Location"]} {data[index]["Name"]}": index})
|
teams_dict.update({f"{index["location"]} {index["name"]}": index["team_id"]})
|
||||||
print(teams_dict)
|
print(teams_dict)
|
||||||
print(teams_list)
|
print(teams_list)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue