Package dev.sympho.bot_utils.event.reply
Class ReplySpec.Builder
java.lang.Object
dev.sympho.bot_utils.event.reply.ReplySpec.Builder
- Enclosing class:
- ReplySpec
-
Method Summary
Modifier and TypeMethodDescriptionaddAllComponents
(Collection<? extends LayoutComponent> elements) addAllEmbeds
(Collection<? extends EmbedCreateSpec> elements) addAllFiles
(Iterable<? extends MessageCreateFields.File> files) addAllFileSpoilers
(Iterable<? extends MessageCreateFields.FileSpoiler> files) addComponent
(LayoutComponent element) addEmbed
(EmbedCreateSpec element) addFile
(MessageCreateFields.File... files) allowedMentions
(discord4j.discordjson.possible.Possible<discord4j.rest.util.AllowedMentions> value) allowedMentions
(discord4j.rest.util.AllowedMentions value) build()
Builds a newReplySpec
.final ReplySpec.Builder
components
(LayoutComponent... elements) components
(discord4j.discordjson.possible.Possible<? extends Collection<? extends LayoutComponent>> elements) components
(Iterable<? extends LayoutComponent> elements) final ReplySpec.Builder
embeds
(EmbedCreateSpec... elements) embeds
(discord4j.discordjson.possible.Possible<? extends Collection<? extends EmbedCreateSpec>> elements) embeds
(Iterable<? extends EmbedCreateSpec> elements) files
(Iterable<? extends MessageCreateFields.File> files) fileSpoilers
(Iterable<? extends MessageCreateFields.FileSpoiler> files) final ReplySpec.Builder
Fill a builder with attribute values from the providedReplySpec
instance.
-
Method Details
-
from
Fill a builder with attribute values from the providedReplySpec
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
privately
@CanIgnoreReturnValue public ReplySpec.Builder privately(discord4j.discordjson.possible.Possible<Boolean> value) -
privately
-
content
@CanIgnoreReturnValue public ReplySpec.Builder content(discord4j.discordjson.possible.Possible<String> value) -
content
-
tts
@CanIgnoreReturnValue public ReplySpec.Builder tts(discord4j.discordjson.possible.Possible<Boolean> value) -
tts
-
addEmbed
-
addAllEmbeds
@CanIgnoreReturnValue public ReplySpec.Builder addAllEmbeds(Collection<? extends EmbedCreateSpec> elements) -
embeds
@CanIgnoreReturnValue public ReplySpec.Builder embeds(discord4j.discordjson.possible.Possible<? extends Collection<? extends EmbedCreateSpec>> elements) -
embeds
-
embeds
@SafeVarargs @CanIgnoreReturnValue public final ReplySpec.Builder embeds(EmbedCreateSpec... elements) -
files
@CanIgnoreReturnValue public ReplySpec.Builder files(Iterable<? extends MessageCreateFields.File> files) -
addFile
-
addAllFiles
@CanIgnoreReturnValue public ReplySpec.Builder addAllFiles(Iterable<? extends MessageCreateFields.File> files) -
fileSpoilers
@CanIgnoreReturnValue public ReplySpec.Builder fileSpoilers(Iterable<? extends MessageCreateFields.FileSpoiler> files) -
addFileSpoiler
@CanIgnoreReturnValue public ReplySpec.Builder addFileSpoiler(MessageCreateFields.FileSpoiler... files) -
addAllFileSpoilers
@CanIgnoreReturnValue public ReplySpec.Builder addAllFileSpoilers(Iterable<? extends MessageCreateFields.FileSpoiler> files) -
allowedMentions
@CanIgnoreReturnValue public ReplySpec.Builder allowedMentions(discord4j.discordjson.possible.Possible<discord4j.rest.util.AllowedMentions> value) -
allowedMentions
@CanIgnoreReturnValue public ReplySpec.Builder allowedMentions(discord4j.rest.util.AllowedMentions value) -
addComponent
-
addAllComponents
@CanIgnoreReturnValue public ReplySpec.Builder addAllComponents(Collection<? extends LayoutComponent> elements) -
components
@CanIgnoreReturnValue public ReplySpec.Builder components(discord4j.discordjson.possible.Possible<? extends Collection<? extends LayoutComponent>> elements) -
components
@CanIgnoreReturnValue public ReplySpec.Builder components(Iterable<? extends LayoutComponent> elements) -
components
@SafeVarargs @CanIgnoreReturnValue public final ReplySpec.Builder components(LayoutComponent... elements) -
build
Builds a newReplySpec
.- Returns:
- An immutable instance of ReplySpec
- Throws:
IllegalStateException
- if any required attributes are missing
-