DiscordLua
discorddiscord
v1.2.4
Install

Integration

Class
On 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.

class Module 1.2.4 REST Source

Properties

Integration.account

# readonly
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.

Integration.application

# readonly
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.

Integration.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 Integration.

Integration.enableEmoticons

# readonly
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.

Integration.enabled

# readonly
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.

Integration.expireBehavior

# readonly
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.

Integration.expireGracePeriod

# readonly
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.

Integration.guildId

# readonly
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.

Integration.id

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

Integration.name

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

Integration.raw

# readonly
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.

Integration.revoked

# readonly
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.

Integration.role

# readonly
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.

Integration.roles

# readonly
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.

Integration.scopes

# readonly
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.

Integration.subscriberCount

# readonly
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.

Integration.syncedAt

# readonly
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.

Integration.syncedTimestamp

# readonly
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.

Integration.syncing

# readonly
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.

Integration.type

# readonly
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.

Integration.user

# readonly
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

NameTypeRequiredBehavior
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

lua
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

lua
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.

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

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc