chore: deprecated resolveAutoArchiveMaxLimit, MAX option

see my commit in discord.js
This commit is contained in:
March 7th 2022-12-26 18:00:14 +07:00
parent b3d0a859f4
commit 557a77e07b
3 changed files with 8 additions and 8 deletions

View File

@ -873,9 +873,10 @@ class Message extends Base {
* archived. This can be:
* * `60` (1 hour)
* * `1440` (1 day)
* * `4320` (3 days) <warn>This is only available when the guild has the `THREE_DAY_THREAD_ARCHIVE` feature.</warn>
* * `10080` (7 days) <warn>This is only available when the guild has the `SEVEN_DAY_THREAD_ARCHIVE` feature.</warn>
* * `'MAX'` Based on the guild's features
* * `4320` (3 days)
* * `10080` (7 days)
* * `'MAX'` (7 days)
* <warn>This option is deprecated and will be removed in the next major version.</warn>
* @typedef {number|string} ThreadAutoArchiveDuration
*/

View File

@ -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;
}
/**

1
typings/index.d.ts vendored
View File

@ -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<ThreadAutoArchiveDuration, 60>;
}