Check constructor
Create a new Check.
_check
should be a callback that returns true
or false
to indicate check success or
failure respectively. _check
should not throw to indicate failure.
name
can optionally be provided and will be used in error messages to identify this check.
Implementation
Check(
this._check, {
String name = 'Check',
this.allowsDm = true,
this.requiredPermissions,
}) : super(name);