Skip to content

Commit

Permalink
refactor(character): improve character service (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
natelandau authored Aug 10, 2023
1 parent 8505212 commit 3c6fd21
Show file tree
Hide file tree
Showing 4 changed files with 718 additions and 297 deletions.
2 changes: 1 addition & 1 deletion src/valentina/character/traits.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def add_trait(
)
await view.wait()
if view.confirmed:
ctx.bot.char_svc.add_trait( # type: ignore [attr-defined]
ctx.bot.char_svc.add_custom_trait( # type: ignore [attr-defined]
character,
name=trait_name,
description=trait_description,
Expand Down
4 changes: 2 additions & 2 deletions src/valentina/cogs/characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ async def unclaim_character(
"""Unclaim currently claimed character. This will allow you to claim a new character."""
if self.bot.char_svc.user_has_claim(ctx):
character = self.bot.char_svc.fetch_claim(ctx)
self.bot.char_svc.remove_claim(ctx)
self.bot.char_svc.remove_claim(ctx.guild.id, ctx.author.id)
await present_embed(
ctx=ctx,
title="Character Unclaimed",
Expand Down Expand Up @@ -275,7 +275,7 @@ async def date_of_birth(
)

@add.command(name="trait", description="Add a custom trait to a character")
async def add_trait(
async def add_custom_trait(
self,
ctx: discord.ApplicationContext,
trait: Option(str, "The new trait to add.", required=True),
Expand Down
Loading

0 comments on commit 3c6fd21

Please sign in to comment.