Skip to content

VoiceBasedChannels

VoiceBasedChannels ⇐ Channel

Represents a voice-based channel in a guild.

Kind: global class
Extends: Channel

new VoiceBasedChannels([data], guildId, client)

Constructs a new instance of a class, extending the base class.

ParamTypeDescription
[data]ObjectThe data object to initialize the instance with.
guildIdstringThe ID of the guild associated with the instance.
clientObjectThe client object associated with the instance.

voiceBasedChannels.members ⇒ Collection.<Snowflake, GuildMember> | null

Retrieves the members in the voice channel associated with the current guild.

Kind: instance property of VoiceBasedChannels
Returns: Collection.<Snowflake, GuildMember> | null - - A collection of guild members in the voice channel, or null if no members are found.

voiceBasedChannels.join([options]) ⇒ VoiceConnection

Joins the voice channel associated with this VoiceConnection.

Kind: instance method of VoiceBasedChannels
Returns: VoiceConnection - - The VoiceConnection instance.

ParamTypeDefaultDescription
[options]ObjectOptional parameters for joining the voice channel.
[options.selfMute]booleanfalseWhether to mute the user’s own audio.
[options.selfDeaf]booleanfalseWhether to deafen the user’s own audio.

voiceBasedChannels.disconnect() ⇒ this

Disconnects the voice connection by sending a voice state update to the server with a null channel ID.

Kind: instance method of VoiceBasedChannels
Returns: this - - Returns the current instance of the class.

voiceBasedChannels.setRtcRegion(rtcRegion, reason) ⇒ Promise

Sets the RTC (Real-Time Communication) region for the object.

Kind: instance method of VoiceBasedChannels
Returns: Promise - - A promise that resolves when the RTC region is successfully set.

ParamTypeDescription
rtcRegionstringThe RTC region to set.
reasonstringThe reason for setting the RTC region.

voiceBasedChannels.setBitrate(bitrate, reason) ⇒ Promise

Sets the bitrate of the current object.

Kind: instance method of VoiceBasedChannels
Returns: Promise - - A promise that resolves when the bitrate is successfully set.

ParamTypeDescription
bitratenumberThe new bitrate value to set.
reasonstringThe reason for setting the bitrate.