aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-08-08 11:04:24 +0200
committerGravatar kwzrd <[email protected]>2020-08-08 11:04:24 +0200
commitf3c16f77d812be50c2b7bed4c046cd67f3b9b761 (patch)
treebd8593ea5c2bf5e67b1da3c218fd3eac40f63de1
parentVerification: improve `is_verified` check (diff)
Verification: only take reactions from core devs
Co-authored-by: MarkKoz <[email protected]>
-rw-r--r--bot/cogs/verification.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py
index d4064cff7..da2f81e2d 100644
--- a/bot/cogs/verification.py
+++ b/bot/cogs/verification.py
@@ -196,12 +196,14 @@ class Verification(Cog):
for option in options:
await confirmation_msg.add_reaction(option)
+ core_dev_ids = [member.id for member in pydis.get_role(constants.Roles.core_developers).members]
+
def check(reaction: discord.Reaction, user: discord.User) -> bool:
"""Check whether `reaction` is a valid reaction to `confirmation_msg`."""
return (
reaction.message.id == confirmation_msg.id # Reacted to `confirmation_msg`
and str(reaction.emoji) in options # With one of `options`
- and not user.bot # By a human
+ and user.id in core_dev_ids # By a core developer
)
timeout = 60 * 5 # Seconds, i.e. 5 minutes