feat(client,types): add FormLayout enum (#2900)

This commit is contained in:
ITOH
2023-03-29 10:45:15 -05:00
committed by GitHub
parent 6d43ca11a7
commit 08fb3fc5b5
3 changed files with 15 additions and 1 deletions
+2
View File
@@ -8,6 +8,7 @@ import type {
ChannelTypes,
DefaultMessageNotificationLevels,
ExplicitContentFilterLevels,
FormLayout,
GuildFeatures,
InteractionResponseTypes,
MessageComponentTypes,
@@ -256,6 +257,7 @@ export interface EditChannelOptions extends Omit<CreateChannelOptions, 'reason'>
ownerID?: string
rtcRegion?: string | null
videoQualityMode?: VideoQualityModes
defaultForumLayout: FormLayout
}
export interface EditChannelPositionOptions {
lockPermissions?: string
+4 -1
View File
@@ -13,6 +13,7 @@ import type {
DefaultMessageNotificationLevels,
EmbedTypes,
ExplicitContentFilterLevels,
FormLayout,
GatewayEventNames,
GuildFeatures,
GuildNsfwLevel,
@@ -740,7 +741,7 @@ export interface DiscordChannel {
/** the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */
default_sort_order?: SortOrderTypes | null
/** the default forum layout view used to display posts in `GUILD_FORUM` channels. Defaults to `0`, which indicates a layout view has not been set by a channel admin */
default_forum_layout?: number
default_forum_layout?: FormLayout
/** When a thread is created this will be true on that channel payload for the thread. */
newly_created?: boolean
}
@@ -2396,6 +2397,8 @@ export interface DiscordModifyChannel {
default_thread_rate_limit_per_user?: number
/** the default sort order type used to order posts in forum channels */
default_sort_order?: SortOrderTypes | null
/** the default forum layout view used to display posts in `GUILD_FORUM` channels. Defaults to `0`, which indicates a layout view has not been set by a channel admin */
default_forum_layout?: FormLayout
}
/** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
+9
View File
@@ -906,6 +906,15 @@ export enum SortOrderTypes {
CreationDate,
}
export enum FormLayout {
/** No default has been set for forum channel. */
NotSet = 0,
/** Display posts as a list. */
ListView = 1,
/** Display posts as a collection of tiles. */
GalleryView = 2,
}
/**
* https://discord.com/developers/docs/reference#image-formatting
* json is only for stickers