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