fix(commands): keep a staff-gated /guild answer private to the caller (#46) #50
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/guild-ephemeral-46"
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?
What & why
Closes #46.
/guildchecked the caller's rung against the shard'sguildsaudience, then posted the permitted answer into the channel. When a shard limits guilds to staff and a moderator runs/guildin a public channel, everyone in that channel saw the guild list, or one guild's counts and leaders.The list and detail replies now set
ephemeral: truewhenever theguildsaudience is narrower than public. Public shards still answer publicly. This is the same rule as module-rust D127.One difference from the issue text: the issue suggests
feature.audience !== 'public'. This module has nopublicvalue. Its lowest rung isanonymous(shardVisibilityLADDER), so!== 'public'would have made every reply private. The check isaudience !== 'anonymous', and a missing audience is treated as narrow, so the reply stays private.Docs: RunicGateway/docs PR (TEAMS.md §7.1 + MODULE_API.md
registerSlashCommands) — linked below.How it was tested
cd server && npm test: 738 pass, 0 fail.server/test/guildCommand.test.js:logged_in,player,staffandadmin, both the list and the detail reply come backephemeral: true.anonymous, both stayephemeral: false.ephemeralinto a private follow-up after a public deferral is the bot's existing behaviour (TEAMS.md §7.1, phase 7 fix), and this change doesn't touch it.Checklist
AI-assisted contributions (required)
Claude Code (Claude Opus 5.5). I have reviewed and understandevery change, and take responsibility for it. AI-authored commits are
marked with a
Co-Authored-By/Assisted-Bytrailer.License
(GNU GPL v3.0 or later), and I have the right to contribute it.
🤖 Generated with Claude Code
https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t