StageInstance
ClassOn 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.
Properties
- 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.
- 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.
- 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.
- 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.
- 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.
- Name
id- Type
any- Access
- readonly
- Description
- Snowflake id of this StageInstance.
- Availability
- Populated from the Gateway/REST payload or constructor for this StageInstance.
- 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.
- 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.
- 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
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
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
local discord = require("discord")
-- object is a StageInstance
object:createdTimestamp()StageInstance:delete()
#Permanently delete this resource through REST.
Signature
StageInstance:delete(callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
StageInstance — the same instance, for chaining.
Example
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
| 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
StageInstance — the same instance, for chaining.
Example
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
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
topic |
any |
required | Passed through to the implementation as written. |
Returns
StageInstance — the same instance, for chaining.
Example
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
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.
Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment
Version: discord 1.2.4 · runtime 1.0.0