diff --git a/jarvis/__init__.py b/jarvis/__init__.py index cc2f332..da05ec4 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -194,15 +194,25 @@ async def on_message(message: Message): if autopurge: await message.delete(delay=autopurge["delay"]) content = re.sub(r"\s+", "", message.content) +<<<<<<< HEAD content = re.sub(r"[^\w\d./]+", "", content) match = invites.search(content) if match: +======= + content = re.sub(r"[^\w\s]", "", content) + matches = invites.match(content) + if matches: +>>>>>>> d2cf3549ece5640fd7e215a75e12421c8f19fa10 guild_invites = await message.guild.invites() allowed = [x.code for x in guild_invites] + [ "dbrand", "VtgZntXcnZ", ] +<<<<<<< HEAD if match.group(6) not in allowed: +======= + if matches.group(6) not in allowed: +>>>>>>> d2cf3549ece5640fd7e215a75e12421c8f19fa10 await message.delete() db.jarvis.warns.insert_one( {