Interface Reply

All Known Implementing Classes:
CommandEvent, ComponentEvent, ComponentReply, ConfigurableReply, MessageReply, ModalEvent, ModalReplyableEvent, ReplyableEvent

public sealed interface Reply permits MessageReply, ReplyableEvent<T>

Common interface for classes that support simple message replies to GenericInteractionCreateEvent.

This interface ensures that ReplyableEvent and MessageReply, which is internally used by ReplyableEvent, always share the same reply methods.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default Message
    reply(@NotNull EmbedDTO embedDTO)
    Acknowledgement of this event with a text message.
    reply(@NotNull String message)
    Acknowledgement of this event with a text message.
    default Message
    reply(@NotNull String format, @NotNull Object... args)
    Acknowledgement of this event with a text message.
    reply(@NotNull EmbedBuilder builder)
    Acknowledgement of this event with a text message.
    reply(@NotNull MessageCreateData message)
    Acknowledgement of this event with a text message.
  • Method Details

    • reply

      Message reply(@NotNull @NotNull String message)
      Acknowledgement of this event with a text message.
      Parameters:
      message - the message to send
      Returns:
      the Message that got created
      Implementation Requirements:

      Internally this method must call RestAction.complete(), thus the Message object can get returned directly.

      This might throw RuntimeExceptions if JDA fails to send the message.

    • reply

      default Message reply(@NotNull @NotNull String format, @NotNull @NotNull Object... args)
      Acknowledgement of this event with a text message.
      Parameters:
      format - the message to send
      args - Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
      Returns:
      the Message that got created
      Throws:
      IllegalFormatException - If a format string contains an illegal syntax, a format specifier that is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions.
    • reply

      Message reply(@NotNull @NotNull MessageCreateData message)
      Acknowledgement of this event with a text message.
      Parameters:
      message - the MessageCreateData to send
      Returns:
      the Message that got created
      Implementation Requirements:

      Internally this method must call RestAction.complete(), thus the Message object can get returned directly.

      This might throw RuntimeExceptions if JDA fails to send the message.

    • reply

      Message reply(@NotNull @NotNull EmbedBuilder builder)
      Acknowledgement of this event with a text message.
      Parameters:
      builder - the EmbedBuilder to send
      Returns:
      the Message that got created
      Implementation Requirements:

      Internally this method must call RestAction.complete(), thus the Message object can get returned directly.

      This might throw RuntimeExceptions if JDA fails to send the message.

    • reply

      default Message reply(@NotNull @NotNull EmbedDTO embedDTO)
      Acknowledgement of this event with a text message.
      Parameters:
      embedDTO - the EmbedDTO to send
      Returns:
      the Message that got created
      Implementation Requirements:

      Internally this method must call RestAction.complete(), thus the Message object can get returned directly.

      This might throw RuntimeExceptions if JDA fails to send the message.