DiscordLua
discorddiscord
v1.2.4
Install

ClientApplication

Class
On this page

ClientApplication is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.

class Module 1.2.4 REST Source

Properties

ClientApplication.approximateGuildCount

# readonly
Name
approximateGuildCount
Type
any
Access
readonly
Description
Instance field ClientApplication.approximateGuildCount. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.approximateUserAuthorizationCount

# readonly
Name
approximateUserAuthorizationCount
Type
any
Access
readonly
Description
Instance field ClientApplication.approximateUserAuthorizationCount. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.approximateUserInstallCount

# readonly
Name
approximateUserInstallCount
Type
any
Access
readonly
Description
Instance field ClientApplication.approximateUserInstallCount. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.bot

# readonly
Name
bot
Type
any
Access
readonly
Description
Instance field ClientApplication.bot. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.botPublic

# readonly
Name
botPublic
Type
any
Access
readonly
Description
Instance field ClientApplication.botPublic. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.botRequireCodeGrant

# readonly
Name
botRequireCodeGrant
Type
any
Access
readonly
Description
Instance field ClientApplication.botRequireCodeGrant. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.client

# readonly
Name
client
Type
any
Access
readonly
Description
Owning Client instance used for REST, cache, and event dispatch.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.commands

# readonly
Name
commands
Type
ApplicationCommandManager
Access
readonly
Description
Cache and REST facade for applicationcommand objects owned by this ClientApplication. Use it to fetch, create, resolve, and mutate those resources.
Availability
Created in ClientApplication.new and remains valid for the lifetime of the ClientApplication.
Related
ApplicationCommandManager

ClientApplication.cover

# readonly
Name
cover
Type
any
Access
readonly
Description
Instance field ClientApplication.cover. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.customInstallURL

# readonly
Name
customInstallURL
Type
any
Access
readonly
Description
Instance field ClientApplication.customInstallURL. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.description

# readonly
Name
description
Type
any
Access
readonly
Description
Instance field ClientApplication.description. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.emojis

# readonly
Name
emojis
Type
ApplicationEmojiManager
Access
readonly
Description
Cache and REST facade for applicationemoji objects owned by this ClientApplication. Use it to fetch, create, resolve, and mutate those resources.
Availability
Created in ClientApplication.new and remains valid for the lifetime of the ClientApplication.
Related
ApplicationEmojiManager

ClientApplication.entitlements

# readonly
Name
entitlements
Type
EntitlementManager
Access
readonly
Description
Cache and REST facade for entitlement objects owned by this ClientApplication. Use it to fetch, create, resolve, and mutate those resources.
Availability
Created in ClientApplication.new and remains valid for the lifetime of the ClientApplication.
Related
EntitlementManager

ClientApplication.eventWebhooksStatus

# readonly
Name
eventWebhooksStatus
Type
any
Access
readonly
Description
Instance field ClientApplication.eventWebhooksStatus. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.eventWebhooksTypes

# readonly
Name
eventWebhooksTypes
Type
any
Access
readonly
Description
Instance field ClientApplication.eventWebhooksTypes. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.eventWebhooksURL

# readonly
Name
eventWebhooksURL
Type
any
Access
readonly
Description
Instance field ClientApplication.eventWebhooksURL. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.flags

# readonly
Name
flags
Type
any
Access
readonly
Description
Instance field ClientApplication.flags. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.guildId

# readonly
Name
guildId
Type
any
Access
readonly
Description
Instance field ClientApplication.guildId. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.hook

# readonly
Name
hook
Type
any
Access
readonly
Description
Instance field ClientApplication.hook. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.icon

# readonly
Name
icon
Type
any
Access
readonly
Description
Instance field ClientApplication.icon. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.id

# readonly
Name
id
Type
any
Access
readonly
Description
Snowflake id of this ClientApplication.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.installParams

# readonly
Name
installParams
Type
any
Access
readonly
Description
Instance field ClientApplication.installParams. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.integrationTypesConfig

# readonly
Name
integrationTypesConfig
Type
any
Access
readonly
Description
Instance field ClientApplication.integrationTypesConfig. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.interactionsEndpointURL

# readonly
Name
interactionsEndpointURL
Type
any
Access
readonly
Description
Instance field ClientApplication.interactionsEndpointURL. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.name

# readonly
Name
name
Type
any
Access
readonly
Description
Display name of this ClientApplication.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.owner

# readonly
Name
owner
Type
any
Access
readonly
Description
Instance field ClientApplication.owner. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.partial

# readonly
Name
partial
Type
any
Access
readonly
Description
Instance field ClientApplication.partial. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.privacyPolicyURL

# readonly
Name
privacyPolicyURL
Type
any
Access
readonly
Description
Instance field ClientApplication.privacyPolicyURL. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.raw

# readonly
Name
raw
Type
any
Access
readonly
Description
Instance field ClientApplication.raw. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.roleConnectionsVerificationURL

# readonly
Name
roleConnectionsVerificationURL
Type
any
Access
readonly
Description
Instance field ClientApplication.roleConnectionsVerificationURL. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.rpcOrigins

# readonly
Name
rpcOrigins
Type
any
Access
readonly
Description
Instance field ClientApplication.rpcOrigins. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.skus

# readonly
Name
skus
Type
SKUManager
Access
readonly
Description
Cache and REST facade for sku objects owned by this ClientApplication. Use it to fetch, create, resolve, and mutate those resources.
Availability
Created in ClientApplication.new and remains valid for the lifetime of the ClientApplication.
Related
SKUManager

ClientApplication.subscriptions

# readonly
Name
subscriptions
Type
SubscriptionManager
Access
readonly
Description
Cache and REST facade for subscription objects owned by this ClientApplication. Use it to fetch, create, resolve, and mutate those resources.
Availability
Created in ClientApplication.new and remains valid for the lifetime of the ClientApplication.
Related
SubscriptionManager

ClientApplication.tags

# readonly
Name
tags
Type
any
Access
readonly
Description
Instance field ClientApplication.tags. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.team

# readonly
Name
team
Type
any
Access
readonly
Description
Instance field ClientApplication.team. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.termsOfServiceURL

# readonly
Name
termsOfServiceURL
Type
any
Access
readonly
Description
Instance field ClientApplication.termsOfServiceURL. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

ClientApplication.verifyKey

# readonly
Name
verifyKey
Type
any
Access
readonly
Description
Instance field ClientApplication.verifyKey. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this ClientApplication.

Methods

ClientApplication:coverURL()

#

Performs cover url on this ClientApplication. Call it from bot code when you need that operation on the current object.

Signature

ClientApplication:coverURL(options)

Parameters

NameTypeRequiredBehavior
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:coverURL({})

ClientApplication:createdAt()

#

Create dAt through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.

Signature

ClientApplication:createdAt()

Parameters

No parameters.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:createdAt()

ClientApplication:createdTimestamp()

#

Create dTimestamp through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.

Signature

ClientApplication:createdTimestamp()

Parameters

No parameters.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:createdTimestamp()

ClientApplication:edit()

#

Apply a REST update to this resource.

Signature

ClientApplication:edit(options, callback)

Parameters

NameTypeRequiredBehavior
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:edit({}, function(err, result)
    if err then error(err) end
end)

ClientApplication:editRoleConnectionMetadataRecords()

#

Apply a REST update to RoleConnectionMetadataRecords and refresh the local object when the request succeeds.

Signature

ClientApplication:editRoleConnectionMetadataRecords(records, callback)

Parameters

NameTypeRequiredBehavior
records any required Passed through to the implementation as written.
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:editRoleConnectionMetadataRecords(records, function(err, result)
    if err then error(err) end
end)

ClientApplication:fetch()

#

Request a fresh copy of this resource from REST and update the cache.

Signature

ClientApplication:fetch(callback)

Parameters

NameTypeRequiredBehavior
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:fetch(function(err, result)
    if err then error(err) end
end)

ClientApplication:fetchActivityInstance()

#

Fetch ActivityInstance from REST and update the local cache when the request succeeds.

Signature

ClientApplication:fetchActivityInstance(instanceId, callback)

Parameters

NameTypeRequiredBehavior
instanceId string required Snowflake id string.
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:fetchActivityInstance("123", function(err, result)
    if err then error(err) end
end)

ClientApplication:fetchRoleConnectionMetadataRecords()

#

Fetch RoleConnectionMetadataRecords from REST and update the local cache when the request succeeds.

Signature

ClientApplication:fetchRoleConnectionMetadataRecords(callback)

Parameters

NameTypeRequiredBehavior
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:fetchRoleConnectionMetadataRecords(function(err, result)
    if err then error(err) end
end)

ClientApplication:fetchSKUs()

#

Fetch SKUs from REST and update the local cache when the request succeeds.

Signature

ClientApplication:fetchSKUs(callback)

Parameters

NameTypeRequiredBehavior
callback function optional Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:fetchSKUs(function(err, result)
    if err then error(err) end
end)

ClientApplication:guild()

#

Performs guild on this ClientApplication. Call it from bot code when you need that operation on the current object.

Signature

ClientApplication:guild()

Parameters

No parameters.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:guild()

ClientApplication:iconURL()

#

Performs icon url on this ClientApplication. Call it from bot code when you need that operation on the current object.

Signature

ClientApplication:iconURL(options)

Parameters

NameTypeRequiredBehavior
options table optional Lua option table. Field names match the corresponding DiscordLua option type when one exists.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:iconURL({})

ClientApplication:toString()

#

function toString() { [native code] }

Signature

ClientApplication:toString()

Parameters

No parameters.

Returns

ClientApplication — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ClientApplication
object:toString()

Static members

  • ClientApplication.ActivityInstance
  • ClientApplication.ActivityLocation
  • ClientApplication.IntegrationApplication

Examples

Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc