Class 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 Summary
Modifier and TypeMethodDescriptiondiscord4j.discordjson.possible.Possible<discord4j.rest.util.AllowedMentions>
The allowed mentions.discord4j.rest.util.AllowedMentions
allowedMentionsOrElse
(discord4j.rest.util.AllowedMentions defaultValue) discord4j.discordjson.possible.Possible<List<LayoutComponent>>
The message components.componentsOrElse
(List<LayoutComponent> defaultValue) discord4j.discordjson.possible.Possible<String>
content()
The reply message content.contentOrElse
(String defaultValue) discord4j.discordjson.possible.Possible<List<EmbedCreateSpec>>
embeds()
The reply embeds.embedsOrElse
(List<EmbedCreateSpec> defaultValue) boolean
This instance is equal to all instances ofCommandReplyMono
that have equal attribute values.com.google.common.collect.ImmutableList<MessageCreateFields.File>
files()
The attached files.com.google.common.collect.ImmutableList<MessageCreateFields.FileSpoiler>
The spoiler-tagged attached files.int
hashCode()
Computes a hash code from attributes:privately
,content
,tts
,embeds
,files
,fileSpoilers
,allowedMentions
,components
,manager
.boolean
boolean
boolean
boolean
boolean
boolean
manager()
The backing reply manager.static CommandReplyMono
of
(ReplyManager manager) Construct a new immutableCommandReplyMono
instance.discord4j.discordjson.possible.Possible<Boolean>
Whether to send the reply privately.privatelyOrElse
(Boolean defaultValue) void
subscribe
(CoreSubscriber<? super Reply> actual) default InteractionFollowupCreateSpec
toInteractionFollowup
(boolean defaultPrivate) Converts this spec into an interaction followup spec.toInteractionReply
(boolean defaultPrivate) Converts this spec into an interaction reply spec.default MessageCreateSpec
Converts this spec into a message spec.toString()
Prints the immutable valueCommandReplyMono
with attribute values.discord4j.discordjson.possible.Possible<Boolean>
tts()
Whether the reply should use TTS.withAllowedMentions
(discord4j.discordjson.possible.Possible<discord4j.rest.util.AllowedMentions> value) withAllowedMentions
(discord4j.rest.util.AllowedMentions value) final CommandReplyMono
withComponents
(LayoutComponent... elements) withComponents
(discord4j.discordjson.possible.Possible<List<LayoutComponent>> possible) withComponents
(Iterable<LayoutComponent> elements) withContent
(discord4j.discordjson.possible.Possible<String> value) withContent
(String value) final CommandReplyMono
withEmbeds
(EmbedCreateSpec... elements) withEmbeds
(discord4j.discordjson.possible.Possible<List<EmbedCreateSpec>> possible) withEmbeds
(Iterable<EmbedCreateSpec> elements) final CommandReplyMono
withFiles
(MessageCreateFields.File... elements) Copy the current immutable object with elements that replace the content offiles
.final CommandReplyMono
withFiles
(Iterable<? extends MessageCreateFields.File> elements) Copy the current immutable object with elements that replace the content offiles
.final CommandReplyMono
withFileSpoilers
(MessageCreateFields.FileSpoiler... elements) Copy the current immutable object with elements that replace the content offileSpoilers
.final CommandReplyMono
withFileSpoilers
(Iterable<? extends MessageCreateFields.FileSpoiler> elements) Copy the current immutable object with elements that replace the content offileSpoilers
.final CommandReplyMono
withManager
(ReplyManager value) Copy the current immutable object by setting a value for themanager
attribute.withPrivately
(discord4j.discordjson.possible.Possible<Boolean> value) withPrivately
(Boolean value) Methods inherited from class reactor.core.publisher.Mono
and, as, block, block, blockOptional, blockOptional, cache, cache, cache, cache, cache, cacheInvalidateIf, cacheInvalidateWhen, cacheInvalidateWhen, cancelOn, cast, checkpoint, checkpoint, checkpoint, concatWith, contextCapture, contextWrite, contextWrite, create, defaultIfEmpty, defer, deferContextual, delay, delay, delayElement, delayElement, delaySubscription, delaySubscription, delaySubscription, delayUntil, dematerialize, doAfterTerminate, doFinally, doFirst, doOnCancel, doOnDiscard, doOnEach, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnSuccess, doOnTerminate, elapsed, elapsed, empty, error, error, expand, expand, expandDeep, expandDeep, filter, filterWhen, first, first, firstWithSignal, firstWithSignal, firstWithValue, firstWithValue, flatMap, flatMapIterable, flatMapMany, flatMapMany, flux, from, fromCallable, fromCompletionStage, fromCompletionStage, fromDirect, fromFuture, fromFuture, fromFuture, fromFuture, fromRunnable, fromSupplier, handle, hasElement, hide, ignoreElement, ignoreElements, just, justOrEmpty, justOrEmpty, log, log, log, log, log, log, map, mapNotNull, materialize, mergeWith, metrics, name, never, ofType, onAssembly, onErrorComplete, onErrorComplete, onErrorComplete, onErrorContinue, onErrorContinue, onErrorContinue, onErrorMap, onErrorMap, onErrorMap, onErrorResume, onErrorResume, onErrorResume, onErrorReturn, onErrorReturn, onErrorReturn, onErrorStop, onTerminateDetach, or, publish, publishOn, repeat, repeat, repeat, repeat, repeatWhen, repeatWhenEmpty, repeatWhenEmpty, retry, retry, retryWhen, sequenceEqual, sequenceEqual, sequenceEqual, share, single, singleOptional, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, switchIfEmpty, tag, take, take, takeUntilOther, tap, tap, tap, then, then, thenEmpty, thenMany, thenReturn, timed, timed, timeout, timeout, timeout, timeout, timeout, timeout, timestamp, timestamp, toFuture, transform, transformDeferred, transformDeferredContextual, using, using, usingWhen, usingWhen, when, when, whenDelayError, whenDelayError, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipWhen, zipWhen, zipWith, zipWith
-
Method Details
-
privately
Whether to send the reply privately. If absent, the default for the command should be used.- Returns:
- The value.
-
content
The reply message content.- Returns:
- The value.
-
tts
Whether the reply should use TTS.- Returns:
- The value.
-
embeds
The reply embeds.- Returns:
- The value.
-
files
The attached files.- Returns:
- The value.
-
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
The message components.- Returns:
- The value.
-
manager
The backing reply manager.- Returns:
- The manager.
-
withPrivately
-
withPrivately
-
withContent
-
withContent
-
withTts
-
withTts
-
withEmbeds
public CommandReplyMono withEmbeds(discord4j.discordjson.possible.Possible<List<EmbedCreateSpec>> possible) -
withEmbeds
-
withEmbeds
-
withFiles
Copy the current immutable object with elements that replace the content offiles
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withFiles
Copy the current immutable object with elements that replace the content offiles
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of files elements to set- Returns:
- A modified copy of
this
object
-
withFileSpoilers
Copy the current immutable object with elements that replace the content offileSpoilers
.- 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 offileSpoilers
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- 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
-
withComponents
public CommandReplyMono withComponents(discord4j.discordjson.possible.Possible<List<LayoutComponent>> possible) -
withComponents
-
withComponents
-
withManager
Copy the current immutable object by setting a value for themanager
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for manager- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofCommandReplyMono
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:privately
,content
,tts
,embeds
,files
,fileSpoilers
,allowedMentions
,components
,manager
. -
toString
Prints the immutable valueCommandReplyMono
with attribute values.- Returns:
- A string representation of the value
-
of
Construct a new immutableCommandReplyMono
instance.- Parameters:
manager
- The value for themanager
attribute- Returns:
- An immutable CommandReplyMono instance
-
isPrivatelyPresent
public boolean isPrivatelyPresent() -
privatelyOrElse
-
isContentPresent
public boolean isContentPresent() -
contentOrElse
-
isTtsPresent
public boolean isTtsPresent() -
ttsOrElse
-
isEmbedsPresent
public boolean isEmbedsPresent() -
embedsOrElse
-
isAllowedMentionsPresent
public boolean isAllowedMentionsPresent() -
allowedMentionsOrElse
public discord4j.rest.util.AllowedMentions allowedMentionsOrElse(discord4j.rest.util.AllowedMentions defaultValue) -
isComponentsPresent
public boolean isComponentsPresent() -
componentsOrElse
-
subscribe
-
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
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.
-