Feat: add message_reaction event (#1619)

* Add 'message_reaction' event
This commit is contained in:
Wictor Nogueira 2022-08-09 12:09:16 -07:00 • committed by GitHub
commit f2ec77f969
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

19
index.d.ts vendored
View file

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