Class RequireMinimumReputationAttribute
Command requirement that checks if user has at least specified reputation level and percentage.
Inheritance
System.Object
System.Attribute
RequireMinimumReputationAttribute
Implements
Inherited Members
Namespace: TehGM.Wolfringo.Commands
Assembly: Wolfringo.Commands.dll
Syntax
public class RequireMinimumReputationAttribute : CommandRequirementAttribute, ICommandRequirement
Remarks
Default ErrorMessage for this requirement is "(n) Your reputation is too low to execute this command.".
Constructors
| Improve this Doc View SourceRequireMinimumReputationAttribute(Double)
Creates a new instance of command reputation requirement.
Declaration
public RequireMinimumReputationAttribute(double minimumReputation)
Parameters
Type | Name | Description |
---|---|---|
System.Double | minimumReputation | Minimum reputation the user needs to have. |
Properties
| Improve this Doc View SourceMinimumReputation
Minimum reputation the user needs to have.
Declaration
public double MinimumReputation { get; }
Property Value
Type | Description |
---|---|
System.Double |
See Also
Methods
| Improve this Doc View SourceCheckAsync(ICommandContext, IServiceProvider, CancellationToken)
Checks requirement.
Declaration
public override async Task<ICommandResult> CheckAsync(ICommandContext context, IServiceProvider services, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
ICommandContext | context | Command to check the requirement for. |
System.IServiceProvider | services | Services that can be used during requirement checks. |
System.Threading.CancellationToken | cancellationToken | Token for cancelling the task. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ICommandResult> | True if requirement was fullfilled; otherwise false. |