Class CommandParameterInfo
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
Represents the base parameter info class for InteractionService commands.
public class CommandParameterInfo : IParameterInfo
- Inheritance
-
CommandParameterInfo
- Implements
- Derived
- Inherited Members
Properties
Attributes
Gets a list of the attributes this parameter has.
public IReadOnlyCollection<Attribute> Attributes { get; }
Property Value
Command
Gets the command that this parameter belongs to.
public ICommandInfo Command { get; }
Property Value
DefaultValue
Gets the default value of this parameter if the parameter is optional.
public object DefaultValue { get; }
Property Value
IsParameterArray
Gets whether this parameter is marked with a params keyword.
public bool IsParameterArray { get; }
Property Value
IsRequired
Gets whether this parameter is required.
public bool IsRequired { get; }
Property Value
Name
Gets the name of this parameter.
public string Name { get; }
Property Value
ParameterType
Gets the type of this parameter.
public Type ParameterType { get; }
Property Value
Preconditions
Gets a list of the preconditions this parameter has.
public IReadOnlyCollection<ParameterPreconditionAttribute> Preconditions { get; }
Property Value
Methods
CheckPreconditionsAsync(IInteractionContext, object, IServiceProvider)
Check if an execution context meets the parameter precondition requirements.
public Task<PreconditionResult> CheckPreconditionsAsync(IInteractionContext context, object value, IServiceProvider services)
Parameters
context
IInteractionContextvalue
objectservices
IServiceProvider