Table of Contents

Method ExecuteCheckAsync

Namespace
DSharpPlus.Commands.ContextChecks.ParameterChecks
Assembly
DSharpPlus.Commands.dll

ExecuteCheckAsync(RequireHigherBotHierarchyAttribute, ParameterCheckInfo, CommandContext)

Executes the check given the attribute and parameter info.

public ValueTask<string?> ExecuteCheckAsync(RequireHigherBotHierarchyAttribute attribute, ParameterCheckInfo info, CommandContext context)

Parameters

attribute RequireHigherBotHierarchyAttribute

The attribute this parameter was decorated with.

info ParameterCheckInfo

The relevant parameters metadata representation and value.

context CommandContext

The context the containing 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.

ExecuteCheckAsync(RequireHigherUserHierarchyAttribute, ParameterCheckInfo, CommandContext)

Executes the check given the attribute and parameter info.

public ValueTask<string?> ExecuteCheckAsync(RequireHigherUserHierarchyAttribute attribute, ParameterCheckInfo info, CommandContext context)

Parameters

attribute RequireHigherUserHierarchyAttribute

The attribute this parameter was decorated with.

info ParameterCheckInfo

The relevant parameters metadata representation and value.

context CommandContext

The context the containing 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.