Class ModalCommandInfo
Represents the info class of an attribute based method for handling Modal Interaction events.
Implements
Inherited Members
Namespace: Discord.Interactions
Assembly: Discord.Net.Interactions.dll
Syntax
public class ModalCommandInfo : CommandInfo<ModalCommandParameterInfo>, ICommandInfo
Properties
| Improve this Doc View SourceModal
Declaration
public ModalInfo Modal { get; }
Property Value
Type | Description |
---|---|
ModalInfo |
Parameters
Gets a collection of the parameters of this command.
Declaration
public override IReadOnlyCollection<ModalCommandParameterInfo> Parameters { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<ModalCommandParameterInfo> |
Overrides
SupportsWildCards
Gets wheter this command supports wild card patterns.
Declaration
public override bool SupportsWildCards { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Methods
| Improve this Doc View SourceExecuteAsync(IInteractionContext, IServiceProvider)
Executes the command with the provided context.
Declaration
public override async Task<IResult> ExecuteAsync(IInteractionContext context, IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IInteractionContext | context | The execution context. |
IServiceProvider | services | Dependencies that will be used to create the module instance. |
Returns
Type | Description |
---|---|
Task<IResult> | A task representing the execution process. The task result contains the execution result. |
Overrides
ExecuteAsync(IInteractionContext, IServiceProvider, String[])
Execute this command using dependency injection.
Declaration
public async Task<IResult> ExecuteAsync(IInteractionContext context, IServiceProvider services, params string[] additionalArgs)
Parameters
Type | Name | Description |
---|---|---|
IInteractionContext | context | Context that will be injected to the InteractionModuleBase<T>. |
IServiceProvider | services | Services that will be used while initializing the InteractionModuleBase<T>. |
String[] | additionalArgs | Provide additional string parameters to the method along with the auto generated parameters. |
Returns
Type | Description |
---|---|
Task<IResult> | A task representing the asynchronous command execution process. |
GetLogString(IInteractionContext)
Declaration
protected override string GetLogString(IInteractionContext context)
Parameters
Type | Name | Description |
---|---|---|
IInteractionContext | context |
Returns
Type | Description |
---|---|
String |
Overrides
InvokeModuleEvent(IInteractionContext, IResult)
Declaration
protected override Task InvokeModuleEvent(IInteractionContext context, IResult result)
Parameters
Type | Name | Description |
---|---|---|
IInteractionContext | context | |
IResult | result |
Returns
Type | Description |
---|---|
Task |