From d8d7bccea617ad0d1150b9d2aed3b26ec1e4f99a Mon Sep 17 00:00:00 2001 From: Advaith Date: Thu, 8 Apr 2021 04:09:47 -0700 Subject: [PATCH] feat(APIChannel): add `video_quality_mode` (#106) Co-authored-by: Vlad Frangu Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- deno/v8/payloads/channel.ts | 17 +++++++++++++++++ deno/v8/rest/channel.ts | 7 +++++++ v8/payloads/channel.ts | 17 +++++++++++++++++ v8/rest/channel.ts | 7 +++++++ 4 files changed, 48 insertions(+) diff --git a/deno/v8/payloads/channel.ts b/deno/v8/payloads/channel.ts index 0316a861..337068a2 100644 --- a/deno/v8/payloads/channel.ts +++ b/deno/v8/payloads/channel.ts @@ -99,6 +99,12 @@ export interface APIChannel extends APIPartialChannel { * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; + /** + * The camera video quality mode of the voice channel, `1` when not present + * + * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes + */ + video_quality_mode?: VideoQualityMode; } /** @@ -141,6 +147,17 @@ export enum ChannelType { GUILD_STORE, } +export enum VideoQualityMode { + /** + * Discord chooses the quality for optimal performance + */ + AUTO = 1, + /** + * 720p + */ + FULL, +} + /** * https://discord.com/developers/docs/resources/channel#message-object-message-structure */ diff --git a/deno/v8/rest/channel.ts b/deno/v8/rest/channel.ts index 4a14c2a7..b0e97ace 100644 --- a/deno/v8/rest/channel.ts +++ b/deno/v8/rest/channel.ts @@ -13,6 +13,7 @@ import type { InviteTargetUserType, MessageFlags, OverwriteType, + VideoQualityMode, } from '../payloads/mod.ts'; /** @@ -88,6 +89,12 @@ export interface RESTPatchAPIChannelJSONBody { * Channel types: text, news, store, voice */ parent_id?: Snowflake | null; + /** + * The camera video quality mode of the voice channel + * + * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes + */ + video_quality_mode?: VideoQualityMode | null; } /** diff --git a/v8/payloads/channel.ts b/v8/payloads/channel.ts index 5decb8c9..e648c66a 100644 --- a/v8/payloads/channel.ts +++ b/v8/payloads/channel.ts @@ -99,6 +99,12 @@ export interface APIChannel extends APIPartialChannel { * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; + /** + * The camera video quality mode of the voice channel, `1` when not present + * + * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes + */ + video_quality_mode?: VideoQualityMode; } /** @@ -141,6 +147,17 @@ export const enum ChannelType { GUILD_STORE, } +export const enum VideoQualityMode { + /** + * Discord chooses the quality for optimal performance + */ + AUTO = 1, + /** + * 720p + */ + FULL, +} + /** * https://discord.com/developers/docs/resources/channel#message-object-message-structure */ diff --git a/v8/rest/channel.ts b/v8/rest/channel.ts index 449e88c1..18cf2b19 100644 --- a/v8/rest/channel.ts +++ b/v8/rest/channel.ts @@ -13,6 +13,7 @@ import type { InviteTargetUserType, MessageFlags, OverwriteType, + VideoQualityMode, } from '../payloads/index'; /** @@ -88,6 +89,12 @@ export interface RESTPatchAPIChannelJSONBody { * Channel types: text, news, store, voice */ parent_id?: Snowflake | null; + /** + * The camera video quality mode of the voice channel + * + * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes + */ + video_quality_mode?: VideoQualityMode | null; } /**