This commit is contained in:
2026-10-13 23:05:17 +08:00
parent 8115c27d56
commit d157d1f6c2
+1 -1
View File
@@ -7,7 +7,7 @@ export async function closeOldTickets(client: Client) {
try {
const thread = await client.channels.fetch(ticket.thread_id) as ThreadChannel;
const latestMessage = (await thread.messages.fetch({ limit: 1 })).at(0);
// Only process stale tickets. (Tickets with 5 days since the last message.)
if (latestMessage && latestMessage.createdTimestamp > Date.now() - 432e6) continue;