InteractionChatCommandCheck class Null safety
A check that succeeds if the command being invoked is a ChatCommand and that the context was created from an interaction.
This is generally used in combination with Check.any and/or Check.deny to only apply another check to ChatCommands invoked from interactions, while still registering this check to CommandsPlugin.
See Check.any for an example of how to implement this.
You might also be interested in:
- ChatCommandCheck, for checking that the command being exected is a ChatCommand;
- InteractionCommandCheck, for checking that a command was invoked from an interaction.
- Inheritance
-
- Object
- AbstractCheck
- Check
- InteractionChatCommandCheck
Constructors
- InteractionChatCommandCheck([String? name])
- Create a new InteractionChatCommandCheck.
Properties
-
allowsDm
→ FutureOr<
bool> -
Whether this check will allow commands to be executed in DM channels.
finalinherited
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- name → String
-
The name of this check.
finalinherited
-
permissions
→ Future<
Iterable< CommandPermissionBuilderAbstract> > -
The set of Discord Slash Command Permissions
this check represents.
finalinherited
-
postCallHooks
→ Iterable<
void Function(IContext context)> -
An iterable of callbacks executed after a command is executed.
read-onlyinherited
-
preCallHooks
→ Iterable<
void Function(IContext context)> -
An iterable of callbacks executed before a command is executed but after all the checks for
that command have succeeded.
read-onlyinherited
-
requiredPermissions
→ FutureOr<
int?> -
The permissions required from members to pass this check.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
check(
IContext context) → FutureOr< bool> -
Validate
context
against this check.inherited -
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