atwa

package module
v0.0.0-...-a35f561 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 6 Imported by: 0

README

atwa

whats helper

Documentation

Index

Constants

View Source
const (
	MediaTypeImage = MediaType(iota)
	MediaTypeVideo
	MediaTypeAudio
	MediaTypeDocument
)

Variables

View Source
var (
	AppInfo = map[MediaType]string{
		MediaTypeImage:    "WhatsApp Image Keys",
		MediaTypeVideo:    "WhatsApp Video Keys",
		MediaTypeAudio:    "WhatsApp Audio Keys",
		MediaTypeDocument: "WhatsApp Document Keys",
	}
)
View Source
var V interface{}

Functions

func GetLiveLoc

func GetLiveLoc(Message *waProto.Message) (lat float64, long float64)

func SendButtonMessage

func SendButtonMessage(btnmsg model.ButtonsMessage, toJID types.JID) (resp whatsmeow.SendResponse, err error)

func SendListMessage

func SendListMessage(lstmsg model.ListMessage, toJID types.JID) (resp whatsmeow.SendResponse, err error)

func SendMessage

func SendMessage(msg string, toJID types.JID) (resp whatsmeow.SendResponse, err error)

Types

type ButtonsMessage

type ButtonsMessage struct {
	Message WaButtonsMessage `json:"message,omitempty"`
	Buttons []WaButton       `json:"buttons,omitempty"`
}

type Chat

type Chat struct {
	Phone_number string `json:"phone_number"`
	Messages     string `json:"messages"`
}

type IteungMessage

type IteungMessage struct {
	Phone_number string  `json:"phone_number"`
	Group_name   string  `json:"group_name"`
	Alias_name   string  `json:"alias_name"`
	Messages     string  `json:"messages"`
	Is_group     string  `json:"is_group"`
	Filename     string  `json:"filename"`
	Filedata     string  `json:"filedata"`
	Latitude     float64 `json:"latitude"`
	Longitude    float64 `json:"longitude"`
	Api_key      string  `json:"api_key"`
}

type IteungRespon

type IteungRespon struct {
	Message string `json:"message"`
}

type ListMessage

type ListMessage struct {
	Title       string
	Description string
	FooterText  string
	ButtonText  string
	Sections    []WaListSection
}

type MediaType

type MediaType int

type Notif

type Notif struct {
	User     string `json:"user"`
	Server   string `json:"server"`
	Messages string `json:"messages"`
}

type NotifButton

type NotifButton struct {
	User    string         `json:"user"`
	Server  string         `json:"server"`
	Message ButtonsMessage `json:"button_messages"`
}

type PhoneList

type PhoneList struct {
	Phones []string `json:"phones,omitempty"`
}

type QRScan

type QRScan struct {
	QR      string `json:"qr"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type Response

type Response struct {
	Response string `json:"response"`
}

type WaButton

type WaButton struct {
	ButtonId    string `json:"button_id,omitempty"`
	DisplayText string `json:"display_text,omitempty"`
}

type WaButtonsMessage

type WaButtonsMessage struct {
	HeaderText  string `json:"header_text,omitempty"`
	ContentText string `json:"content_text,omitempty"`
	FooterText  string `json:"footer_text,omitempty"`
}

type WaListRow

type WaListRow struct {
	Title       string
	Description string
	RowId       string
}

type WaListSection

type WaListSection struct {
	Title string
	Rows  []WaListRow
}

Jump to

Keyboard shortcuts

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