ResponseLevel class
Information about how a command should respond when using InteractiveContext.respond.
This class mainly determines the properties of the message that is sent in response to a command, such as whether it should be ephemeral or whether the user should be mentioned.
You can create an instance of this class yourself, or use one of the provided levels: private, hint, or public.
Constructors
- ResponseLevel({required bool hideInteraction, required bool isDm, required bool? mention, required bool preserveComponentMessages})
-
Construct a new response level.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideInteraction → bool
-
Whether interaction responses sent at this level should be marked as ephemeral.
final
- isDm → bool
-
Whether message responses sent at this level should be sent via DM to the user.
final
- mention → bool?
-
Whether message responses sent at this level should mention the user when replying to them.
final
- preserveComponentMessages → bool
-
Whether to edit the message a component belongs to or create a new message when responding to
a component interaction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? hideInteraction, bool? isDm, bool? mention, bool? preserveComponentMessages}) → ResponseLevel - Create a new ResponseLevel identical to this one with one or more fields changed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- hint → const ResponseLevel
- A response that follows how the user invoked the command.
- private → const ResponseLevel
- A private response.
- public → const ResponseLevel
- A public responses.