Search Results for

    Show / Hide Table of Contents

    Class CheckBaseAttribute

    Represents a base for all command pre-execution check attributes.

    Inheritance
    System.Object
    System.Attribute
    CheckBaseAttribute
    CooldownAttribute
    RequireBoostingAttribute
    RequireBotPermissionsAttribute
    RequireCertifiedModeratorAttribute
    RequireCommunityAttribute
    RequireDirectMessageAttribute
    RequireDisCatSharpDeveloperAttribute
    RequireGuildAttribute
    RequireGuildOwnerAttribute
    RequireMemberVerificationGateAttribute
    RequireNsfwAttribute
    RequireOwnerAttribute
    RequireOwnerOrIdAttribute
    RequirePermissionsAttribute
    RequirePrefixesAttribute
    RequireReferencedMessageAttribute
    RequireRolesAttribute
    RequireStaffAttribute
    RequireUserPermissionsAttribute
    RequireWelcomeScreenAttribute
    Namespace: DisCatSharp.CommandsNext.Attributes
    Assembly: DisCatSharp.CommandsNext.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
    public abstract class CheckBaseAttribute : Attribute

    Methods

    | Improve this Doc View Source

    ExecuteCheckAsync(CommandContext, Boolean)

    Asynchronously checks whether this command can be executed within given context.

    Declaration
    public abstract Task<bool> ExecuteCheckAsync(CommandContext ctx, bool help)
    Parameters
    Type Name Description
    CommandContext ctx

    Context to check execution ability for.

    System.Boolean help

    Whether this check is being executed from help or not. This can be used to probe whether command can be run without setting off certain fail conditions (such as cooldowns).

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    Whether the command can be executed in given context.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems