AbstractCheck class Null safety

Represents a check on a command.

A check is a function that is executed when a command is about to be invoked. A check can either fail or succeed; if any of a command's checks fail then the execution of that command is cancelled.

You might also be interested in:

Implementers

Constructors

AbstractCheck(String name)
Create a new AbstractCheck.

Properties

allowsDm FutureOr<bool>
Whether this check will allow commands to be executed in DM channels.
read-only
hashCode int
The hash code for this object.
read-only, inherited
name String
The name of this check.
final
permissions Future<Iterable<CommandPermissionBuilderAbstract>>
The set of Discord Slash Command Permissions this check represents.
@Deprecated('Use allowsDm and requiredPermissions instead'), final
postCallHooks Iterable<void Function(IContext)>
An iterable of callbacks executed after a command is executed.
read-only
preCallHooks Iterable<void Function(IContext)>
An iterable of callbacks executed before a command is executed but after all the checks for that command have succeeded.
read-only
requiredPermissions FutureOr<int?>
The permissions required from members to pass this check.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

check(IContext context) FutureOr<bool>
Validate context against this check.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited