Skip to content

GuildVoiceStateManager

GuildVoiceStateManager ⇐ VoiceStateManager

Represents a voice state manager for a specific guild.

Kind: global class
Extends: VoiceStateManager

new GuildVoiceStateManager(guildId, client)

Constructs a new instance of the class.

ParamTypeDescription
guildIdstringThe ID of the guild.
clientClientThe client instance.

guildVoiceStateManager.cache ⇒ Array

Retrieves the cache for the current guild.

Kind: instance property of GuildVoiceStateManager
Returns: Array - An array of objects from the cache that belong to the current guild.

guildVoiceStateManager.edit(user, [options]) ⇒ Promise.<void>

Edits the voice state of a user in a guild.

Kind: instance method of GuildVoiceStateManager
Returns: Promise.<void> - A promise that resolves when the voice state is successfully edited.

ParamTypeDescription
userstring | UserThe user or user ID to edit the voice state for.
[options]ObjectThe options for editing the voice state.
[options.channel]string | ChannelThe channel or channel ID to move the user to.
[options.suppress]booleanWhether to suppress the user’s audio.
[options.requestToSpeak]DateThe timestamp for the user’s request to speak.