Optional
captionOptional
createCreate a new chat to a new contact
Optional
delayDelay some time (in ms) before sending message While delaying, Typing Status is used to look like a human interaction
Optional
detectAutomatic detect and add the mentioned contacts with @[number]
Optional
filenameOptional
footerOptional
isOptional
isOptional
markAutomatically mark chat is read after send a message
Optional
mentionedDefine a mentioned list for a message This option work better with a message with mension
Optional
messageOptional
mimetypeOptional
quotedQuote a message, like a reply message
Optional
waitWait for send while the ACK of message is SENT(1)
Optional
waveformSend an audio message as a PTT with waveform
// Enable waveform
WPP.chat.sendFileMessage(
'[number]@c.us',
'data:audio/mp3;base64,<a long base64 file...>',
{
type: 'audio',
isPtt: true,
waveform: true // false to disable
}
);
// Disable waveform
WPP.chat.sendFileMessage(
'[number]@c.us',
'data:audio/mp3;base64,<a long base64 file...>',
{
type: 'audio',
isPtt: true,
waveform: false
}
);
Send an audio message as a PTT, like a recorded message
Example