aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2021-12-01 00:19:42 +0000
committerGravatar Chris Lovering <[email protected]>2021-12-01 01:10:41 +0000
commite62ff5b4d0cd811e40d54e94ae5ae6d48f934624 (patch)
tree248a76ffbffe6a10df295d9be2e0eb7c1dea0316
parentSupress NotFound when archiving a nomination (diff)
Ensure a nomination archival emoji isn't from the bot
This is most relevant in local dev testing where the Emojis.check_mark could be the same as the Emojis.incident_actioned or Emojis.incident_unactioned, which would cause the bot to attempt to archive the post_review invocation if it was posted in the nomination voting channel.
-rw-r--r--bot/exts/recruitment/talentpool/_cog.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py
index 699d60f42..615a95d20 100644
--- a/bot/exts/recruitment/talentpool/_cog.py
+++ b/bot/exts/recruitment/talentpool/_cog.py
@@ -516,6 +516,9 @@ class TalentPool(Cog, name="Talentpool"):
if payload.channel_id != Channels.nomination_voting:
return
+ if payload.user_id == self.bot.user.id:
+ return
+
message: PartialMessage = self.bot.get_channel(payload.channel_id).get_partial_message(payload.message_id)
emoji = str(payload.emoji)