net

package
v0.0.0-...-dfaed9c Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TooManyStickers = 20126
	BadData         = 10002

	BotPersonalAlbumID = "1a472cbb-3c55-497a-bec4-d8be0d9af502"
	AdminUserID        = "d3bee23a-81d4-462e-902a-22dae9ef89ff"
)

Variables

This section is empty.

Functions

func AddSticker

func AddSticker(ctx context.Context, localUrl string) (*store.MixinSticker, error)

func CheckPersonalStickers

func CheckPersonalStickers(ctx context.Context) (int, error)

func ClearPersonalStickers

func ClearPersonalStickers(ctx context.Context) error

func CreateAlbumZip

func CreateAlbumZip(mixinAlbum *MixinAlbum, mid string, formatStickerName bool) (*os.File, error)

func GetStickersByAlbumID

func GetStickersByAlbumID(ctx context.Context, albumID string) ([]store.MixinSticker, error)

func HandleLottieUrl

func HandleLottieUrl(ctx context.Context, content string, cid, mid, uid string) error

func HandleMessage

func HandleMessage(ctx context.Context, msg *mixin.MessageView) error

func HandleTgAlbumUrl

func HandleTgAlbumUrl(ctx context.Context, content string, cid, mid, uid string) error

func HandleTgsOrJsonFile

func HandleTgsOrJsonFile(ctx context.Context, data *mixin.DataMessage, cid, mid, uid string) error

func HandleZipFile

func HandleZipFile(ctx context.Context, data *mixin.DataMessage, cid, mid, uid string) error

func RemoveStickers

func RemoveStickers(ctx context.Context, ids ...string) error

func Respond

func Respond(ctx context.Context, msg *mixin.MessageView, category string, data []byte) error

func RespondSticker

func RespondSticker(ctx context.Context, stickerID, cid, mid, uid string) error

func RespondStickerWithJson

func RespondStickerWithJson(ctx context.Context, stickerID, cid, mid, uid string, json []byte) error

func UploadAlbum

func UploadAlbum(ctx context.Context, albumZipPath string) (*store.MixinAlbum, error)

Types

type MixinAlbum

type MixinAlbum struct {
	Manifest *string
	Thumb    *string
	Banner   *string
	Stickers []StickerItem

	Name string
}

type StickerItem

type StickerItem struct {
	LocalUrl string `json:"local_url"`
	Name     string `json:"name"`
}

type StickerRequest

type StickerRequest struct {
	DataBase64 string `json:"data_base64"`
}

Jump to

Keyboard shortcuts

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