mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
refactor(core): move setVoiceState to GuildsAPI (#9228)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -12,8 +12,6 @@ import {
|
||||
type RESTPatchAPICurrentUserResult,
|
||||
type RESTPatchAPIGuildMemberJSONBody,
|
||||
type RESTPatchAPIGuildMemberResult,
|
||||
type RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody,
|
||||
type RESTPatchAPIGuildVoiceStateCurrentMemberResult,
|
||||
type RESTPostAPICurrentUserCreateDMChannelResult,
|
||||
type RESTPutAPICurrentUserApplicationRoleConnectionJSONBody,
|
||||
type RESTPutAPICurrentUserApplicationRoleConnectionResult,
|
||||
@@ -99,19 +97,6 @@ export class UsersAPI {
|
||||
}) as Promise<RESTPatchAPIGuildMemberResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the voice state for the current user
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}
|
||||
* @param guildId - The id of the guild
|
||||
* @param options - The options to use when setting the voice state
|
||||
*/
|
||||
public async setVoiceState(guildId: Snowflake, options: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody = {}) {
|
||||
return this.rest.patch(Routes.guildVoiceState(guildId, '@me'), {
|
||||
body: options,
|
||||
}) as Promise<RESTPatchAPIGuildVoiceStateCurrentMemberResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a new DM channel with a user
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user