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

[balls] correcting the wording on is_blocked checks #440

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 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
36 changes: 34 additions & 2 deletions ballsdex/packages/balls/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@ async def list(
blocked = await player.is_blocked(interaction_player)
if blocked and not is_staff(interaction):
await interaction.followup.send(
"You cannot view the list of a user that has you blocked.", ephemeral=True
"You cannot view the list of a user that has blocked you.", ephemeral=True
)
return
blocked2 = await interaction_player.is_blocked(player)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I think if you blocked a user you can still view their inventory and only they cannot view yours

That's just my two cents

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that if you block a user you should avoid all interactions with them, but that's just me personally too, id like to hear another opinion too

if blocked2 and not is_staff(interaction):
await interaction.followup.send(
"You cannot view the list of a user that you have blocked.", ephemeral=True
)
return

Expand Down Expand Up @@ -283,6 +289,13 @@ async def completion(
ephemeral=True,
)
return
blocked2 = await interaction_player.is_blocked(player)
if blocked2 and not is_staff(interaction):
await interaction.followup.send(
"You cannot view the completion of a user that you have blocked.",
ephemeral=True,
)
return

if await inventory_privacy(self.bot, interaction, player, user_obj) is False:
return
Expand Down Expand Up @@ -442,6 +455,14 @@ async def last(self, interaction: discord.Interaction, user: discord.User | None
ephemeral=True,
)
return
blocked2 = await interaction_player.is_blocked(player)
if blocked2 and not is_staff(interaction):
await interaction.followup.send(
f"You cannot view the last caught {settings.collectible_name} "
"of a user that you have blocked.",
ephemeral=True,
)
return

countryball = await player.balls.all().order_by("-id").first().select_related("ball")
if not countryball:
Expand Down Expand Up @@ -611,7 +632,18 @@ async def give(
blocked = await new_player.is_blocked(old_player)
if blocked:
await interaction.followup.send(
"You cannot interact with a user that has blocked you.", ephemeral=True
f"You cannot donate a {settings.collectible_name} to "
"a user that has blocked you.",
ephemeral=True,
)
await countryball.unlock()
return
blocked2 = await new_player.is_blocked(old_player)
if blocked2:
await interaction.followup.send(
f"You cannot donate a {settings.collectible_name} to "
"a user that you have blocked.",
ephemeral=True,
)
await countryball.unlock()
return
Expand Down
Loading