Skip to content

Commit

Permalink
warnsystem: allow user to interact with his own view
Browse files Browse the repository at this point in the history
  • Loading branch information
laggron42 committed Nov 26, 2024
1 parent 9d33235 commit 66c246e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions warnsystem/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def __init__(

async def interaction_check(self, interaction: Interaction[discord.Client]) -> bool:
return (
await mod.is_mod_or_superior(self.bot, interaction.user)
interaction.client == self.user
or await mod.is_mod_or_superior(self.bot, interaction.user)
or interaction.user.guild_permissions.kick_members
)

Expand Down Expand Up @@ -274,7 +275,8 @@ def __init__(

async def interaction_check(self, interaction: Interaction[discord.Client]) -> bool:
return (
await mod.is_mod_or_superior(self.bot, interaction.user)
interaction.client == self.user
or await mod.is_mod_or_superior(self.bot, interaction.user)
or interaction.user.guild_permissions.kick_members
)

Expand Down

0 comments on commit 66c246e

Please sign in to comment.