mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 06:15:31 +00:00
logs-spy: don't lowercase invite URLs
This commit is contained in:
parent
921ab28190
commit
05f66e71ff
|
@ -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