whatsapp

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppMonitor

func AppMonitor()

AppMonitor Prevents the application from running until stopped

func Initial_startup

func Initial_startup(w *WhatsApp) error

Initial_startup It checks if the html attribute existing only in the qr code check table exists. If it exists, it means that whatsapp is not authenticated, returning <nil> in your call.

Types

type WhatsApp

type WhatsApp struct {
	// Browser returns the driver components
	Browser driver.ChromeDriver
	// contains filtered or unexported fields
}

WhatsApp controls the drivers needed to store the session

func (*WhatsApp) Authenticate

func (w *WhatsApp) Authenticate()

Authenticate Initializes the driver by opening the whatsapp address with the variable control. After correctly scanning the QR code on the mobile device, authentication will be performed and messaging will be allowed.

In case there is a need to authenticate several numbers, the ideal is to execute these functions in a goroutine, because during the QR Code Scan time, a repeating for loop is executed, preventing the code from continuing until its end (when it is done the scan of the QR Code and the session is created).

func (*WhatsApp) CheckDriverStatus added in v1.0.2

func (w *WhatsApp) CheckDriverStatus() error

func (*WhatsApp) SendMessageToNumber

func (w *WhatsApp) SendMessageToNumber(number uint64, message string, sleep_time int64) error

SendMessageToNumber Attempts to send a text message to a number, returning an error on failure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL