DiscordLua
discorddiscord
v1.2.4
Install

Invite

Class
On this page

Invite 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 Source

Properties

Invite.approximateMemberCount

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

Invite.approximatePresenceCount

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

Invite.channel

# readonly
Name
channel
Type
any
Access
readonly
Description
Channel this Invite belongs to, when resolved from cache.
Availability
Populated from the Gateway/REST payload or constructor for this Invite.

Invite.channelId

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

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

Invite.code

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

Invite.createdTimestamp

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

Invite.expiresAt

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

Invite.expiresTimestamp

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

Invite.flags

# readonly
Name
flags
Type
any
Access
readonly
Description
Instance field Invite.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 Invite.

Invite.guild

# readonly
Name
guild
Type
any
Access
readonly
Description
Guild this Invite belongs to, when the payload included a guild id.
Availability
Populated from the Gateway/REST payload or constructor for this Invite.

Invite.guildId

# readonly
Name
guildId
Type
any
Access
readonly
Description
Instance field Invite.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 Invite.

Invite.guildScheduledEvent

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

Invite.inviter

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

Invite.inviterId

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

Invite.maxAge

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

Invite.maxUses

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

Invite.memberCount

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

Invite.presenceCount

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

Invite.raw

# readonly
Name
raw
Type
any
Access
readonly
Description
Instance field Invite.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 Invite.

Invite.stageInstance

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

Invite.targetApplication

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

Invite.targetType

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

Invite.targetUser

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

Invite.temporary

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

Invite.type

# readonly
Name
type
Type
any
Access
readonly
Description
Instance field Invite.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 Invite.

Invite.url

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

Invite.uses

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

Methods

Invite:createdAt()

#

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

Signature

Invite:createdAt()

Parameters

No parameters.

Returns

Invite — the same instance, for chaining.

Example

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

Invite:deletable()

#

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

Signature

Invite:deletable()

Parameters

No parameters.

Returns

Invite — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Invite
object:deletable()

Invite:delete()

#

Permanently delete this resource through REST.

Signature

Invite:delete(callback)

Parameters

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

Returns

Invite — the same instance, for chaining.

Example

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

Invite:isGuest()

#

Predicate that returns whether this Invite matches isGuest. Use it to branch before calling type-specific methods.

Signature

Invite:isGuest()

Parameters

No parameters.

Returns

Invite — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a Invite
object:isGuest()

Invite:toString()

#

function toString() { [native code] }

Signature

Invite:toString()

Parameters

No parameters.

Returns

Invite — the same instance, for chaining.

Example

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

Static members

  • Invite.BaseInvite
  • Invite.GroupDMInvite
  • Invite.GuildInvite
  • Invite.InviteStageInstance
  • Invite.InvitesPattern

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