Repository navigation
Conversation
A layout file defines the roles, categories and channels of the Discord server of a game server. Administrators run /openmu setup to create what's missing; existing items are adopted by name, so it can run repeatedly. The bot posts notifications and the status into the channels of the layout, found by name, unless channel ids are configured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USFZ9xErMB1EwkpfdUHzoZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USFZ9xErMB1EwkpfdUHzoZ
Deploying openmudocs with
|
| Latest commit: |
1979383
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3aecb009.openmudocs.pages.dev |
| Branch Preview URL: | https://claude-sweet-cray-w8crms-m3.openmudocs.pages.dev |
sven-n
left a comment
There was a problem hiding this comment.
Part of a review pass over the whole Discord stack.
The idempotency story here is the part I was most sceptical of going in, and it holds up: adopt by name, create only what's missing, never delete or rename, and the IDiscordServer seam with FakeDiscordServer means the provisioner is actually testable without a live server. /openmu setup is gated twice — WithDefaultMemberPermissions(Administrator) on the command plus an explicit GuildPermissions.Administrator check at execution, because the default can be overridden in the Discord server's settings. That's the right instinct and the comment says so.
Three comments inline. The permission-overwrite one is the only one with a user-visible failure mode.
Generated by Claude Code
…failed commands A private category whose roles couldn't be created stays visible to everyone, and the setup report says so, instead of being visible to nobody but the bot. The names in a layout have to be unique, because the items are adopted by their name. A command which fails after it was deferred gets an answer, instead of leaving the user waiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USFZ9xErMB1EwkpfdUHzoZ
Milestone M3 of the Discord integration (#1101). Stacked on #1156 (M2), so review/merge that first.
What
src/Discord/Provisioning/DefaultLayout.json, embedded): roles GM and Linked Player; categories Info (#announcements,#events,#server-status), Community (#world-news,#world-chat,#general) and Staff (#staff-alerts,#gm-commands, only visible to GM). Each item has a stable key. Channels can be read-only, announcement channels, receive notification categories or show the status. A custom layout can be configured withDiscord__Bot__LayoutFile; it's validated on load (unique keys, known roles)./openmu setup: a slash command with Administrator as its default member permission, usable in guilds only. The handler re-checks that the user is an admin. Behaviour:@everyone, the roles and the bot; other overwrites stay as they are.Bot__Channels__*/Bot__StatusChannelIdtake precedence. Until the bot is connected, categories without an explicit channel fall back to their webhook.IDiscordServerabstraction;SocketGuildServeradapts Discord.Net's guild to it.Tests
New: provisioning of an empty server, idempotency, adoption by name across categories, failure reporting with continuation, permission overwrites, finding channels, layout validation, routing precedence, setup report, and webhook fallback in the notifier. Full suite: 1690 passed.
Not tested against a real Discord server/bot token.
🤖 Generated with Claude Code
https://claude.ai/code/session_01USFZ9xErMB1EwkpfdUHzoZ
Generated by Claude Code