Five days before a player-created side op starts, if it is not yet Ready, the creator gets one in-app notification per day (via mission-tick) plus one Discord DM per day (new bot service). Per-server-local-day dedupe via hidden readyReminderWebSentAt/readyReminderDmSentAt markers. The ready-reminder type is excluded from the notification bridge to avoid double-DMing. Markers are nulled on clone.
17 lines
690 B
TypeScript
17 lines
690 B
TypeScript
import type { Client } from "discord.js";
|
|
import type { Payload } from "payload";
|
|
import { start as startMissionEmbeds } from "./missionEmbeds";
|
|
import { start as startNotificationBridge } from "./notificationBridge";
|
|
import { start as startTransferRequests } from "./transferRequests";
|
|
import { start as startEvaluationReminders } from "./evaluationReminders";
|
|
import { start as startReadyReminders } from "./readyReminders";
|
|
|
|
export type ServiceStarter = (client: Client, payload: Payload) => Promise<void> | void;
|
|
|
|
export const services: ServiceStarter[] = [
|
|
startMissionEmbeds,
|
|
startNotificationBridge,
|
|
startTransferRequests,
|
|
startEvaluationReminders,
|
|
startReadyReminders,
|
|
];
|