diff options
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/README.md')
-rw-r--r-- | vendor/github.com/Rhymen/go-whatsapp/README.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/README.md b/vendor/github.com/Rhymen/go-whatsapp/README.md index f3c7ef58..7f12dd72 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/README.md +++ b/vendor/github.com/Rhymen/go-whatsapp/README.md @@ -74,6 +74,10 @@ func (myHandler) HandleBatteryMessage(msg whatsapp.BatteryMessage) { fmt.Println(message) } +func (myHandler) HandleNewContact(contact whatsapp.Contact) { + fmt.Println(contact) +} + wac.AddHandler(myHandler{}) ``` The message handlers are all optional, you don't need to implement anything but the error handler to implement the interface. The ImageMessage, VideoMessage, AudioMessage and DocumentMessage provide a Download function to get the media data. |