DiscordLua
discorddiscord
v1.2.4
Install

VoiceRegion

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

class Module 1.2.4 Source

Properties

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

VoiceRegion.custom

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

VoiceRegion.deprecated

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

VoiceRegion.id

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

VoiceRegion.name

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

VoiceRegion.optimal

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

VoiceRegion.raw

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

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

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

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc