update

package
v1.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdatePool added in v1.2.1

type UpdatePool struct {
	// contains filtered or unexported fields
}

func NewupdatePool added in v1.2.1

func NewupdatePool() *UpdatePool

func (*UpdatePool) Newupdate added in v1.2.1

func (u *UpdatePool) Newupdate(ctx context.Context, origin *tgbotapi.Update) *Updatectx

func (*UpdatePool) Put added in v1.2.1

func (u *UpdatePool) Put(upx *Updatectx)

type Updatectx

type Updatectx struct {
	Ctx    context.Context
	Cancle context.CancelFunc

	Service string
	Update  *tgbotapi.Update
	User    *bottype.User

	Serviceset bool

	Chat_ID int64
	Chat    *tgbotapi.Chat

	Command string // only use inside setuser method in parser
}

func (*Updatectx) Dbuser

func (u *Updatectx) Dbuser() *db.User

func (*Updatectx) FromChat

func (u *Updatectx) FromChat() *tgbotapi.Chat

func (*Updatectx) FromUser

func (u *Updatectx) FromUser() *tgbotapi.User

func (Updatectx) IsCommand

func (u Updatectx) IsCommand(cmd string) bool

func (*Updatectx) Setservice

func (u *Updatectx) Setservice(srvname string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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