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
parent fd368361df
commit f2ec77f969
6 changed files with 129 additions and 1 deletions

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