update

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Updatectx

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

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

	Serviceset bool

	ShouldSave bool

	Chat_ID int64
	Chat    *tgbotapi.Chat

	Command string // only use inside setuser method in parser
	// contains filtered or unexported fields
}

func Newupdate

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

func (*Updatectx) Close

func (u *Updatectx) Close()

func (*Updatectx) Dbuser

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

func (*Updatectx) Drop

func (u *Updatectx) Drop() bool

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) Iscallback

func (u Updatectx) Iscallback() (bool, error)

func (*Updatectx) SetDrop

func (u *Updatectx) SetDrop(drp bool)

func (*Updatectx) Setcallback

func (u *Updatectx) Setcallback()

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