Check class Null safety

Represents a simple stateless check.

Inheritance
Implementers

Constructors

Check(FutureOr<bool> _check(Context), [String name = 'Check'])
Creates a new Check. [...]
Check.all(Iterable<AbstractCheck> checks, [String? name])
Creates a new Check that succeeds if all of the supplied checks succeeds, and fails otherwise. [...]
factory
Check.any(Iterable<AbstractCheck> checks, [String? name])
Creates a new Check that succeeds if at least one of the supplied checks succeed.
factory
Check.deny(AbstractCheck check, [String? name])
Creates a new Check that inverts the result of the supplied check. Use this to allow use of commands by default but deny it for certain users. [...]
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
name String
The name of the check
final, inherited
permissions Future<Iterable<CommandPermissionBuilderAbstract>>
An Iterable of permission overrides that will be used on slash commands using this check.
read-only, override
postCallHooks Iterable<void Function(Context context)>
An Iterable of post-call hooks that will be called when a command this check is on emits to Command.onPostCall. [...]
read-only, override
preCallHooks Iterable<void Function(Context context)>
An Iterable of pre-call hooks that will be called when a command this check is on emits to Command.onPreCall. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

check(Context context) FutureOr<bool>
The method called to validate this check. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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