Class RequireMaximumReputationAttribute
Command requirement that checks if user has no more reputation level and percentage than specified.
Implements
Inherited Members
Namespace: TehGM.Wolfringo.Commands
Assembly: Wolfringo.Commands.dll
Syntax
public class RequireMaximumReputationAttribute : CommandRequirementAttribute, ICommandRequirement
Remarks
Default ErrorMessage for this requirement is "(n) Your reputation is too high to execute this command.".
Constructors
| Improve this Doc View SourceRequireMaximumReputationAttribute(Double)
Creates a new instance of command reputation requirement.
Declaration
public RequireMaximumReputationAttribute(double maximumReputation)
Parameters
Type | Name | Description |
---|---|---|
Double | maximumReputation | Maximum reputation the user needs to have. |
Properties
| Improve this Doc View SourceMaximumReputation
Maximum reputation the user needs to have.
Declaration
public double MaximumReputation { get; }
Property Value
Type | Description |
---|---|
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. |
IServiceProvider | services | Services that can be used during requirement checks. |
CancellationToken | cancellationToken | Token for cancelling the task. |
Returns
Type | Description |
---|---|
Task<ICommandResult> | True if requirement was fullfilled; otherwise false. |