Integration
ClassOn this page
Integration 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
account- Type
any- Access
- readonly
- Description
- Instance field
Integration.account. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
application- Type
any- Access
- readonly
- Description
- Application object for the logged-in bot, available after ready.
- Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- 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 Integration.
- Name
enableEmoticons- Type
any- Access
- readonly
- Description
- Instance field
Integration.enableEmoticons. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
enabled- Type
any- Access
- readonly
- Description
- Instance field
Integration.enabled. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
expireBehavior- Type
any- Access
- readonly
- Description
- Instance field
Integration.expireBehavior. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
expireGracePeriod- Type
any- Access
- readonly
- Description
- Instance field
Integration.expireGracePeriod. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
guildId- Type
any- Access
- readonly
- Description
- Instance field
Integration.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 Integration.
- Name
id- Type
any- Access
- readonly
- Description
- Snowflake id of this Integration.
- Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
name- Type
any- Access
- readonly
- Description
- Display name of this Integration.
- Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
raw- Type
any- Access
- readonly
- Description
- Instance field
Integration.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 Integration.
- Name
revoked- Type
any- Access
- readonly
- Description
- Instance field
Integration.revoked. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
role- Type
any- Access
- readonly
- Description
- Instance field
Integration.role. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
roles- Type
any- Access
- readonly
- Description
- Instance field
Integration.roles. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
scopes- Type
any- Access
- readonly
- Description
- Instance field
Integration.scopes. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
subscriberCount- Type
any- Access
- readonly
- Description
- Instance field
Integration.subscriberCount. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
syncedAt- Type
any- Access
- readonly
- Description
- Instance field
Integration.syncedAt. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
syncedTimestamp- Type
any- Access
- readonly
- Description
- Instance field
Integration.syncedTimestamp. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
syncing- Type
any- Access
- readonly
- Description
- Instance field
Integration.syncing. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
type- Type
any- Access
- readonly
- Description
- Instance field
Integration.type. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
- Name
user- Type
any- Access
- readonly
- Description
- User object associated with this Integration.
- Availability
- Populated from the Gateway/REST payload or constructor for this Integration.
Methods
Integration:delete()
#Permanently delete this resource through REST.
Signature
Integration:delete(reason, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
reason |
string |
optional | Audit-log reason sent as X-Audit-Log-Reason on REST mutations. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
Integration — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Integration
object:delete(reason, function(err, result)
if err then error(err) end
end)Integration:guild()
#Performs guild on this Integration. Call it from bot code when you need that operation on the current object.
Signature
Integration:guild() Parameters
No parameters.
Returns
Integration — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Integration
object:guild()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