Class CommandReplyEditSpec.Builder
java.lang.Object
dev.sympho.modular_commands.api.command.reply.CommandReplyEditSpec.Builder
- Enclosing class:
- CommandReplyEditSpec
Builds instances of type
CommandReplyEditSpec
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllAttachments
(List<Attachment> elements) addAllComponents
(List<LayoutComponent> elements) addAllEmbeds
(List<EmbedCreateSpec> elements) addAllFiles
(Iterable<? extends MessageCreateFields.File> files) addAllFileSpoilers
(Iterable<? extends MessageCreateFields.FileSpoiler> files) addAttachment
(Attachment element) addComponent
(LayoutComponent element) addEmbed
(EmbedCreateSpec element) addFile
(MessageCreateFields.File... files) allowedMentions
(discord4j.discordjson.possible.Possible<Optional<discord4j.rest.util.AllowedMentions>> value) allowedMentions
(discord4j.rest.util.AllowedMentions value) Deprecated.allowedMentionsOrNull
(discord4j.rest.util.AllowedMentions value) attachments
(discord4j.discordjson.possible.Possible<Optional<List<Attachment>>> elements) attachments
(Iterable<Attachment> elements) Deprecated.attachments
(List<Attachment> elements) attachmentsOrNull
(Iterable<Attachment> elements) build()
Builds a newCommandReplyEditSpec
.components
(discord4j.discordjson.possible.Possible<Optional<List<LayoutComponent>>> elements) components
(Iterable<LayoutComponent> elements) Deprecated.components
(List<LayoutComponent> elements) componentsOrNull
(Iterable<LayoutComponent> elements) Deprecated.contentOrNull
(String value) embeds
(discord4j.discordjson.possible.Possible<Optional<List<EmbedCreateSpec>>> elements) embeds
(Iterable<EmbedCreateSpec> elements) Deprecated.embeds
(List<EmbedCreateSpec> elements) embedsOrNull
(Iterable<EmbedCreateSpec> elements) files
(Iterable<? extends MessageCreateFields.File> files) fileSpoilers
(Iterable<? extends MessageCreateFields.FileSpoiler> files) from
(CommandReplyEditSpec instance) Fill a builder with attribute values from the providedCommandReplyEditSpec
instance.
-
Method Details
-
from
Fill a builder with attribute values from the providedCommandReplyEditSpec
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
-
content
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder content(discord4j.discordjson.possible.Possible<Optional<String>> value) -
content
@Deprecated @CanIgnoreReturnValue public CommandReplyEditSpec.Builder content(@Nullable String value) Deprecated. -
contentOrNull
-
addEmbed
-
addAllEmbeds
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder addAllEmbeds(List<EmbedCreateSpec> elements) -
embeds
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder embeds(discord4j.discordjson.possible.Possible<Optional<List<EmbedCreateSpec>>> elements) -
embeds
-
embeds
@Deprecated @CanIgnoreReturnValue public CommandReplyEditSpec.Builder embeds(@Nullable Iterable<EmbedCreateSpec> elements) Deprecated. -
embedsOrNull
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder embedsOrNull(@Nullable Iterable<EmbedCreateSpec> elements) -
files
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder files(Iterable<? extends MessageCreateFields.File> files) -
addFile
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder addFile(MessageCreateFields.File... files) -
addAllFiles
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder addAllFiles(Iterable<? extends MessageCreateFields.File> files) -
fileSpoilers
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder fileSpoilers(Iterable<? extends MessageCreateFields.FileSpoiler> files) -
addFileSpoiler
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder addFileSpoiler(MessageCreateFields.FileSpoiler... files) -
addAllFileSpoilers
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder addAllFileSpoilers(Iterable<? extends MessageCreateFields.FileSpoiler> files) -
allowedMentions
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder allowedMentions(discord4j.discordjson.possible.Possible<Optional<discord4j.rest.util.AllowedMentions>> value) -
allowedMentions
@Deprecated @CanIgnoreReturnValue public CommandReplyEditSpec.Builder allowedMentions(@Nullable discord4j.rest.util.AllowedMentions value) Deprecated. -
allowedMentionsOrNull
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder allowedMentionsOrNull(@Nullable discord4j.rest.util.AllowedMentions value) -
addComponent
-
addAllComponents
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder addAllComponents(List<LayoutComponent> elements) -
components
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder components(discord4j.discordjson.possible.Possible<Optional<List<LayoutComponent>>> elements) -
components
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder components(List<LayoutComponent> elements) -
components
@Deprecated @CanIgnoreReturnValue public CommandReplyEditSpec.Builder components(@Nullable Iterable<LayoutComponent> elements) Deprecated. -
componentsOrNull
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder componentsOrNull(@Nullable Iterable<LayoutComponent> elements) -
addAttachment
-
addAllAttachments
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder addAllAttachments(List<Attachment> elements) -
attachments
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder attachments(discord4j.discordjson.possible.Possible<Optional<List<Attachment>>> elements) -
attachments
-
attachments
@Deprecated @CanIgnoreReturnValue public CommandReplyEditSpec.Builder attachments(@Nullable Iterable<Attachment> elements) Deprecated. -
attachmentsOrNull
@CanIgnoreReturnValue public CommandReplyEditSpec.Builder attachmentsOrNull(@Nullable Iterable<Attachment> elements) -
build
Builds a newCommandReplyEditSpec
.- Returns:
- An immutable instance of CommandReplyEditSpec
- Throws:
IllegalStateException
- if any required attributes are missing
-