escape '<' and '>'
This commit is contained in:
parent
fa97d4fc97
commit
37bdb2409c
1 changed files with 4 additions and 0 deletions
4
main.py
4
main.py
|
@ -337,6 +337,10 @@ class DiscordClient(discord.ext.commands.Bot):
|
||||||
# Replace emote IDs with names.
|
# Replace emote IDs with names.
|
||||||
content = re.sub(regex, r":\g<1>:", content)
|
content = re.sub(regex, r":\g<1>:", content)
|
||||||
|
|
||||||
|
# Escape stuff
|
||||||
|
for replace in ("<", ">"):
|
||||||
|
content = content.replace(replace, f"\{replace}")
|
||||||
|
|
||||||
# Append attachments to message.
|
# Append attachments to message.
|
||||||
for attachment in message.attachments:
|
for attachment in message.attachments:
|
||||||
content += f"\n{attachment.url}"
|
content += f"\n{attachment.url}"
|
||||||
|
|
Loading…
Reference in a new issue