Class: ClientApplication

ClientApplication

Represents a Client OAuth2 Application.

Constructor

new ClientApplication()

Source:

Extends

Members

(nullable) botPublic :boolean

If this app's bot is public
Type:
  • boolean
Source:

(nullable) botRequireCodeGrant :boolean

If this app's bot requires a code grant when using the OAuth2 flow
Type:
  • boolean
Source:

(nullable) cover :string

The app's cover image
Type:
  • string
Source:

(readonly) createdAt :Date

The time the app was created at
Type:
  • Date
Inherited From:
Source:

(readonly) createdTimestamp :number

The timestamp the app was created at
Type:
  • number
Inherited From:
Source:

description :string

The app's description
Type:
  • string
Inherited From:
Source:

icon :string

The app's icon hash
Type:
  • string
Inherited From:
Source:

id :Snowflake

The ID of the app
Type:
Inherited From:
Source:

name :string

The name of the app
Type:
  • string
Inherited From:
Source:

owner :User|Team

The owner of this OAuth application
Type:
Source:

rpcOrigins :Array.<string>

The app's RPC origins, if enabled
Type:
  • Array.<string>
Source:

Methods

coverImage(optionsopt) → {string}

A link to this application's cover image.
Parameters:
Name Type Attributes Default Description
options ImageURLOptions <optional>
{} Options for the Image URL
Inherited From:
Source:
Returns:
URL to the cover image
Type
string

fetchAssets() → {Promise.<Array.<ApplicationAsset>>}

Gets the clients rich presence assets.
Inherited From:
Source:
Returns:
Type
Promise.<Array.<ApplicationAsset>>

iconURL(optionsopt) → {string}

A link to the application's icon.
Parameters:
Name Type Attributes Default Description
options ImageURLOptions <optional>
{} Options for the Image URL
Inherited From:
Source:
Returns:
URL to the icon
Type
string

toString() → {string}

When concatenated with a string, this automatically returns the application's name instead of the Oauth2Application object.
Inherited From:
Source:
Returns:
Type
string
Example
// Logs: Application name: My App
console.log(`Application name: ${application}`);