Fixing how we're searching for commodities on the api by using string.title()
This commit is contained in:
parent
02ab4318fb
commit
f6dcd35ae0
16
app/star_citizen.py
Normal file → Executable file
16
app/star_citizen.py
Normal file → Executable file
@ -213,24 +213,18 @@ async def calculate_trade_profies(commodity, scu=None):
|
||||
scu = 696
|
||||
scu_string = "a C2 Hercules full"
|
||||
|
||||
commodity = commodity.capitalize()
|
||||
commodity = commodity.title()
|
||||
|
||||
embed = discord.Embed(
|
||||
description="-------", color=discord.Color.blue(), type="rich"
|
||||
)
|
||||
try:
|
||||
response = requests.get(url, headers=headers).json()["data"]
|
||||
except Exception:
|
||||
print(commodity)
|
||||
embed.set_author(
|
||||
name="❌ Couldnt find that commodity",
|
||||
url="%s%s" % (wiki_url, commodity),
|
||||
)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
embed.set_author(name="❌ Couldnt find that commodity")
|
||||
|
||||
embed.set_author(
|
||||
name=commodity,
|
||||
url="%s%s" % (wiki_url, commodity),
|
||||
)
|
||||
embed.set_author(name=commodity)
|
||||
|
||||
# Loop through every system/outpost and find the cheapest place selling the commodity
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user