Class CommandReplyMono

java.lang.Object
reactor.core.publisher.Mono<Reply>
dev.sympho.modular_commands.api.command.reply.CommandReplyMono
All Implemented Interfaces:
org.reactivestreams.Publisher<Reply>, CorePublisher<Reply>

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class CommandReplyMono extends Mono<Reply>
Specification for creating a new command reply that can be directly subscribed to to execute.
Since:
1.0
Version:
1.0
  • Method Details

    • privately

      public discord4j.discordjson.possible.Possible<Boolean> privately()
      Whether to send the reply privately. If absent, the default for the command should be used.
      Returns:
      The value.
    • content

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

      public discord4j.discordjson.possible.Possible<Boolean> tts()
      Whether the reply should use TTS.
      Returns:
      The value.
    • embeds

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

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

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

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

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

      public ReplyManager manager()
      The backing reply manager.
      Returns:
      The manager.
    • withPrivately

      public CommandReplyMono withPrivately(discord4j.discordjson.possible.Possible<Boolean> value)
    • withPrivately

      public CommandReplyMono withPrivately(Boolean value)
    • withContent

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

      public CommandReplyMono withContent(String value)
    • withTts

      public CommandReplyMono withTts(discord4j.discordjson.possible.Possible<Boolean> value)
    • withTts

      public CommandReplyMono withTts(Boolean value)
    • withEmbeds

      public CommandReplyMono withEmbeds(discord4j.discordjson.possible.Possible<List<EmbedCreateSpec>> possible)
    • withEmbeds

      public CommandReplyMono withEmbeds(Iterable<EmbedCreateSpec> elements)
    • withEmbeds

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

      public final CommandReplyMono 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 CommandReplyMono 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 CommandReplyMono 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 CommandReplyMono 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 CommandReplyMono withAllowedMentions(discord4j.discordjson.possible.Possible<discord4j.rest.util.AllowedMentions> value)
    • withAllowedMentions

      public CommandReplyMono withAllowedMentions(discord4j.rest.util.AllowedMentions value)
    • withComponents

      public CommandReplyMono withComponents(discord4j.discordjson.possible.Possible<List<LayoutComponent>> possible)
    • withComponents

      public CommandReplyMono withComponents(Iterable<LayoutComponent> elements)
    • withComponents

      @SafeVarargs public final CommandReplyMono withComponents(LayoutComponent... elements)
    • withManager

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of CommandReplyMono 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: privately, content, tts, embeds, files, fileSpoilers, allowedMentions, components, manager.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static CommandReplyMono of(ReplyManager manager)
      Construct a new immutable CommandReplyMono instance.
      Parameters:
      manager - The value for the manager attribute
      Returns:
      An immutable CommandReplyMono instance
    • isPrivatelyPresent

      public boolean isPrivatelyPresent()
    • privatelyOrElse

      public Boolean privatelyOrElse(Boolean defaultValue)
    • isContentPresent

      public boolean isContentPresent()
    • contentOrElse

      public String contentOrElse(String defaultValue)
    • isTtsPresent

      public boolean isTtsPresent()
    • ttsOrElse

      public Boolean ttsOrElse(Boolean 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)
    • subscribe

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

      @SideEffectFree default MessageCreateSpec toMessage()
      Converts this spec into a message spec.
      Returns:
      The converted spec.
    • toInteractionReply

      @SideEffectFree default InteractionApplicationCommandCallbackSpec toInteractionReply(boolean defaultPrivate)
      Converts this spec into an interaction reply spec.
      Parameters:
      defaultPrivate - Whether the reply should be private (ephemeral) by default (if not specified).
      Returns:
      The converted spec.
    • toInteractionFollowup

      @SideEffectFree default InteractionFollowupCreateSpec toInteractionFollowup(boolean defaultPrivate)
      Converts this spec into an interaction followup spec.
      Parameters:
      defaultPrivate - Whether the reply should be private (ephemeral) by default (if not specified).
      Returns:
      The converted spec.