to— the recipient (5511999999999@s.whatsapp.net, a group...@g.us, etc.). See JID helpers for building these.content— a string, a typed content object, or a rawProto.IMessage.options— quoting, mentions, forwarding, view-once, edits, and more.
WaMessagePublishResult once the server acks:
Plain text
The simplest content is a string:Replying (quoting)
Pass the original message event (or a reference) asoptions.quote:
Mentions
options.mentions is a list of JIDs to tag. Include the matching @number text in the body so WhatsApp renders the mention:
Link previews
Link-preview behavior is controlled per message via the text object’slinkPreview field:
linkPreview client option.
Forwarding
Setoptions.forward to mark a message as forwarded:
Send options reference
WaSendMessageOptions (third argument) includes:
The content union
content accepts any WaSendMessageContent. The typed variants are documented across these guides:
Media
Images, video, audio, documents, stickers.
Polls & reactions
Polls, votes, reactions, pins, edits, revokes, events.
Proto.IMessage for anything not covered by a typed builder:
Location and contact
Message types without a typed builder are sent as rawProto.IMessage fields — for example location and contact:
Proto.IMessage fields (location, live location, contacts, group invite, product, order, …) is listed in the message types reference.