docs(teams): a slash-command answer narrower than public is ephemeral

TEAMS.md §7.1 and MODULE_API.md registerSlashCommands now state the rule:
the rung check decides whether to answer, and an answer whose audience is
above the public rung is returned ephemeral: true because a channel reply
reaches everyone in the channel. Records module-uo's /guild fix
(Module-uo#46), the same rule as module-rust D127.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
This commit is contained in:
2026-11-27 13:26:23 -06:00
parent 8cf3f77df6
commit ebfc0c46b1
2 changed files with 11 additions and 0 deletions

View File

@@ -1284,6 +1284,9 @@ volume and cannot load a line of module code, so it pulls the definitions over a
owns every platform-specific concern — deferral, the acknowledgement deadline, ephemerality,
follow-ups, embeds. A module that wanted to call `interaction.deferReply()` would be a module holding
a Discord handle, and this split is the reason a second platform could implement the same contract.
`ephemeral` is still the handler's to set: return `ephemeral: true` for any answer whose audience is
narrower than public, because a channel reply is read by everyone in the channel, not only the caller
who passed the rung check (TEAMS.md §7.1).
**`actor` is resolved by core before the handler is entered**, and is the whole of what a handler
learns about the caller:

View File

@@ -1877,6 +1877,14 @@ none is built.
`/teams/:slug`. For a caller with no linked account it returns the **public** projection plus an
ephemeral "link your account for more" — see §9 answer 5.
**A permitted answer narrower than public goes to the caller alone.** The handler's rung check
decides *whether* to answer. It does not decide who else reads the reply. A reply posted into a
channel is read by everyone in it, so an answer whose audience is above the public rung is returned
`ephemeral: true`. An answer the public may see stays public. module-uo's `/guild` does this for both
the list and one guild's detail whenever the shard's `guilds` audience is above `anonymous`
([Module-uo#46](https://gitea.whitlocktech.com/RunicGateway/Module-uo/issues/46)). It is the same rule
as module-rust's D127 (`docs/modules/rust/PLAN.md`).
### 7.2 Notifications bridge
> **Amended after building it (phase 8, 2026-08-18).** The shape below is what was designed; five