diff options
| -rw-r--r-- | bot/cogs/moderation/incidents.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/cogs/moderation/incidents.py b/bot/cogs/moderation/incidents.py index 00cceca7d..f19bdb41f 100644 --- a/bot/cogs/moderation/incidents.py +++ b/bot/cogs/moderation/incidents.py @@ -248,7 +248,8 @@ class Incidents(Cog): """ Pre-process `payload` and pass it to `process_event` if appropriate. - We abort instantly if `payload` doesn't relate to a message sent in #incidents. + We abort instantly if `payload` doesn't relate to a message sent in #incidents, + or if it was sent by a bot. If `payload` relates to a message in #incidents, we first ensure that `crawl_task` has finished, to make sure we don't mutate channel state as we're crawling it. @@ -266,7 +267,7 @@ class Incidents(Cog): which were not cached in the current session. As a result, a certain amount of complexity is introduced, but at the moment this doesn't appear to be avoidable. """ - if payload.channel_id != Channels.incidents: + if payload.channel_id != Channels.incidents or payload.member.bot: return log.debug(f"Received reaction add event in #incidents, waiting for crawler: {self.crawl_task.done()=}") |