Move description of a ship to the top of the embed
This commit is contained in:
parent
45d0a83c06
commit
2c43ddebcb
@ -63,6 +63,16 @@ async def get_ship(ship_name):
|
|||||||
description="-------", color=discord.Color.blue(), type="rich"
|
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"]
|
ship_image = (soup.find("a", {"class": "mw-file-description"})).img["src"]
|
||||||
embed.set_image(url=ship_image)
|
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
|
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:
|
try:
|
||||||
item_uuid = (
|
item_uuid = (
|
||||||
soup.find("div", {"class": "infobox__label"}, string="UUID")
|
soup.find("div", {"class": "infobox__label"}, string="UUID")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user