The TextMessageBuilder class implement MessageBuilderInterface, which in turn inherits from one interface: SetMessageBuilderInterface
autoNewLine
- bool default: true. This tells the builder if you want to use the auto-newline mode. While this mode is on, each use of the method that adds text adds a new line.
build
- Returns a formatted string
The TextMessageBuilder class, thanks to the SetMessageBuilderInterface implementation, offers the following methods:
addText
- Text added with this method will not have the format.addNewLine
- Adds a new line. It's useful if you've decided not to use the automatic newline that works every time you use append textaddBold
- Added text with bold formataddItalic
- Added text with italic formataddUnderline
- Added text with __underline__ formataddStrikethrough
- Added text withstrikethroughformataddList
- Added text with list formataddCodeBlock
- Added text withcodeblock
formataddMultilineCodeBlock
- Added text with
multiline codeblock format
addQuoteBlock
- Added text with
quote format
addMultilineQuoteBlock
- Added text with
multiline
quote
format
Be careful with the use. Discord for some reason can't always tell when you want to stop using a multiline quote block.
addCombineTextFormatting
- Added text with combine format
All setters implement the Fluent Interface pattern.
An example usage can be found in: MessageBuilderExample