aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar an-dyy <[email protected]>2022-03-01 15:24:28 -0500
committerGravatar an-dyy <[email protected]>2022-03-01 15:24:28 -0500
commit9e204117dfd236c0cc2fb8355899df2feab63d29 (patch)
tree972a717f2bff2417b33dcf8fbb6faf9c052d04ea
parentfeat: Allow moderators to use buttons in other people's help command (diff)
docs: Added docstring for moderator access
-rw-r--r--bot/exts/info/help.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/exts/info/help.py b/bot/exts/info/help.py
index 71f244eac..864e7edd2 100644
--- a/bot/exts/info/help.py
+++ b/bot/exts/info/help.py
@@ -121,7 +121,11 @@ class CommandView(ui.View):
self.children.append(GroupButton(help_command, command, emoji="↩️"))
async def interaction_check(self, interaction: Interaction) -> bool:
- """Ensures that the button only works for the user who spawned the help command."""
+ """
+ Ensures that the button only works for the user who spawned the help command.
+
+ Also allows moderators to access buttons even when not the author of message.
+ """
if interaction.user is not None:
if any(role.id in constants.MODERATION_ROLES for role in interaction.user.roles):
return True