Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[players] fix stats #404

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ballsdex/packages/players/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ async def stats(self, interaction: discord.Interaction):
"You haven't got any statistics to show!", ephemeral=True
)
return
ball = await BallInstance.filter(player=player).prefetch_related("special")
ball = await BallInstance.filter(player=player).prefetch_related("special", "trade_player")

user = interaction.user
bot_countryballs = {x: y.emoji_id for x, y in balls.items() if y.enabled}
Expand Down Expand Up @@ -452,11 +452,11 @@ async def stats(self, interaction: discord.Interaction):
embed.description = (
"Here are your current statistics in the bot!\n\n"
f"**Completion:** {completion_percentage}\n"
f"**{settings.collectible_name.title()}s Owned:** {len(balls_owned)}\n"
f"**Caught {settings.collectible_name.title()}s Owned**: {len(caught_owned)}\n"
f"**Shiny {settings.collectible_name.title()}s:** {len(shiny)}\n"
f"**Special {settings.collectible_name.title()}s:** {len(special)}\n"
f"**Trades Completed:** {trades}"
f"**{settings.collectible_name.title()}s Owned:** {len(balls_owned):,}\n"
f"**Caught {settings.collectible_name.title()}s Owned**: {len(caught_owned):,}\n"
f"**Shiny {settings.collectible_name.title()}s:** {len(shiny):,}\n"
f"**Special {settings.collectible_name.title()}s:** {len(special):,}\n"
f"**Trades Completed:** {trades:,}"
)
embed.set_footer(text="Keep collecting and trading to improve your stats!")
embed.set_thumbnail(url=user.display_avatar) # type: ignore
Expand Down
Loading