aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2018-07-27 21:38:01 +0200
committerGravatar Leon Sandøy <[email protected]>2018-07-27 21:38:01 +0200
commiteaf146e7c09f1127f5a12e0174d77b38cd32ba2f (patch)
treebea1ec90f730c72349855234929e86482294c712
parentCreated the Filtering cog and implemented a filter for zalgo. (diff)
minor testing parameters
-rw-r--r--bot/cogs/filtering.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index ccd270924..23b0d9e96 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -4,6 +4,8 @@ import re
from discord import Message
from discord.ext.commands import Bot
+from bot.constants import Channels
+
log = logging.getLogger(__name__)
@@ -16,7 +18,13 @@ class Filtering:
self.bot = bot
async def on_message(self, msg: Message):
- self._filter_zalgo(msg.content)
+
+ has_zalgo = await self._filter_zalgo(msg.content)
+
+ if has_zalgo:
+ self.bot.get_channel(Channels.modlog).send(
+ content="ZALGO!"
+ )
@staticmethod
async def _has_zalgo(text):