Documentation
¶
Overview ¶
Package whatsapp exposes the WhatsApp (Meta Cloud API) constructor, the raw-message accessor, and the Config/Message/Media types for botbooter. Import it for a WhatsApp bot; the adapter speaks the Cloud API over plain HTTP, so a WhatsApp-only binary pulls in no third-party platform SDK — it never compiles discordgo, slack-go or go-telegram.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMissingConfig = waint.ErrMissingConfig
ErrMissingConfig is returned by New when a required Config field is empty.
Functions ¶
func Addr ¶
Addr returns the address b's webhook listener is bound to (host:port), or "" if b is not a WhatsApp bot or is not connected. Use it to recover the OS-assigned port after passing cfg.Addr ":0".
func New ¶
New creates a WhatsApp bot backed by the Meta Cloud API. It runs an inbound webhook HTTP server at cfg.Addr, so put a TLS-terminating proxy in front and register the public HTTPS URL in Meta's webhook settings. It returns ErrMissingConfig if a required config field is missing.