Concrete class prototype

This commit is contained in:
RogueException
2016-09-22 21:15:37 -03:00
parent ab42129eb9
commit 6319933ed0
394 changed files with 3648 additions and 3224 deletions

View File

@@ -0,0 +1,23 @@
namespace Discord
{
public static class Format
{
/// <summary> Returns a markdown-formatted string with bold formatting. </summary>
public static string Bold(string text) => $"**{text}**";
/// <summary> Returns a markdown-formatted string with italics formatting. </summary>
public static string Italics(string text) => $"*{text}*";
/// <summary> Returns a markdown-formatted string with underline formatting. </summary>
public static string Underline(string text) => $"__{text}__";
/// <summary> Returns a markdown-formatted string with strikethrough formatting. </summary>
public static string Strikethrough(string text) => $"~~{text}~~";
/// <summary> Returns a markdown-formatted string with strikeout formatting. </summary>
public static string Code(string text, string language = null)
{
if (language != null || text.Contains("\n"))
return $"```{language ?? ""}\n{text}\n```";
else
return $"`{text}`";
}
}
}