Move terminal.service.ts and prune.service.ts entirely to bot/modules/ since they are Discord-specific. Split lootdrop.service.ts: pure logic (activity tracking, DB ops, claim) stays in shared/, Discord operations (message sending, channel interactions) move to bot/modules/economy/ lootdrop.handler.ts. Move effect registry/handlers/types from bot/ to shared/modules/inventory/ since they contain no Discord.js imports and are needed by inventory.service.ts in shared. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
668 B
TypeScript
22 lines
668 B
TypeScript
import { temporaryRoleService } from "@shared/modules/system/temp-role.service";
|
|
import { terminalService } from "./terminal.service";
|
|
|
|
export const schedulerService = {
|
|
start: () => {
|
|
console.log("🕒 Scheduler started: Maintenance loops initialized.");
|
|
|
|
// 1. Temporary Role Revocation (every 60s)
|
|
setInterval(() => {
|
|
temporaryRoleService.processExpiredRoles();
|
|
}, 60 * 1000);
|
|
|
|
// 2. Terminal Update Loop (every 60s)
|
|
setInterval(() => {
|
|
terminalService.update();
|
|
}, 60 * 1000);
|
|
|
|
// Run an initial check on start
|
|
temporaryRoleService.processExpiredRoles();
|
|
}
|
|
};
|