From 61e2bb4a90202d12c36754e6936b33fbdebb2f7d Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 28 Feb 2022 22:51:21 -0500 Subject: feat: Allow moderators to use buttons in other people's help command --- bot/exts/info/help.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3