Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change thread async duration #321

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions discord-scripts/thread-management/check-thread-archiving.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {

// The maximum time between any two messages after which a thread is considered
// async.
const MAX_HEURISTIC_SYNC_THREAD_DURATION = 60 * MINUTE // 60 * MINUTE
const MAX_HEURISTIC_SYNC_THREAD_DURATION = 12 * HOUR // 60 * MINUTE
// How frequently threads are checked for archive requirements.
const THREAD_CHECK_CADENCE = 12 * HOUR // 12 * HOUR
// Use a ThreadAutoArchiveDuration as we'll still lean on Discord to
Expand Down Expand Up @@ -368,9 +368,7 @@ async function checkThreadStatus(
if (
lastActiveTimestamp - (firstActiveTimestamp ?? 0) >
(thread.autoArchiveDuration ?? 0) * MINUTE -
/* AUTO_ARCHIVE_WARNING_LEAD_MINUTES */ (thread.autoArchiveDuration ??
0) *
MINUTE
AUTO_ARCHIVE_WARNING_LEAD_MINUTES * MINUTE
) {
await thread.send({
content:
Expand Down
Loading