Package dev.sympho.bot_utils.event.reply
Class ReplyMono
- All Implemented Interfaces:
org.reactivestreams.Publisher<Reply>,CorePublisher<Reply>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ReplyMono
extends Mono<Reply>
Specification for creating a new event 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.AllowedMentionsallowedMentionsOrElse(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) booleanThis instance is equal to all instances ofReplyMonothat 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.inthashCode()Computes a hash code from attributes:privately,content,tts,embeds,files,fileSpoilers,allowedMentions,components,manager.booleanbooleanbooleanbooleanbooleanbooleanmanager()The backing reply manager.static ReplyMonoof(ReplyManager manager) Construct a new immutableReplyMonoinstance.discord4j.discordjson.possible.Possible<Boolean>Whether to send the reply privately.privatelyOrElse(Boolean defaultValue) voidsubscribe(CoreSubscriber<? super Reply> actual) default InteractionFollowupCreateSpectoInteractionFollowup(boolean defaultPrivate) Converts this spec into an interaction followup spec.toInteractionReply(boolean defaultPrivate) Converts this spec into an interaction reply spec.default MessageCreateSpecConverts this spec into a message spec.toString()Prints the immutable valueReplyMonowith 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 ReplyMonowithComponents(LayoutComponent... elements) withComponents(discord4j.discordjson.possible.Possible<? extends List<? extends LayoutComponent>> possible) withComponents(Iterable<? extends LayoutComponent> elements) withContent(discord4j.discordjson.possible.Possible<String> value) withContent(String value) final ReplyMonowithEmbeds(EmbedCreateSpec... elements) withEmbeds(discord4j.discordjson.possible.Possible<? extends List<? extends EmbedCreateSpec>> possible) withEmbeds(Iterable<? extends EmbedCreateSpec> elements) final ReplyMonowithFiles(MessageCreateFields.File... elements) Copy the current immutable object with elements that replace the content offiles.final ReplyMonowithFiles(Iterable<? extends MessageCreateFields.File> elements) Copy the current immutable object with elements that replace the content offiles.final ReplyMonowithFileSpoilers(MessageCreateFields.FileSpoiler... elements) Copy the current immutable object with elements that replace the content offileSpoilers.final ReplyMonowithFileSpoilers(Iterable<? extends MessageCreateFields.FileSpoiler> elements) Copy the current immutable object with elements that replace the content offileSpoilers.final ReplyMonowithManager(ReplyManager value) Copy the current immutable object by setting a value for themanagerattribute.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 ReplyMono withEmbeds(discord4j.discordjson.possible.Possible<? extends List<? extends 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
thisobject
-
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
thisobject
-
withFileSpoilers
Copy the current immutable object with elements that replace the content offileSpoilers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFileSpoilers
public final ReplyMono 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
thisobject
-
withAllowedMentions
public ReplyMono withAllowedMentions(discord4j.discordjson.possible.Possible<discord4j.rest.util.AllowedMentions> value) -
withAllowedMentions
-
withComponents
public ReplyMono withComponents(discord4j.discordjson.possible.Possible<? extends List<? extends LayoutComponent>> possible) -
withComponents
-
withComponents
-
withManager
Copy the current immutable object by setting a value for themanagerattribute. 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
thisobject
-
equals
This instance is equal to all instances ofReplyMonothat 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 valueReplyMonowith attribute values.- Returns:
- A string representation of the value
-
of
Construct a new immutableReplyMonoinstance.- Parameters:
manager- The value for themanagerattribute- Returns:
- An immutable ReplyMono 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.
-