Class Formatter
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.dll
Contains markdown formatting helpers.
public static class Formatter
- Inheritance
-
objectFormatter
Methods
- AttachedImageUrl(string)
Creates a url for using attachments in embeds. This can only be used as an Image URL, Thumbnail URL, Author icon URL or Footer icon URL.
- BlockCode(string, string)
Creates a block of code.
- Bold(string)
Creates bold text.
- Colorize(string, params AnsiColor[])
Colorizes text based using ANSI escape codes. Escape codes are only properly rendered in code blocks. Resets are inserted automatically.
- EmbedlessUrl(Uri)
Creates a URL that won't create a link preview.
- Emoji(DiscordEmoji)
Creates a custom emoji string.
- InlineCode(string)
Creates inline code snippet.
- Italic(string)
Creates italicized text.
- MaskedUrl(string, Uri, string)
Creates a masked link. This link will display as specified text, and alternatively provided alt text. This can only be used in embeds.
- Mention(DiscordApplicationCommand)
Creates a mention for specified application command.
- Mention(DiscordChannel)
Creates a mention for specified channel.
- Mention(DiscordRole)
Creates a mention for specified role.
- Mention(DiscordUser, bool)
Creates a mention for specified user or member. Can optionally specify to resolve nicknames.
- Sanitize(string)
Escapes all markdown formatting from specified text.
- Spoiler(string)
Creates spoiler from text.
- Strike(string)
Creates strikethrough text.
- Strip(string)
Removes all markdown formatting from specified text.
- Timestamp(DateTime, TimestampFormat)
Creates a rendered timestamp.
- Timestamp(DateTimeOffset, TimestampFormat)
Creates a rendered timestamp.
- Timestamp(TimeSpan, TimestampFormat)
Creates a rendered timestamp.
- ToBigHeader(string)
Creates a big header.
- ToMediumHeader(string)
Creates a medium header.
- ToSmallHeader(string)
Creates a small header.
- Underline(string)
Creates underlined text.