Adds one attachment to the message's list of attachments, this will not overwrite any existing ones but just adds.
the attachment to add
Adds a block collection to the message's own collection
Adds a custom field to the message. Note: This key can not already exist or it will throw an error. Note: The key must not contain a period in it, an error will be thrown.
the name of the custom field
the value of this custom field
Gets the attachments array for the message
Removes an attachment at the given position (index). If there is no attachment at that position, there will be an error thrown.
the index of the attachment to remove
Replaces an attachment at the given position (index). If there is no attachment at that position, there will be an error thrown.
the index of the attachment to replace
the attachment to replace with
Sets the attachments for the message, replacing and destroying all of the current attachments.
array of the attachments
Sets the url which to display for the avatar, this overwrites the current avatar whether it be the user's or an emoji one.
image url to use as the avatar
Sets the block collection of the message
Provides a convenient way to set the data for the message. Note: Providing an "id" field here will be ignored.
the message data to set
Sets the user who is editing this message. This is required if you are modifying an existing message.
the editor
Sets the emoji to use for the avatar, this overwrites the current avatar whether it be the user's or the avatar url provided.
the emoji code
Sets whether this message can group with others. This is desirable if you want to avoid confusion with other integrations.
whether this message can group with others
Sets whether this message should have any URLs in the text parsed by Rocket.Chat and get the details added to the message's attachments.
whether URLs should be parsed in this message
Sets the room where this message should be sent to.
the room where to send
Sets the sender of this message.
the user sending the message
Sets the text of the message.
the actual text
Sets the thread to which this message belongs, if any.
The id of the thread
Provides a convenient way to set the data for the message keeping the "id" field so as to update the message later.
Sets the display text of the sender's username that is visible.
the username alias to display
Generated using TypeDoc
Interface for building out a message. Please note, that a room and sender must be associated otherwise you will NOT be able to successfully save the message object.