Class SendableReply

java.lang.Object
io.github.kaktushose.jdac.dispatching.reply.MessageReply
io.github.kaktushose.jdac.dispatching.reply.SendableReply

public final class SendableReply extends MessageReply
Subtype of MessageReply that allows replying without message content (reply()).
  • Constructor Details

    • SendableReply

      public SendableReply(MessageReply reply)
      Constructs a new SendableReply.
      Parameters:
      reply - the underlying MessageReply
  • Method Details

    • reply

      public Message reply()
      Sends the reply to Discord and blocks the current thread until the message was sent.
      Returns:
      the Message that got created
      Implementation Note:

      This method can handle both message replies and message edits. it will check if the interaction got acknowledged and will acknowledge it if necessary before sending or editing a message. After that, WebhookClient.sendMessage(MessageCreateData) or respectively InteractionHook.editOriginal(MessageEditData) will be called.

      If keepComponents is true, queries the original message first and adds its components to the reply before sending it.