Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class RequireMaximumReputationAttribute

    Command requirement that checks if user has no more reputation level and percentage than specified.

    Inheritance
    System.Object
    System.Attribute
    CommandRequirementAttribute
    RequireMaximumReputationAttribute
    Implements
    ICommandRequirement
    Inherited Members
    CommandRequirementAttribute.ErrorMessage
    CommandRequirementAttribute.AbortOnFail
    CommandRequirementAttribute.SendMessageWhenSkipping
    CommandRequirementAttribute.SuccessResult
    CommandRequirementAttribute.FailureResult
    CommandRequirementAttribute.ResultFromBoolean(Boolean)
    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 Source

    RequireMaximumReputationAttribute(Double)

    Creates a new instance of command reputation requirement.

    Declaration
    public RequireMaximumReputationAttribute(double maximumReputation)
    Parameters
    Type Name Description
    System.Double maximumReputation

    Maximum reputation the user needs to have.

    Properties

    | Improve this Doc View Source

    MaximumReputation

    Maximum reputation the user needs to have.

    Declaration
    public double MaximumReputation { get; }
    Property Value
    Type Description
    System.Double
    See Also
    Reputation

    Methods

    | Improve this Doc View Source

    CheckAsync(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.

    Overrides
    CommandRequirementAttribute.CheckAsync(ICommandContext, IServiceProvider, CancellationToken)

    Implements

    ICommandRequirement