Skip to content

Commit

Permalink
Show shiny and special in completion failure msg
Browse files Browse the repository at this point in the history
  • Loading branch information
flaree committed Aug 30, 2024
1 parent ad9bf97 commit 2ac1731
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ballsdex/packages/balls/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,14 @@ async def completion(
Whether you want to see the completion of shiny countryballs
"""
user_obj = user or interaction.user
extra_text = "shiny " if shiny else "" + f"{special.name} " if special else ""
if user is not None:
try:
player = await Player.get(discord_id=user_obj.id)
except DoesNotExist:
await interaction.response.send_message(
f"{user_obj.name} doesn't have any {settings.collectible_name}s yet."
f"{user_obj.name} doesn't have any "
f"{extra_text}{settings.collectible_name}s yet."
)
return
if await inventory_privacy(self.bot, interaction, player, user_obj) is False:
Expand All @@ -274,10 +276,12 @@ async def completion(
}
if not bot_countryballs:
await interaction.response.send_message(
f"There are no {settings.collectible_name}s registered on this bot yet.",
f"There are no {extra_text}{settings.collectible_name}s"
" registered on this bot yet.",
ephemeral=True,
)
return

await interaction.response.defer(thinking=True)

if shiny is not None:
Expand Down

0 comments on commit 2ac1731

Please sign in to comment.