Skip to content

Post a game's releases to its players' Discord channel - #23

Merged
XopoIII merged 1 commit into
mainfrom
discord-announce
Oct 18, 2026
Merged

XopoIII merged 1 commit into
mainfrom
discord-announce

Conversation

@XopoIII

@XopoIII XopoIII commented Oct 18, 2026

Copy link
Copy Markdown
Owner

A new door, POST /announce, takes { title, text, url? } from a game's own tools, behind the ingest key, and posts it as one embed to a Discord channel's webhook. The webhook's URL is a Worker secret named by bindings.announceWebhook (ANNOUNCE_WEBHOOK by default) and is never logged. Nobody is pinged (allowed_mentions: { parse: [] }); the title and the lines are cut to Discord's 256 and 4,096. Without the secret: 503. Discord's refusal: 502 with its status (0 when nothing answered).

Joins the unreleased 0.7.0 (the local mirror); README's doors, config and a setup section, and the changelog's Added and Not done.

Checked: every pre-commit gate clean; 94 Worker tests, 6 new; three mutants (cap boundary, mentions, an ignored refusal) each killed. Not posted to a real Discord webhook.

🤖 Generated with Claude Code

A new door, POST /announce, takes a title, the release's lines and an optional https address from
the game's own tools, behind the same key as /notify, and posts them as one embed to a Discord
channel's webhook. The webhook's URL is a Worker secret named by bindings.announceWebhook
(ANNOUNCE_WEBHOOK by default) and is never logged, since it holds the webhook's token. The post
pings nobody whatever the lines say, and the title and the lines are cut to Discord's 256 and
4,096 characters. Without the secret the door answers 503; a refusal from Discord comes back as a
502 with its status, so a tool can say the post did not go. It joins the unreleased 0.7.0.

Checked: lefthook run pre-commit --all-files, every gate clean (lockfile, lint, format, file-size,
strict-mode, english-only, worker, types); npm test, 94 tests pass, 6 of them new; three mutants
(the cap's boundary, the dropped allowed_mentions, an ignored refusal) each failed one test and
were restored. No real Discord webhook was posted to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@XopoIII
XopoIII merged commit 8cd6ef3 into main Oct 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant