1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-18 04:40:59 -05:00

Compare commits

..

No commits in common. "5a59e9cf75eab05f80b02ba942d6f699cefb15df" and "b3ff2d0b192fd0bed9f752814264b46525b7c8eb" have entirely different histories.

3 changed files with 3 additions and 18 deletions

View File

@ -85,8 +85,7 @@
"dcmod_chat": "742324777934520350",
"mpmod_chat": "516344221452599306",
"multifarm_chat": "1149238561934151690",
"pw_list": "1193424588554645505",
"help_forum": "1022236553562558464"
"pw_list": "1193424588554645505"
}
}
}

View File

@ -25,19 +25,6 @@ client.on('error', (error: Error)=>_(error, 'clientError'));
// Interval timers for modules
setInterval(async()=>await MPModule(client), refreshTimerSecs);
setInterval(()=>YTModule(client), 180000); // 3 minutes
setInterval(async()=>{
const forum = client.guilds.cache.get(client.config.dcServer.id).channels.cache.get(client.config.dcServer.channels.help_forum) as Discord.ForumChannel;
await forum.threads.fetch();
for await (const thread of forum.threads.cache.values()) {
await thread.messages.fetch();
if (!thread.archived && thread.lastMessage.createdTimestamp <= Date.now() - 1555200000) {// check if thread is inactive for over 18 days
await thread.setLocked(true).catch(()=>null);
await thread.setArchived(true, 'Inactive for over 18 days').catch(()=>null);
Logger.console('log', 'ThreadTimer', `${thread.name} has been archived and locked due to inactivity`);
}
}
}, 1200000); // 20 minutes
// Event loop for punishments and daily msgs
setInterval(async()=>{

5
src/interfaces.d.ts vendored
View File

@ -159,9 +159,8 @@ export interface Config {
punishment_log: string,
dcmod_chat: string,
mpmod_chat: string,
multifarm_chat: string,
pw_list: string,
help_forum: string
multifarm_chat: string
pw_list: string
}
}
}