new TextMessageEvent(Creates a new instance of TextMessageEvent.params
):TextMessageEvent
Client
The client associated with the event.
• params.data
The data associated with the event.
• params.data.from: string
• params.data.isForwarded: boolean
• params.data.messageId: string
• params.data.text: TextMessage
• params.data.timestamp: string
TextMessageEvent
MessageEvent
.constructor
client: Client
The client instance associated with the event.
TextMessageEventInterface
.client
MessageEvent
.client
context: MessageContext
The context of the message.
TextMessageEventInterface
.context
MessageEvent
.context
isForwarded: boolean
MessageEvent
.isForwarded
messageId: string
The ID of the message.
TextMessageEventInterface
.messageId
MessageEvent
.messageId
text: TextMessage
The text message associated with the event.
TextMessageEventInterface
.text
timestamp: number
The timestamp of the message.
TextMessageEventInterface
.timestamp
MessageEvent
.timestamp
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