Interface TextBuilder

    • Method Summary

      Modifier and Type Method Description
      TextBuilder append​(java.lang.String message)
      Appends unformatted, escaped text to the message.
      TextBuilder append​(java.lang.String message, java.util.EnumSet<TextStyle> styles)
      Appends formatted text to the message.
      TextBuilder appendMention​(Chat chat)
      Appends a chat mention to the formatted message.
      TextBuilder appendMention​(PlatformUser user)
      Appends a user mention to the formatted message.
      TextBuilder appendRaw​(java.lang.String message)
      Appends unformatted, unescaped text to the message.
      default TextBuilder appendUrl​(java.lang.String url)
      Appends a formatted URL to this message.
      default TextBuilder appendUrl​(java.net.URL url)
      Appends a formatted URL to this message.
      java.lang.String build()
      Builds the formatted message.
      Chat getChat()
      Gets the sender associated with this formatted message.
      default TextFormat getFormat()
      Gets the text format instance being used in this message.
      boolean hasContent()
      Finds if the formatted message has content in its buffer.
      TextBuilder newLine()
      Adds a new line to the message output.
    • Method Detail

      • getChat

        Chat getChat()
        Gets the sender associated with this formatted message.
        Returns:
        ChatSender instance.
      • getFormat

        default TextFormat getFormat()
        Gets the text format instance being used in this message.
        Returns:
        TextFormat instance.
      • hasContent

        boolean hasContent()
        Finds if the formatted message has content in its buffer.
        Returns:
        true if the formatted message has content, false otherwise.
      • newLine

        TextBuilder newLine()
        Adds a new line to the message output.
        Returns:
        continued FormattedMessage instance.
      • appendMention

        TextBuilder appendMention​(PlatformUser user)
        Appends a user mention to the formatted message.
        Parameters:
        user - user to mention.
        Returns:
        continued FormattedMessage instance.
      • appendMention

        TextBuilder appendMention​(Chat chat)
        Appends a chat mention to the formatted message.
        Parameters:
        chat - chat to mention.
        Returns:
        continued FormattedMessage instance.
      • appendRaw

        TextBuilder appendRaw​(java.lang.String message)
        Appends unformatted, unescaped text to the message.
        Parameters:
        message - text to directly append to the message.
        Returns:
        continued FormattedMessage instance.
      • append

        TextBuilder append​(java.lang.String message)
        Appends unformatted, escaped text to the message.
        Parameters:
        message - text to escape and append to the message.
        Returns:
        continued FormattedMessage instance.
      • appendUrl

        default TextBuilder appendUrl​(java.lang.String url)
        Appends a formatted URL to this message.
        Parameters:
        url - URL to append to the message.
        Returns:
        continued FormattedMessage instance.
      • appendUrl

        default TextBuilder appendUrl​(java.net.URL url)
        Appends a formatted URL to this message.
        Parameters:
        url - URL to append to the message.
        Returns:
        continued FormattedMessage instance.
      • append

        TextBuilder append​(java.lang.String message,
                           java.util.EnumSet<TextStyle> styles)
        Appends formatted text to the message.
        Parameters:
        message - text to escape and append to the message.
        styles - styles to apply to the specified text.
        Returns:
        continued FormattedMessage instance.
      • build

        java.lang.String build()
        Builds the formatted message.
        Returns:
        formatted message.