Check.deny constructor Null safety

Check.deny(
  1. AbstractCheck check,
  2. [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.

Passing custom checks directly implementing AbstractCheck should be done with care, as pre- and post- call hooks will be called if the internal check fails, and uncalled if the internal check succeeds.

Implementation

factory Check.deny(AbstractCheck check, [String? name]) => _DenyCheck(check, name);