bot

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: AGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	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")
	ErrNoStorages      = errors.New("no available storage")
	ErrEmptyMessage    = errors.New("message is empty")
)

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 *ext.Context, 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 *ext.Context, chatId int64, messageID int) (*tg.Message, error)

func HandleSilentAddTask added in v0.10.0

func HandleSilentAddTask(ctx *ext.Context, update *ext.Update, user *dao.User, task *types.Task) error

func Init

func Init()

func ProvideSelectMessage added in v0.10.0

func ProvideSelectMessage(ctx *ext.Context, update *ext.Update, file *types.File, chatID int64, fileMsgID, toEditMsgID int) error

func RegisterHandlers added in v0.4.0

func RegisterHandlers(dispatcher dispatcher.Dispatcher)

Types

type ConversationState added in v0.11.0

type ConversationState struct {
	sync.Mutex

	InConversation bool
	// contains filtered or unexported fields
}

func (*ConversationState) GetData added in v0.11.0

func (c *ConversationState) GetData(key string) interface{}

func (*ConversationState) Reset added in v0.11.0

func (c *ConversationState) Reset()

func (*ConversationState) SetConversationType added in v0.11.0

func (c *ConversationState) SetConversationType(t ConversationType)

func (*ConversationState) SetData added in v0.11.0

func (c *ConversationState) SetData(key string, value interface{})

type ConversationType added in v0.11.0

type ConversationType string

Jump to

Keyboard shortcuts

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