Interface InteractionMessageBuilderBase<T>
-
- All Known Subinterfaces:
ComponentInteractionOriginalMessageUpdater,ExtendedInteractionMessageBuilderBase<T>,InteractionFollowupMessageBuilder,InteractionImmediateResponseBuilder,InteractionOriginalResponseUpdater
- All Known Implementing Classes:
InteractionMessageBuilder
public interface InteractionMessageBuilderBase<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TaddComponents(HighLevelComponent... components)Adds multiple components to the message.TaddEmbed(EmbedBuilder embed)Adds the embed to the message.TaddEmbeds(java.util.List<EmbedBuilder> embeds)Adds the embeds to the message.TaddEmbeds(EmbedBuilder... embeds)Adds the embeds to the message.Tappend(java.lang.Object object)Appends the string representation of the object (callingString.valueOf(Object)method) to the message.Tappend(java.lang.String message, MessageDecoration... decorations)Appends a sting with or without decoration to the message.Tappend(Mentionable entity)Appends a mentionable entity (usually a user or channel) to the message.TappendCode(java.lang.String language, java.lang.String code)Appends code to the message.TappendNamedLink(java.lang.String name, java.lang.String url)Appends a named link "[name](link)" to the message.TappendNewLine()Appends a new line to the message.java.lang.StringBuildergetStringBuilder()Gets theStringBuilderwhich is used to build the message.TremoveAllComponents()Removes all components from the message.TremoveAllEmbeds()Removes all embeds from the message.TremoveComponent(int index)Remove a component from the message.TremoveComponent(HighLevelComponent component)Remove a component from the message.TremoveEmbed(EmbedBuilder embed)Removes the embed from the message.TremoveEmbeds(EmbedBuilder... embeds)Removes the embeds from the message.TsetAllowedMentions(AllowedMentions allowedMentions)Controls who will be mentioned if mentions exist in the message.TsetContent(java.lang.String content)Sets the content of the message.TsetFlags(java.util.EnumSet<MessageFlag> messageFlags)Sets the message flags of the message.TsetFlags(MessageFlag... messageFlags)Sets the message flags of the message.TsetTts(boolean tts)Sets if the message should be text to speech.
-
-
-
Method Detail
-
appendCode
T appendCode(java.lang.String language, java.lang.String code)
Appends code to the message.- Parameters:
language- The language, e.g. "java".code- The code.- Returns:
- The current instance in order to chain call methods.
-
append
T append(java.lang.String message, MessageDecoration... decorations)
Appends a sting with or without decoration to the message.- Parameters:
message- The string to append.decorations- The decorations of the string.- Returns:
- The current instance in order to chain call methods.
-
append
T append(Mentionable entity)
Appends a mentionable entity (usually a user or channel) to the message.- Parameters:
entity- The entity to mention.- Returns:
- The current instance in order to chain call methods.
-
append
T append(java.lang.Object object)
Appends the string representation of the object (callingString.valueOf(Object)method) to the message.- Parameters:
object- The object to append.- Returns:
- The current instance in order to chain call methods.
- See Also:
StringBuilder.append(Object)
-
appendNamedLink
T appendNamedLink(java.lang.String name, java.lang.String url)
Appends a named link "[name](link)" to the message.- 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
T appendNewLine()
Appends a new line to the message.- Returns:
- The current instance in order to chain call methods.
-
setContent
T setContent(java.lang.String content)
Sets the content of the message. This method overwrites all previous content changes (usingappend(String, MessageDecoration...)for example).- Parameters:
content- The new content of the message.- Returns:
- The current instance in order to chain call methods.
-
addEmbed
T addEmbed(EmbedBuilder embed)
Adds the embed to the message.- Parameters:
embed- The embed to add.- Returns:
- The current instance in order to chain call methods.
-
addEmbeds
T addEmbeds(EmbedBuilder... embeds)
Adds the embeds to the message.- Parameters:
embeds- The embeds to add.- Returns:
- The current instance in order to chain call methods.
-
addEmbeds
T addEmbeds(java.util.List<EmbedBuilder> embeds)
Adds the embeds to the message.- Parameters:
embeds- A list of embeds to add.- Returns:
- The current instance in order to chain call methods.
-
addComponents
T addComponents(HighLevelComponent... components)
Adds multiple components to the message.- Parameters:
components- The components.- Returns:
- The current instance in order to chain call methods.
-
removeAllComponents
T removeAllComponents()
Removes all components from the message.- Returns:
- The current instance in order to chain call methods.
-
removeComponent
T removeComponent(int index)
Remove a component from the message.- Parameters:
index- The index placement to remove from.- Returns:
- The current instance in order to chain call methods.
-
removeComponent
T removeComponent(HighLevelComponent component)
Remove a component from the message.- Parameters:
component- The component.- Returns:
- The current instance in order to chain call methods.
-
removeEmbed
T removeEmbed(EmbedBuilder embed)
Removes the embed from the message.- Parameters:
embed- The embed to remove.- Returns:
- The current instance in order to chain call methods.
-
removeEmbeds
T removeEmbeds(EmbedBuilder... embeds)
Removes the embeds from the message.- Parameters:
embeds- The embeds to remove.- Returns:
- The current instance in order to chain call methods.
-
removeAllEmbeds
T removeAllEmbeds()
Removes all embeds from the message.- Returns:
- The current instance in order to chain call methods.
-
setTts
T setTts(boolean tts)
Sets if the message should be text to speech.- Parameters:
tts- Whether the message should be text to speech or not.- Returns:
- The current instance in order to chain call methods.
-
setAllowedMentions
T setAllowedMentions(AllowedMentions allowedMentions)
Controls who will be mentioned if mentions exist in the message.- Parameters:
allowedMentions- The mention object.- Returns:
- The current instance in order to chain call methods.
-
setFlags
T setFlags(MessageFlag... messageFlags)
Sets the message flags of the message.- Parameters:
messageFlags- The message flags enum type.- Returns:
- The current instance in order to chain call methods.
-
setFlags
T setFlags(java.util.EnumSet<MessageFlag> messageFlags)
Sets the message flags of the message.- Parameters:
messageFlags- An EnumSet of message flag enum type.- Returns:
- The current instance in order to chain call methods.
-
getStringBuilder
java.lang.StringBuilder getStringBuilder()
Gets theStringBuilderwhich is used to build the message.- Returns:
- The StringBuilder which is used to build the message.
-
-