Move description of a ship to the top of the embed

This commit is contained in:
Luke Robles 2023-11-25 08:07:06 -08:00
parent 04a48dc5a2
commit 691251e57e

View File

@ -63,6 +63,16 @@ async def get_ship(ship_name):
description="-------", color=discord.Color.blue(), type="rich"
)
try:
description = (
soup.find("section", {"class": "citizen-section-collapsible"})
.findNext("p")
.text
)
except Exception:
description = "N/A"
embed.add_field(name="**Description**", value=description, inline=False)
ship_image = (soup.find("a", {"class": "mw-file-description"})).img["src"]
embed.set_image(url=ship_image)
@ -265,16 +275,6 @@ async def get_ship(ship_name):
name="**Link**", value="%s%s" % (wiki_url, wiki_ship_name), inline=False
)
try:
description = (
soup.find("section", {"class": "citizen-section-collapsible"})
.findNext("p")
.text
)
except Exception:
description = "N/A"
embed.add_field(name="**Description**", value=description, inline=True)
try:
item_uuid = (
soup.find("div", {"class": "infobox__label"}, string="UUID")