If there is no ingame price, do not make the link clickable
This commit is contained in:
parent
76f3998ec3
commit
f6d50732bc
@ -59,6 +59,11 @@ async def get_ship(ship_name):
|
||||
.text
|
||||
)
|
||||
|
||||
price = "[%s](%s%s#Buying)" % (ingame_price, wiki_url, wiki_ship_name)
|
||||
|
||||
if "Not available" in ingame_price:
|
||||
price = "N/A"
|
||||
|
||||
## Hideous code for "where to buy" in game
|
||||
# table = soup.find("span", {"id": "Buying"}).findNext(
|
||||
# "table", {"class": "wikitable"}
|
||||
@ -76,9 +81,10 @@ async def get_ship(ship_name):
|
||||
|
||||
# if not len(ingame_price):
|
||||
# ingame_price = "No in-game price available"
|
||||
|
||||
embed.add_field(
|
||||
name="**Ingame Price**",
|
||||
value="[%s](%s%s#Buying)" % (ingame_price, wiki_url, wiki_ship_name),
|
||||
value=price,
|
||||
inline=True,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user