Class ReplyEditMono

java.lang.Object
reactor.core.publisher.Mono<Message>
dev.sympho.bot_utils.event.reply.ReplyEditMono
All Implemented Interfaces:
org.reactivestreams.Publisher<Message>, CorePublisher<Message>

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ReplyEditMono extends Mono<Message>
Specification for editing an event reply that can be directly subscribed to to execute.
Since:
1.0
Version:
1.0
  • Method Details

    • content

      public discord4j.discordjson.possible.Possible<Optional<String>> content()
      The new reply message content.
      Returns:
      The value.
    • embeds

      public discord4j.discordjson.possible.Possible<Optional<List<EmbedCreateSpec>>> embeds()
      The new reply embeds.
      Returns:
      The value.
    • files

      public com.google.common.collect.ImmutableList<MessageCreateFields.File> files()
      The new attached files.
      Returns:
      The value.
    • fileSpoilers

      public com.google.common.collect.ImmutableList<MessageCreateFields.FileSpoiler> fileSpoilers()
      The new spoiler-tagged attached files.
      Returns:
      The value.
    • allowedMentions

      public discord4j.discordjson.possible.Possible<Optional<discord4j.rest.util.AllowedMentions>> allowedMentions()
      The new allowed mentions.
      Returns:
      The value.
    • components

      public discord4j.discordjson.possible.Possible<Optional<List<LayoutComponent>>> components()
      The new message components.
      Returns:
      The value.
    • attachments

      public discord4j.discordjson.possible.Possible<Optional<List<Attachment>>> attachments()
      The new attachments.
      Returns:
      The value.
    • reply

      public Reply reply()
      The backing reply.
      Returns:
      The reply.
    • withContent

      public ReplyEditMono withContent(discord4j.discordjson.possible.Possible<Optional<String>> value)
    • withContent

      @Deprecated public ReplyEditMono withContent(@Nullable String value)
      Deprecated.
    • withContentOrNull

      public ReplyEditMono withContentOrNull(@Nullable String value)
    • withEmbeds

      public ReplyEditMono withEmbeds(discord4j.discordjson.possible.Possible<? extends Optional<? extends List<? extends EmbedCreateSpec>>> possible)
    • withEmbeds

      Deprecated.
    • withEmbedsOrNull

      public ReplyEditMono withEmbedsOrNull(@Nullable Iterable<? extends EmbedCreateSpec> elements)
    • withEmbeds

      @SafeVarargs public final ReplyEditMono withEmbeds(EmbedCreateSpec... elements)
    • withFiles

      public final ReplyEditMono withFiles(MessageCreateFields.File... elements)
      Copy the current immutable object with elements that replace the content of files.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFiles

      public final ReplyEditMono withFiles(Iterable<? extends MessageCreateFields.File> elements)
      Copy the current immutable object with elements that replace the content of files. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of files elements to set
      Returns:
      A modified copy of this object
    • withFileSpoilers

      public final ReplyEditMono withFileSpoilers(MessageCreateFields.FileSpoiler... elements)
      Copy the current immutable object with elements that replace the content of fileSpoilers.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFileSpoilers

      public final ReplyEditMono withFileSpoilers(Iterable<? extends MessageCreateFields.FileSpoiler> elements)
      Copy the current immutable object with elements that replace the content of fileSpoilers. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of fileSpoilers elements to set
      Returns:
      A modified copy of this object
    • withAllowedMentions

      public ReplyEditMono withAllowedMentions(discord4j.discordjson.possible.Possible<Optional<discord4j.rest.util.AllowedMentions>> value)
    • withAllowedMentions

      @Deprecated public ReplyEditMono withAllowedMentions(@Nullable discord4j.rest.util.AllowedMentions value)
      Deprecated.
    • withAllowedMentionsOrNull

      public ReplyEditMono withAllowedMentionsOrNull(@Nullable discord4j.rest.util.AllowedMentions value)
    • withComponents

      public ReplyEditMono withComponents(discord4j.discordjson.possible.Possible<? extends Optional<? extends List<? extends LayoutComponent>>> possible)
    • withComponents

      @Deprecated public ReplyEditMono withComponents(@Nullable Iterable<LayoutComponent> elements)
      Deprecated.
    • withComponentsOrNull

      public ReplyEditMono withComponentsOrNull(@Nullable Iterable<? extends LayoutComponent> elements)
    • withComponents

      @SafeVarargs public final ReplyEditMono withComponents(LayoutComponent... elements)
    • withAttachments

      public ReplyEditMono withAttachments(discord4j.discordjson.possible.Possible<? extends Optional<? extends List<? extends Attachment>>> possible)
    • withAttachments

      @Deprecated public ReplyEditMono withAttachments(@Nullable Iterable<Attachment> elements)
      Deprecated.
    • withAttachmentsOrNull

      public ReplyEditMono withAttachmentsOrNull(@Nullable Iterable<? extends Attachment> elements)
    • withAttachments

      @SafeVarargs public final ReplyEditMono withAttachments(Attachment... elements)
    • withReply

      public final ReplyEditMono withReply(Reply value)
      Copy the current immutable object by setting a value for the reply attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for reply
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ReplyEditMono that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: content, embeds, files, fileSpoilers, allowedMentions, components, attachments, reply.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ReplyEditMono with attribute values.
      Returns:
      A string representation of the value
    • of

      public static ReplyEditMono of(Reply reply)
      Construct a new immutable ReplyEditMono instance.
      Parameters:
      reply - The value for the reply attribute
      Returns:
      An immutable ReplyEditMono instance
    • isContentPresent

      public boolean isContentPresent()
    • contentOrElse

      public String contentOrElse(String defaultValue)
    • isEmbedsPresent

      public boolean isEmbedsPresent()
    • embedsOrElse

      public List<EmbedCreateSpec> embedsOrElse(List<EmbedCreateSpec> defaultValue)
    • isAllowedMentionsPresent

      public boolean isAllowedMentionsPresent()
    • allowedMentionsOrElse

      public discord4j.rest.util.AllowedMentions allowedMentionsOrElse(discord4j.rest.util.AllowedMentions defaultValue)
    • isComponentsPresent

      public boolean isComponentsPresent()
    • componentsOrElse

      public List<LayoutComponent> componentsOrElse(List<LayoutComponent> defaultValue)
    • isAttachmentsPresent

      public boolean isAttachmentsPresent()
    • attachmentsOrElse

      public List<Attachment> attachmentsOrElse(List<Attachment> defaultValue)
    • subscribe

      public void subscribe(CoreSubscriber<? super Message> actual)
      Specified by:
      subscribe in interface CorePublisher<Message>
      Specified by:
      subscribe in class Mono<Message>
    • toMessage

      @SideEffectFree default MessageEditSpec toMessage()
      Converts this spec into a message edit spec.
      Returns:
      The converted spec.
    • toInteraction

      @SideEffectFree default InteractionReplyEditSpec toInteraction()
      Converts this spec into an interaction reply edit spec.
      Returns:
      The converted spec.