Method ExecuteCheckAsync
- Namespace
- DSharpPlus.Commands.ContextChecks
- Assembly
- DSharpPlus.Commands.dll
ExecuteCheckAsync(TAttribute, CommandContext)
Executes the check given the attribute.
ValueTask<string?> ExecuteCheckAsync(TAttribute attribute, CommandContext context)
Parameters
attribute
TAttributeThe attribute this command was decorated with.
context
CommandContextThe context this command is executed in.
Returns
- ValueTask<string>
A string containing the error message, or
null
if successful.
Remarks
It is allowed for a check to access other metadata from the context.