Namespace FishMMO.DiscordBot.Services
Classes
- AccountLinkingService
Manages Discord-to-game account linking via verification codes. Users request a link with a character name, receive a code, type it in-game, and the polling service confirms the link when the code appears in chat.
- BotConfigurationService
Manages loading and saving of persistent bot configuration, including the dynamic channel states mapping and persistent bot data (linked accounts, bridge bans, muted zones). All inner dictionaries use ConcurrentDictionary<TKey, TValue> for thread safety.
- BridgeBanService
Manages bridge bans — prevents specific game characters or accounts from having their messages forwarded between Discord and the game.
- ChatPollingService
Background service that polls the game database for new chat messages and forwards them to the appropriate Discord channels. Uses a reentrancy guard to prevent overlapping polls.
- ChatRelayPolicy
Decides which in-game chat channels are allowed to be republished to Discord.
- CommandHandlingService
Handles incoming Discord messages: routes commands to modules and delegates non-command messages in managed channels to GameChatBridgeService.
- DynamicChannelManagerService
Manages dynamically created Discord channels that bridge game world/scene chat to Discord. Implements IHostedService for lifecycle management of the cleanup timer. All inner dictionaries are ConcurrentDictionary<TKey, TValue> for thread safety.
- GameChatBridgeService
Bridges Discord messages from managed game chat channels into the game database. Enforces rate limiting, bridge ban checks, and message length validation before insertion.
- RateLimiterService
Per-user sliding window rate limiter to prevent abuse of the Discord-to-game chat bridge. Uses a circular buffer of timestamps per user for O(1) per-check cost.
Enums
- BridgeResult
Result of a Discord-to-game bridge operation.