Table of Contents

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 TAttribute

The attribute this command was decorated with.

context CommandContext

The 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.