ReactionEvent
Wapi.js Docs / ReactionEvent
Class: ReactionEvent
Represents a reaction event.
Implements
Extends
Implements
Constructors
new ReactionEvent()
new ReactionEvent(
params
):ReactionEvent
Creates a new instance of ReactionEvent.
Parameters
• params
The parameters for creating the ReactionEvent.
• params.client: Client
The client associated with the event.
• params.data
The data associated with the event.
• params.data.from: string
• params.data.id: string
• params.data.isForwarded: boolean
• params.data.reaction: ReactionMessage
• params.data.timestamp: string
Returns
Overrides
Source
packages/wapi.js/src/webhook/events/reaction/index.ts:32
Properties
client
client:
Client
The client instance associated with the event.
Implementation of
Inherited from
Source
packages/wapi.js/src/webhook/events/base/index.ts:20
context
context:
MessageContext
The context of the message.
Implementation of
ReactionEventInterface
.context
Inherited from
Source
packages/wapi.js/src/webhook/events/base/index.ts:37
isForwarded
isForwarded:
boolean
Inherited from
Source
packages/wapi.js/src/webhook/events/base/index.ts:39
messageId
messageId:
string
The ID of the message.
Implementation of
ReactionEventInterface
.messageId
Inherited from
Source
packages/wapi.js/src/webhook/events/base/index.ts:36
reaction
reaction:
ReactionMessage
The reaction message associated with the event.
Implementation of
ReactionEventInterface
.reaction
Source
packages/wapi.js/src/webhook/events/reaction/index.ts:19
timestamp
timestamp:
number
The timestamp of the message.
Implementation of
ReactionEventInterface
.timestamp
Inherited from
Source
packages/wapi.js/src/webhook/events/base/index.ts:38
Methods
react()
react(
params
):Promise
<object
|object
>
Reacts to the message with an emoji.
Parameters
• params
The parameters for the reaction.
• params.emoji: string
The emoji to react with.
• params.phoneNumber: string
The phone number of the sender.
Returns
Promise
<object
| object
>
- A promise that resolves with the reaction response.
Inherited from
Source
packages/wapi.js/src/webhook/events/base/index.ts:100
read()
read():
Promise
<object
|object
|object
|object
|object
>
Marks the message as read.
Returns
Promise
<object
| object
| object
| object
| object
>
- A promise that resolves with the read response.
Inherited from
Memberof
MessageEvent
Source
packages/wapi.js/src/webhook/events/base/index.ts:121
reply()
reply<
T
>(props
):Promise
<object
|object
>
Sends a reply to the message.
Type parameters
• T extends BaseMessage
<string
>
Parameters
• props
The properties for the reply.
• props.message: T
The message to send as a reply.
Returns
Promise
<object
| object
>
- A promise that resolves when the reply is sent.
Inherited from
Throws
- If the context message ID is not found.
Source
Was this page helpful?