From 40ab542a92865df9416fc353df6491bfc8ac838e Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 22 Feb 2022 04:49:04 +0100 Subject: [PATCH] :sparkles: Add support for spoilers --- royalnet_discordpy/formatting.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/royalnet_discordpy/formatting.py b/royalnet_discordpy/formatting.py index bb9c74ba..08ee0b36 100644 --- a/royalnet_discordpy/formatting.py +++ b/royalnet_discordpy/formatting.py @@ -11,6 +11,8 @@ def ds_markdown_format(string: str) -> str: - ``\uE002``: end underline - ``\uE015``: start strike - ``\uE005``: end strike + - ``\uE01F``: start spoiler + - ``\uE00F``: end spoiler - ``\uE01C``: start single-line code - ``\uE00C``: end single-line code - ``\uE01D``: start multi-line code @@ -37,6 +39,8 @@ def ds_markdown_format(string: str) -> str: string = string.replace("\uE005", "~~") string = string.replace("\uE012", "__") string = string.replace("\uE002", "__") + string = string.replace("\uE01F", "||") + string = string.replace("\uE00F", "||") string = string.replace("\uE01C", "`") string = string.replace("\uE00C", "`") string = string.replace("\uE01D", "```")