Skip to content

Commit

Permalink
feat: add defaultForumLayout to createChannel() (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
TTtie authored Jul 14, 2023
1 parent 63e63ee commit a5d81e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ declare namespace Dysnomia {
availableTags?: (Required<Pick<ForumTag, "name">> & Partial<ForumTag>)[];
bitrate?: number;
defaultAutoArchiveDuration?: AutoArchiveDuration;
defaultForumLayout?: ForumLayoutTypes;
defaultReactionEmoji?: ForumDefaultReactionEmoji | null;
defaultSortOrder?: ThreadSortingOrders | null;
nsfw?: boolean;
Expand All @@ -356,7 +357,6 @@ declare namespace Dysnomia {
archived?: boolean;
appliedTags?: string[];
autoArchiveDuration?: AutoArchiveDuration;
defaultForumLayout?: ForumLayoutTypes;
defaultThreadRateLimitPerUser?: number | null;
flags?: number;
invitable?: boolean;
Expand Down
2 changes: 2 additions & 0 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ class Client extends EventEmitter {
* @arg {Array<Object>} [options.availableTags] Available tags for a forum channel
* @arg {Number} [options.bitrate] The bitrate of the channel (voice channels only)
* @arg {Number} [options.defaultAutoArchiveDuration] The default duration of newly created threads in minutes to automatically archive the thread after inactivity (60, 1440, 4320, 10080)
* @arg {Number} [options.defaultForumLayout] The default forum layout view used to display forum posts
* @arg {Object} [options.defaultReactionEmoji] The emoji to show as the reaction button (forum channels only)
* @arg {Object} [options.defaultSortOrder] The default thread sorting order
* @arg {Boolean} [options.nsfw] The nsfw status of the channel
Expand Down Expand Up @@ -432,6 +433,7 @@ class Client extends EventEmitter {
})),
bitrate: options.bitrate,
default_auto_archive_duration: options.defaultAutoArchiveDuration,
default_forum_layout: options.defaultForumLayout,
default_reaction_emoji: options.defaultReactionEmoji && {
emoji_id: options.defaultReactionEmoji.emojiID,
emoji_name: options.defaultReactionEmoji.emojiName
Expand Down
1 change: 1 addition & 0 deletions lib/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ class Guild extends Base {
* @arg {Array<Object>} [options.availableTags] Available tags for a forum channel
* @arg {Number} [options.bitrate] The bitrate of the channel (voice channels only)
* @arg {Number} [options.defaultAutoArchiveDuration] The default duration of newly created threads in minutes to automatically archive the thread after inactivity (60, 1440, 4320, 10080)
* @arg {Number} [options.defaultForumLayout] The default forum layout view used to display forum posts
* @arg {Object} [options.defaultReactionEmoji] The emoji to show as the reaction button (forum channels only)
* @arg {Object} [options.defaultSortOrder] The default thread sorting order
* @arg {Boolean} [options.nsfw] The nsfw status of the channel
Expand Down

0 comments on commit a5d81e5

Please sign in to comment.