Class Format
A helper class for formatting characters.
Inheritance
System.Object
Format
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Discord.Net.Core.dll
public static class Format
Methods
|
Improve this Doc
View Source
Formats a string as a block quote.
Declaration
public static string BlockQuote(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
The text to format.
|
Returns
| Type |
Description |
| System.String |
Gets the formatted block quote text.
|
|
Improve this Doc
View Source
Returns a markdown-formatted string with bold formatting.
Declaration
public static string Bold(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Returns a markdown-formatted string with codeblock formatting.
Declaration
public static string Code(string text, string language = null)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.String |
language |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Escapes a URL so that a preview is not generated.
Declaration
public static string EscapeUrl(string url)
Parameters
| Type |
Name |
Description |
| System.String |
url |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Returns a markdown-formatted string with italics formatting.
Declaration
public static string Italics(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Formats a string as a quote.
Declaration
public static string Quote(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
The text to format.
|
Returns
| Type |
Description |
| System.String |
Gets the formatted quote text.
|
|
Improve this Doc
View Source
Sanitizes the string, safely escaping any Markdown sequences.
Declaration
public static string Sanitize(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Returns a string with spoiler formatting.
Declaration
public static string Spoiler(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Returns a markdown-formatted string with strikethrough formatting.
Declaration
public static string Strikethrough(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Returns a markdown-formatted string with underline formatting.
Declaration
public static string Underline(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Returns a markdown-formatted URL. Only works in EmbedBuilder descriptions and fields.
Declaration
public static string Url(string text, string url)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.String |
url |
|
Returns
| Type |
Description |
| System.String |
|