Adds one attachment to the message's list of attachments, this will not overwrite any existing ones but just adds.
the attachment to add
Gets the attachments array for the message
Gets the url used for the avatar.
Gets the user who edited the message
Gets the emoji used for the avatar.
Gets the resulting message that has been built up to the point of calling it.
Note: This will error out if the Room has not been defined.
Gets the room where this message was sent to.
Gets the User which sent the message.
Gets the message text.
Gets the display text of the sender's username that is visible.
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
Provides a convient 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 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 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.