Table of Contents

Interface IModuleBase

Namespace
Discord.Commands
Assembly
Discord.Net.Commands.dll

Represents a generic module base.

public interface IModuleBase

Methods

AfterExecute(CommandInfo)

Executed after a command is ran in this module base.

void AfterExecute(CommandInfo command)

Parameters

command CommandInfo

The command that ran.

AfterExecuteAsync(CommandInfo)

Executed asynchronously after a command is run in this module base.

Task AfterExecuteAsync(CommandInfo command)

Parameters

command CommandInfo

The command that's about to run.

Returns

Task

BeforeExecute(CommandInfo)

Executed before a command is run in this module base.

void BeforeExecute(CommandInfo command)

Parameters

command CommandInfo

The command that's about to run.

BeforeExecuteAsync(CommandInfo)

Executed asynchronously before a command is run in this module base.

Task BeforeExecuteAsync(CommandInfo command)

Parameters

command CommandInfo

The command that's about to run.

Returns

Task

OnModuleBuilding(CommandService, ModuleBuilder)

Executed when this module is building.

void OnModuleBuilding(CommandService commandService, ModuleBuilder builder)

Parameters

commandService CommandService

The command service that is building this module.

builder ModuleBuilder

The builder constructing this module.

SetContext(ICommandContext)

Sets the context of this module base.

void SetContext(ICommandContext context)

Parameters

context ICommandContext

The context to set.