Table of Contents

Class Formatter

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

Contains markdown formatting helpers.

public static class Formatter
Inheritance
Formatter
Inherited Members

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.

EmbedlessUrl(Uri)

Creates a URL that won't create a link preview.

Emoji(DiscordEmoji)

Creates a custom emoji string.

Header1(string)

Creates a header.

Header2(string)

Creates a small header.

Header3(string)

Creates a smaller header.

InlineCode(string)

Creates inline code snippet.

Italic(string)

Creates italicized text.

MaskedUrl(string, Uri, string?, bool)

Creates a masked link. This link will display as specified text, and alternatively provided alt text.

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.

MultiQuote(string)

Creates a multiline quoted text. Add new lines by using \n.

Sanitize(string)

Escapes all markdown formatting from specified text.

SimpleList(string[])

Creates a simple list.

If you want a indented list, see https://support.discord.com/hc/en-us/articles/210298617.

SingleQuote(string)

Creates quoted 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.

Underline(string)

Creates underlined text.