Class CheckBaseAttribute
Represents a base for all command pre-execution check attributes.
Inheritance
System.Object
System.Attribute
CheckBaseAttribute
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 SourceExecuteCheckAsync(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. |