ComponentMessageBuilder class

Extended MessageBuilder with support for buttons

Constructors

ComponentMessageBuilder()

Properties

allowedMentions ↔ AllowedMentions?
AllowedMentions object to control mentions in message
getter/setter pairinherited
attachments List<AttachmentMetadataBuilder>?
List of attachments to send with message
getter/setter pairinherited
componentRows List<ComponentRowBuilder>?
Set of buttons to attach to message. Message can only have 5 rows with 5 buttons each.
getter/setter pair
content String
Returns current content of message
getter/setter pairinherited
embeds List<EmbedBuilder>?
Embed to include in message
getter/setter pairinherited
files List<AttachmentBuilder>?
List of files to send with message
getter/setter pairinherited
flags ↔ MessageFlagBuilder?
Flags to attach to message
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
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
getter/setter pairinherited
replyBuilder ↔ ReplyBuilder?
Allows to create message that replies to another message
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tts bool?
Set to true if message should be TTS
getter/setter pairinherited

Methods

addAttachment(AttachmentBuilder attachment) → void
Add attachment
inherited
addBytesAttachment(List<int> bytes, String name, {bool spoiler = false}) → void
Add attachment from specified bytes
inherited
addComponentRow(ComponentRowBuilder componentRowBuilder) → void
Allows to add
addEmbed(FutureOr<void> builder(EmbedBuilder embed)) FutureOr<void>
Allows to add embed to message. Warning: Completes future synchronously!
inherited
addFileAttachment(File file, {String? name, bool spoiler = false}) → void
Add attachment from specified file
inherited
addPathAttachment(String path, {String? name, bool spoiler = false}) → void
Add attachment at specified path
inherited
append(Object text) → void
Allows to append
inherited
appendBold(Object text) → void
Appends bold text to message
inherited
appendClearCharacter() → void
Appends clear character. Can be used to skip first line in message body.
inherited
appendCode(Object language, Object code) → void
Appends code block to message
inherited
appendCodeSimple(Object text) → void
Appends simple code to message
inherited
appendItalics(Object text) → void
Appends italic text to message
inherited
appendMention(Mentionable mentionable) → void
Appends Mentionable object to message
inherited
appendNewLine() → void
Appends empty line to message
inherited
appendSpoiler(Object text) → void
Appends spoiler to message
inherited
appendStrike(Object text) → void
Appends strikeout text to message
inherited
appendTimestamp(DateTime dateTime, {TimeStampStyle style = TimeStampStyle.def}) → void
Appends timestamp to message from dateTime
inherited
appendWithDecoration(Object text, MessageDecoration decoration) → void
Appends formatted text to message
inherited
build([AllowedMentions? defaultAllowedMentions]) → RawApiMap
canBeUsedAsNewMessage() bool
Returns if this instance of message builder can be used when editing message
getMappedFiles() Iterable<MultipartFile>
inherited
hasFiles() bool
inherited
limitLength({int length = 2000, String? ellipsis = '...'}) → void
Limits the length of the content of the builder to length.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(ISend entity) Future<IMessage>
Sends message
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited