abstract
MediaMessageEventnew MediaMessageEvent(Creates a new instance of the MediaMessageEvent class.params
):MediaMessageEvent
Client
The client instance.
• params.from: string
The sender’s phone number.
• params.isForwarded: boolean
Indicates if the message is forwarded.
• params.mediaId: string
The ID of the media.
• params.messageId: string
The message ID.
• params.mimeType: string
The MIME type of the media.
• params.sha256: string
The SHA256 hash of the media.
• params.timestamp: string
The timestamp of the message.
MediaMessageEvent
MessageEvent
.constructor
client: Client
The client instance associated with the event.
MediaMessageEventInterface
.client
MessageEvent
.client
context: MessageContext
The context of the message.
MediaMessageEventInterface
.context
MessageEvent
.context
isForwarded: boolean
MessageEvent
.isForwarded
mediaId: string
The ID of the media.
MediaMessageEventInterface
.mediaId
messageId: string
The ID of the message.
MediaMessageEventInterface
.messageId
MessageEvent
.messageId
mimeType: string
The MIME type of the media.
MediaMessageEventInterface
.mimeType
sha256: string
The SHA256 hash of the media.
MediaMessageEventInterface
.sha256
timestamp: number
The timestamp of the message.
MediaMessageEventInterface
.timestamp
MessageEvent
.timestamp
getUrl():Gets the URL of the media.Promise
<string
>
Promise
<string
>
MediaMessageEventInterface
.getUrl
react(Reacts to the message with an emoji.params
):Promise
<object
|object
>
string
The emoji to react with.
• params.phoneNumber: string
The phone number of the sender.
Promise
<object
| object
>
MessageEvent
.react
read():Marks the message as read.Promise
<object
|object
|object
|object
|object
>
Promise
<object
| object
| object
| object
| object
>
MessageEvent
.read
reply<Sends a reply to the message.T
>(props
):Promise
<object
|object
>
BaseMessage
<string
>
T
The message to send as a reply.
Promise
<object
| object
>
MessageEvent
.reply