ClientApplication
ClassOn 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.
Properties
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.newand remains valid for the lifetime of the ClientApplication. - Related
- ApplicationCommandManager
- 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.
- 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.
- 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.
- 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.newand remains valid for the lifetime of the ClientApplication. - Related
- ApplicationEmojiManager
- 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.newand remains valid for the lifetime of the ClientApplication. - Related
- EntitlementManager
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Name
id- Type
any- Access
- readonly
- Description
- Snowflake id of this ClientApplication.
- Availability
- Populated from the Gateway/REST payload or constructor for this ClientApplication.
- 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.
- 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.
- 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.
- Name
name- Type
any- Access
- readonly
- Description
- Display name of this ClientApplication.
- Availability
- Populated from the Gateway/REST payload or constructor for this ClientApplication.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.newand remains valid for the lifetime of the ClientApplication. - Related
- SKUManager
- 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.newand remains valid for the lifetime of the ClientApplication. - Related
- SubscriptionManager
- 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.
- 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.
- 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.
- 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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
ClientApplication — the same instance, for chaining.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
ClientApplication — the same instance, for chaining.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
ClientApplication — the same instance, for chaining.
Example
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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
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.
Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment
Version: discord 1.2.4 · runtime 1.0.0