From 448f40b1a1610e8b9fef2de6b8bb7748d7c851ac Mon Sep 17 00:00:00 2001 From: TTtie Date: Tue, 12 Sep 2023 10:16:16 +0000 Subject: [PATCH] feat(Guild): add defaultThreadRatelimitPerUser to createChannel (#110) Ref: https://github.com/discord/discord-api-docs/commit/7d0db33266d7f811b786b2a7c60de3b91ef6bd9f --- index.d.ts | 2 +- lib/Client.js | 2 ++ lib/structures/Guild.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 58939aaa..28c447de 100644 --- a/index.d.ts +++ b/index.d.ts @@ -346,6 +346,7 @@ declare namespace Dysnomia { defaultForumLayout?: ForumLayoutTypes; defaultReactionEmoji?: ForumDefaultReactionEmoji | null; defaultSortOrder?: ThreadSortingOrders | null; + defaultThreadRateLimitPerUser?: number | null; nsfw?: boolean; parentID?: string; permissionOverwrites?: Overwrite[]; @@ -361,7 +362,6 @@ declare namespace Dysnomia { archived?: boolean; appliedTags?: string[]; autoArchiveDuration?: AutoArchiveDuration; - defaultThreadRateLimitPerUser?: number | null; flags?: number; invitable?: boolean; locked?: boolean; diff --git a/lib/Client.js b/lib/Client.js index 8698326f..dc62be30 100644 --- a/lib/Client.js +++ b/lib/Client.js @@ -408,6 +408,7 @@ class Client extends EventEmitter { * @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 {Number} [options.defaultThreadRateLimitPerUser] The initial ratelimit of the channel to use on newly created threads, in seconds. 0 means no ratelimit is enabled * @arg {Boolean} [options.nsfw] The nsfw status of the channel * @arg {String?} [options.parentID] The ID of the parent category channel for this channel * @arg {Array} [options.permissionOverwrites] An array containing permission overwrite objects @@ -439,6 +440,7 @@ class Client extends EventEmitter { emoji_name: options.defaultReactionEmoji.emojiName }, default_sort_order: options.defaultSortOrder, + default_thread_rate_limit_per_user: options.defaultThreadRateLimitPerUser, nsfw: options.nsfw, parent_id: options.parentID, permission_overwrites: options.permissionOverwrites, diff --git a/lib/structures/Guild.js b/lib/structures/Guild.js index a20058e1..7d96a7bb 100644 --- a/lib/structures/Guild.js +++ b/lib/structures/Guild.js @@ -400,6 +400,7 @@ class Guild extends Base { * @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 {Number} [options.defaultThreadRateLimitPerUser] The initial ratelimit of the channel to use on newly created threads, in seconds. 0 means no ratelimit is enabled * @arg {Boolean} [options.nsfw] The nsfw status of the channel * @arg {String?} [options.parentID] The ID of the parent category channel for this channel * @arg {Array} [options.permissionOverwrites] An array containing permission overwrite objects