mirror of
https://github.com/insertapp/mmolbbot.git
synced 2025-07-01 06:17:03 +00:00
chore: fetch season 2 information
This commit is contained in:
parent
0ad64bc326
commit
58c35d349e
1 changed files with 2 additions and 2 deletions
|
@ -216,7 +216,7 @@ class TeamView(nextcord.ui.View):
|
|||
embed = ogmsg[0]
|
||||
teamid = embed.footer.text
|
||||
data = requests.get(f"https://mmolb.com/api/team/{teamid}").json()
|
||||
history = requests.get(f"https://freecashe.ws/api/games?team={teamid}&season=1").json()["items"]
|
||||
history = requests.get(f"https://freecashe.ws/api/games?team={teamid}&season=2").json()["items"]
|
||||
color = tuple(int(data["Color"][i:i+2], 16) for i in (0, 2, 4))
|
||||
embed = nextcord.Embed(title=f"Last ten games for the {data["Location"]} {data["Name"]} {data["Emoji"]}", colour = nextcord.Color.from_rgb(color[0], color[1], color[2]))
|
||||
embed.set_footer(text=teamid)
|
||||
|
@ -319,7 +319,7 @@ class team(commands.Cog):
|
|||
await interaction.response.defer()
|
||||
teamid = teams_dict[team]
|
||||
data = requests.get(f"https://mmolb.com/api/team/{teamid}").json()
|
||||
history = requests.get(f"https://freecashe.ws/api/games?team={teamid}&season=1").json()["items"]
|
||||
history = requests.get(f"https://freecashe.ws/api/games?team={teamid}&season=2").json()["items"]
|
||||
color = tuple(int(data["Color"][i:i+2], 16) for i in (0, 2, 4))
|
||||
embed = nextcord.Embed(title=f"Last ten games for the {data["Location"]} {data["Name"]} {data["Emoji"]}", colour = nextcord.Color.from_rgb(color[0], color[1], color[2]))
|
||||
embed.set_footer(text=teamid)
|
||||
|
|
Loading…
Reference in a new issue