bot

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyFileName   = errors.New("file name is empty")
	ErrEmptyDocument   = errors.New("document is empty")
	ErrEmptyPhoto      = errors.New("photo is empty")
	ErrEmptyPhotoSize  = errors.New("photo size is empty")
	ErrEmptyPhotoSizes = errors.New("photo size slice is empty")
)
View Source
var StorageDisplayNames = map[string]string{
	"all":    "全部",
	"local":  "服务器磁盘",
	"alist":  "Alist",
	"webdav": "WebDAV",
}

Functions

func AddToQueue

func AddToQueue(ctx *ext.Context, update *ext.Update) error

func FileFromMedia added in v0.4.0

func FileFromMedia(media tg.MessageMediaClass, customFileName string) (*types.File, error)

func FileFromMessage added in v0.4.0

func FileFromMessage(ctx context.Context, client *gotgproto.Client, chatID int64, messageID int, customFileName string) (*types.File, error)

func FloodWaitMiddleware added in v0.4.0

func FloodWaitMiddleware() []telegram.Middleware

func GetTGMessage added in v0.4.0

func GetTGMessage(ctx context.Context, client *gotgproto.Client, messageID int) (*tg.Message, error)

func Init

func Init()

func RegisterHandlers added in v0.4.0

func RegisterHandlers(dispatcher dispatcher.Dispatcher)

Types

This section is empty.

Jump to

Keyboard shortcuts

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