Add ship description to the /ship command

This commit is contained in:
Luke Robles 2023-11-04 23:43:03 -07:00
parent 7455ab4e2e
commit b9ca190e30

View File

@ -230,7 +230,15 @@ async def get_ship(ship_name):
name="**Link**", value="%s%s" % (wiki_url, wiki_ship_name), inline=False
)
embed.set_image(url=ship_image)
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 = (