DiscordLua
discorddiscord
v1.2.4
Install

StageInstance

Class
On this page

StageInstance 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

StageInstance.channelId

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

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

StageInstance.discoverableDisabled

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

StageInstance.guildId

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

StageInstance.guildScheduledEventId

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

StageInstance.id

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

StageInstance.privacyLevel

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

StageInstance.raw

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

StageInstance.topic

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

Methods

StageInstance:channel()

#

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

Signature

StageInstance:channel()

Parameters

No parameters.

Returns

StageInstance — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a StageInstance
object:channel()

StageInstance:createdAt()

#

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

Signature

StageInstance:createdAt()

Parameters

No parameters.

Returns

StageInstance — the same instance, for chaining.

Example

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

StageInstance:createdTimestamp()

#

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

Signature

StageInstance:createdTimestamp()

Parameters

No parameters.

Returns

StageInstance — the same instance, for chaining.

Example

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

StageInstance:delete()

#

Permanently delete this resource through REST.

Signature

StageInstance:delete(callback)

Parameters

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

Returns

StageInstance — the same instance, for chaining.

Example

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

StageInstance:edit()

#

Apply a REST update to this resource.

Signature

StageInstance: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

StageInstance — the same instance, for chaining.

Example

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

StageInstance:guild()

#

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

Signature

StageInstance:guild()

Parameters

No parameters.

Returns

StageInstance — the same instance, for chaining.

Example

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

StageInstance:guildScheduledEvent()

#

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

Signature

StageInstance:guildScheduledEvent()

Parameters

No parameters.

Returns

StageInstance — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a StageInstance
object:guildScheduledEvent()

StageInstance:setTopic()

#

Set the Topic field. Builders return this StageInstance so setters can be chained.

Signature

StageInstance:setTopic(topic)

Parameters

NameTypeRequiredBehavior
topic any required Passed through to the implementation as written.

Returns

StageInstance — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a StageInstance
object:setTopic(topic)

StageInstance:toJSON()

#

Serialize this StageInstance into a Lua table suitable for REST or debugging.

Signature

StageInstance:toJSON()

Parameters

No parameters.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a StageInstance
object:toJSON()

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