Search Results for

    Show / Hide Table of Contents

    Interface IParameterInfo

    Represents a ICommandInfo parameter.

    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public interface IParameterInfo

    Properties

    | Improve this Doc View Source

    Attributes

    Gets a list of the attributes this parameter has.

    Declaration
    IReadOnlyCollection<Attribute> Attributes { get; }
    Property Value
    Type Description
    IReadOnlyCollection<Attribute>
    | Improve this Doc View Source

    Command

    Gets the command that this parameter belongs to.

    Declaration
    ICommandInfo Command { get; }
    Property Value
    Type Description
    ICommandInfo
    | Improve this Doc View Source

    DefaultValue

    Gets the default value of this parameter if the parameter is optional.

    Declaration
    object DefaultValue { get; }
    Property Value
    Type Description
    Object
    | Improve this Doc View Source

    IsParameterArray

    Gets whether this parameter is marked with a langword_csharp_params keyword.

    Declaration
    bool IsParameterArray { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsRequired

    Gets whether this parameter is required.

    Declaration
    bool IsRequired { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Name

    Gets the name of this parameter.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    ParameterType

    Gets the type of this parameter.

    Declaration
    Type ParameterType { get; }
    Property Value
    Type Description
    Type
    | Improve this Doc View Source

    Preconditions

    Gets a list of the preconditions this parameter has.

    Declaration
    IReadOnlyCollection<ParameterPreconditionAttribute> Preconditions { get; }
    Property Value
    Type Description
    IReadOnlyCollection<ParameterPreconditionAttribute>

    Methods

    | Improve this Doc View Source

    CheckPreconditionsAsync(IInteractionContext, Object, IServiceProvider)

    Check if an execution context meets the parameter precondition requirements.

    Declaration
    Task<PreconditionResult> CheckPreconditionsAsync(IInteractionContext context, object value, IServiceProvider services)
    Parameters
    Type Name Description
    IInteractionContext context
    Object value
    IServiceProvider services
    Returns
    Type Description
    Task<PreconditionResult>

    Theme

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