Skip to content

Commit

Permalink
refactor: remove store channels (#364)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Store channels have been removed, alongside their types
  • Loading branch information
almeidx committed Mar 29, 2022
1 parent 6b0f662 commit 25677ff
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 60 deletions.
14 changes: 1 addition & 13 deletions deno/payloads/v10/channel.ts
Expand Up @@ -50,11 +50,7 @@ export type TextChannelType =
| ChannelType.GuildText;

export type GuildChannelType = Exclude<
| TextChannelType
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildNews
| ChannelType.GuildStore,
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
ChannelType.DM | ChannelType.GroupDM
>;

Expand Down Expand Up @@ -129,7 +125,6 @@ export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildTex

export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
export type APIGuildStoreChannel = APIGuildChannel<ChannelType.GuildStore>;

export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
/**
Expand Down Expand Up @@ -236,7 +231,6 @@ export type APIChannel =
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildStoreChannel
| APIVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
Expand Down Expand Up @@ -274,12 +268,6 @@ export enum ChannelType {
* See https://support.discord.com/hc/en-us/articles/360032008192
*/
GuildNews,
/**
* A channel in which game developers can sell their game on Discord
*
* See https://discord.com/developers/docs/game-and-server-management/special-channels
*/
GuildStore,
/**
* A thread channel (public) within a Guild News channel
*/
Expand Down
14 changes: 1 addition & 13 deletions deno/payloads/v9/channel.ts
Expand Up @@ -50,11 +50,7 @@ export type TextChannelType =
| ChannelType.GuildText;

export type GuildChannelType = Exclude<
| TextChannelType
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildNews
| ChannelType.GuildStore,
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
ChannelType.DM | ChannelType.GroupDM
>;

Expand Down Expand Up @@ -129,7 +125,6 @@ export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildTex

export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
export type APIGuildStoreChannel = APIGuildChannel<ChannelType.GuildStore>;

export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
/**
Expand Down Expand Up @@ -236,7 +231,6 @@ export type APIChannel =
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildStoreChannel
| APIVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
Expand Down Expand Up @@ -274,12 +268,6 @@ export enum ChannelType {
* See https://support.discord.com/hc/en-us/articles/360032008192
*/
GuildNews,
/**
* A channel in which game developers can sell their game on Discord
*
* See https://discord.com/developers/docs/game-and-server-management/special-channels
*/
GuildStore,
/**
* A thread channel (public) within a Guild News channel
*/
Expand Down
4 changes: 2 additions & 2 deletions deno/rest/v10/channel.ts
Expand Up @@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* Whether the channel is nsfw
*
* Channel types: text, news, store
* Channel types: text, news
*/
nsfw?: boolean | null;
/**
Expand Down Expand Up @@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* ID of the new parent category for a channel
*
* Channel types: text, news, store, voice
* Channel types: text, news, voice
*/
parent_id?: Snowflake | null;
/**
Expand Down
4 changes: 2 additions & 2 deletions deno/rest/v9/channel.ts
Expand Up @@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* Whether the channel is nsfw
*
* Channel types: text, news, store
* Channel types: text, news
*/
nsfw?: boolean | null;
/**
Expand Down Expand Up @@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* ID of the new parent category for a channel
*
* Channel types: text, news, store, voice
* Channel types: text, news, voice
*/
parent_id?: Snowflake | null;
/**
Expand Down
14 changes: 1 addition & 13 deletions payloads/v10/channel.ts
Expand Up @@ -50,11 +50,7 @@ export type TextChannelType =
| ChannelType.GuildText;

export type GuildChannelType = Exclude<
| TextChannelType
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildNews
| ChannelType.GuildStore,
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
ChannelType.DM | ChannelType.GroupDM
>;

Expand Down Expand Up @@ -129,7 +125,6 @@ export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildTex

export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
export type APIGuildStoreChannel = APIGuildChannel<ChannelType.GuildStore>;

export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
/**
Expand Down Expand Up @@ -236,7 +231,6 @@ export type APIChannel =
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildStoreChannel
| APIVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
Expand Down Expand Up @@ -274,12 +268,6 @@ export enum ChannelType {
* See https://support.discord.com/hc/en-us/articles/360032008192
*/
GuildNews,
/**
* A channel in which game developers can sell their game on Discord
*
* See https://discord.com/developers/docs/game-and-server-management/special-channels
*/
GuildStore,
/**
* A thread channel (public) within a Guild News channel
*/
Expand Down
14 changes: 1 addition & 13 deletions payloads/v9/channel.ts
Expand Up @@ -50,11 +50,7 @@ export type TextChannelType =
| ChannelType.GuildText;

export type GuildChannelType = Exclude<
| TextChannelType
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildNews
| ChannelType.GuildStore,
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
ChannelType.DM | ChannelType.GroupDM
>;

Expand Down Expand Up @@ -129,7 +125,6 @@ export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildTex

export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
export type APIGuildStoreChannel = APIGuildChannel<ChannelType.GuildStore>;

export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
/**
Expand Down Expand Up @@ -236,7 +231,6 @@ export type APIChannel =
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildStoreChannel
| APIVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
Expand Down Expand Up @@ -274,12 +268,6 @@ export enum ChannelType {
* See https://support.discord.com/hc/en-us/articles/360032008192
*/
GuildNews,
/**
* A channel in which game developers can sell their game on Discord
*
* See https://discord.com/developers/docs/game-and-server-management/special-channels
*/
GuildStore,
/**
* A thread channel (public) within a Guild News channel
*/
Expand Down
4 changes: 2 additions & 2 deletions rest/v10/channel.ts
Expand Up @@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* Whether the channel is nsfw
*
* Channel types: text, news, store
* Channel types: text, news
*/
nsfw?: boolean | null;
/**
Expand Down Expand Up @@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* ID of the new parent category for a channel
*
* Channel types: text, news, store, voice
* Channel types: text, news, voice
*/
parent_id?: Snowflake | null;
/**
Expand Down
4 changes: 2 additions & 2 deletions rest/v9/channel.ts
Expand Up @@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* Whether the channel is nsfw
*
* Channel types: text, news, store
* Channel types: text, news
*/
nsfw?: boolean | null;
/**
Expand Down Expand Up @@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
/**
* ID of the new parent category for a channel
*
* Channel types: text, news, store, voice
* Channel types: text, news, voice
*/
parent_id?: Snowflake | null;
/**
Expand Down

0 comments on commit 25677ff

Please sign in to comment.