MessageBuilder class Null safety

Allows to create pre built custom messages which can be passed to classes which inherits from ISend.



Generic constructor for MessageBuilder
MessageBuilder.content(String content)
Creates MessageBuilder with only content
MessageBuilder.embed(EmbedBuilder embed)
Creates MessageBuilder with only embed
Creates MessageBuilder with content of empty character
MessageBuilder.files(List<AttachmentBuilder> files)
Creates MessageBuilder with only specified files
MessageBuilder.fromMessage(Message message)
Creates MessageBuilder from Message. Copies content, tts and first embed of target message


allowedMentions AllowedMentions?
AllowedMentions object to control mentions in message
read / write
content String
Returns current content of message
read / write
embeds List<EmbedBuilder>
Embed to include in message
read / write
files List<AttachmentBuilder>?
List of files to send with message
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
nonce String?
A nonce that can be used for optimistic message sending (up to 25 characters) You will be able to identify that message when receiving it through gateway
read / write
replyBuilder ReplyBuilder?
Allows to create message that replies to another message
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
tts bool?
Set to true if message should be TTS
read / write


addAttachment(AttachmentBuilder attachment) → void
Add attachment
addBytesAttachment(List<int> bytes, String name, {bool spoiler = false}) → void
Add attachment from specified bytes
addEmbed(void builder(EmbedBuilder embed)) → void
Allows to add embed to message
addFileAttachment(File file, {String? name, bool spoiler = false}) → void
Add attachment from specified file
addPathAttachment(String path, {String? name, bool spoiler = false}) → void
Add attachment at specified path
append(Object text) → void
Allows to append
appendBold(Object text) → void
Appends bold text to message
appendClearCharacter() → void
Appends clear character. Can be used to skip first line in message body.
appendCode(Object language, Object code) → void
Appends code block to message
appendCodeSimple(Object text) → void
Appends simple code to message
appendItalics(Object text) → void
Appends italic text to message
appendMention(Mentionable mentionable) → void
Appends Mentionable object to message
appendNewLine() → void
Appends empty line to message
appendSpoiler(Object text) → void
Appends spoiler to message
appendStrike(Object text) → void
Appends strikeout text to message
appendTimestamp(DateTime dateTime, {TimeStampStyle style = TimeStampStyle.def}) → void
Appends timestamp to message from dateTime
appendWithDecoration(Object text, MessageDecoration decoration) → void
Appends formatted text to message
build(INyxx client) RawApiMap
Returns built response for api
canBeUsedAsNewMessage() bool
Returns if this instance of message builder can be used when editing message
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
send(ISend entity) Future<Message>
Sends message
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]


clearCharacter → const String
Clear character which can be used to skip first line in message body or sanitize message content