Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(APIGuildForumChannel): add default_sort_order #589

Merged
merged 1 commit into from
Sep 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions deno/payloads/v10/channel.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'flags'
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
Expand Down