Skip to content

Commit

Permalink
Fix backpack.. in loot command and remove view if the user can't eq…
Browse files Browse the repository at this point in the history
…uip (#463)
  • Loading branch information
TrustyJAID authored May 4, 2024
1 parent e7bd07b commit 408a76e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adventure/loot.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ async def _open_chest(self, ctx: commands.Context, user: discord.User, chest_typ
if not character.can_equip(item):
await character.add_to_backpack(item)
await self.config.user(ctx.author).set(await character.to_json(ctx, self.config))
await open_msg.edit(view=None)
return await smart_embed(
ctx=ctx,
message=_(
Expand All @@ -464,7 +465,7 @@ async def _open_chest(self, ctx: commands.Context, user: discord.User, chest_typ
user=escape(ctx.author.display_name), item=item.as_ansi(), slot=slot
)
else:
equip_msg = _("{user} equipped {item} ({slot} slot) and put {old_item} into their backpack.").format(
equip_msg = _("{user} equipped {item} ({slot} slot) and put {old_item} into their backpack").format(
user=escape(ctx.author.display_name),
item=item,
slot=slot,
Expand Down

0 comments on commit 408a76e

Please sign in to comment.