Annotation Interface ReplyConfig
Used to configure the reply behaviour of interaction replies.
Interaction methods annotated with ReplyConfig
will use the configured values of this annotation when sending a reply.
Interaction classes annotated with ReplyConfig
will apply the configured values of this annotation to
every method, if and only if no annotation is present at method level. If the ReplyConfig
annotation is neither
present at the class level nor the method level, the global ReplyConfig
will be used instead.
These values are always overridden by ConfigurableReply.ephemeral(boolean)
,
ConfigurableReply.keepComponents(boolean)
or respectively ConfigurableReply.editReply(boolean)
.
In other words the hierarchy is as following:
ConfigurableReply
ReplyConfig
method annotationReplyConfig
class annotation- global
ReplyConfig
provided inJDACommandsBuilder
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Whether to edit the original message or to send a new one.boolean
Whether to send ephemeral replies.boolean
Whether to keep the original components when editing a message.
-
Element Details
-
ephemeral
boolean ephemeralWhether to send ephemeral replies. Default value is
false
.Ephemeral messages have some limitations and will be removed once the user restarts their client. Limitations:
- Cannot contain any files/ attachments
- Cannot be reacted to
- Cannot be retrieved
- Returns:
true
if to send ephemeral replies
- Default:
false
-
keepComponents
boolean keepComponentsWhether to keep the original components when editing a message. Default value is
true
.More formally, if editing a message and
keepComponents
istrue
, the original message will first be queried and its components get added to the reply before it is sent.- Returns:
true
if to keep the original components
- Default:
true
-
editReply
boolean editReplyWhether to edit the original message or to send a new one. Default value is
true
.The original message is the message, from which this event (interaction) originates. For example if this event is a ButtonEvent, the original message will be the message to which the pressed button is attached to.
Subsequent replies to the same slash command event or the button event cannot be edited.
- Returns:
true
if to edit the original method
- Default:
true
-