using System; using System.Threading.Tasks; namespace Discord.Commands { /// /// Requires the parameter to pass the specified precondition before execution can begin. /// /// [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = true)] public abstract class ParameterPreconditionAttribute : Attribute { /// /// Checks whether the condition is met before execution of the command. /// /// The context of the command. /// The parameter of the command being checked against. /// The raw value of the parameter. /// The service collection used for dependency injection. public abstract Task CheckPermissionsAsync(ICommandContext context, ParameterInfo parameter, object value, IServiceProvider services); } }