VoiceBasedChannels
VoiceBasedChannels ⇐ Channel
Section titled “VoiceBasedChannels ⇐ Channel”Represents a voice-based channel in a guild.
Kind: global class
Extends: Channel
- VoiceBasedChannels ⇐
Channel- new VoiceBasedChannels([data], guildId, client)
- .members ⇒
Collection.<Snowflake, GuildMember>|null - .join([options]) ⇒
VoiceConnection - .disconnect() ⇒
this - .setRtcRegion(rtcRegion, reason) ⇒
Promise - .setBitrate(bitrate, reason) ⇒
Promise
new VoiceBasedChannels([data], guildId, client)
Section titled “new VoiceBasedChannels([data], guildId, client)”Constructs a new instance of a class, extending the base class.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data object to initialize the instance with. |
| guildId | string | The ID of the guild associated with the instance. |
| client | Object | The client object associated with the instance. |
voiceBasedChannels.members ⇒ Collection.<Snowflake, GuildMember> | null
Section titled “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
Section titled “voiceBasedChannels.join([options]) ⇒ VoiceConnection”Joins the voice channel associated with this VoiceConnection.
Kind: instance method of VoiceBasedChannels
Returns: VoiceConnection - - The VoiceConnection instance.
| Param | Type | Default | Description |
|---|---|---|---|
| [options] | Object | Optional parameters for joining the voice channel. | |
| [options.selfMute] | boolean | false | Whether to mute the user’s own audio. |
| [options.selfDeaf] | boolean | false | Whether to deafen the user’s own audio. |
voiceBasedChannels.disconnect() ⇒ this
Section titled “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
Section titled “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.
| Param | Type | Description |
|---|---|---|
| rtcRegion | string | The RTC region to set. |
| reason | string | The reason for setting the RTC region. |
voiceBasedChannels.setBitrate(bitrate, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| bitrate | number | The new bitrate value to set. |
| reason | string | The reason for setting the bitrate. |