From 557a77e07b891cb8d9bf4edfd416ef77409fdd32 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Mon, 26 Dec 2022 18:00:14 +0700 Subject: [PATCH] chore: deprecated resolveAutoArchiveMaxLimit, `MAX` option see my commit in discord.js --- src/structures/Message.js | 7 ++++--- src/util/Util.js | 8 +++----- typings/index.d.ts | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 6e8e746..db2b2ee 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -873,9 +873,10 @@ class Message extends Base { * archived. This can be: * * `60` (1 hour) * * `1440` (1 day) - * * `4320` (3 days) This is only available when the guild has the `THREE_DAY_THREAD_ARCHIVE` feature. - * * `10080` (7 days) This is only available when the guild has the `SEVEN_DAY_THREAD_ARCHIVE` feature. - * * `'MAX'` Based on the guild's features + * * `4320` (3 days) + * * `10080` (7 days) + * * `'MAX'` (7 days) + * This option is deprecated and will be removed in the next major version. * @typedef {number|string} ThreadAutoArchiveDuration */ diff --git a/src/util/Util.js b/src/util/Util.js index 968f720..50ca7a3 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -648,13 +648,11 @@ class Util extends null { /** * Resolves the maximum time a guild's thread channels should automatcally archive in case of no recent activity. - * @param {Guild} guild The guild to resolve this limit from. + * @deprecated * @returns {number} */ - static resolveAutoArchiveMaxLimit({ features }) { - if (features.includes('SEVEN_DAY_THREAD_ARCHIVE')) return 10080; - if (features.includes('THREE_DAY_THREAD_ARCHIVE')) return 4320; - return 1440; + static resolveAutoArchiveMaxLimit() { + return 10080; } /** diff --git a/typings/index.d.ts b/typings/index.d.ts index c12c51a..a8741bc 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -3151,6 +3151,7 @@ export class Util extends null { ): Promise<{ id: Snowflake; position: number }[]>; /** @deprecated This will be removed in the next major version. */ public static splitMessage(text: string, options?: SplitOptions): string[]; + /** @deprecated This will be removed in the next major version. */ public static resolveAutoArchiveMaxLimit(guild: Guild): Exclude; }