interface LocationMessageOptions {
    address?: string;
    buttons?: MessageButtonsTypes[];
    createChat?: boolean;
    delay?: number;
    detectMentioned?: boolean;
    footer?: string;
    lat: string | number;
    lng: string | number;
    markIsRead?: boolean;
    mentionedList?: (string | WAJS.whatsapp.Wid)[];
    messageId?: string | MsgKey;
    name?: string;
    quotedMsg?: string | MsgKey | MsgModel;
    title?: string;
    url?: string;
    waitForAck?: boolean;
}

Hierarchy (view full)

Properties

address?: string

The full address of place

buttons?: MessageButtonsTypes[]

List of buttons, with at least 1 option and a maximum of 3

createChat?: boolean

Create a new chat to a new contact

false
WPP.chat.sendTextMessage('[number]@c.us', 'Hello new contact', {
createChat: true
});
delay?: number

Delay some time (in ms) before sending message While delaying, Typing Status is used to look like a human interaction

0
WPP.chat.sendTextMessage('[number]@c.us', 'Delay with typing', {
delay: 4000
})
detectMentioned?: boolean

Automatic detect and add the mentioned contacts with @[number]

true
WPP.chat.sendTextMessage('[number]@c.us', 'Hello @123 and @456', {
detectMentioned: true
});
footer?: string

Footer text for buttons

lat: string | number

latitude in degrees

lng: string | number

longitude in degrees

markIsRead?: boolean

Automatically mark chat is read after send a message

true
WPP.chat.sendTextMessage('[number]@c.us', 'Replying your message', {
markIsRead: true
});
mentionedList?: (string | WAJS.whatsapp.Wid)[]

Define a mentioned list for a message This option work better with a message with mension

WPP.chat.sendTextMessage('[number]@c.us', 'Hello @123 and @456', {
mentionedList: ['123@c.us', '456@c.us']
})
messageId?: string | MsgKey
name?: string

Name of the place

quotedMsg?: string | MsgKey | MsgModel

Quote a message, like a reply message

WPP.chat.sendTextMessage('[number]@c.us', 'This is a reply', {
quotedMsg: 'true_[number]@c.us_3EB0F435D95D32C4C638'
})
title?: string

Title for buttons, only for text message

url?: string

URL to open when click on the address/name

waitForAck?: boolean

Wait for send while the ACK of message is SENT(1)

true
WPP.chat.sendTextMessage('[number]@c.us', 'Wait for sent', {
waitForAck: true
})