From b9ca190e302b07b5bff99e335daeb776757a48fd Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Sat, 4 Nov 2023 23:43:03 -0700 Subject: [PATCH] Add ship description to the /ship command --- app/star_citizen.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/star_citizen.py b/app/star_citizen.py index 95627d1b..ad0b8036 100755 --- a/app/star_citizen.py +++ b/app/star_citizen.py @@ -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 = (