fix issue if you typo a commodity name

This commit is contained in:
Luke Robles 2023-06-16 08:05:59 -07:00
parent 913e5ef054
commit 5e84edc81a

View File

@ -218,11 +218,10 @@ async def calculate_trade_profies(commodity, scu=None):
embed = discord.Embed( embed = discord.Embed(
description="-------", color=discord.Color.blue(), type="rich" description="-------", color=discord.Color.blue(), type="rich"
) )
try: response = requests.get(url, headers=headers).json()["data"]
response = requests.get(url, headers=headers).json()["data"] if not response:
except Exception as e: embed.set_author(name="❌ Couldnt find that commodity: %s" % commodity)
print(e) return embed
embed.set_author(name="❌ Couldnt find that commodity")
embed.set_author(name=commodity) embed.set_author(name=commodity)