data. ChatMessageData

The data schema for a ChatMessage document.


new ChatMessageData(data, documentopt)

  • BaseChatMessage
Name Type Attributes Default Description
_id string

The _id which uniquely identifies this ChatMessage document

type number <optional>

The message type from CONST.CHAT_MESSAGE_TYPES

user string

The _id of the User document who generated this message

timestamp number

The timestamp at which point this message was generated

flavor string <optional>

An optional flavor text message which summarizes this message

content string

The HTML content of this chat message

speaker data.ChatSpeakerData

A ChatSpeakerData object which describes the origin of the ChatMessage

whisper Array.<string>

An array of User _id values to whom this message is privately whispered

blind boolean <optional>

Is this message sent blindly where the creating User cannot see it?

roll string <optional>

The serialized content of a Roll instance which belongs to the ChatMessage

sound string <optional>

The URL of an audio file which plays when this message is received

emote boolean <optional>

Is this message styled as an emote?

flags object <optional>

An object of optional key/value flags

Name Type Attributes Description
data object

Initial data used to construct the data object

document BaseChatMessage <optional>

The document to which this data object belongs


  • DocumentData