Skip to main content

Class ParameterPreconditionAttribute

Requires the parameter to pass the specified precondition before execution can begin.

Assembly: Revolt.Net.Commands.dll​
View Source​
Declaration
public abstract class ParameterPreconditionAttribute : Attribute

Methods​

CheckPermissionsAsync(ICommandContext, ParameterInfo, Object, IServiceProvider)​

Checks whether the condition is met before execution of the command.

View Source​
Declaration
public abstract Task<PreconditionResult> CheckPermissionsAsync(ICommandContext context, ParameterInfo parameter, object value, IServiceProvider services)
Returns​

Task<Revolt.Commands.Results.PreconditionResult>

Parameters​
TypeNameDescription
Revolt.Commands.ICommandContextcontextThe context of the command.
Revolt.Commands.Info.ParameterInfoparameterThe parameter of the command being checked against.
System.ObjectvalueThe raw value of the parameter.
IServiceProviderservicesThe service collection used for dependency injection.