docs: record integrated Discord command suite and activation
This commit is contained in:
@@ -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.
|
expire after 15 minutes, and mutation controls are consumed after successful use.
|
||||||
Interaction IDs retain replay receipts for 24 hours. Neither table stores tokens.
|
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
|
`state.ts` provide the shared feature building blocks. Feature tasks extend command
|
||||||
registration and route dispatch while keeping their behavior in separate modules.
|
registration and route dispatch while keeping their behavior in separate modules.
|
||||||
|
|
||||||
Tests use real Ed25519 signatures and disposable migrated SQLite databases. The
|
Tests use real Ed25519 signatures and disposable migrated SQLite databases. The
|
||||||
foundation tests cover server/DM privacy, replay after restart, stale progress,
|
foundation tests cover server/DM privacy, replay after restart, stale progress,
|
||||||
cross-account controls, and matching website state. Command registration and live
|
cross-account controls, and matching website state. All feature modules are now
|
||||||
Discord validation will be completed during integration.
|
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
|
`/help` lists the current command definitions automatically, explains check-in
|
||||||
controls and privacy, and links to the website. It works before account setup and
|
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
|
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:
|
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`.
|
`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.
|
||||||
|
|||||||
Reference in New Issue
Block a user