docs: record integrated Discord command suite and activation

This commit is contained in:
syntaxbullet
2026-09-08 08:46:58 +02:00
parent 2c135398d7
commit d088179c5e

View File

@@ -11,14 +11,15 @@ responses are ephemeral. Buttons/forms carry opaque persisted owner-bound state,
expire after 15 minutes, and mutation controls are consumed after successful use.
Interaction IDs retain replay receipts for 24 hours. Neither table stores tokens.
`daily.ts` implements the initial `/today` workflow. `types.ts`, `ui.ts`, and
`daily.ts` implements the `/today` workflow. `types.ts`, `ui.ts`, and
`state.ts` provide the shared feature building blocks. Feature tasks extend command
registration and route dispatch while keeping their behavior in separate modules.
Tests use real Ed25519 signatures and disposable migrated SQLite databases. The
foundation tests cover server/DM privacy, replay after restart, stale progress,
cross-account controls, and matching website state. Command registration and live
Discord validation will be completed during integration.
cross-account controls, and matching website state. All feature modules are now
composed in the shared API. End-to-end user interaction in Discord remains a
manual acceptance check after deployment and registration.
`/help` lists the current command definitions automatically, explains check-in
controls and privacy, and links to the website. It works before account setup and
@@ -78,3 +79,31 @@ Mina Sans / Instrument Serif, shared theme colors, and existing habit shades.
The 30 cells retain fixed readable sizes; symbols are Canvas paths. Text summaries
and buttons accompany the PNG. To produce review images without sending messages:
`PROGRESS_IMAGE_REVIEW_DIR=/tmp/minabot-progress-review bun test src/discord/progress-image.test.ts`.
## Integrated commands
All commands use global registration with server and bot-DM contexts. `/help`
reads this same registration metadata, so its command list stays in sync.
| Command | Function |
| --- | --- |
| `/help` | Command guide and website link |
| `/today` | Daily manual/count/task check-ins |
| `/habits` | Create, edit, schedule, archive, restore, permanently delete |
| `/tasks` | Add, rename, schedule, delete routine tasks |
| `/history` | Inspect and correct dated progress, including archived habits |
| `/reminders` | Named schedules, multiple times, quiet hours, enable/disable |
| `/settings` | Timezone and reminder delivery status |
| `/progress` | Private graphics, confirmed snapshot sharing, live-image controls |
After the deployment controller installs a release, register its definitions:
```sh
cd /opt/minabot
sudo docker compose exec -T app bun scripts/register-discord-commands.ts --apply
```
Registration upserts individual global commands and preserves unrelated commands.
The public key and interactions URL are one-time setup; adding commands requires
rerunning registration after their handlers have deployed.