diff --git a/src/Discord.Net.Core/Format.cs b/src/Discord.Net.Core/Format.cs index fec9b607a..07a9ec75c 100644 --- a/src/Discord.Net.Core/Format.cs +++ b/src/Discord.Net.Core/Format.cs @@ -4,7 +4,7 @@ namespace Discord public static class Format { // Characters which need escaping - private static readonly string[] SensitiveCharacters = { "\\", "*", "_", "~", "`" }; + private static readonly string[] SensitiveCharacters = { "\\", "*", "_", "~", "`", "|" }; /// Returns a markdown-formatted string with bold formatting. public static string Bold(string text) => $"**{text}**"; @@ -14,6 +14,8 @@ namespace Discord public static string Underline(string text) => $"__{text}__"; /// Returns a markdown-formatted string with strikethrough formatting. public static string Strikethrough(string text) => $"~~{text}~~"; + /// Returns a string with spoiler formatting. + public static string Spoiler(string text) => $"||{text}||"; /// Returns a markdown-formatted URL. Only works in descriptions and fields. public static string Url(string text, string url) => $"[{text}]({url})"; /// Escapes a URL so that a preview is not generated.