class VoiceAPI

export declare class VoiceAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the VoiceAPI class

editUserVoiceState(
guildId: Snowflake
userId: Snowflake
options?: Pick<RequestData, 'reason' | 'signal'>
) : Promise<never>

Edits a user's voice state in a guild

See also: https://discord.com/developers/docs/resources/voice#modify-user-voice-state

editVoiceState() : Promise<never>

Edits the voice state for the current user

See also: https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state

getUserVoiceState(
options: Snowflake
userId: Snowflake
{ signal }?: Pick<RequestData, 'signal'>
) : Promise<APIVoiceState>

Fetches voice state of a user by their id

See also: https://discord.com/developers/docs/resources/voice#get-user-voice-state

getVoiceRegions(
options?: Pick<RequestData, 'signal'>
) : Promise<RESTGetAPIVoiceRegionsResult>

Fetches all voice regions

See also: https://discord.com/developers/docs/resources/voice#list-voice-regions

getVoiceState(
options: Snowflake
{ signal }?: Pick<RequestData, 'signal'>
) : Promise<APIVoiceState>

Fetches the current user's voice state

See also: https://discord.com/developers/docs/resources/voice#get-current-user-voice-state