Escape Discord characters in edit summary

This commit is contained in:
Frisk 2018-12-26 14:21:05 +01:00
parent 2901f9de26
commit 9b0cb59af4
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C

View file

@ -481,7 +481,7 @@ def webhook_formatter(action, STATIC, **params):
embed["url"] = link embed["url"] = link
if "desc" not in params: if "desc" not in params:
params["desc"] = "" params["desc"] = ""
embed["description"] = params["desc"] embed["description"] = re.sub(r"(`|_|\*|~|<|>|{|})", "\\\\\\1", params["desc"], 0)
embed["color"] = random.randrange(1, 16777215) if colornumber is None else math.floor(colornumber) embed["color"] = random.randrange(1, 16777215) if colornumber is None else math.floor(colornumber)
embed["timestamp"] = STATIC["timestamp"] embed["timestamp"] = STATIC["timestamp"]
if STATIC["tags"]: if STATIC["tags"]: