Table of Contents

Class GameChatBridgeService

Namespace
FishMMO.DiscordBot.Services
Assembly
FishMMO-DiscordBot.dll

Bridges Discord messages from managed game chat channels into the game database. Enforces rate limiting, bridge ban checks, and message length validation before insertion.

public class GameChatBridgeService
Inheritance
GameChatBridgeService
Inherited Members

Constructors

GameChatBridgeService(IServiceProvider, DynamicChannelManagerService, RateLimiterService, BridgeBanService, AccountLinkingService, ILogger<GameChatBridgeService>, IConfiguration)

Initializes a new instance of the GameChatBridgeService class.

public GameChatBridgeService(IServiceProvider serviceProvider, DynamicChannelManagerService dynamicChannelManager, RateLimiterService rateLimiter, BridgeBanService bridgeBanService, AccountLinkingService accountLinkingService, ILogger<GameChatBridgeService> logger, IConfiguration configuration)

Parameters

serviceProvider IServiceProvider

Service provider for creating scoped database contexts.

dynamicChannelManager DynamicChannelManagerService

Service managing dynamic Discord channels.

rateLimiter RateLimiterService

Per-user rate limiter.

bridgeBanService BridgeBanService
accountLinkingService AccountLinkingService
logger ILogger<GameChatBridgeService>

Logger instance.

configuration IConfiguration

Application configuration.

Methods

BridgeMessageAsync(SocketUserMessage, SocketTextChannel)

Attempts to bridge a Discord message to the game database. Validates the channel is managed, the user is not rate-limited, and the message content is valid.

public Task<BridgeResult> BridgeMessageAsync(SocketUserMessage message, SocketTextChannel textChannel)

Parameters

message SocketUserMessage

The Discord user message.

textChannel SocketTextChannel

The Discord text channel the message was sent in.

Returns

Task<BridgeResult>

The result of the bridge attempt.