fix: made value parameters allow non-ints

This commit is contained in:
Seaswimmer 2023-07-30 12:21:01 -04:00
parent 1874697228
commit b85c56547b
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -160,52 +160,52 @@ class Galaxy(commands.Cog):
return embed return embed
@insurance.command() @insurance.command()
async def miner(self, ctx: commands.Context, value: int): async def miner(self, ctx: commands.Context, value):
"""Calculates insurance for miners. (70%)""" """Calculates insurance for miners. (70%)"""
await ctx.send(embed=await self._insurance('miner', value)) await ctx.send(embed=await self._insurance('miner', value))
@insurance.command() @insurance.command()
async def freighter(self, ctx: commands.Context, value: int): async def freighter(self, ctx: commands.Context, value):
"""Calculates insurance for freighters. (65%)""" """Calculates insurance for freighters. (65%)"""
await ctx.send(embed=await self._insurance('freighter', value)) await ctx.send(embed=await self._insurance('freighter', value))
@insurance.command() @insurance.command()
async def frigate(self, ctx: commands.Context, value: int): async def frigate(self, ctx: commands.Context, value):
"""Calculates insurance for frigates. (60%)""" """Calculates insurance for frigates. (60%)"""
await ctx.send(embed=await self._insurance('frigate', value)) await ctx.send(embed=await self._insurance('frigate', value))
@insurance.command() @insurance.command()
async def destroyer(self, ctx: commands.Context, value: int): async def destroyer(self, ctx: commands.Context, value):
"""Calculates insurance for destroyers. (55%)""" """Calculates insurance for destroyers. (55%)"""
await ctx.send(embed=await self._insurance('destroyer', value)) await ctx.send(embed=await self._insurance('destroyer', value))
@insurance.command() @insurance.command()
async def cruiser(self, ctx: commands.Context, value: int): async def cruiser(self, ctx: commands.Context, value):
"""Calculates insurance for cruisers. (50%)""" """Calculates insurance for cruisers. (50%)"""
await ctx.send(embed=await self._insurance('cruiser', value)) await ctx.send(embed=await self._insurance('cruiser', value))
@insurance.command() @insurance.command()
async def battlecruiser(self, ctx: commands.Context, value: int): async def battlecruiser(self, ctx: commands.Context, value):
"""Calculates insurance for battlecruisers. (40%)""" """Calculates insurance for battlecruisers. (40%)"""
await ctx.send(embed=await self._insurance('battlecruiser', value)) await ctx.send(embed=await self._insurance('battlecruiser', value))
@insurance.command() @insurance.command()
async def battleship(self, ctx: commands.Context, value: int): async def battleship(self, ctx: commands.Context, value):
"""Calculates insurance for battleships. (35%)""" """Calculates insurance for battleships. (35%)"""
await ctx.send(embed=await self._insurance('battleship', value)) await ctx.send(embed=await self._insurance('battleship', value))
@insurance.command() @insurance.command()
async def dreadnought(self, ctx: commands.Context, value: int): async def dreadnought(self, ctx: commands.Context, value):
"""Calculates insurance for dreadnoughts. (30%)""" """Calculates insurance for dreadnoughts. (30%)"""
await ctx.send(embed=await self._insurance('dreadnought', value)) await ctx.send(embed=await self._insurance('dreadnought', value))
@insurance.command() @insurance.command()
async def carrier(self, ctx: commands.Context, value: int): async def carrier(self, ctx: commands.Context, value):
"""Calculates insurance for carriers. (30%)""" """Calculates insurance for carriers. (30%)"""
await ctx.send(embed=await self._insurance('carrier', value)) await ctx.send(embed=await self._insurance('carrier', value))
@insurance.command() @insurance.command()
async def supercapital(self, ctx: commands.Context, value: int): async def supercapital(self, ctx: commands.Context, value):
"""Calculates insurance for super capitals. (25%)""" """Calculates insurance for super capitals. (25%)"""
await ctx.send(embed=await self._insurance('super_capital', value)) await ctx.send(embed=await self._insurance('super_capital', value))