Skip to content

Commit

Permalink
feat(APIGuildForumChannel): add default_sort_order (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Sep 25, 2022
1 parent 0f118d3 commit 143b003
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 0 deletions.
18 changes: 18 additions & 0 deletions deno/payloads/v10/channel.ts
Expand Up @@ -276,6 +276,20 @@ export interface APIGuildForumDefaultReactionEmoji {
emoji_name: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
*/
export enum SortOrderType {
/**
* Sort forum posts by activity
*/
LatestActivity,
/**
* Sort forum posts by creation time (from most recent to oldest)
*/
CreationDate,
}

export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
Expand All @@ -290,6 +304,10 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
* The emoji to show in the add reaction button on a thread in a forum channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
*/
default_sort_order: SortOrderType | null;
}

/**
Expand Down
18 changes: 18 additions & 0 deletions deno/payloads/v9/channel.ts
Expand Up @@ -276,6 +276,20 @@ export interface APIGuildForumDefaultReactionEmoji {
emoji_name: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
*/
export enum SortOrderType {
/**
* Sort forum posts by activity
*/
LatestActivity,
/**
* Sort forum posts by creation time (from most recent to oldest)
*/
CreationDate,
}

export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
Expand All @@ -290,6 +304,10 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
* The emoji to show in the add reaction button on a thread in a forum channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
*/
default_sort_order: SortOrderType | null;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions deno/rest/v10/channel.ts
Expand Up @@ -21,6 +21,7 @@ import type {
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
} from '../../payloads/v10/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';

Expand Down Expand Up @@ -162,6 +163,12 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
* Channel types: text, forum
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
}>;

/**
Expand Down
1 change: 1 addition & 0 deletions deno/rest/v10/guild.ts
Expand Up @@ -55,6 +55,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'flags'
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
Expand Down
7 changes: 7 additions & 0 deletions deno/rest/v9/channel.ts
Expand Up @@ -21,6 +21,7 @@ import type {
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
} from '../../payloads/v9/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';

Expand Down Expand Up @@ -162,6 +163,12 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
* Channel types: text, forum
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
}>;

/**
Expand Down
1 change: 1 addition & 0 deletions deno/rest/v9/guild.ts
Expand Up @@ -55,6 +55,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'flags'
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
Expand Down
18 changes: 18 additions & 0 deletions payloads/v10/channel.ts
Expand Up @@ -276,6 +276,20 @@ export interface APIGuildForumDefaultReactionEmoji {
emoji_name: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
*/
export enum SortOrderType {
/**
* Sort forum posts by activity
*/
LatestActivity,
/**
* Sort forum posts by creation time (from most recent to oldest)
*/
CreationDate,
}

export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
Expand All @@ -290,6 +304,10 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
* The emoji to show in the add reaction button on a thread in a forum channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
*/
default_sort_order: SortOrderType | null;
}

/**
Expand Down
18 changes: 18 additions & 0 deletions payloads/v9/channel.ts
Expand Up @@ -276,6 +276,20 @@ export interface APIGuildForumDefaultReactionEmoji {
emoji_name: string | null;
}

/**
* https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
*/
export enum SortOrderType {
/**
* Sort forum posts by activity
*/
LatestActivity,
/**
* Sort forum posts by creation time (from most recent to oldest)
*/
CreationDate,
}

export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
Expand All @@ -290,6 +304,10 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
* The emoji to show in the add reaction button on a thread in a forum channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
*/
default_sort_order: SortOrderType | null;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions rest/v10/channel.ts
Expand Up @@ -21,6 +21,7 @@ import type {
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
} from '../../payloads/v10/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';

Expand Down Expand Up @@ -162,6 +163,12 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
* Channel types: text, forum
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
}>;

/**
Expand Down
1 change: 1 addition & 0 deletions rest/v10/guild.ts
Expand Up @@ -55,6 +55,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'flags'
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
Expand Down
7 changes: 7 additions & 0 deletions rest/v9/channel.ts
Expand Up @@ -21,6 +21,7 @@ import type {
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
} from '../../payloads/v9/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';

Expand Down Expand Up @@ -162,6 +163,12 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
* Channel types: text, forum
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
}>;

/**
Expand Down
1 change: 1 addition & 0 deletions rest/v9/guild.ts
Expand Up @@ -55,6 +55,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'flags'
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
Expand Down

1 comment on commit 143b003

@vercel
Copy link

@vercel vercel bot commented on 143b003 Sep 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.