Table of Contents

Interface IInteractionModuleBase

Namespace
Discord.Interactions
Assembly
Discord.Net.Interactions.dll

Represents a generic interaction module base.

public interface IInteractionModuleBase

Methods

AfterExecute(ICommandInfo)

Method body to be executed after an application command execution.

void AfterExecute(ICommandInfo command)

Parameters

command ICommandInfo

Command information related to the Discord Application Command.

AfterExecuteAsync(ICommandInfo)

Method body to be executed asynchronously after an application command execution.

Task AfterExecuteAsync(ICommandInfo command)

Parameters

command ICommandInfo

Command information related to the Discord Application Command.

Returns

Task

BeforeExecute(ICommandInfo)

Method body to be executed before executing an application command.

void BeforeExecute(ICommandInfo command)

Parameters

command ICommandInfo

Command information related to the Discord Application Command.

BeforeExecuteAsync(ICommandInfo)

Method body to be executed asynchronously before executing an application command.

Task BeforeExecuteAsync(ICommandInfo command)

Parameters

command ICommandInfo

Command information related to the Discord Application Command.

Returns

Task

Construct(ModuleBuilder, InteractionService)

Method body to be executed after the automated module creation is completed and before Build(InteractionService, IServiceProvider, ModuleInfo) is called.

void Construct(ModuleBuilder builder, InteractionService commandService)

Parameters

builder ModuleBuilder

Builder class of this module.

commandService InteractionService

Command Service instance that is building this method.

OnModuleBuilding(InteractionService, ModuleInfo)

Method body to be executed when Build(InteractionService, IServiceProvider, ModuleInfo) is called.

void OnModuleBuilding(InteractionService commandService, ModuleInfo module)

Parameters

commandService InteractionService

Command Service instance that built this module.

module ModuleInfo

Info class of this module.

SetContext(IInteractionContext)

Sets the context of this module.

void SetContext(IInteractionContext context)

Parameters

context IInteractionContext