mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Escape Discord characters in edit summary
This commit is contained in:
parent
ad55b0f423
commit
567ac2e2c1
|
@ -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"]:
|
||||||
|
|
Loading…
Reference in a new issue