move buy location lower in the embed, if not buyable, dont add it to the embed

This commit is contained in:
Luke Robles 2023-06-01 21:19:20 -07:00
parent df44f23273
commit 80381fbad8
3 changed files with 9 additions and 9 deletions

View File

@ -77,15 +77,6 @@ async def get_ship(ship_name):
value=price, value=price,
inline=True, inline=True,
) )
buy_location = soup.find_all("td", {"class": "Location smwtype_wpg"})
embed.add_field(
name="**Where to buy**",
value=", ".join(str(x.text) for x in buy_location),
inline=True,
)
try: try:
pledge_price = ( pledge_price = (
soup.find("div", {"class": "infobox__label"}, string="Standalone") soup.find("div", {"class": "infobox__label"}, string="Standalone")
@ -113,6 +104,15 @@ async def get_ship(ship_name):
inline=True, inline=True,
) )
buy_location = soup.find_all("td", {"class": "Location smwtype_wpg"})
if len(buy_location):
embed.add_field(
name="**Buyable At**",
value=", ".join(str(x.text) for x in buy_location),
inline=True,
)
# embed.add_field(name="-------", value="", inline=False) # embed.add_field(name="-------", value="", inline=False)
# embed.add_field(name="**Description**", value=ship["description"], inline=False) # embed.add_field(name="**Description**", value=ship["description"], inline=False)
embed.add_field(name="-------", value="", inline=False) embed.add_field(name="-------", value="", inline=False)

0
app/stock.py Executable file → Normal file
View File

0
argocd-application.yaml Executable file → Normal file
View File