Skip to content

Commit

Permalink
feat(APIChannel): add video_quality_mode (#106)
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 8, 2021
1 parent 4462255 commit d8d7bcc
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions deno/v8/payloads/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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
*/
Expand Down
7 changes: 7 additions & 0 deletions deno/v8/rest/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {
InviteTargetUserType,
MessageFlags,
OverwriteType,
VideoQualityMode,
} from '../payloads/mod.ts';

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down
17 changes: 17 additions & 0 deletions v8/payloads/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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
*/
Expand Down
7 changes: 7 additions & 0 deletions v8/rest/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {
InviteTargetUserType,
MessageFlags,
OverwriteType,
VideoQualityMode,
} from '../payloads/index';

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit d8d7bcc

Please sign in to comment.