diff options
author | 2022-02-28 22:51:21 -0500 | |
---|---|---|
committer | 2022-02-28 22:51:21 -0500 | |
commit | 61e2bb4a90202d12c36754e6936b33fbdebb2f7d (patch) | |
tree | ba04648465037e1542c1db3eb9225cba390ecf7f | |
parent | docs: Make docstring sound better (diff) |
feat: Allow moderators to use buttons in other people's help command
-rw-r--r-- | bot/exts/info/help.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/info/help.py b/bot/exts/info/help.py index 33ce40c88..71f244eac 100644 --- a/bot/exts/info/help.py +++ b/bot/exts/info/help.py @@ -123,8 +123,10 @@ class CommandView(ui.View): async def interaction_check(self, interaction: Interaction) -> bool: """Ensures that the button only works for the user who spawned the help command.""" if interaction.user is not None: + if any(role.id in constants.MODERATION_ROLES for role in interaction.user.roles): + return True - if interaction.user.id == self.context.author.id: + elif interaction.user.id == self.context.author.id: return True return False |