feat: Send buttons and Lists (#756)

This commit is contained in:
tuyuribr 2021-09-13 18:06:05 -03:00 • committed by GitHub
commit b60029ed09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 259 additions and 6 deletions

27
index.d.ts vendored
View file

@ -567,6 +567,12 @@ declare namespace WAWebJS {
businessOwnerJid?: string,
/** Product JID */
productId?: string,
/** Message buttons */
dynamicReplyButtons?: object,
/** Selected button ID */
selectedButtonId?: string,
/** Selected list row ID */
selectedRowId?: string,
/** Accept the Group V4 Invite in message */
acceptGroupV4Invite: () => Promise<{status: number}>,
/** Deletes the message from the chat */
@ -1149,6 +1155,27 @@ declare namespace WAWebJS {
/** Object with participants */
participants: object
}
/** Message type List */
export class List {
body: string
buttonText: string
sections: Array<any>
title?: string | null
footer?: string | null
constructor(body: string, buttonText: string, sections: Array<any>, title?: string | null, footer?: string | null)
}
/** Message type buttons */
export class Buttons {
body: string | MessageMedia
buttons: Array<Array<string>>
title?: string | null
footer?: string | null
constructor(body: string, buttons: Array<Array<string>>, title?: string | null, footer?: string | null)
}
}
export = WAWebJS