From a4802c600450ff31346ef5ba74bd9e798e8d9e1d Mon Sep 17 00:00:00 2001 From: Hampus Date: Wed, 14 Oct 2026 20:49:00 +0200 Subject: [PATCH] docs(guilds): document template forum channel fields (#3479) --- fluxer_docs/scripts/VerifyDocsStyle.ts | 2 +- .../src/content/docs/http-api/guilds.mdx | 60 +++++++++++++++++-- 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/fluxer_docs/scripts/VerifyDocsStyle.ts b/fluxer_docs/scripts/VerifyDocsStyle.ts index a2b2460d9..1de2b58ef 100644 --- a/fluxer_docs/scripts/VerifyDocsStyle.ts +++ b/fluxer_docs/scripts/VerifyDocsStyle.ts @@ -297,7 +297,7 @@ const ACCEPTED_TABLE_FINDINGS = new Map1 | decimal string \| integer | Template-local channel ID | | type2 | integer | Source channel type | | name? | ?string | Channel name, defaulting to the empty string | -| topic? | ?string | Channel topic | +| topic?6 | ?string | Channel topic, or forum guidelines on a forum or media channel | | position | integer | The sort position of the channel | | parent_id?3 | ?decimal string \| integer | Template-local parent category ID | | bitrate?4 | ?integer | Voice bitrate, defaulting to 64000 for a voice channel and capped at 96000 | | user_limit?4 | ?integer | Voice occupancy limit, defaulting to 0 for a voice channel | | voice_connection_limit?4 | ?integer | Per-user voice connection limit, defaulting to 5 for a voice channel | -| nsfw? | boolean | Whether the channel is age restricted (default false) | -| rate_limit_per_user? | integer | Slowmode interval in seconds, defaulting to 0 | -| permission_overwrites?5 | array[[guild template role permission overwrite](#guild-template-role-permission-overwrite-object) object] | Role permission overwrites | +| nsfw? | ?boolean | Whether the channel is age restricted (default false) | +| rate_limit_per_user? | ?integer | Slowmode interval in seconds, defaulting to 0 | +| permission_overwrites?5 | ?array[[guild template role permission overwrite](#guild-template-role-permission-overwrite-object) object] | Role permission overwrites | +| available_tags?7 | ?array[[guild template forum tag](#guild-template-forum-tag-object) object] | Tags for a forum or media channel | +| default_reaction_emoji?8 | ?[guild template default reaction](#guild-template-default-reaction-object) object | Default reaction shown on posts in a forum or media channel | +| default_sort_order?9 | ?integer | Default [forum sort order](/http-api/forums/#forum-sort-orders) of a forum or media channel | +| default_forum_layout?9 | ?integer | Default [forum layout](/http-api/forums/#forum-layouts) of a forum channel | +| default_tag_setting?9 | ?string | Default [forum tag setting](/http-api/forums/#forum-tag-settings) of a forum or media channel | +| default_thread_rate_limit_per_user?10 | ?integer | Slowmode interval in seconds copied onto new threads | +| default_auto_archive_duration?9 | ?integer | Default [auto archive duration](/http-api/threads/#auto-archive-durations) in minutes for new threads | +| flags?11 | ?integer | [Channel flags](/http-api/forums/#channel-flags) of a forum or media channel | 1 A duplicate identifier in the same template rejects creation with 400 `GUILD_TEMPLATE_INVALID` -2 The value 0 creates a text channel, 2 a voice channel, 4 a category, and 5 an announcement channel. The value 13, the stage channel type of another platform, creates a voice channel. Fluxer skips every other value, a forum channel (15) and a media channel (16) included, and creates no channel for it +2 The value 0 creates a text channel, 2 a voice channel, 4 a category, 5 an announcement channel, 15 a forum channel, and 16 a media channel. The value 13, the stage channel type of another platform, creates a voice channel. Fluxer skips every other value and creates no channel for it -3 The identifier is applied only when it resolves to a category in the same template, and every other value leaves the channel at the guild root +3 The identifier is applied only when it resolves to a category in the same template and the channel is not itself a category, and every other value leaves the channel at the guild root 4 These voice fields are stored only on a voice channel and are null on every other channel type 5 An entry is applied only when its resolved `type` is 0 and its `id` resolves to a role in the same template, and the identifier `0` resolves to the everyone role. Fluxer skips every other entry, and a channel whose entries are all skipped is created with no overwrites +6 A topic longer than 4096 characters on a forum or media channel, or 1024 characters on any other channel, is shortened to that limit + +7 Applied only to a forum or media channel. Each tag gets a new ID, its name is trimmed and shortened to 50 characters, a tag with an empty or repeated name is skipped, and Fluxer keeps at most 20 tags + +8 Applied only to a forum or media channel, and only when `emoji_name` is a single unicode emoji + +9 An unknown value is ignored and the channel keeps the default. `default_sort_order` and `default_tag_setting` apply only to a forum or media channel, `default_forum_layout` only to a forum channel, and `default_auto_archive_duration` to a text, announcement, forum or media channel + +10 Applied to a text, announcement, forum or media channel, capped at 21600, and a value of 0 or less is ignored + +11 Only the flags a forum or media channel can carry are kept, and `REQUIRE_TAG` is dropped when no imported tag can be applied by members without moderator permissions + +### Guild template forum tag object + +#### Structure + +| Field | Type | Description | +| --- | --- | --- | +| name | string | Tag name | +| moderated? | ?boolean | Whether only moderators can apply the tag | +| emoji_id?1 | ?string \| integer | Custom emoji of the tag | +| emoji_name?2 | ?string | Unicode emoji of the tag | + +1 Ignored on import, because the custom emoji does not exist in the new guild + +2 Kept only when the value is a single unicode emoji + +### Guild template default reaction object + +#### Structure + +| Field | Type | Description | +| --- | --- | --- | +| emoji_id?1 | ?string \| integer | Custom emoji of the reaction | +| emoji_name?2 | ?string | Unicode emoji of the reaction | + +1 Ignored on import, because the custom emoji does not exist in the new guild + +2 Kept only when the value is a single unicode emoji + ### Guild template role permission overwrite object #### Structure