feat : let discord fetcher can stop working and accept every message type
CI / Verify (push) Successful in 1m48s
CI / Build immutable images and deploy (push) Successful in 3m21s

This commit is contained in:
2026-09-21 18:29:17 +07:00 Unverified
parent 481123eec0
commit 88afa8e947
4 changed files with 132 additions and 115 deletions
+5 -1
View File
@@ -197,10 +197,14 @@ describe("environment template contract", () => {
expect(rbac).toContain("buzz-sheet-discord-worker");
});
it("syncs only for new Discord version announcements", async () => {
it("checks Lunaris for every new message in the configured Discord channel", async () => {
const worker = await repositoryFile("backend/discord.ts");
expect(worker).toContain("client.on(Events.MessageCreate, handleMessage)");
expect(worker).toContain("if (message.channelId !== channelId) return;");
expect(worker).not.toContain("message.author.id === client.user?.id");
expect(worker).not.toContain("parseLunarisVersionChange");
expect(worker).toContain("const details = { version, attempt: attempt + 1, messageUrl };");
expect(worker).not.toContain("channel.messages.fetch");
expect(worker).not.toContain('source: "history"');
});