Adding top speed to /ship command

This commit is contained in:
Luke Robles 2023-06-01 17:13:47 -07:00
parent 8b4293901f
commit d04de10d41

View File

@ -116,9 +116,19 @@ async def get_ship(ship_name):
)
except Exception:
cargo_capacity = "N/A"
embed.add_field(name="**Cargo Capacity**", value=cargo_capacity, inline=True)
try:
top_speed = (
soup.find("div", {"class": "infobox__label"}, string="Max speed")
.findNext("span", {"class": "smwtext"})
.text
)
except Exception:
top_speed = "N/A"
embed.add_field(name="**Top Speed**", value=top_speed, inline=True)
try:
crew_size = (
soup.find("div", {"class": "infobox__label"}, string="Crew")