aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2018-07-30 22:31:10 +0200
committerGravatar Leon Sandøy <[email protected]>2018-07-30 22:31:10 +0200
commit5703372a6715538c564ecd2cc4dc32c534bd7d33 (patch)
tree014ac3913741634986ebd72eb91972a9cd6525f2
parentAddressing all review comments from gdude (diff)
Gotta filter edits too, to combat sneaky racists
-rw-r--r--bot/cogs/filtering.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index 9b9a9999b..92fa13f5b 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -68,8 +68,14 @@ class Filtering:
return self.bot.get_cog("ModLog")
async def on_message(self, msg: Message):
+ await self._filter_message(msg)
+
+ async def on_message_edit(self, _: Message, after: Message):
+ await self._filter_message(after)
+
+ async def _filter_message(self, msg: Message):
"""
- Whenever a message is received,
+ Whenever a message is sent or edited,
run it through our filters to see if it
violates any of our rules, and then respond
accordingly.