helpers

package
v0.0.0-...-912cf2b Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Image   = "image"
	Video   = "video"
	Audio   = "audio"
	Sticker = "sticker"
)
View Source
const (
	ErrorReaction     string = "❌"
	ForbiddenReaction string = "🚫"
	SuccessReaction   string = "✅"
	LoadingReaction   string = "⏳"
	ConfigReaction    string = "⚙️"
	PingReaction      string = "🏓"
	LoveReaction      string = "❤️"
	LikeReaction      string = "👍"
	DislikeReaction   string = "👎"
)

Variables

This section is empty.

Functions

func GetAudioMessage

func GetAudioMessage(msg *events.Message) (audioMsg *waProto.VideoMessage, err error)

func GetCmdArgs

func GetCmdArgs(m *events.Message) []string

func GetGreeting

func GetGreeting(sender string) string

func GetImageMessage

func GetImageMessage(msg *events.Message) (imageMsg *waProto.ImageMessage, err error)

func GetMessage

func GetMessage(msg *events.Message, msgType MessageType) (message interface{}, err error)

func GetStickerMessage

func GetStickerMessage(msg *events.Message) (stickerMsg *waProto.StickerMessage, err error)

func GetTextFromMsg

func GetTextFromMsg(m *events.Message) string

func GetVideoMessage

func GetVideoMessage(msg *events.Message) (videoMsg *waProto.VideoMessage, err error)

func IsAdmin

func IsAdmin(chat types.JID, sender types.JID) bool

func IsOwner

func IsOwner(sender types.JID) bool

func Reply

func Reply(m *events.Message, text string)

func ReplyWithMentions

func ReplyWithMentions(m *events.Message, text string, mentions []string)

func SendReact

func SendReact(m *events.Message, reaction string) whatsmeow.SendResponse

func SendText

func SendText(from types.JID, text string)

func SendTextWithMentions

func SendTextWithMentions(from types.JID, text string, mentions []string)

func WebpWriteExifData

func WebpWriteExifData(inputData []byte, updateId int64) ([]byte, error)

Types

type MessageType

type MessageType string
const (
	ImageMessageType   MessageType = "image"
	VideoMessageType   MessageType = "video"
	AudioMessageType   MessageType = "audio"
	StickerMessageType MessageType = "sticker"
)

Jump to

Keyboard shortcuts

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