feat: backport (#7787)

This commit is contained in:
Jiralite
2022-04-14 11:48:31 +01:00
committed by GitHub
parent ab324ea6ae
commit 3eb45e30b3
6 changed files with 28 additions and 22 deletions

View File

@@ -603,6 +603,17 @@ class Util extends null {
filter.isDefault = true;
return filter;
}
/**
* 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.
* @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;
}
}
module.exports = Util;