Repository navigation
Conversation
/world sends a message to all players of all game servers. The game event publisher plugin publishes the guild, alliance and world chat as ChatMessageEvent, if it's enabled in its configuration (off by default). Players are told when they enter the game, if the chat of their guild or alliance is mirrored to Discord. The Dapr event publisher moves to the common project, so that the Discord host can send chat messages, too. 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
Guild masters bind the chat of their guild or alliance to a channel: on the Discord server of the game server with /guildchat create, or on their own Discord server with /guildchat bind. Linked users write into the game with /say, or with normal messages when the Message Content intent is enabled. 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: |
b6dd4db
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://62c753b5.openmudocs.pages.dev |
| Branch Preview URL: | https://claude-sweet-cray-w8crms-m5.openmudocs.pages.dev |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01USFZ9xErMB1EwkpfdUHzoZ
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Milestone M5 of the Discord integration (#1103). Stacked on #1160 (M4).
What
/world <message>reaches all players of all game servers. The chat ban andIChatMessageReceivedPlugInapply.IEventPublisher.WorldChatMessageAsyncandIGameServer.WorldChatMessageAsync, implemented in-memory, as a Dapr topic and inGameServerClient.[World] Name: text.isWorldChat(#world-chat).GameEventPublisherPlugInpublishes a newChatMessageEventfor guild, alliance and world chat.IEventPublisher.GuildMessageAsync/AllianceMessageAsync/WorldChatMessageAsync.EventPublishermoved from GameServer.Host to Dapr.Common, so the Discord host can use it. In the all-in-one deployment,GameServerContainer.EventPublisheris registered asIEventPublisherand resolved lazily, because the publisher depends on the bot.GuildChatBindingwith persistent guild id, scope (guild/alliance), provider, Discord server and channel id, hosted flag, bound by and bound at. It has a migration and compiled models, and an FK toGuildwith cascade, so disbanding a guild removes its bindings (M5.8). Operator settingsBot__ChatBridge__*:BindingMode(Both/HostedOnly/GuildOwnedOnly),AllowedDiscordServerIds,ReadMessages,MaximumMessageLength,MaximumMessagesPerMinute./guildchat create [scope]creates#guild-<name>/#alliance-<name>in the new Guilds category of the layout. Only the bot and linked guild members can see it. Visibility uses per-user channel overwrites, synchronized after linking and every 10 status ticks./guildchat bind [scope]in the channel. That requires Manage Channel on that channel; the allowlist applies. Players get a localized in-game notice at login when their guild or alliance chat is mirrored (newGuildChatBridgeNoticePlugIn).Account.ChatBanUntilapplies, plus a flood limit (10 messages per minute by default).<:name:id>becomes:name:, markdown and line breaks are stripped, and the length is capped. The sender is@plus the character name, at most 10 characters, so Discord users can't impersonate characters./say <message>works in any bridged channel.ReadMessagesthe bot uses the Message Content intent and reads normal messages, and reacts with ❌ when one is rejected./guildchat unbindis used (by the guild master or by users who manage the channel), or the guild is disbanded. When the guild master changes, the binding stays, but only the current master can change it.IGuildServerContext.GetGuildMembershipAsync(characterName)andIPlayerContext.GetAccountChatBanUntilAsync(accountId), for EF and in-memory.Deviations from the issue, for discussion
/discord bindguild+/bind <code>became/guildchat bind./sayinstead of/gand/w. It works in any bridged channel./guildchat create.Tests
DiscordChatBridgeTest, against the in-memory DB with guilds, an alliance and linked users. It covers:DiscordChatTextTest(sanitizing),DiscordChatQueueTest(batching).GameEventPublisherPlugInTest: chat publishing on and off, the/worldcommand, and the chat ban for it.GuildMembershipQueryTest: EF query translation.Not tested: against a real Discord bot or server, and the migration against a real PostgreSQL database.
🤖 Generated with Claude Code
https://claude.ai/code/session_01USFZ9xErMB1EwkpfdUHzoZ
Generated by Claude Code