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:
ConfigurableReplyReplyConfigmethod annotationReplyConfigclass annotation- global
ReplyConfigprovided inJDACBuilder
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to edit the original message or to send a new one.booleanWhether to send ephemeral replies.booleanWhether to keep the original components when editing a message.booleanWhether to keep the selections of a string select menu when sending edits.
-
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:
trueif 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
keepComponentsistrue, the original message will first be queried and its components get added to the reply before it is sent.- Returns:
trueif 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:
trueif to edit the original method
- Default:
true
-
keepSelections
boolean keepSelectionsWhether to keep the selections of a string select menu when sending edits. This setting only has an effect withkeepComponents()true.- Default:
true
-