mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-19 20:19:14 +00:00
Feat: add message_reaction event (#1619)
* Add 'message_reaction' event
This commit is contained in:
19
index.d.ts
vendored
19
index.d.ts
vendored
@@ -241,6 +241,12 @@ declare namespace WAWebJS {
|
||||
message: Message
|
||||
) => void): this
|
||||
|
||||
/** Emitted when a reaction is sent, received, updated or removed */
|
||||
on(event: 'message_reaction', listener: (
|
||||
/** The reaction object */
|
||||
reaction: Reaction
|
||||
) => void): this
|
||||
|
||||
/** Emitted when loading screen is appearing */
|
||||
on(event: 'loading_screen', listener: (percent: string, message: string) => void): this
|
||||
|
||||
@@ -1307,6 +1313,19 @@ declare namespace WAWebJS {
|
||||
|
||||
constructor(body: string, buttons: Array<{ id?: string; body: string }>, title?: string | null, footer?: string | null)
|
||||
}
|
||||
|
||||
/** Message type Reaction */
|
||||
export class Reaction {
|
||||
id: MessageId
|
||||
orphan: number
|
||||
orphanReason?: string
|
||||
timestamp: number
|
||||
reaction: string
|
||||
read: boolean
|
||||
msgId: MessageId
|
||||
senderId: string
|
||||
ack?: number
|
||||
}
|
||||
}
|
||||
|
||||
export = WAWebJS
|
||||
|
||||
Reference in New Issue
Block a user