At 8 PM Eastern on Wednesday, if no non-cancelled mission starts on that week's upcoming Friday, post once in #side-ops pinging the Community Zeus role (DISCORD_COMMUNITY_ZEUS_ROLE_ID, or the role resolved by name): the slot is open, hosting is welcome, and otherwise the slot stays empty or Jason hosts it himself. Dedup uses a stable per-Friday timestamp token scanned from recent channel messages, so no DB state. When a non-superuser later claims the slot the notice is edited to credit them; a cancelled or deleted claim reverts the notice, and a between-polls claim swap re-credits the new claimant.
21 lines
878 B
TypeScript
21 lines
878 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";
|
|
import { start as startImminentReminders } from "./imminentReminders";
|
|
import { start as startFridayOpsNotice } from "./fridayOpsNotice";
|
|
|
|
export type ServiceStarter = (client: Client, payload: Payload) => Promise<void> | void;
|
|
|
|
export const services: ServiceStarter[] = [
|
|
startMissionEmbeds,
|
|
startNotificationBridge,
|
|
startTransferRequests,
|
|
startEvaluationReminders,
|
|
startReadyReminders,
|
|
startImminentReminders,
|
|
startFridayOpsNotice,
|
|
];
|