Skip to main content Wapi.js Docs  / ReactionMessageClass: ReactionMessage Represents a reaction message. 
Implements Extends 
BaseMessage<MessageTypeEnum.Reaction> 
Implements Constructors new ReactionMessage() 
new ReactionMessage (params): ReactionMessage 
Creates a new instance of ReactionMessage. 
Parameters • params  
The parameters for creating the reaction message. 
• params.emoji : string 
The emoji to use as a reaction. 
• params.messageId : string 
The ID of the message to react to. 
Returns ReactionMessageOverrides BaseMessage<MessageTypeEnum.Reaction>.constructorMemberof ReactionMessage 
Source packages/wapi.js/src/structures/reaction/index.ts:30 Properties data 
data : object 
emoji 
emoji : string 
messageId 
messageId : string 
Implementation of ReactionMessageInterfacedataSource packages/wapi.js/src/structures/reaction/index.ts:17 messaging_product 
messaging_product : "whatsapp" 
The messaging product. 
Implementation of ReactionMessageInterfacemessaging_productInherited from BaseMessage.messaging_productSource packages/wapi.js/src/structures/message/index.ts:17 recipient_type 
recipient_type : "individual" 
The recipient type. 
Implementation of ReactionMessageInterfacerecipient_typeInherited from BaseMessage.recipient_typeSource packages/wapi.js/src/structures/message/index.ts:18 type 
type : MessageTypeEnum 
The type of the message. 
Implementation of ReactionMessageInterfacetypeInherited from BaseMessage.typeSource packages/wapi.js/src/structures/message/index.ts:16 Methods parseConstructorPayload() 
protected parseConstructorPayload (schema, payload): any 
Parses the constructor payload using the provided schema. 
Parameters • schema : ZodType<any, ZodTypeDef, any> 
The Zod schema used for parsing the payload. 
• payload : any 
The payload to be parsed. 
Returns anyThe parsed data. 
Inherited from BaseMessage.parseConstructorPayloadThrows An error if the parsing fails. 
Source packages/wapi.js/src/structures/message/index.ts:42 toJson() 
toJson (params): object 
Converts the reaction message to a JSON object. 
Parameters • params  
The parameters for converting the reaction message to JSON. 
• params.to : string 
The recipient of the reaction message. 
Returns object
The JSON representation of the reaction message. 
 
biz_opaque_callback_data? 
optional biz_opaque_callback_data : string 
context? 
optional context : object 
context.message_id 
message_id : string 
messaging_product 
messaging_product : "whatsapp" 
reaction 
reaction : object = ReactionDataPayloadSchemaType 
reaction.emoji 
emoji : string 
reaction.message_id 
message_id : string 
recipient_type 
recipient_type : "individual" 
to 
to : string 
type 
type : Reaction 
Overrides BaseMessage.toJsonMemberof ReactionMessage 
Source packages/wapi.js/src/structures/reaction/index.ts:42