bot

package
v0.0.0-...-4050570 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type BotIO

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

func NewBotIO

func NewBotIO(bot *telego.Bot, update *telego.Update, messageProcessed bool) *BotIO

func (*BotIO) PrintButtons

func (io *BotIO) PrintButtons(text string, buttons []*io.ButtonData)

func (*BotIO) PrintText

func (io *BotIO) PrintText(text string)

func (*BotIO) ReadText

func (io *BotIO) ReadText() *string

type BotWorker

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

func NewBotWorker

func NewBotWorker(logger *zap.SugaredLogger, c *config.ServiceConfig, r *rdb.Rdb, db *pgsql.Db, ws *WebhookServer) *BotWorker

func (*BotWorker) RegisterComponent

func (bw *BotWorker) RegisterComponent(t string, c ct.Action)

func (*BotWorker) RunBot

func (bw *BotWorker) RunBot(botId int64, token string) error

func (*BotWorker) StopBot

func (bw *BotWorker) StopBot(botId int64)

type Storage

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

type WebhookServer

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

func NewWebhookServer

func NewWebhookServer(logger *zap.SugaredLogger, c *config.ServiceConfig) *WebhookServer

func (*WebhookServer) RegisterBot

func (w *WebhookServer) RegisterBot(path string, handler telego.WebhookHandler) error

func (*WebhookServer) RemoveBot

func (w *WebhookServer) RemoveBot(botId int64)

func (*WebhookServer) Shutdown

func (w *WebhookServer) Shutdown() error

func (*WebhookServer) Start

func (w *WebhookServer) Start() error

Jump to

Keyboard shortcuts

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