diff --git a/src/api/Routes/channels.ts b/src/api/Routes/channels.ts index 2c893b0..2b85cf9 100644 --- a/src/api/Routes/channels.ts +++ b/src/api/Routes/channels.ts @@ -253,5 +253,8 @@ export interface ChannelRoutes { args: RestArguments, ): Promise; }; + 'voice-status': { + put(args: RestArguments): Promise; + }; }; } diff --git a/src/common/shorters/channels.ts b/src/common/shorters/channels.ts index 2789238..481eca3 100644 --- a/src/common/shorters/channels.ts +++ b/src/common/shorters/channels.ts @@ -183,6 +183,10 @@ export class ChannelShorter extends BaseShorter { query, }); } + + setVoiceStatus(channelId: string, status: string | null = null) { + return this.client.proxy.channels(channelId)['voice-status'].put({ body: { status } }); + } } export type ChannelShorterOptionalParams = Partial<{ guildId: string; reason: string }>; diff --git a/src/structures/channels.ts b/src/structures/channels.ts index 70c4873..c99b15c 100644 --- a/src/structures/channels.ts +++ b/src/structures/channels.ts @@ -352,6 +352,10 @@ export class VoiceChannelMethods extends DiscordBase { return this.edit({ video_quality_mode: VideoQualityMode[quality] }, reason); } + setVoiceState(status: string | null = null) { + return this.client.channels.setVoiceStatus(this.id, status); + } + async states() { if (!this.guildId) return []; const states = await this.cache.voiceStates?.values(this.guildId);