Table of Contents

Class CommandHandlingService

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

Handles incoming Discord messages: routes commands to modules and delegates non-command messages in managed channels to GameChatBridgeService.

public class CommandHandlingService
Inheritance
CommandHandlingService
Inherited Members

Constructors

CommandHandlingService(DiscordSocketClient, CommandService, ILogger<CommandHandlingService>, IServiceProvider, GameChatBridgeService, BotConfigurationService)

Initializes a new instance of the CommandHandlingService class.

public CommandHandlingService(DiscordSocketClient discord, CommandService commands, ILogger<CommandHandlingService> logger, IServiceProvider serviceProvider, GameChatBridgeService gameChatBridge, BotConfigurationService botConfigService)

Parameters

discord DiscordSocketClient

The Discord socket client.

commands CommandService

The command service for slash/prefix commands.

logger ILogger<CommandHandlingService>

Logger instance.

serviceProvider IServiceProvider

Service provider for dependency resolution.

gameChatBridge GameChatBridgeService

Service that bridges Discord messages to the game database.

botConfigService BotConfigurationService

Methods

InitializeAsync()

Discovers and loads all command modules from the entry assembly. Must be called once during application startup.

public Task InitializeAsync()

Returns

Task