Search Results for

    Show / Hide Table of Contents

    Class ModalCommandInfo

    Represents the info class of an attribute based method for handling Modal Interaction events.

    Inheritance
    Object
    CommandInfo<ModalCommandParameterInfo>
    ModalCommandInfo
    Implements
    ICommandInfo
    Inherited Members
    CommandInfo<ModalCommandParameterInfo>.Module
    CommandInfo<ModalCommandParameterInfo>.CommandService
    CommandInfo<ModalCommandParameterInfo>.Name
    CommandInfo<ModalCommandParameterInfo>.MethodName
    CommandInfo<ModalCommandParameterInfo>.IgnoreGroupNames
    CommandInfo<ModalCommandParameterInfo>.IsTopLevelCommand
    CommandInfo<ModalCommandParameterInfo>.RunMode
    CommandInfo<ModalCommandParameterInfo>.Attributes
    CommandInfo<ModalCommandParameterInfo>.Preconditions
    CommandInfo<ModalCommandParameterInfo>.CheckPreconditionsAsync(IInteractionContext, IServiceProvider)
    CommandInfo<ModalCommandParameterInfo>.RunAsync(IInteractionContext, Object[], IServiceProvider)
    CommandInfo<ModalCommandParameterInfo>.InvokeEventAndReturn(IInteractionContext, IResult)
    CommandInfo<ModalCommandParameterInfo>.ICommandInfo.Parameters
    CommandInfo<ModalCommandParameterInfo>.ToString()
    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public class ModalCommandInfo : CommandInfo<ModalCommandParameterInfo>, ICommandInfo

    Properties

    | Improve this Doc View Source

    Modal

    Gets the ModalInfo class for this commands IModal parameter.

    Declaration
    public ModalInfo Modal { get; }
    Property Value
    Type Description
    ModalInfo
    | Improve this Doc View Source

    Parameters

    Gets a collection of the parameters of this command.

    Declaration
    public override IReadOnlyCollection<ModalCommandParameterInfo> Parameters { get; }
    Property Value
    Type Description
    IReadOnlyCollection<ModalCommandParameterInfo>
    Overrides
    Discord.Interactions.CommandInfo<Discord.Interactions.ModalCommandParameterInfo>.Parameters
    | Improve this Doc View Source

    SupportsWildCards

    Gets wheter this command supports wild card patterns.

    Declaration
    public override bool SupportsWildCards { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    Discord.Interactions.CommandInfo<Discord.Interactions.ModalCommandParameterInfo>.SupportsWildCards

    Methods

    | Improve this Doc View Source

    ExecuteAsync(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
    Discord.Interactions.CommandInfo<Discord.Interactions.ModalCommandParameterInfo>.ExecuteAsync(Discord.IInteractionContext, IServiceProvider)
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    GetLogString(IInteractionContext)

    Declaration
    protected override string GetLogString(IInteractionContext context)
    Parameters
    Type Name Description
    IInteractionContext context
    Returns
    Type Description
    String
    Overrides
    Discord.Interactions.CommandInfo<Discord.Interactions.ModalCommandParameterInfo>.GetLogString(Discord.IInteractionContext)
    | Improve this Doc View Source

    InvokeModuleEvent(IInteractionContext, IResult)

    Declaration
    protected override Task InvokeModuleEvent(IInteractionContext context, IResult result)
    Parameters
    Type Name Description
    IInteractionContext context
    IResult result
    Returns
    Type Description
    Task
    Overrides
    Discord.Interactions.CommandInfo<Discord.Interactions.ModalCommandParameterInfo>.InvokeModuleEvent(Discord.IInteractionContext, Discord.Interactions.IResult)

    Implements

    ICommandInfo

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.7.2