feat(guilds): /guild — the module's own chat command #14
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/teams-phase7-slash-commands"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 7 of
docs/website/TEAMS.md, this module's half. The first command throughapi.registerSlashCommands(MODULE_API 1.6.0, §7.1).Pairs with website#157 (the seam) and docs#161.
/guild, not/team— the org lead's callCore does not own the word for a Team. That is what deleted its Team pages in phase 3, and it applies just as well to a channel: a core
/teamwould publish core's invented noun beside this module's existing/uo/guilds. So the module owns the vocabulary and therefore the command, and core ships the dispatcher and zero commands.Nothing in
server/commands/guild.command.jsknows what Discord is. It is handed anactorand returns an envelope; the same handler would serve a second platform unchanged.The part that is a security boundary, not presentation
The audience rungs are re-resolved in the handler. A shard whose
guildsfeature is gated to staff does not become public because the question arrived over Discord. SameshardVisibilityconfig the routes use, and the anonymous case is answered directly rather than by handingviewerLevela synthetic request — that fall-through intoauth.getUserFromRequestis the phase 3 bug.The provider's own staleness guard is honoured too: a shard that is not connected answers "guild information may be out of date" instead of reporting a board of unknown age as current.
Smaller decisions
resolveUserIdis exported rather than copied, so "linked" means here exactly what it means on the roster (the shard's assertedweb_idor the link table).The live rig found both fixes in the second commit
Real ServUO + real sidecar + the app with this module installed:
staff, the refusal still read "link your account — this shard shows guild information to linked players". Signing in reacheslogged_inand linking reachesplayer;staffandadminare roles an operator grants. Inviting someone to do something that changes nothing is worse than plainly saying no.Guilds on localhost:5173).ctx.sitecarries a base URL and no brand name, so naming the deployment there could only ever print a hostname into a title on the shard's own Discord server.Walked afterwards against two real guilds:
/guildlisted both,/guild name:GMreturned 10 members / 0 online / 0 linked / leaderSeed006Cand a link to/uo/guilds/2, and a shard gated tostaffrefused an anonymous and a linked-player caller while serving a linked admin.Tests
437 (+10).
check:importsclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01WnDSWzpUjw8t8C2hghysNz