client

package
v0.0.0-...-02929fb Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Initial = iota
	GroupSelect
	SubjectSelect
	QueueSelect
	QueueAction
	AdminMode
)

Variables

View Source
var NeedMoreInfo = `` /* 351-byte string literal not displayed */
View Source
var NoQueues = `Очереди не найдены.`
View Source
var NoSubjects = `Не найдено ни одного предмета, относящегося к этой группе.`

Functions

This section is empty.

Types

type BotState

type BotState uint

type Client

type Client struct {
	User     *model.User
	Db       db.QueueDB
	Group    *db.Group
	Subject  []db.Subject
	Queue    []db.Queue
	CurQueue db.Queue
	State    BotState
	IsActive bool
	LastConn time.Time
}

func NewClient

func NewClient(update tgbotapi.Update, tgUser *tgbotapi.User, database *sql.DB) (*Client, error)

func (*Client) CheckTimeout

func (c *Client) CheckTimeout() bool

func (*Client) CreateGreeting

func (c *Client) CreateGreeting(user *model.User) (string, error)

func (*Client) HandleCommand

func (c *Client) HandleCommand(msg tgbotapi.MessageConfig) (tgbotapi.MessageConfig, error)

func (*Client) HandleState

func (c *Client) HandleState(msg tgbotapi.MessageConfig) (tgbotapi.MessageConfig, error)

Jump to

Keyboard shortcuts

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