Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Message

Hierarchy

  • Message

Index

Properties

ack

The acknolwedgement state of a message MessageAck

author

author: string

body

body: string

The body of the message. If the message type is chat , body will be the text of the chat. If the message type is some sort of media, then this body will be the thumbnail of the media.

broadcast

broadcast: boolean

If the message is sent as a broadcast

Optional buttons

buttons: Button[]

Buttons associated with the message

caption

caption: string

If the message is of a media type, it may also have a caption

chat

chat: Chat

The chat object

chatId

chatId: ChatId

clientUrl

clientUrl: string
deprecated

Ironically, you should be using deprecatedMms3Url instead

Optional cloudUrl

cloudUrl: string

The URL of the file after being uploaded to the cloud using a cloud upload message preprocessor.

content

content: string

deprecatedMms3Url

deprecatedMms3Url: string

Optional duration

duration: string | number

The length of the media in the message, if it exists.

Optional filePath

filePath: string

When config.messagePreprocessor: "AUTO_DECRYPT_SAVE" is set, media is decrypted and saved on disk in a folder called media relative to the current working directory.

This is the filePath of the decrypted file.

Optional filehash

filehash: string

Used to checking the integrity of the decrypted media.

Optional filename

filename: string

The given filename of the file

from

from: ChatId

The chat from which the message was sent

fromMe

fromMe: boolean

If the message is from the host account

id

The id of the message

invis

invis: boolean

isAnimated

isAnimated: boolean

isForwarded

isForwarded: boolean

If the message has been forwarded

isGroupMsg

isGroupMsg: boolean

isMMS

isMMS: boolean

isMedia

isMedia: boolean

isNewMsg

isNewMsg: boolean

isNotification

isNotification: boolean

isPSA

isPSA: boolean

isViewOnce

isViewOnce: boolean

Is the message a "view once" message

labels

labels: string[]

The labels associated with the message (used with business accounts)

Optional lat

lat: string

The latitude of a location message

Optional list

list: { buttonText: string; description: string; sections: Section[]; title: string }

The list associated with the list message

Type declaration

  • buttonText: string
  • description: string
  • sections: Section[]
  • title: string

Optional listResponse

listResponse: Row

List response associated with the message

Optional lng

lng: string

The longitude of a location message

Optional loc

loc: string

The text associated with a location message

mediaData

mediaData: unknown

mentionedJidList

mentionedJidList: ContactId[]

An array of all mentioned numbers in this message.

Optional mimetype

mimetype: string

notifyName

notifyName: string

quoteMap

quoteMap: QuoteMap

Use this to traverse the quote chain.

Optional quotedMsg

quotedMsg: Message

Optional quotedMsgObj

quotedMsgObj: Message

recvFresh

recvFresh: boolean

selectedButtonId

selectedButtonId: string

The ID of the selected button

self

self: "in" | "out"

Indicates whether the message was sent by the host account

sender

sender: Contact

The contact object of the account that sent the message

shareDuration

shareDuration: number

star

star: boolean

Optional stickerAuthor

stickerAuthor: string

Optional stickerPack

stickerPack: string

t

t: number

The timestamp of the message

text

text: string

a convenient way to get the main text content from a message.

timestamp

timestamp: number

the timestanmp of the message

to

to: ChatId

The chat id to which the message is being sent

type

The type of the message, see MessageTypes