warehouse should work now

This commit is contained in:
Seaswimmer 2023-02-28 00:33:58 -05:00
parent 4a8fe1711c
commit a4642196ec

View file

@ -7,13 +7,6 @@ class Galaxy(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
@commands.command()
async def warehouset(self, ctx: commands.Context, lvlfrom: str = None, lvlto: str = None):
print(lvlfrom)
print(lvlto)
temp = isinstance(lvlfrom,int)
print(str(temp))
@commands.command() @commands.command()
async def warehouse(self, ctx: commands.Context, lvlfrom: int, lvlto: int): async def warehouse(self, ctx: commands.Context, lvlfrom: int, lvlto: int):
"""Calculates the total cost to upgrade your warehouse from a level to a level.""" """Calculates the total cost to upgrade your warehouse from a level to a level."""
@ -27,15 +20,15 @@ class Galaxy(commands.Cog):
embed.add_field(name="To:", value=f"Warehouse Level: {lvlto}\nTotal Cost: {total_to} Credits") embed.add_field(name="To:", value=f"Warehouse Level: {lvlto}\nTotal Cost: {total_to} Credits")
embed.add_field(name="Output:", value=f"{total} Credits") embed.add_field(name="Output:", value=f"{total} Credits")
if lvlfrom == lvlto: if lvlfrom == lvlto:
ctx.send(contents="``lvlfrom`` cannot be the same as ``lvlto``.") await ctx.send(contents="``lvlfrom`` cannot be the same as ``lvlto``.")
elif lvlfrom > lvlto: elif lvlfrom > lvlto:
ctx.send(contents="``lvlfrom`` cannot be a higher value than ``to``.") await ctx.send(contents="``lvlfrom`` cannot be a higher value than ``to``.")
elif lvlfrom < 1 or lvlfrom > 37: elif lvlfrom < 1 or lvlfrom > 37:
ctx.send(contents="``lvlfrom`` must be higher than 0 and lower than 38") await ctx.send(contents="``lvlfrom`` must be higher than 0 and lower than 38")
elif lvlto < 1 or lvlto > 38: elif lvlto < 1 or lvlto > 38:
ctx.send(contents="``lvlto`` must be higher than 1 and lower than 39") await ctx.send(contents="``lvlto`` must be higher than 1 and lower than 39")
else: else:
ctx.send(embed=embed) await ctx.send(embed=embed)
@commands.group(autohelp=True) @commands.group(autohelp=True)
async def faq(self, ctx): async def faq(self, ctx):