Table of Contents

Class ParameterInfo

Namespace
Discord.Commands
Assembly
Discord.Net.Commands.dll

Provides the information of a parameter.

public class ParameterInfo
Inheritance
ParameterInfo
Inherited Members

Properties

Attributes

Gets a read-only list of attributes that apply to this parameter.

public IReadOnlyList<Attribute> Attributes { get; }

Property Value

IReadOnlyList<Attribute>

Command

Gets the command that associates with this parameter.

public CommandInfo Command { get; }

Property Value

CommandInfo

DefaultValue

Gets the default value for this optional parameter if applicable.

public object DefaultValue { get; }

Property Value

object

IsMultiple

public bool IsMultiple { get; }

Property Value

bool

IsOptional

Gets a value that indicates whether this parameter is optional or not.

public bool IsOptional { get; }

Property Value

bool

IsRemainder

Gets a value that indicates whether this parameter is a remainder parameter or not.

public bool IsRemainder { get; }

Property Value

bool

Name

Gets the name of this parameter.

public string Name { get; }

Property Value

string

Preconditions

Gets a read-only list of precondition that apply to this parameter.

public IReadOnlyList<ParameterPreconditionAttribute> Preconditions { get; }

Property Value

IReadOnlyList<ParameterPreconditionAttribute>

Summary

Gets the summary of this parameter.

public string Summary { get; }

Property Value

string

Type

Gets the type of the parameter.

public Type Type { get; }

Property Value

Type

Methods

CheckPreconditionsAsync(ICommandContext, object, IServiceProvider)

public Task<PreconditionResult> CheckPreconditionsAsync(ICommandContext context, object arg, IServiceProvider services = null)

Parameters

context ICommandContext
arg object
services IServiceProvider

Returns

Task<PreconditionResult>

ParseAsync(ICommandContext, string, IServiceProvider)

public Task<TypeReaderResult> ParseAsync(ICommandContext context, string input, IServiceProvider services = null)

Parameters

context ICommandContext
input string
services IServiceProvider

Returns

Task<TypeReaderResult>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.