Skip to content

Commit

Permalink
Merge branch 'master' into unique-ball-search
Browse files Browse the repository at this point in the history
  • Loading branch information
flaree authored Feb 10, 2025
2 parents 8bf35d8 + e7ce3b3 commit 275e1fd
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions ballsdex/packages/balls/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ async def give(
ephemeral=True,
)
return
if countryball.favorite:
favorite = countryball.favorite
if favorite:
view = ConfirmChoiceView(
interaction,
accept_message=f"{settings.collectible_name.title()} donated.",
Expand Down Expand Up @@ -609,10 +610,22 @@ async def give(
countryball.description(short=True, include_emoji=True, bot=self.bot, is_trade=True)
+ f" (`{countryball.attack_bonus:+}%/{countryball.health_bonus:+}%`)"
)
await interaction.followup.send(
f"You just gave the {settings.collectible_name} {cb_txt} to {user.mention}!",
allowed_mentions=discord.AllowedMentions(users=new_player.can_be_mentioned),
)
mentions = []
if new_player.can_be_mentioned:
mentions.append(new_player.discord_id)
if old_player.can_be_mentioned:
mentions.append(old_player.discord_id)
if favorite:
await interaction.followup.send(
f"{interaction.user.mention}, you just gave the "
f"{settings.collectible_name} {cb_txt} to {user.mention}!",
allowed_mentions=discord.AllowedMentions(users=mentions),
)
else:
await interaction.followup.send(
f"You just gave the {settings.collectible_name} {cb_txt} to {user.mention}!",
allowed_mentions=discord.AllowedMentions(users=mentions),
)
await countryball.unlock()

@app_commands.command()
Expand Down

0 comments on commit 275e1fd

Please sign in to comment.