Represents an oauth application.

Hierarchy

Constructors

Properties

botPublic: boolean

When false, only the application's owners can invite the bot to guilds.

botRequireCodeGrant: boolean

When true, the applications bot will only join upon the completion of the full oauth2 code grant flow.

coverImage: null | string

This application's rich presence invite cover image hash, if any.

customInstallURL?: string

This application's default custom authorization link, if any.

description: string

The description of the application.

flags: number

This application's public flags.

guild?: Guild

If this application is a game sold on Discord, the guild to which it has been linked.

guildID?: string

The ID of the guild associated with this application, if any.

icon: null | string

The icon hash of the application.

id: string
installParams?: InstallParams

Settings for this application's in-app authorization link, if enabled.

name: string

The name of the application.

owner: User

The owner of this application.

primarySKUID?: string

If this application is a game sold on Discord, the id of the Game's SKU.

privacyPolicyURL?: string

A url to this application's privacy policy.

rpcOrigins: string[]

A list of rpc origin urls, if rpc is enabled.

slug?: string

If this application is a game sold on Discord, the slug that links to its store page.

tags?: string[]

The tags for this application.

team: null | Team

The team that owns this application, if any.

termsOfServiceURL?: string

A url to this application's terms of service.

verifyKey: string

The bot's hex encoded public key.

Accessors

Methods

  • The url of this application's cover image.

    Returns

    Parameters

    • Optional format: "jpg" | "jpeg" | "png" | "webp" | "gif"

      The format the url should be.

    • Optional size: number

      The dimensions of the image.

    Returns null | string

  • Get a global application command.

    Returns

    Type Parameters

    • W extends boolean = false

    • T extends Omit<ApplicationCommand<CHAT_INPUT>, "descriptionLocalizations" | "nameLocalizations"> | Omit<ApplicationCommand<USER>, "descriptionLocalizations" | "nameLocalizations"> | Omit<ApplicationCommand<MESSAGE>, "descriptionLocalizations" | "nameLocalizations"> | Omit<ApplicationCommand<CHAT_INPUT>, "descriptionLocalizations" | "nameLocalizations"> & { descriptionLocalizations: null | Record<string, string>; nameLocalizations: null | Record<string, string> } | Omit<ApplicationCommand<USER>, "descriptionLocalizations" | "nameLocalizations"> & { descriptionLocalizations: null | Record<string, string>; nameLocalizations: null | Record<string, string> } | Omit<ApplicationCommand<MESSAGE>, "descriptionLocalizations" | "nameLocalizations"> & { descriptionLocalizations: null | Record<string, string>; nameLocalizations: null | Record<string, string> } = AnyApplicationCommand<W>

    Parameters

    • commandID: string

      The id of the command.

    • Optional withLocalizations: W

      If localizations should be included.

    Returns Promise<T>

  • Get a global application command.

    Returns

    Type Parameters

    • W extends boolean = false

    • T extends Omit<ApplicationCommand<CHAT_INPUT>, "descriptionLocalizations" | "nameLocalizations"> | Omit<ApplicationCommand<USER>, "descriptionLocalizations" | "nameLocalizations"> | Omit<ApplicationCommand<MESSAGE>, "descriptionLocalizations" | "nameLocalizations"> | Omit<ApplicationCommand<CHAT_INPUT>, "descriptionLocalizations" | "nameLocalizations"> & { descriptionLocalizations: null | Record<string, string>; nameLocalizations: null | Record<string, string> } | Omit<ApplicationCommand<USER>, "descriptionLocalizations" | "nameLocalizations"> & { descriptionLocalizations: null | Record<string, string>; nameLocalizations: null | Record<string, string> } | Omit<ApplicationCommand<MESSAGE>, "descriptionLocalizations" | "nameLocalizations"> & { descriptionLocalizations: null | Record<string, string>; nameLocalizations: null | Record<string, string> } = AnyApplicationCommand<W>

    Parameters

    • guildID: string

      The id of the guild.

    • commandID: string

      The id of the command.

    • Optional withLocalizations: W

      If localizations should be included.

    Returns Promise<T>