Skip to content

VoiceChannel

VoiceChannel ⇐ VoiceBasedChannels

Represents a voice channel in a guild.

Kind: global class
Extends: VoiceBasedChannels

new VoiceChannel([data], guildId, client)

Constructs a new instance of the class.

ParamTypeDescription
[data]ObjectThe data object containing the properties for the instance.
guildIdstringThe ID of the guild associated with the instance.
clientClientThe client object associated with the instance.

voiceChannel.messages ⇒ MessageManager

Get the message manager for this channel.

Kind: instance property of VoiceChannel
Returns: MessageManager - The message manager object for this channel.

voiceChannel.send(options) ⇒ Promise

Sends a message using the specified options.

Kind: instance method of VoiceChannel
Returns: Promise - A promise that resolves when the message is sent.

ParamTypeDescription
optionsobjectThe options for sending the message.

voiceChannel.bulkDelete(messages, reason) ⇒ Promise.<void>

Bulk deletes the specified messages with the given reason.

Kind: instance method of VoiceChannel
Returns: Promise.<void> - A promise that resolves when the messages are deleted.

ParamTypeDescription
messagesArray.<Message>The messages to be deleted.
reasonstringThe reason for deleting the messages.

voiceChannel.setNsfw(nsfw, reason) ⇒ Promise

Sets the NSFW (Not Safe for Work) flag for the current item.

Kind: instance method of VoiceChannel
Returns: Promise - - A promise that resolves when the NSFW flag is set.

ParamTypeDescription
nsfwbooleanThe NSFW flag value to set.
reasonstringThe reason for setting the NSFW flag.

voiceChannel.setRateLimitPerUser(ratelimit, reason) ⇒ Promise

Sets the rate limit per user for a specific action.

Kind: instance method of VoiceChannel
Returns: Promise - - A promise that resolves when the rate limit is successfully set.

ParamTypeDescription
ratelimitnumberThe new rate limit value to set.
reasonstringThe reason for setting the rate limit.

voiceChannel.setUserLimit(userLimit, reason) ⇒ Promise

Sets the user limit for the current channel and provides a reason for the change.

Kind: instance method of VoiceChannel
Returns: Promise - - A promise that resolves when the user limit is successfully set.

ParamTypeDescription
userLimitnumberThe new user limit for the channel.
reasonstringThe reason for changing the user limit.

voiceChannel.setVideoQualityMode(videoQualityMode, reason) ⇒ Promise

Sets the video quality mode with the given parameters.

Kind: instance method of VoiceChannel
Returns: Promise - - A promise that resolves when the video quality mode is set.

ParamTypeDescription
videoQualityModestringThe video quality mode to set.
reasonstringThe reason for setting the video quality mode.

voiceChannel.triggerTyping() ⇒ Promise.<void>

Triggers a typing indicator in the channel where this method is called.

Kind: instance method of VoiceChannel
Returns: Promise.<void> - - A promise that resolves when the typing indicator is triggered.