Skip to content

Commit

Permalink
Re-enable setAutoArchiveDuration
Browse files Browse the repository at this point in the history
### Notes
Let's re-enable the `setAutoArchiveDuration` to 24 hours / `OneDay` after the initial warning message is sent.
  • Loading branch information
zuuring committed Dec 12, 2024
1 parent 9c9bf46 commit 91e6e41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions discord-scripts/thread-management/check-thread-archiving.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const THREAD_CHECK_CADENCE = 12 * HOUR // 12 * HOUR
// Use a ThreadAutoArchiveDuration as we'll still lean on Discord to
// auto-archive after issuing the warning, so we want the value to be
// one that we can update auto-archiving to.
// const AUTO_ARCHIVE_WARNING_LEAD_MINUTES: ThreadAutoArchiveDuration = ThreadAutoArchiveDuration.OneDay
const AUTO_ARCHIVE_WARNING_LEAD_MINUTES: ThreadAutoArchiveDuration = ThreadAutoArchiveDuration.OneDay

Check failure on line 40 in discord-scripts/thread-management/check-thread-archiving.ts

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎·`

/**
* A helper to request follow-up action on a thread based on the id of the user
Expand Down Expand Up @@ -474,7 +474,8 @@ async function checkThreadStatus(
},
],
})

// Let's add back setting the thread autoArchive to 24hr after the message is sent
await thread.setAutoArchiveDuration(AUTO_ARCHIVE_WARNING_LEAD_MINUTES)
// Use robot brain to store the warning event data
robot.brain.set(warningKey, warningMessage.id)
robot.logger.info(
Expand Down

0 comments on commit 91e6e41

Please sign in to comment.