feat: Send buttons and Lists (#756)

This commit is contained in:
tuyuribr
2021-09-13 18:06:05 -03:00
committed by GitHub
parent ab415ff9be
commit b60029ed09
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