logs-spy: don't lowercase invite URLs
This commit is contained in:
parent
921ab28190
commit
05f66e71ff
1 changed files with 3 additions and 2 deletions
|
@ -15,7 +15,8 @@ class Logs(Cog):
|
|||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.invite_re = re.compile(r"((discord\.gg|discordapp\.com/"
|
||||
r"+invite)/+[a-zA-Z0-9-]+)")
|
||||
r"+invite)/+[a-zA-Z0-9-]+)",
|
||||
re.IGNORECASE)
|
||||
self.name_re = re.compile(r"[a-zA-Z0-9].*")
|
||||
self.clean_re = re.compile(r'[^a-zA-Z0-9_ ]+', re.UNICODE)
|
||||
# All lower case, no spaces, nothing non-alphanumeric
|
||||
|
@ -150,7 +151,7 @@ class Logs(Cog):
|
|||
msg = f"🚨 Suspicious message by {message.author.mention} "\
|
||||
f"({message.author.id}):"
|
||||
|
||||
invites = self.invite_re.findall(message.content.lower())
|
||||
invites = self.invite_re.findall(message.content)
|
||||
for invite in invites:
|
||||
msg += f"\n- Has invite: https://{invite[0]}"
|
||||
alert = True
|
||||
|
|
Loading…
Reference in a new issue