From eaf146e7c09f1127f5a12e0174d77b38cd32ba2f Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Fri, 27 Jul 2018 21:38:01 +0200 Subject: minor testing parameters --- bot/cogs/filtering.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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): -- cgit v1.2.3