Adding top speed to /ship command

This commit is contained in:
Luke Robles 2023-06-01 17:13:47 -07:00
parent 2da5cc8f29
commit d62e674106

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")