Class InteractionDefinition.ReplyConfig.Builder

java.lang.Object
io.github.kaktushose.jdac.definitions.interactions.InteractionDefinition.ReplyConfig.Builder
Enclosing class:
InteractionDefinition.ReplyConfig

public static class InteractionDefinition.ReplyConfig.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
      Constructs a new Builder.
  • Method Details

    • ephemeral

      public InteractionDefinition.ReplyConfig.Builder ephemeral(boolean ephemeral)

      Whether 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
    • keepComponents

      public InteractionDefinition.ReplyConfig.Builder keepComponents(boolean keepComponents)

      Whether to keep the original components when editing a message. Default value is true.

      More formally, if editing a message and keepComponents is true, the original message will first be queried and its components get added to the reply before it is sent.

    • keepSelections

      public InteractionDefinition.ReplyConfig.Builder keepSelections(boolean keepSelections)
      Whether to keep the selections of a string select menu when sending edits. This setting only has an effect with InteractionDefinition.ReplyConfig.keepComponents() true.
    • editReply

      public InteractionDefinition.ReplyConfig.Builder editReply(boolean editReply)

      Whether 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.

    • silent

      public InteractionDefinition.ReplyConfig.Builder silent(boolean silent)
      Whether to suppress notifications of a message. Defaults to false.
      See Also:
      • MessageCreateRequest.setSuppressedNotifications(boolean)
    • allowedMentions

      public InteractionDefinition.ReplyConfig.Builder allowedMentions(Collection<net.dv8tion.jda.api.entities.Message.MentionType> allowedMentions)
      Sets the Message.MentionTypes that should be parsed. By default, all Message.MentionTypes are allowed.
      See Also:
      • MessageRequest.setAllowedMentions(Collection)
      Implementation Note:
      This will always override the old value.