From 040b6826c31c5d34a378add0aa76560523743157 Mon Sep 17 00:00:00 2001 From: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com> Date: Fri, 17 Feb 2023 09:01:31 -0500 Subject: [PATCH] refactor(APIVoiceChannelBase): support text and video in stages (#721) --- deno/payloads/v10/channel.ts | 20 ++++++++++---------- deno/payloads/v9/channel.ts | 20 ++++++++++---------- payloads/v10/channel.ts | 20 ++++++++++---------- payloads/v9/channel.ts | 20 ++++++++++---------- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/deno/payloads/v10/channel.ts b/deno/payloads/v10/channel.ts index 616f848a..4d4595a2 100644 --- a/deno/payloads/v10/channel.ts +++ b/deno/payloads/v10/channel.ts @@ -49,7 +49,8 @@ export type TextChannelType = | ChannelType.AnnouncementThread | ChannelType.GuildText | ChannelType.GuildForum - | ChannelType.GuildVoice; + | ChannelType.GuildVoice + | ChannelType.GuildStageVoice; export type GuildChannelType = Exclude; @@ -132,13 +133,15 @@ export type APITextChannel = APIGuildTextChannel; export type APINewsChannel = APIGuildTextChannel; export type APIGuildCategoryChannel = APIGuildChannel; -export interface APIVoiceChannelBase extends APIGuildChannel { +export interface APIVoiceChannelBase + extends APIGuildChannel, + Omit, 'name' | 'last_pin_timestamp'> { /** - * The bitrate (in bits) of the voice channel + * The bitrate (in bits) of the voice or stage channel */ bitrate?: number; /** - * The user limit of the voice channel + * The user limit of the voice or stage channel */ user_limit?: number; /** @@ -147,19 +150,16 @@ export interface APIVoiceChannelBase extends APIGuildChan * See https://discord.com/developers/docs/resources/voice#voice-region-object */ rtc_region?: string | null; -} - -export interface APIGuildVoiceChannel - extends APIVoiceChannelBase, - Omit, 'name' | 'last_pin_timestamp'> { /** - * The camera video quality mode of the voice channel, `1` when not present + * The camera video quality mode of the voice or stage channel, `1` when not present * * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes */ video_quality_mode?: VideoQualityMode; } +export type APIGuildVoiceChannel = APIVoiceChannelBase; + export type APIGuildStageVoiceChannel = APIVoiceChannelBase; export interface APIDMChannelBase extends Omit, 'rate_limit_per_user'> { diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index 7d15fe4b..d62bc4f4 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -49,7 +49,8 @@ export type TextChannelType = | ChannelType.AnnouncementThread | ChannelType.GuildText | ChannelType.GuildForum - | ChannelType.GuildVoice; + | ChannelType.GuildVoice + | ChannelType.GuildStageVoice; export type GuildChannelType = Exclude; @@ -132,13 +133,15 @@ export type APITextChannel = APIGuildTextChannel; export type APINewsChannel = APIGuildTextChannel; export type APIGuildCategoryChannel = APIGuildChannel; -export interface APIVoiceChannelBase extends APIGuildChannel { +export interface APIVoiceChannelBase + extends APIGuildChannel, + Omit, 'name' | 'last_pin_timestamp'> { /** - * The bitrate (in bits) of the voice channel + * The bitrate (in bits) of the voice or stage channel */ bitrate?: number; /** - * The user limit of the voice channel + * The user limit of the voice or stage channel */ user_limit?: number; /** @@ -147,19 +150,16 @@ export interface APIVoiceChannelBase extends APIGuildChan * See https://discord.com/developers/docs/resources/voice#voice-region-object */ rtc_region?: string | null; -} - -export interface APIGuildVoiceChannel - extends APIVoiceChannelBase, - Omit, 'name' | 'last_pin_timestamp'> { /** - * The camera video quality mode of the voice channel, `1` when not present + * The camera video quality mode of the voice or stage channel, `1` when not present * * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes */ video_quality_mode?: VideoQualityMode; } +export type APIGuildVoiceChannel = APIVoiceChannelBase; + export type APIGuildStageVoiceChannel = APIVoiceChannelBase; export interface APIDMChannelBase extends Omit, 'rate_limit_per_user'> { diff --git a/payloads/v10/channel.ts b/payloads/v10/channel.ts index b200f160..1f347e53 100644 --- a/payloads/v10/channel.ts +++ b/payloads/v10/channel.ts @@ -49,7 +49,8 @@ export type TextChannelType = | ChannelType.AnnouncementThread | ChannelType.GuildText | ChannelType.GuildForum - | ChannelType.GuildVoice; + | ChannelType.GuildVoice + | ChannelType.GuildStageVoice; export type GuildChannelType = Exclude; @@ -132,13 +133,15 @@ export type APITextChannel = APIGuildTextChannel; export type APINewsChannel = APIGuildTextChannel; export type APIGuildCategoryChannel = APIGuildChannel; -export interface APIVoiceChannelBase extends APIGuildChannel { +export interface APIVoiceChannelBase + extends APIGuildChannel, + Omit, 'name' | 'last_pin_timestamp'> { /** - * The bitrate (in bits) of the voice channel + * The bitrate (in bits) of the voice or stage channel */ bitrate?: number; /** - * The user limit of the voice channel + * The user limit of the voice or stage channel */ user_limit?: number; /** @@ -147,19 +150,16 @@ export interface APIVoiceChannelBase extends APIGuildChan * See https://discord.com/developers/docs/resources/voice#voice-region-object */ rtc_region?: string | null; -} - -export interface APIGuildVoiceChannel - extends APIVoiceChannelBase, - Omit, 'name' | 'last_pin_timestamp'> { /** - * The camera video quality mode of the voice channel, `1` when not present + * The camera video quality mode of the voice or stage channel, `1` when not present * * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes */ video_quality_mode?: VideoQualityMode; } +export type APIGuildVoiceChannel = APIVoiceChannelBase; + export type APIGuildStageVoiceChannel = APIVoiceChannelBase; export interface APIDMChannelBase extends Omit, 'rate_limit_per_user'> { diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index c5ff75a6..18177f4a 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -49,7 +49,8 @@ export type TextChannelType = | ChannelType.AnnouncementThread | ChannelType.GuildText | ChannelType.GuildForum - | ChannelType.GuildVoice; + | ChannelType.GuildVoice + | ChannelType.GuildStageVoice; export type GuildChannelType = Exclude; @@ -132,13 +133,15 @@ export type APITextChannel = APIGuildTextChannel; export type APINewsChannel = APIGuildTextChannel; export type APIGuildCategoryChannel = APIGuildChannel; -export interface APIVoiceChannelBase extends APIGuildChannel { +export interface APIVoiceChannelBase + extends APIGuildChannel, + Omit, 'name' | 'last_pin_timestamp'> { /** - * The bitrate (in bits) of the voice channel + * The bitrate (in bits) of the voice or stage channel */ bitrate?: number; /** - * The user limit of the voice channel + * The user limit of the voice or stage channel */ user_limit?: number; /** @@ -147,19 +150,16 @@ export interface APIVoiceChannelBase extends APIGuildChan * See https://discord.com/developers/docs/resources/voice#voice-region-object */ rtc_region?: string | null; -} - -export interface APIGuildVoiceChannel - extends APIVoiceChannelBase, - Omit, 'name' | 'last_pin_timestamp'> { /** - * The camera video quality mode of the voice channel, `1` when not present + * The camera video quality mode of the voice or stage channel, `1` when not present * * See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes */ video_quality_mode?: VideoQualityMode; } +export type APIGuildVoiceChannel = APIVoiceChannelBase; + export type APIGuildStageVoiceChannel = APIVoiceChannelBase; export interface APIDMChannelBase extends Omit, 'rate_limit_per_user'> {