Interface InteractionMessageBuilderBase<T>

    • Method Detail

      • appendCode

        T appendCode​(String language,
                     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​(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​(Object object)
        Appends the string representation of the object (calling String.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)
      • appendNewLine

        T appendNewLine​()
        Appends a new line to the message.
        Returns:
        The current instance in order to chain call methods.
      • setContent

        T setContent​(String content)
        Sets the content of the message. This method overwrites all previous content changes (using append(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.
      • 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​(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

        StringBuilder getStringBuilder​()
        Gets the StringBuilder which is used to build the message.
        Returns:
        The StringBuilder which is used to build the message.