VoiceChannel
channelOn this page
VoiceChannel is a DiscordLua channel representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
- VoiceChannel
- BaseGuildVoiceChannel
- GuildChannel
- Channel
Inherited properties (45)
appliedTags · inherited from Channelarchived · inherited from ChannelarchiveTimestamp · inherited from ChannelautoArchiveDuration · inherited from ChannelavailableTags · inherited from Channelbitrate · inherited from Channelchildren · inherited from Channelclient · inherited from ChanneldefaultAutoArchiveDuration · inherited from ChanneldefaultForumLayout · inherited from ChanneldefaultReactionEmoji · inherited from ChanneldefaultSortOrder · inherited from ChanneldefaultThreadRateLimitPerUser · inherited from Channelflags · inherited from ChannelguildId · inherited from Channelicon · inherited from Channelid · inherited from Channelinvitable · inherited from Channelinvites · inherited from ChannellastMessageId · inherited from ChannellastPinTimestamp · inherited from Channellocked · inherited from ChannelmemberCount · inherited from Channelmembers · inherited from ChannelmessageCount · inherited from Channelmessages · inherited from Channelname · inherited from Channelnsfw · inherited from ChannelownerId · inherited from ChannelparentId · inherited from ChannelpermissionOverwrites · inherited from Channelposition · inherited from ChannelrateLimitPerUser · inherited from Channelraw · inherited from Channelrecipient · inherited from ChannelrecipientId · inherited from ChannelrecipientIds · inherited from Channelrecipients · inherited from ChannelrtcRegion · inherited from Channelthreads · inherited from Channeltopic · inherited from ChanneltotalMessageSent · inherited from Channeltype · inherited from ChanneluserLimit · inherited from ChannelvideoQualityMode · inherited from ChannelMethods
VoiceChannel:deletable()
#Performs deletable on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:deletable() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:deletable()VoiceChannel:full()
#Performs full on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:full() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:full()VoiceChannel:join()
#Join the voice channel represented by this object.
Signature
VoiceChannel:join(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
VoiceChannel — the same instance, for chaining.
Throws
A DiscordLua error when arguments are invalid or the request fails without a callback.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:join({}, function(err, result)
if err then error(err) end
end)VoiceChannel:joinable()
#Performs joinable on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:joinable() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:joinable()VoiceChannel:leave()
#Leave the associated voice connection.
Signature
VoiceChannel:leave() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:leave()VoiceChannel:manageable()
#Performs manageable on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:manageable() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:manageable()VoiceChannel:parent()
#Performs parent on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:parent() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:parent()VoiceChannel:permissionsLocked()
#Performs permissions locked on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:permissionsLocked() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:permissionsLocked()VoiceChannel:rawPosition()
#Performs raw position on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:rawPosition() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:rawPosition()VoiceChannel:sendSoundboardSound()
#Send SoundboardSound using this VoiceChannel.
Signature
VoiceChannel:sendSoundboardSound(sound) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
sound |
any |
required | Passed through to the implementation as written. |
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:sendSoundboardSound(sound)VoiceChannel:setBitrate()
#Set the Bitrate field. Builders return this VoiceChannel so setters can be chained.
Signature
VoiceChannel:setBitrate(bitrate) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
bitrate |
any |
required | Passed through to the implementation as written. |
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:setBitrate(bitrate)VoiceChannel:setRTCRegion()
#Set the RTCRegion field. Builders return this VoiceChannel so setters can be chained.
Signature
VoiceChannel:setRTCRegion(region) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
region |
any |
required | Passed through to the implementation as written. |
Returns
VoiceChannel — the same instance, for chaining.
Throws
A DiscordLua error when arguments are invalid or the request fails without a callback.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:setRTCRegion(region)VoiceChannel:setUserLimit()
#Set the UserLimit field. Builders return this VoiceChannel so setters can be chained.
Signature
VoiceChannel:setUserLimit(userLimit) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userLimit |
any |
required | Passed through to the implementation as written. |
Returns
VoiceChannel — the same instance, for chaining.
Throws
A DiscordLua error when arguments are invalid or the request fails without a callback.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:setUserLimit(userLimit)VoiceChannel:setVideoQualityMode()
#Set the VideoQualityMode field. Builders return this VoiceChannel so setters can be chained.
Signature
VoiceChannel:setVideoQualityMode(mode) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
mode |
any |
required | Passed through to the implementation as written. |
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:setVideoQualityMode(mode)VoiceChannel:speakable()
#Performs speakable on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:speakable() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:speakable()VoiceChannel:viewable()
#Performs viewable on this VoiceChannel. Call it from bot code when you need that operation on the current object.
Signature
VoiceChannel:viewable() Parameters
No parameters.
Returns
VoiceChannel — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a VoiceChannel
object:viewable()Inherited methods (48)
Channel:addFollowerChannel:awaitMessageComponentChannel:awaitMessagesChannel:bulkDeleteChannel:cloneChannel:createdAtChannel:createdTimestampChannel:createInteractionCollectorChannel:createInviteChannel:createMessageCollectorChannel:createMessageComponentCollectorChannel:createWebhookChannel:deleteChannel:editChannel:equalsChannel:fetchChannel:fetchInvitesChannel:fetchMessagesChannel:fetchWebhooksChannel:guildChannel:iconURLChannel:isDMBasedChannel:isSendableChannel:isTextBasedChannel:isThreadChannel:isThreadOnlyChannel:isVoiceBasedChannel:lastMessageChannel:lastPinAtChannel:lockPermissionsBaseGuildVoiceChannel:membersChannel:partialChannel:permissionsForChannel:sendChannel:sendTypingChannel:setDefaultAutoArchiveDurationChannel:setNameChannel:setNSFWChannel:setParentChannel:setPositionChannel:setRateLimitPerUserChannel:setSlowmodeChannel:setTopicChannel:setTypeChannel:startTypingChannel:toJSONChannel:toStringChannel:urlExamples
Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.
Related APIs
BaseGuildTextChannel · BaseGuildVoiceChannel · CategoryChannel · Channel · DirectoryChannel · DMChannel · ForumChannel · GuildChannel
Version: discord 1.2.4 · runtime 1.0.0