Skip to content

Commit

Permalink
required fixes for hom
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-zaidali committed Jul 17, 2023
1 parent 937780e commit a63fff2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hitormiss/main.py
Expand Up @@ -218,8 +218,9 @@ async def cog_unload(self):
async def throw(
self,
ctx,
item: BaseItem = commands.parameter(converter=ItemConverter),
target: Player = commands.parameter(converter=PlayerConverter),
*,
item: BaseItem = commands.parameter(converter=ItemConverter),
):
"""Throw an item you own at a user
Expand Down Expand Up @@ -361,6 +362,7 @@ async def hom_buy(
self,
ctx: commands.Context,
amount: Optional[int] = None,
*,
item: BaseItem = commands.parameter(converter=ItemConverter),
):
"""
Expand Down Expand Up @@ -467,7 +469,7 @@ async def hom_create(self, ctx: commands.Context):

name = answers.pop("name")

if next(filter(lambda x: x.lower() == name.lower(), self.items.keys()), None) is None:
if next(filter(lambda x: x.lower() == name.lower(), self.items.keys()), None) is not None:
return await ctx.send(f"An item with the name `{name}` already exists.")

answers["throwable"] = True
Expand Down

0 comments on commit a63fff2

Please sign in to comment.