Skip to content

Formatting

const Formatting: object

Defined in: package/src/utils/formatting.ts:2

Utilities for formatting text with Discord

blockQuote: (text) => `>>> ${string}`

Format text as a full block quote covering multiple lines

string

`>>> ${string}`

bold: (text) => `**${string}**`

Format text as bold

string

`**${string}**`

code: (text) => ${string}

Format text as inline code

string

${string}

codeBlock: (text, language?) => ````${string} ${string} ````

console.log("Format text as a code block, with optional programming language");

string

string

````${string} ${string} ````

footer: (text) => `-# ${string}`

Format text as a small gray footer

string

`-# ${string}`

h1: (text) => `# ${string}`

string

`# ${string}`

h2: (text) => `## ${string}`

string

`## ${string}`

h3: (text) => `### ${string}`

string

`### ${string}`

italic: (text) => `*${string}*`

Format text as italic

string

`*${string}*`

quote: (text) => `> ${string}`

Format text as a quote

string

`> ${string}`

strikethrough: (text) => `~~${string}~~`

Format text as a strikethrough

string

`~~${string}~~`

underline: (text) => `__${string}__`

Format text to be underlined

string

`__${string}__`