Fix element type in pal embed
All checks were successful
Build and push / changes (push) Successful in 2s
Build and push / Lint-Python (push) Successful in 1s
Build and push / Build-and-Push-Docker (push) Successful in 20s
Build and push / sync-argocd-app (push) Successful in 3s
Build and push / post-status-to-discord (push) Successful in 2s

This commit is contained in:
Luke Robles 2025-03-22 17:15:58 -07:00
parent 31e01fa5fc
commit 6e8ea72c11

View File

@ -70,8 +70,8 @@ class PalWorld(commands.Cog):
pal_elements_div = soup.find("div", class_="elements")
element_icon = "https://palworld.gg" + pal_elements_div.find("img")["src"]
element_type = pal_elements_div.find_next("div").text
elements[element_type] = element_icon
element_type = pal_elements_div.find_next("div")
elements[element_type.text] = element_icon
# https://discordpy.readthedocs.io/en/latest/api.html?highlight=colour#discord.Colour
color_lookup = {
@ -88,14 +88,16 @@ class PalWorld(commands.Cog):
embed = discord.Embed(
description="-------",
color=color_lookup[element_type],
color=color_lookup[element_type.text],
type="rich",
title=pal.capitalize(),
)
embed.set_author(
name=", ".join(elements.keys()),
icon_url=elements[element_type],
name="/".join(
[x.text for x in pal_elements_div.find_all("div", class_="name")]
),
icon_url=elements[element_type.text],
url=pal_url,
)