aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anand Krishna <[email protected]>2021-01-22 19:23:38 +0400
committerGravatar Anand Krishna <[email protected]>2021-01-22 19:23:38 +0400
commitc4399916db810a82adce1111fb6367e2228f8ef1 (patch)
tree564bb8f2c5d00b9cd32a2b648ad56aadef13b882
parentMake type hints uniform across file (diff)
Do `is_helper_viewable` check before fetching message
-rw-r--r--bot/exts/fun/duck_pond.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/fun/duck_pond.py b/bot/exts/fun/duck_pond.py
index c97f4b0cc..3eed25781 100644
--- a/bot/exts/fun/duck_pond.py
+++ b/bot/exts/fun/duck_pond.py
@@ -173,13 +173,13 @@ class DuckPond(Cog):
if channel is None:
return
- message = await channel.fetch_message(payload.message_id)
- member = discord.utils.get(message.guild.members, id=payload.user_id)
-
# Was the message sent in a channel Helpers can see?
if not self.is_helper_viewable(channel):
return
+ message = await channel.fetch_message(payload.message_id)
+ member = discord.utils.get(message.guild.members, id=payload.user_id)
+
# Was the message sent by a human staff member?
if not self.is_staff(message.author) or message.author.bot:
return