Class CheckBaseAttribute
Represents a base for all command pre-execution check attributes.
Inheritance
System.Object
CheckBaseAttribute
Namespace: DSharpPlus.CommandsNext.Attributes
Assembly: cs.temp.dll.dll
Syntax
public abstract class CheckBaseAttribute : Attribute
Methods
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. |