mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[Mod] Prevent invite links from embedding in modlog (#2110)
This commit is contained in:
parent
c7becb6d80
commit
7cd3ff13bf
@ -1465,6 +1465,11 @@ class Mod:
|
||||
channel = self.bot.get_channel(channel)
|
||||
tmp["action"] += ' in ' + channel.mention
|
||||
|
||||
contains_invite = any(("discord.gg/" in tmp["user"].lower(),
|
||||
"discordapp.com/" in tmp["user"].lower()))
|
||||
if contains_invite:
|
||||
tmp["user"] = tmp["user"].replace(".", "\u200b.")
|
||||
|
||||
case_msg = (
|
||||
"**Case #{case}** | {action}\n"
|
||||
"**User:** {user} ({user_id})\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user