VoiceRegion
ClassOn this page
VoiceRegion 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
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 VoiceRegion.
- Name
custom- Type
any- Access
- readonly
- Description
- Instance field
VoiceRegion.custom. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this VoiceRegion.
- Name
deprecated- Type
any- Access
- readonly
- Description
- Instance field
VoiceRegion.deprecated. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this VoiceRegion.
- Name
id- Type
any- Access
- readonly
- Description
- Snowflake id of this VoiceRegion.
- Availability
- Populated from the Gateway/REST payload or constructor for this VoiceRegion.
- Name
name- Type
any- Access
- readonly
- Description
- Display name of this VoiceRegion.
- Availability
- Populated from the Gateway/REST payload or constructor for this VoiceRegion.
- Name
optimal- Type
any- Access
- readonly
- Description
- Instance field
VoiceRegion.optimal. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this VoiceRegion.
- Name
raw- Type
any- Access
- readonly
- Description
- Instance field
VoiceRegion.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 VoiceRegion.
Methods
VoiceRegion:toJSON()
#Serialize this VoiceRegion into a Lua table suitable for REST or debugging.
Signature
VoiceRegion:toJSON() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a VoiceRegion
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