Class: ListInteractionMessage
Represents a list interaction message.Implements
Extends
Implements
Constructors
new ListInteractionMessage()
new ListInteractionMessage(Creates an instance of ListInteractionMessage.params
):ListInteractionMessage
Parameters
• params The parameters for creating the list interaction message. • params.bodyText:string
The body text of the message.
• params.buttonText: string
The button text of the message.
• params.footerText?: string
The footer text of the message.
• params.sections: object
[]
The sections of the message.
Returns
ListInteractionMessage
Overrides
InteractiveMessage
.constructor
Memberof
ListInteractionMessageSource
packages/wapi.js/src/structures/interaction/index.ts:212Properties
data
data: object
buttonText
buttonText: string
sections
sections: object
[]
Implementation of
ListInteractionMessageInterface
.data
Source
packages/wapi.js/src/structures/interaction/index.ts:190interactiveMessageData
readonly
interactiveMessageData:object
bodyText
bodyText: string
footerText?
optional
footerText:string
header?
optional
header:object
|object
|object
|object
type
type: InteractiveMessageTypeEnum
Implementation of
ListInteractionMessageInterface
.interactiveMessageData
Inherited from
InteractiveMessage
.interactiveMessageData
Source
packages/wapi.js/src/structures/interaction/index.ts:31messaging_product
messaging_product: "whatsapp"
The messaging product.
Implementation of
ListInteractionMessageInterface
.messaging_product
Inherited from
InteractiveMessage
.messaging_product
Source
packages/wapi.js/src/structures/message/index.ts:17recipient_type
recipient_type: "individual"
The recipient type.
Implementation of
ListInteractionMessageInterface
.recipient_type
Inherited from
InteractiveMessage
.recipient_type
Source
packages/wapi.js/src/structures/message/index.ts:18type
type: MessageTypeEnum
The type of the message.
Implementation of
ListInteractionMessageInterface
.type
Inherited from
InteractiveMessage
.type
Source
packages/wapi.js/src/structures/message/index.ts:16Methods
addFooter()
addFooter(Adds a footer to the message.footerText
):void
Parameters
• footerText:string
The footer text to be added.
Returns
void
Source
packages/wapi.js/src/structures/interaction/index.ts:247addHeader()
addHeader(): void
Adds a header to the message.
Returns
void
Source
packages/wapi.js/src/structures/interaction/index.ts:241addSection()
addSection(Adds a section to the message.section
):void
Parameters
• section The section to be added. • section.rows:object
[]= undefined
• section.title: string
= undefined
Returns
void
Source
packages/wapi.js/src/structures/interaction/index.ts:234parseConstructorPayload()
Parses the constructor payload using the provided schema.protected
parseConstructorPayload(schema
,payload
):any
Parameters
• schema:ZodType
<any
, ZodTypeDef
, any
>
The Zod schema used for parsing the payload.
• payload: any
The payload to be parsed.
Returns
any
The parsed data.
Inherited from
InteractiveMessage
.parseConstructorPayload
Throws
An error if the parsing fails.Source
packages/wapi.js/src/structures/message/index.ts:42toJson()
toJson(Converts the message to JSON format.params
):object
&object
Parameters
• params The parameters for converting the message to JSON. • params.replyToMessageId?:string
The ID of the message to reply to.
• params.to: string
The recipient of the message.
Returns
object
& object
The JSON representation of the message.
Overrides
InteractiveMessage
.toJson