> ## Documentation Index
> Fetch the complete documentation index at: https://javascript.wapikit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ReactionMessage

[Wapi.js Docs](../README.mdx) / ReactionMessage

# Class: ReactionMessage

Represents a reaction message.

## Implements

## Extends

* `BaseMessage`\<`MessageTypeEnum.Reaction`>

## Implements

* [`ReactionMessageInterface`](../interfaces/ReactionMessageInterface.mdx)

## Constructors

### new ReactionMessage()

> **new ReactionMessage**(`params`): [`ReactionMessage`](ReactionMessage.mdx)

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

[`ReactionMessage`](ReactionMessage.mdx)

#### Overrides

`BaseMessage<MessageTypeEnum.Reaction>.constructor`

#### Memberof

ReactionMessage

#### Source

[packages/wapi.js/src/structures/reaction/index.ts:30](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/reaction/index.ts#L30)

## Properties

### data

> **data**: `object`

#### emoji

> **emoji**: `string`

#### messageId

> **messageId**: `string`

#### Implementation of

[`ReactionMessageInterface`](../interfaces/ReactionMessageInterface.mdx).[`data`](../interfaces/ReactionMessageInterface.mdx#data)

#### Source

[packages/wapi.js/src/structures/reaction/index.ts:17](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/reaction/index.ts#L17)

***

### messaging\_product

> **messaging\_product**: `"whatsapp"`

The messaging product.

#### Implementation of

[`ReactionMessageInterface`](../interfaces/ReactionMessageInterface.mdx).[`messaging_product`](../interfaces/ReactionMessageInterface.mdx#messaging_product)

#### Inherited from

`BaseMessage.messaging_product`

#### Source

[packages/wapi.js/src/structures/message/index.ts:17](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L17)

***

### recipient\_type

> **recipient\_type**: `"individual"`

The recipient type.

#### Implementation of

[`ReactionMessageInterface`](../interfaces/ReactionMessageInterface.mdx).[`recipient_type`](../interfaces/ReactionMessageInterface.mdx#recipient_type)

#### Inherited from

`BaseMessage.recipient_type`

#### Source

[packages/wapi.js/src/structures/message/index.ts:18](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L18)

***

### type

> **type**: `MessageTypeEnum`

The type of the message.

#### Implementation of

[`ReactionMessageInterface`](../interfaces/ReactionMessageInterface.mdx).[`type`](../interfaces/ReactionMessageInterface.mdx#type)

#### Inherited from

`BaseMessage.type`

#### Source

[packages/wapi.js/src/structures/message/index.ts:16](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L16)

## 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

`any`

The parsed data.

#### Inherited from

`BaseMessage.parseConstructorPayload`

#### Throws

An error if the parsing fails.

#### Source

[packages/wapi.js/src/structures/message/index.ts:42](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/message/index.ts#L42)

***

### 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.toJson`

#### Memberof

ReactionMessage

#### Source

[packages/wapi.js/src/structures/reaction/index.ts:42](https://github.com/sarthakjdev/wapi.js/blob/1b066ed4efaf997a4bb012da51514dfcb4165da6/packages/wapi.js/src/structures/reaction/index.ts#L42)
