BaseMessage
<MessageTypeEnum.Reaction
>new ReactionMessage(Creates a new instance of ReactionMessage.params
):ReactionMessage
string
The emoji to use as a reaction.
• params.messageId: string
The ID of the message to react to.
ReactionMessage
BaseMessage<MessageTypeEnum.Reaction>.constructor
data: object
emoji: string
messageId: string
ReactionMessageInterface
.data
messaging_product: "whatsapp"
The messaging product.
ReactionMessageInterface
.messaging_product
BaseMessage.messaging_product
recipient_type: "individual"
The recipient type.
ReactionMessageInterface
.recipient_type
BaseMessage.recipient_type
type: MessageTypeEnum
The type of the message.
ReactionMessageInterface
.type
BaseMessage.type
Parses the constructor payload using the provided schema.protected
parseConstructorPayload(schema
,payload
):any
ZodType
<any
, ZodTypeDef
, any
>
The Zod schema used for parsing the payload.
• payload: any
The payload to be parsed.
any
The parsed data.
BaseMessage.parseConstructorPayload
toJson(Converts the reaction message to a JSON object.params
):object
string
The recipient of the reaction message.
object
optional
biz_opaque_callback_data:string
optional
context:object
message_id: string
messaging_product: "whatsapp"
reaction:object
=ReactionDataPayloadSchemaType
emoji: string
message_id: string
recipient_type: "individual"
to: string
type: Reaction
BaseMessage.toJson