bot

package
v0.0.0-...-3248bb2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

func New

func New(token string, logLevel log.Level) (*Bot, error)

func (*Bot) AddHandler

func (b *Bot) AddHandler(predicate Predicate, handlerFunc HandlerFunc)

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) error

func (*Bot) Send

func (b *Bot) Send(msg tgbotapi.Chattable) error

type HandlerFunc

type HandlerFunc func(tgbotapi.Update, *tgbotapi.BotAPI) error

func GetAddMonitoringCommandHandler

func GetAddMonitoringCommandHandler(dataProvider provider.AuctionDataProvider, flowStorage storage.AddMonitoringFlowStorage) HandlerFunc

func GetAddMonitoringMinimalCountStepHandler

func GetAddMonitoringMinimalCountStepHandler(flowStorage storage.AddMonitoringFlowStorage,
	monitoringStorage storage.MonitoringStorage) HandlerFunc

func GetAddMonitoringVehicleStepHandler

func GetAddMonitoringVehicleStepHandler(flowStorage storage.AddMonitoringFlowStorage) HandlerFunc

func GetAllDataShortCommandHandler

func GetAllDataShortCommandHandler(dataProvider provider.AuctionDataProvider) HandlerFunc

func GetCancelCommandHandler

func GetCancelCommandHandler(flowStorage storage.AddMonitoringFlowStorage) HandlerFunc

func GetDataCommandHandler

func GetDataCommandHandler(dataProvider provider.AuctionDataProvider) HandlerFunc

func GetDataShortCommandHandler

func GetDataShortCommandHandler(dataProvider provider.AuctionDataProvider) HandlerFunc

func GetMonitoringCommandHandler

func GetMonitoringCommandHandler(monitoringStorage storage.MonitoringStorage) HandlerFunc

func GetStaticTextResponseHandler

func GetStaticTextResponseHandler(response string) HandlerFunc

type Predicate

type Predicate func(tgbotapi.Update) bool

func GetCommandNamePredicate

func GetCommandNamePredicate(name string) Predicate

func GetSetVehicleMinimalCountFlowPredicate

func GetSetVehicleMinimalCountFlowPredicate(flowStorage storage.AddMonitoringFlowStorage, step dto.MonitoringStep) Predicate

func GetSetVehicleNameFlowCallbackPredicate

func GetSetVehicleNameFlowCallbackPredicate(flowStorage storage.AddMonitoringFlowStorage, step dto.MonitoringStep) Predicate

Jump to

Keyboard shortcuts

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