Class ParameterInfo
Provides the information of a parameter.
Assembly: Discord.Net.Commands.dll​
View Source​
Declaration
public class ParameterInfo
Properties​
Command​
Gets the command that associates with this parameter.
View Source​
Declaration
public CommandInfo Command { get; }
Name​
Gets the name of this parameter.
View Source​
Declaration
public string Name { get; }
Summary​
Gets the summary of this parameter.
View Source​
Declaration
public string Summary { get; }
IsOptional​
Gets a value that indicates whether this parameter is optional or not.
View Source​
Declaration
public bool IsOptional { get; }
IsRemainder​
Gets a value that indicates whether this parameter is a remainder parameter or not.
View Source​
Declaration
public bool IsRemainder { get; }
IsMultiple​
View Source​
Declaration
public bool IsMultiple { get; }
Type​
Gets the type of the parameter.
View Source​
Declaration
public Type Type { get; }
DefaultValue​
Gets the default value for this optional parameter if applicable.
View Source​
Declaration
public object DefaultValue { get; }
Preconditions​
Gets a read-only list of precondition that apply to this parameter.
View Source​
Declaration
public IReadOnlyList<ParameterPreconditionAttribute> Preconditions { get; }
Attributes​
Gets a read-only list of attributes that apply to this parameter.
View Source​
Declaration
public IReadOnlyList<Attribute> Attributes { get; }
Methods​
CheckPreconditionsAsync(ICommandContext, Object, IServiceProvider)​
View Source​
Declaration
public async Task<PreconditionResult> CheckPreconditionsAsync(ICommandContext context, object arg, IServiceProvider services = null)
Returns​
System.Threading.Tasks.Task<Discord.Commands.PreconditionResult>
Parameters​
Type | Name |
---|---|
Discord.Commands.ICommandContext | context |
System.Object | arg |
System.IServiceProvider | services |
ParseAsync(ICommandContext, String, IServiceProvider)​
View Source​
Declaration
public async Task<TypeReaderResult> ParseAsync(ICommandContext context, string input, IServiceProvider services = null)
Returns​
System.Threading.Tasks.Task<Discord.Commands.TypeReaderResult>
Parameters​
Type | Name |
---|---|
Discord.Commands.ICommandContext | context |
System.String | input |
System.IServiceProvider | services |
ToString()​
View Source​
Declaration
public override string ToString()
Returns​
System.String