Interface IInteractionModuleBase
Represents a generic interaction module base.
Namespace: Discord.Interactions
Assembly: Discord.Net.Interactions.dll
Syntax
public interface IInteractionModuleBase
Methods
| Improve this Doc View SourceAfterExecute(ICommandInfo)
Method body to be executed after an application command execution.
Declaration
void AfterExecute(ICommandInfo command)
Parameters
Type | Name | Description |
---|---|---|
ICommandInfo | command | Command information related to the Discord Application Command. |
AfterExecuteAsync(ICommandInfo)
Method body to be executed asynchronously after an application command execution.
Declaration
Task AfterExecuteAsync(ICommandInfo command)
Parameters
Type | Name | Description |
---|---|---|
ICommandInfo | command | Command information related to the Discord Application Command. |
Returns
Type | Description |
---|---|
Task |
BeforeExecute(ICommandInfo)
Method body to be executed before executing an application command.
Declaration
void BeforeExecute(ICommandInfo command)
Parameters
Type | Name | Description |
---|---|---|
ICommandInfo | command | Command information related to the Discord Application Command. |
BeforeExecuteAsync(ICommandInfo)
Method body to be executed asynchronously before executing an application command.
Declaration
Task BeforeExecuteAsync(ICommandInfo command)
Parameters
Type | Name | Description |
---|---|---|
ICommandInfo | command | Command information related to the Discord Application Command. |
Returns
Type | Description |
---|---|
Task |
Construct(ModuleBuilder, InteractionService)
Method body to be executed after the automated module creation is completed and before
Declaration
void Construct(ModuleBuilder builder, InteractionService commandService)
Parameters
Type | Name | Description |
---|---|---|
ModuleBuilder | builder | Builder class of this module. |
InteractionService | commandService | Command Service instance that is building this method. |
OnModuleBuilding(InteractionService, ModuleInfo)
Method body to be executed when
Declaration
void OnModuleBuilding(InteractionService commandService, ModuleInfo module)
Parameters
Type | Name | Description |
---|---|---|
InteractionService | commandService | Command Service instance that built this module. |
ModuleInfo | module | Info class of this module. |
SetContext(IInteractionContext)
Sets the context of this module.
Declaration
void SetContext(IInteractionContext context)
Parameters
Type | Name | Description |
---|---|---|
IInteractionContext | context |