Class Formatters

Deprecated

This class is redundant as all methods of the class can be imported from discord.js directly.

Hierarchy

  • any
    • Formatters

Constructors

Properties

TimestampStyles: {
    LongDate: "D";
    LongDateTime: "F";
    LongTime: "T";
    RelativeTime: "R";
    ShortDate: "d";
    ShortDateTime: "f";
    ShortTime: "t";
}

Type declaration

  • Readonly LongDate: "D"

    Long date format, consisting of day, month, and year.

    Example

    `20 April 2021`
    
  • Readonly LongDateTime: "F"

    Long date-time format, consisting of long date and short time formats.

    Example

    `Tuesday, 20 April 2021 16:20`
    
  • Readonly LongTime: "T"

    Long time format, consisting of hours, minutes, and seconds.

    Example

    `16:20:30`
    
  • Readonly RelativeTime: "R"

    Relative time format, consisting of a relative duration format.

    Example

    `2 months ago`
    
  • Readonly ShortDate: "d"

    Short date format, consisting of day, month, and year.

    Example

    `20/04/2021`
    
  • Readonly ShortDateTime: "f"

    Short date-time format, consisting of short date and short time formats.

    Example

    `20 April 2021 16:20`
    
  • Readonly ShortTime: "t"

    Short time format, consisting of hours and minutes.

    Example

    `16:20`
    

Deprecated

Import this property directly from discord.js instead.

blockQuote: (<Content>(content) => `>>> ${Content}`)

Type declaration

    • <Content>(content): `>>> ${Content}`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns `>>> ${Content}`

      Deprecated

      Import this method directly from discord.js instead.

bold: (<Content>(content) => `**${Content}**`)

Type declaration

    • <Content>(content): `**${Content}**`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns `**${Content}**`

      Deprecated

      Import this method directly from discord.js instead.

channelMention: (<ChannelId>(channelId) => `<#${ChannelId}>`)

Type declaration

    • <ChannelId>(channelId): `<#${ChannelId}>`
    • Type Parameters

      • ChannelId extends string

      Parameters

      • channelId: ChannelId

      Returns `<#${ChannelId}>`

      Deprecated

      Import this method directly from discord.js instead.

codeBlock: {
    <Content>(content): ```` ${Content} ````;
    <Language, Content>(language, content): ````${Language} ${Content} ````;
}

Type declaration

    • <Content>(content): ```` ${Content} ````
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns ```` ${Content} ````

      Deprecated

      Import this method directly from discord.js instead.

    • <Language, Content>(language, content): ````${Language} ${Content} ````
    • Type Parameters

      • Language extends string

      • Content extends string

      Parameters

      • language: Language
      • content: Content

      Returns ````${Language} ${Content} ````

      Deprecated

      Import this method directly from discord.js instead.

formatEmoji: {
    <EmojiId>(emojiId, animated?): `<:_:${EmojiId}>`;
    <EmojiId>(emojiId, animated?): `<a:_:${EmojiId}>`;
    <EmojiId>(emojiId, animated?): `<:_:${EmojiId}>` | `<a:_:${EmojiId}>`;
    <EmojiId, EmojiName>(options): `<a:${EmojiName}:${EmojiId}>`;
    <EmojiId, EmojiName>(options): `<:${EmojiName}:${EmojiId}>`;
    <EmojiId, EmojiName>(options): `<:${EmojiName}:${EmojiId}>` | `<a:${EmojiName}:${EmojiId}>`;
}

Type declaration

    • <EmojiId>(emojiId, animated?): `<:_:${EmojiId}>`
    • Type Parameters

      • EmojiId extends string

      Parameters

      • emojiId: EmojiId
      • Optional animated: false

      Returns `<:_:${EmojiId}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <EmojiId>(emojiId, animated?): `<a:_:${EmojiId}>`
    • Type Parameters

      • EmojiId extends string

      Parameters

      • emojiId: EmojiId
      • Optional animated: true

      Returns `<a:_:${EmojiId}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <EmojiId>(emojiId, animated?): `<:_:${EmojiId}>` | `<a:_:${EmojiId}>`
    • Type Parameters

      • EmojiId extends string

      Parameters

      • emojiId: EmojiId
      • Optional animated: boolean

      Returns `<:_:${EmojiId}>` | `<a:_:${EmojiId}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <EmojiId, EmojiName>(options): `<a:${EmojiName}:${EmojiId}>`
    • Type Parameters

      • EmojiId extends string

      • EmojiName extends string

      Parameters

      Returns `<a:${EmojiName}:${EmojiId}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <EmojiId, EmojiName>(options): `<:${EmojiName}:${EmojiId}>`
    • Type Parameters

      • EmojiId extends string

      • EmojiName extends string

      Parameters

      Returns `<:${EmojiName}:${EmojiId}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <EmojiId, EmojiName>(options): `<:${EmojiName}:${EmojiId}>` | `<a:${EmojiName}:${EmojiId}>`
    • Type Parameters

      • EmojiId extends string

      • EmojiName extends string

      Parameters

      Returns `<:${EmojiName}:${EmojiId}>` | `<a:${EmojiName}:${EmojiId}>`

      Deprecated

      Import this method directly from discord.js instead.

hideLinkEmbed: {
    <Content>(url): `<${Content}>`;
    (url): `<${string}>`;
}

Type declaration

    • <Content>(url): `<${Content}>`
    • Type Parameters

      • Content extends string

      Parameters

      • url: Content

      Returns `<${Content}>`

      Deprecated

      Import this method directly from discord.js instead.

    • (url): `<${string}>`
    • Parameters

      • url: URL

      Returns `<${string}>`

      Deprecated

      Import this method directly from discord.js instead.

hyperlink: {
    <Content>(content, url): `[${Content}](${string})`;
    <Content, Url>(content, url): `[${Content}](${Url})`;
    <Content, Title>(content, url, title): `[${Content}](${string} "${Title}")`;
    <Content, Url, Title>(content, url, title): `[${Content}](${Url} "${Title}")`;
}

Type declaration

    • <Content>(content, url): `[${Content}](${string})`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content
      • url: URL

      Returns `[${Content}](${string})`

      Deprecated

      Import this method directly from discord.js instead.

    • <Content, Url>(content, url): `[${Content}](${Url})`
    • Type Parameters

      • Content extends string

      • Url extends string

      Parameters

      • content: Content
      • url: Url

      Returns `[${Content}](${Url})`

      Deprecated

      Import this method directly from discord.js instead.

    • <Content, Title>(content, url, title): `[${Content}](${string} "${Title}")`
    • Type Parameters

      • Content extends string

      • Title extends string

      Parameters

      • content: Content
      • url: URL
      • title: Title

      Returns `[${Content}](${string} "${Title}")`

      Deprecated

      Import this method directly from discord.js instead.

    • <Content, Url, Title>(content, url, title): `[${Content}](${Url} "${Title}")`
    • Type Parameters

      • Content extends string

      • Url extends string

      • Title extends string

      Parameters

      • content: Content
      • url: Url
      • title: Title

      Returns `[${Content}](${Url} "${Title}")`

      Deprecated

      Import this method directly from discord.js instead.

inlineCode: (<Content>(content) => ``${Content}``)

Type declaration

    • <Content>(content): ``${Content}``
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns ``${Content}``

      Deprecated

      Import this method directly from discord.js instead.

italic: (<Content>(content) => `_${Content}_`)

Type declaration

    • <Content>(content): `_${Content}_`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns `_${Content}_`

      Deprecated

      Import this method directly from discord.js instead.

quote: (<Content>(content) => `> ${Content}`)

Type declaration

    • <Content>(content): `> ${Content}`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns `> ${Content}`

      Deprecated

      Import this method directly from discord.js instead.

roleMention: (<RoleId>(roleId) => `<@&${RoleId}>`)

Type declaration

    • <RoleId>(roleId): `<@&${RoleId}>`
    • Type Parameters

      • RoleId extends string

      Parameters

      • roleId: RoleId

      Returns `<@&${RoleId}>`

      Deprecated

      Import this method directly from discord.js instead.

spoiler: (<Content>(content) => `||${Content}||`)

Type declaration

    • <Content>(content): `||${Content}||`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns `||${Content}||`

      Deprecated

      Import this method directly from discord.js instead.

strikethrough: (<Content>(content) => `~~${Content}~~`)

Type declaration

    • <Content>(content): `~~${Content}~~`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns `~~${Content}~~`

      Deprecated

      Import this method directly from discord.js instead.

time: {
    (date?): `<t:${bigint}>`;
    <Style>(date, style): `<t:${bigint}:${Style}>`;
    <Seconds>(seconds): `<t:${Seconds}>`;
    <Seconds, Style>(seconds, style): `<t:${Seconds}:${Style}>`;
}

Type declaration

    • (date?): `<t:${bigint}>`
    • Parameters

      • Optional date: Date

      Returns `<t:${bigint}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <Style>(date, style): `<t:${bigint}:${Style}>`
    • Type Parameters

      Parameters

      • date: Date
      • style: Style

      Returns `<t:${bigint}:${Style}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <Seconds>(seconds): `<t:${Seconds}>`
    • Type Parameters

      • Seconds extends number

      Parameters

      • seconds: Seconds

      Returns `<t:${Seconds}>`

      Deprecated

      Import this method directly from discord.js instead.

    • <Seconds, Style>(seconds, style): `<t:${Seconds}:${Style}>`
    • Type Parameters

      Parameters

      • seconds: Seconds
      • style: Style

      Returns `<t:${Seconds}:${Style}>`

      Deprecated

      Import this method directly from discord.js instead.

underscore: (<Content>(content) => `__${Content}__`)

Type declaration

    • <Content>(content): `__${Content}__`
    • Type Parameters

      • Content extends string

      Parameters

      • content: Content

      Returns `__${Content}__`

      Deprecated

      Import this method directly from discord.js instead.

userMention: (<UserId>(userId) => `<@${UserId}>`)

Type declaration

    • <UserId>(userId): `<@${UserId}>`
    • Type Parameters

      • UserId extends string

      Parameters

      • userId: UserId

      Returns `<@${UserId}>`

      Deprecated

      Import this method directly from discord.js instead.

Generated using TypeDoc