interface ChatMessageData {
    _id: null | string;
    _stats: DocumentStats;
    blind?: boolean;
    content: string;
    emote?: boolean;
    flags: DocumentFlags;
    flavor?: string;
    rolls?: string[];
    sound?: string;
    speaker: ChatSpeakerData;
    style?: ChatMessageStyle;
    system: object;
    timestamp: number;
    title?: string;
    type: string;
    user: string;
    whisper: string[];
}

Properties

_id: null | string

The _id which uniquely identifies this ChatMessage document

An object of creation and access information

blind?: boolean

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

content: string

The HTML content of this chat message

emote?: boolean

Is this message styled as an emote?

An object of optional key/value flags

flavor?: string

An optional flavor text message which summarizes this message

rolls?: string[]

Serialized content of any Roll instances attached to the ChatMessage

sound?: string

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

A ChatSpeakerData object which describes the origin of the ChatMessage

The message style from CONST.CHAT_MESSAGE_STYLES

system: object

Data for a ChatMessage subtype, defined by a System or Module

timestamp: number

The timestamp at which point this message was generated

title?: string

An optional title used if the message is popped-out

type: string

The type of this chat message, in BaseChatMessage.metadata.types

user: string

The _id of the User document who generated this message

whisper: string[]

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