whats

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSentHandler

func AddSentHandler(handler HandlerSentMessage)

func EventIs

func EventIs(e interface{}, i interface{}) bool

func GetTextContext

func GetTextContext(msg *waProto.Message) (string, *waProto.ContextInfo)

func NewAudio

func NewAudio(data []byte, mimetype string, ptt bool, seconds int, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.AudioMessage, error)

func NewAudioMessage

func NewAudioMessage(data []byte, mimetype string, ptt bool, seconds int, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewAudioMessageFile

func NewAudioMessageFile(filename string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewButtons

func NewButtons(header interface{}, content, footer string, buttons []*waProto.ButtonsMessage_Button, ctx *waProto.ContextInfo) (*waProto.ButtonsMessage, error)

func NewButtonsMessage

func NewButtonsMessage(header interface{}, content, footer string, buttons []*waProto.ButtonsMessage_Button, ctx *waProto.ContextInfo) (*waProto.Message, error)

func NewConversation

func NewConversation(text string) (*waProto.Message, error)

func NewDocument

func NewDocument(data []byte, filename string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.DocumentMessage, error)

func NewDocumentMessage

func NewDocumentMessage(data []byte, filename string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewDocumentMessageFile

func NewDocumentMessageFile(filename string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewExtendedMessage

func NewExtendedMessage(text string, ctx *waProto.ContextInfo) (*waProto.Message, error)

func NewFormatTemplate

func NewFormatTemplate(title interface{}, content, footer, template_id string, buttons []*waProto.HydratedTemplateButton, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.TemplateMessage, error)

func NewFormatTemplateMessage

func NewFormatTemplateMessage(title interface{}, content, footer, template_id string, buttons []*waProto.HydratedTemplateButton, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewHydratedTemplate

func NewHydratedTemplate(title interface{}, content, footer, template_id string, buttons []*waProto.HydratedTemplateButton, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.TemplateMessage, error)

func NewHydratedTemplateMessage

func NewHydratedTemplateMessage(title interface{}, content, footer, template_id string, buttons []*waProto.HydratedTemplateButton, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewImage

func NewImage(data []byte, caption string, resize int, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.ImageMessage, error)

func NewImageMessage

func NewImageMessage(data []byte, caption string, resize int, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewImageMessageFile

func NewImageMessageFile(filename, caption string, resize int, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewList

func NewList(title, description, toggle, footer string, section []*waProto.ListMessage_Section, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.ListMessage, error)

func NewListMessage

func NewListMessage(title, description, toggle, footer string, section []*waProto.ListMessage_Section, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewProduct

func NewProduct(header interface{}, body, footer string, ctx *waProto.ContextInfo) (*waProto.ProductMessage, error)

func NewProductMessage

func NewProductMessage(header interface{}, body, footer string, ctx *waProto.ContextInfo) (*waProto.Message, error)

func NewSticker

func NewSticker(data []byte, animated bool, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.StickerMessage, error)

func NewStickerMessage

func NewStickerMessage(data []byte, animated bool, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewStickerMessageFile

func NewStickerMessageFile(filename string, animated bool, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewVideo

func NewVideo(data []byte, caption string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.VideoMessage, error)

func NewVideoMessage

func NewVideoMessage(data []byte, caption string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func NewVideoMessageFile

func NewVideoMessageFile(filename, caption string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (*waProto.Message, error)

func PrepareExec

func PrepareExec(e interface{}) (*events.Message, *waProto.ContextInfo, string, []string, error)

func SanitizeContext

func SanitizeContext(e *events.Message, quote bool, client *whatsmeow.Client) (*waProto.ContextInfo, error)

func SendChatPresence

func SendChatPresence(event *events.Message, media waTypes.ChatPresenceMedia, state waTypes.ChatPresence, client *whatsmeow.Client) error

func SendMessage

func SendMessage(jid waTypes.JID, message *waProto.Message, client *whatsmeow.Client) (whatsmeow.SendResponse, error)

func SendReactMessage

func SendReactMessage(event *events.Message, react Reactions, client *whatsmeow.Client) (whatsmeow.SendResponse, error)

func SendRecording

func SendRecording(event *events.Message, client *whatsmeow.Client) error

func SendStopRecording

func SendStopRecording(event *events.Message, client *whatsmeow.Client) error

func SendStopTyping

func SendStopTyping(event *events.Message, client *whatsmeow.Client) error

func SendTextMessage

func SendTextMessage(jid waTypes.JID, text string, ctx *waProto.ContextInfo, client *whatsmeow.Client) (whatsmeow.SendResponse, error)

func SendTyping

func SendTyping(event *events.Message, client *whatsmeow.Client) error

Types

type HandlerSentMessage

type HandlerSentMessage func(waTypes.JID, string, *waProto.Message)

type Reactions

type Reactions string
const (
	ReactLove          Reactions = "❤️"
	ReactHandLike      Reactions = "👍"
	ReactHandBad       Reactions = "👎"
	ReactHandFolded    Reactions = "🙏"
	ReactFaceHot       Reactions = "🥵"
	ReactFacePalm      Reactions = "🤦‍♂️"
	ReactFaceClown     Reactions = "🤡"
	ReactFaceZany      Reactions = "🤪"
	ReactFaceVomiting  Reactions = "🤮"
	ReactFaceTired     Reactions = "😫"
	ReactFaceLying     Reactions = "🤥"
	ReactFaceTear      Reactions = "🥲"
	ReactFaceLove      Reactions = "🥰"
	ReactFaceMoney     Reactions = "🤑"
	ReactFaceInnoncent Reactions = "😇"
	ReactFaceWow       Reactions = "😮"
	ReactFaceJoy       Reactions = "😂"
	ReactFaceSad       Reactions = "😥"
	ReactFaceHugging   Reactions = "🤗"
	ReactFlagIndonesia Reactions = "🇮🇩"
	ReactHundred       Reactions = "💯"
	ReactMedalGold     Reactions = "🥇"
	ReactMedalSilver   Reactions = "🥈"
	ReactMedalBronze   Reactions = "🥉"
	ReactAirplane      Reactions = "✈️"
	ReactPlester       Reactions = "🩹"
	ReactAlarm         Reactions = "⏰"
	ReactBadminton     Reactions = "🏸"
	ReactNotEntry      Reactions = "⛔"
	ReactRocket        Reactions = "🚀"
)

Jump to

Keyboard shortcuts

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