Class InteractionMessageBuilder
- java.lang.Object
-
- org.javacord.api.interaction.callback.InteractionMessageBuilder
-
- All Implemented Interfaces:
ExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>,InteractionMessageBuilderBase<InteractionMessageBuilder>
public class InteractionMessageBuilder extends java.lang.Object implements ExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>
This class is intended to be used by advanced users that desire full control over interaction responses. We strongly recommend using the offered methods on your received interactions instead of this class.
-
-
Field Summary
Fields Modifier and Type Field Description protected InteractionMessageBuilderDelegatedelegate
-
Constructor Summary
Constructors Constructor Description InteractionMessageBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InteractionMessageBuilderaddAttachment(byte[] bytes, java.lang.String fileName)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(byte[] bytes, java.lang.String fileName, java.lang.String description)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.awt.image.BufferedImage image, java.lang.String fileName)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.awt.image.BufferedImage image, java.lang.String fileName, java.lang.String description)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.io.File file)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.io.File file, java.lang.String description)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.io.InputStream stream, java.lang.String fileName)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.io.InputStream stream, java.lang.String fileName, java.lang.String description)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.net.URL url)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(java.net.URL url, java.lang.String description)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(Icon icon)Adds an attachment to the message.InteractionMessageBuilderaddAttachment(Icon icon, java.lang.String description)Adds an attachment to the message.InteractionMessageBuilderaddAttachmentAsSpoiler(byte[] bytes, java.lang.String fileName)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(byte[] bytes, java.lang.String fileName, java.lang.String description)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.awt.image.BufferedImage image, java.lang.String fileName)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.awt.image.BufferedImage image, java.lang.String fileName, java.lang.String description)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.io.File file)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.io.File file, java.lang.String description)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.io.InputStream stream, java.lang.String fileName)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.io.InputStream stream, java.lang.String fileName, java.lang.String description)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.net.URL url)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(java.net.URL url, java.lang.String description)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(Icon icon)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddAttachmentAsSpoiler(Icon icon, java.lang.String description)Adds an attachment to the message and marks it as spoiler.InteractionMessageBuilderaddComponents(HighLevelComponent... components)Adds multiple components to the message.InteractionMessageBuilderaddEmbed(EmbedBuilder embed)Adds the embed to the message.InteractionMessageBuilderaddEmbeds(java.util.List<EmbedBuilder> embeds)Adds the embeds to the message.InteractionMessageBuilderaddEmbeds(EmbedBuilder... embeds)Adds the embeds to the message.InteractionMessageBuilderappend(java.lang.Object object)Appends the string representation of the object (callingString.valueOf(Object)method) to the message.InteractionMessageBuilderappend(java.lang.String message, MessageDecoration... decorations)Appends a sting with or without decoration to the message.InteractionMessageBuilderappend(Mentionable entity)Appends a mentionable entity (usually a user or channel) to the message.InteractionMessageBuilderappendCode(java.lang.String language, java.lang.String code)Appends code to the message.InteractionMessageBuilderappendNamedLink(java.lang.String name, java.lang.String url)Appends a named link "[name](link)" to the message.InteractionMessageBuilderappendNewLine()Appends a new line to the message.InteractionMessageBuildercopy(Message message)Copy a message's values into this build instance.InteractionMessageBuildercopy(InteractionBase interaction)Copy an interaction's message.java.util.concurrent.CompletableFuture<java.lang.Void>deleteFollowupMessage(InteractionBase interaction, java.lang.String messageId)Delete a followup message from an interaction.java.util.concurrent.CompletableFuture<java.lang.Void>deleteInitialResponse(InteractionBase interaction)Delete the original response.java.util.concurrent.CompletableFuture<Message>editFollowupMessage(InteractionBase interaction, long messageId)Edits a followup message from an interaction.java.util.concurrent.CompletableFuture<Message>editFollowupMessage(InteractionBase interaction, java.lang.String messageId)Edits a followup message from an interaction.java.util.concurrent.CompletableFuture<Message>editOriginalResponse(InteractionBase interaction)Edits your original sent response.java.lang.StringBuildergetStringBuilder()Gets theStringBuilderwhich is used to build the message.InteractionMessageBuilderremoveAllComponents()Removes all components from the message.InteractionMessageBuilderremoveAllEmbeds()Removes all embeds from the message.InteractionMessageBuilderremoveComponent(int index)Remove a component from the message.InteractionMessageBuilderremoveComponent(HighLevelComponent component)Remove a component from the message.InteractionMessageBuilderremoveEmbed(EmbedBuilder embed)Removes the embed from the message.InteractionMessageBuilderremoveEmbeds(EmbedBuilder... embeds)Removes the embeds from the message.java.util.concurrent.CompletableFuture<Message>sendFollowupMessage(InteractionBase interaction)Sends a followup message to an interaction.java.util.concurrent.CompletableFuture<InteractionMessageBuilder>sendInitialResponse(InteractionBase interaction)Sends the first response message.InteractionMessageBuildersetAllowedMentions(AllowedMentions allowedMentions)Controls who will be mentioned if mentions exist in the message.InteractionMessageBuildersetContent(java.lang.String content)Sets the content of the message.InteractionMessageBuildersetFlags(java.util.EnumSet<MessageFlag> messageFlags)Sets the message flags of the message.InteractionMessageBuildersetFlags(MessageFlag... messageFlags)Sets the message flags of the message.InteractionMessageBuildersetTts(boolean tts)Sets if the message should be text to speech.java.util.concurrent.CompletableFuture<java.lang.Void>updateOriginalMessage(InteractionBase interaction)Update the message the components were attached to.
-
-
-
Field Detail
-
delegate
protected final InteractionMessageBuilderDelegate delegate
-
-
Method Detail
-
sendInitialResponse
public java.util.concurrent.CompletableFuture<InteractionMessageBuilder> sendInitialResponse(InteractionBase interaction)
Sends the first response message. This can only be done once after you want to respond to an interaction the FIRST time. Responding directly to an interaction limits you to not being able to upload anything. Therefore i.e.EmbedBuilder.setFooter(String, File)will not work and you have to use the String methods for attachments likeEmbedBuilder.setFooter(String, String)if available. If you want to upload attachments useeditOriginalResponse(InteractionBase)instead.- Parameters:
interaction- The interaction.- Returns:
- The CompletableFuture when your message was sent.
-
editOriginalResponse
public java.util.concurrent.CompletableFuture<Message> editOriginalResponse(InteractionBase interaction)
Edits your original sent response. Your original response may be sent bysendInitialResponse(InteractionBase)or by deciding to respond throughInteractionBase.respondLater()which sends a "loading state" as your first response. In comparison tosendInitialResponse(InteractionBase)this method allows you to upload attachments with your message.- Parameters:
interaction- The interaction.- Returns:
- The edited message.
-
sendFollowupMessage
public java.util.concurrent.CompletableFuture<Message> sendFollowupMessage(InteractionBase interaction)
Sends a followup message to an interaction.- Parameters:
interaction- The interaction.- Returns:
- The sent message.
-
editFollowupMessage
public java.util.concurrent.CompletableFuture<Message> editFollowupMessage(InteractionBase interaction, long messageId)
Edits a followup message from an interaction.- Parameters:
interaction- The interaction.messageId- The message id of the followup message which should be edited.- Returns:
- The edited message.
-
editFollowupMessage
public java.util.concurrent.CompletableFuture<Message> editFollowupMessage(InteractionBase interaction, java.lang.String messageId)
Edits a followup message from an interaction.- Parameters:
interaction- The interaction.messageId- The message id of the followup message which should be edited.- Returns:
- The edited message.
-
updateOriginalMessage
public java.util.concurrent.CompletableFuture<java.lang.Void> updateOriginalMessage(InteractionBase interaction)
Update the message the components were attached to.- Parameters:
interaction- The original interaction.- Returns:
- The completable future to determine if the message was updated.
-
deleteInitialResponse
public java.util.concurrent.CompletableFuture<java.lang.Void> deleteInitialResponse(InteractionBase interaction)
Delete the original response.- Parameters:
interaction- The interaction.- Returns:
- The completable future when the message has been deleted.
-
deleteFollowupMessage
public java.util.concurrent.CompletableFuture<java.lang.Void> deleteFollowupMessage(InteractionBase interaction, java.lang.String messageId)
Delete a followup message from an interaction.- Parameters:
interaction- The interaction.messageId- The message id of the followup message which should be deleted.- Returns:
- The deleted message.
-
appendCode
public InteractionMessageBuilder appendCode(java.lang.String language, java.lang.String code)
Description copied from interface:InteractionMessageBuilderBaseAppends code to the message.- Specified by:
appendCodein interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
language- The language, e.g. "java".code- The code.- Returns:
- The current instance in order to chain call methods.
-
append
public InteractionMessageBuilder append(java.lang.String message, MessageDecoration... decorations)
Description copied from interface:InteractionMessageBuilderBaseAppends a sting with or without decoration to the message.- Specified by:
appendin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
message- The string to append.decorations- The decorations of the string.- Returns:
- The current instance in order to chain call methods.
-
append
public InteractionMessageBuilder append(Mentionable entity)
Description copied from interface:InteractionMessageBuilderBaseAppends a mentionable entity (usually a user or channel) to the message.- Specified by:
appendin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
entity- The entity to mention.- Returns:
- The current instance in order to chain call methods.
-
append
public InteractionMessageBuilder append(java.lang.Object object)
Description copied from interface:InteractionMessageBuilderBaseAppends the string representation of the object (callingString.valueOf(Object)method) to the message.- Specified by:
appendin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
object- The object to append.- Returns:
- The current instance in order to chain call methods.
- See Also:
StringBuilder.append(Object)
-
appendNamedLink
public InteractionMessageBuilder appendNamedLink(java.lang.String name, java.lang.String url)
Description copied from interface:InteractionMessageBuilderBaseAppends a named link "[name](link)" to the message.- Specified by:
appendNamedLinkin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
name- The displayed name of the link.url- The URL of the link.- Returns:
- The current instance in order to chain call methods.
-
appendNewLine
public InteractionMessageBuilder appendNewLine()
Description copied from interface:InteractionMessageBuilderBaseAppends a new line to the message.- Specified by:
appendNewLinein interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Returns:
- The current instance in order to chain call methods.
-
setContent
public InteractionMessageBuilder setContent(java.lang.String content)
Description copied from interface:InteractionMessageBuilderBaseSets the content of the message. This method overwrites all previous content changes (usingInteractionMessageBuilderBase.append(String, MessageDecoration...)for example).- Specified by:
setContentin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
content- The new content of the message.- Returns:
- The current instance in order to chain call methods.
-
addEmbed
public InteractionMessageBuilder addEmbed(EmbedBuilder embed)
Description copied from interface:InteractionMessageBuilderBaseAdds the embed to the message.- Specified by:
addEmbedin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
embed- The embed to add.- Returns:
- The current instance in order to chain call methods.
-
addEmbeds
public InteractionMessageBuilder addEmbeds(EmbedBuilder... embeds)
Description copied from interface:InteractionMessageBuilderBaseAdds the embeds to the message.- Specified by:
addEmbedsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
embeds- The embeds to add.- Returns:
- The current instance in order to chain call methods.
-
addEmbeds
public InteractionMessageBuilder addEmbeds(java.util.List<EmbedBuilder> embeds)
Description copied from interface:InteractionMessageBuilderBaseAdds the embeds to the message.- Specified by:
addEmbedsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
embeds- A list of embeds to add.- Returns:
- The current instance in order to chain call methods.
-
addComponents
public InteractionMessageBuilder addComponents(HighLevelComponent... components)
Description copied from interface:InteractionMessageBuilderBaseAdds multiple components to the message.- Specified by:
addComponentsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
components- The components.- Returns:
- The current instance in order to chain call methods.
-
removeAllComponents
public InteractionMessageBuilder removeAllComponents()
Description copied from interface:InteractionMessageBuilderBaseRemoves all components from the message.- Specified by:
removeAllComponentsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Returns:
- The current instance in order to chain call methods.
-
removeComponent
public InteractionMessageBuilder removeComponent(int index)
Description copied from interface:InteractionMessageBuilderBaseRemove a component from the message.- Specified by:
removeComponentin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
index- The index placement to remove from.- Returns:
- The current instance in order to chain call methods.
-
removeComponent
public InteractionMessageBuilder removeComponent(HighLevelComponent component)
Description copied from interface:InteractionMessageBuilderBaseRemove a component from the message.- Specified by:
removeComponentin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
component- The component.- Returns:
- The current instance in order to chain call methods.
-
removeEmbed
public InteractionMessageBuilder removeEmbed(EmbedBuilder embed)
Description copied from interface:InteractionMessageBuilderBaseRemoves the embed from the message.- Specified by:
removeEmbedin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
embed- The embed to remove.- Returns:
- The current instance in order to chain call methods.
-
removeEmbeds
public InteractionMessageBuilder removeEmbeds(EmbedBuilder... embeds)
Description copied from interface:InteractionMessageBuilderBaseRemoves the embeds from the message.- Specified by:
removeEmbedsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
embeds- The embeds to remove.- Returns:
- The current instance in order to chain call methods.
-
removeAllEmbeds
public InteractionMessageBuilder removeAllEmbeds()
Description copied from interface:InteractionMessageBuilderBaseRemoves all embeds from the message.- Specified by:
removeAllEmbedsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Returns:
- The current instance in order to chain call methods.
-
setTts
public InteractionMessageBuilder setTts(boolean tts)
Description copied from interface:InteractionMessageBuilderBaseSets if the message should be text to speech.- Specified by:
setTtsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
tts- Whether the message should be text to speech or not.- Returns:
- The current instance in order to chain call methods.
-
setAllowedMentions
public InteractionMessageBuilder setAllowedMentions(AllowedMentions allowedMentions)
Description copied from interface:InteractionMessageBuilderBaseControls who will be mentioned if mentions exist in the message.- Specified by:
setAllowedMentionsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
allowedMentions- The mention object.- Returns:
- The current instance in order to chain call methods.
-
setFlags
public InteractionMessageBuilder setFlags(MessageFlag... messageFlags)
Description copied from interface:InteractionMessageBuilderBaseSets the message flags of the message.- Specified by:
setFlagsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
messageFlags- The message flags enum type.- Returns:
- The current instance in order to chain call methods.
-
setFlags
public InteractionMessageBuilder setFlags(java.util.EnumSet<MessageFlag> messageFlags)
Description copied from interface:InteractionMessageBuilderBaseSets the message flags of the message.- Specified by:
setFlagsin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
messageFlags- An EnumSet of message flag enum type.- Returns:
- The current instance in order to chain call methods.
-
getStringBuilder
public java.lang.StringBuilder getStringBuilder()
Description copied from interface:InteractionMessageBuilderBaseGets theStringBuilderwhich is used to build the message.- Specified by:
getStringBuilderin interfaceInteractionMessageBuilderBase<InteractionMessageBuilder>- Returns:
- The StringBuilder which is used to build the message.
-
copy
public InteractionMessageBuilder copy(Message message)
Description copied from interface:ExtendedInteractionMessageBuilderBaseCopy a message's values into this build instance.- Specified by:
copyin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
message- The message to copy.- Returns:
- The current instance in order to chain call methods.
-
copy
public InteractionMessageBuilder copy(InteractionBase interaction)
Description copied from interface:ExtendedInteractionMessageBuilderBaseCopy an interaction's message.- Specified by:
copyin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
interaction- The interaction to copy.- Returns:
- The current instance in order to chain call methods/
-
addAttachment
public InteractionMessageBuilder addAttachment(java.awt.image.BufferedImage image, java.lang.String fileName)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
image- The image to add as an attachment.fileName- The file name of the image.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(java.awt.image.BufferedImage image, java.lang.String fileName, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
image- The image to add as an attachment.fileName- The file name of the image.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(java.io.File file)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
file- The file to add as an attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(java.io.File file, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
file- The file to add as an attachment.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(Icon icon)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
icon- The icon to add as an attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(Icon icon, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
icon- The icon to add as an attachment.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(java.net.URL url)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
url- The url of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(java.net.URL url, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
url- The url of the attachment.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(byte[] bytes, java.lang.String fileName)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
bytes- The bytes of the file.fileName- The name of the file.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(byte[] bytes, java.lang.String fileName, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
bytes- The bytes of the file.fileName- The name of the file.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(java.io.InputStream stream, java.lang.String fileName)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
stream- The stream of the file.fileName- The name of the file.- Returns:
- The current instance in order to chain call methods.
-
addAttachment
public InteractionMessageBuilder addAttachment(java.io.InputStream stream, java.lang.String fileName, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message.- Specified by:
addAttachmentin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
stream- The stream of the file.fileName- The name of the file.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.awt.image.BufferedImage image, java.lang.String fileName)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
image- The image to add as an attachment.fileName- The file name of the image.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.awt.image.BufferedImage image, java.lang.String fileName, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
image- The image to add as an attachment.fileName- The file name of the image.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.io.File file)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
file- The file to add as an attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.io.File file, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
file- The file to add as an attachment.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(Icon icon)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
icon- The icon to add as an attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(Icon icon, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
icon- The icon to add as an attachment.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.net.URL url)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
url- The url of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.net.URL url, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
url- The url of the attachment.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(byte[] bytes, java.lang.String fileName)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
bytes- The bytes of the file.fileName- The name of the file.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(byte[] bytes, java.lang.String fileName, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
bytes- The bytes of the file.fileName- The name of the file.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.io.InputStream stream, java.lang.String fileName)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
stream- The stream of the file.fileName- The name of the file.- Returns:
- The current instance in order to chain call methods.
-
addAttachmentAsSpoiler
public InteractionMessageBuilder addAttachmentAsSpoiler(java.io.InputStream stream, java.lang.String fileName, java.lang.String description)
Description copied from interface:ExtendedInteractionMessageBuilderBaseAdds an attachment to the message and marks it as spoiler.- Specified by:
addAttachmentAsSpoilerin interfaceExtendedInteractionMessageBuilderBase<InteractionMessageBuilder>- Parameters:
stream- The stream of the file.fileName- The name of the file.description- The description of the attachment.- Returns:
- The current instance in order to chain call methods.
-
-