Versions in this module Expand all Collapse all v0 v0.0.3 Mar 9, 2022 v0.0.2 Feb 18, 2022 Changes in this version + type ChatType struct + func NewAnyGroupChat(processor Processor) *ChatType + func NewChannelChat(processor Processor) *ChatType + func NewPrivateChat(processor Processor) *ChatType + func (p *ChatType) Process(update tgbotapi.Update, ctx context.Context) bool + type Composite []Processor + func (c Composite) Process(update tgbotapi.Update, ctx context.Context) bool type Factory + func (f Factory) AnyGroup(processor Processor) Processor + func (f Factory) Composite(processors ...Processor) Composite v0.0.1 Aug 25, 2021 Changes in this version + type BotAddedToChat struct + func NewBotAddedToChat(proccessor Processor, bot *tgbotapi.BotAPI) *BotAddedToChat + func (a *BotAddedToChat) Process(update tgbotapi.Update, ctx context.Context) bool + type BotRemovedFromChat struct + func NewBotRemovedFromChat(proccessor Processor, bot *tgbotapi.BotAPI) *BotRemovedFromChat + func (a *BotRemovedFromChat) Process(update tgbotapi.Update, ctx context.Context) bool + type CallbackQuery struct + func (c CallbackQuery) Process(update tgbotapi.Update, ctx context.Context) bool + type Chain []Processor + func (c Chain) Process(update tgbotapi.Update, ctx context.Context) bool + type CommandWordResolver interface + Resolve func(word string, ctx context.Context) ResolveResult + type CommandWordResolverExactWord struct + func (c CommandWordResolverExactWord) Resolve(word string, ctx context.Context) ResolveResult + type EasyCommandSplit struct + func (e EasyCommandSplit) Split(update tgbotapi.Update, ctx context.Context) (command string, other string) + func (e EasyCommandSplit) SplitByText(text string) (string, string) + type EmptyPredefinedProcessor struct + func (e EmptyPredefinedProcessor) Process(update tgbotapi.Update, ctx context.Context) bool + type Factory struct + func NewFactory(api *tgbotapi.BotAPI, storage LastMessageStorage) *Factory + func (f *Factory) EmptyPredefined() Processor + func (f *Factory) PredefinedReply(replyMessage string) Processor + func (f *Factory) WithFileMimeType(mimeTpe string, processor Processor) Processor + func (f Factory) Api() *tgbotapi.BotAPI + func (f Factory) CallbackQuery(processor Processor) CallbackQuery + func (f Factory) Chain(processors ...Processor) Chain + func (f Factory) EasyApi() *easy.EasyApi + func (f Factory) LastMessageProcessor(processor Processor) Processor + func (f Factory) LastMessageStorage() LastMessageStorage + func (f Factory) Message(processor Processor) WithMessage + func (f Factory) OneWordCommand(resolver CommandWordResolver, processor Processor) OneWordCommand + func (f Factory) Private(processor Processor) Private + func (f Factory) SimpleCommand(command string, processor Processor) OneWordCommand + func (f Factory) SimpleCommandMap(mapping map[string]Processor) SimpleCommandMap + type LastMessageProcessor struct + func (p LastMessageProcessor) Process(update tgbotapi.Update, ctx context.Context) bool + type LastMessageRepo struct + func NewLastMessageRepo() *LastMessageRepo + func (r LastMessageRepo) GetByUpdate(update *tgbotapi.Update) string + func (r LastMessageRepo) GetByUser(user *tgbotapi.User) string + func (r LastMessageRepo) Store(user *tgbotapi.User, text string) + func (r LastMessageRepo) StoreByUpdate(update *tgbotapi.Update, text string) + type LastMessageStorage interface + GetByUpdate func(update *tgbotapi.Update) string + GetByUser func(user *tgbotapi.User) string + Store func(user *tgbotapi.User, text string) + StoreByUpdate func(user *tgbotapi.Update, text string) + type OneWordCommand struct + func (c OneWordCommand) Process(update tgbotapi.Update, ctx context.Context) bool + type PredefinedReplyProcessor struct + func NewPredefinedReplyProcessor(easyApi *easy.EasyApi, replyMessage string) *PredefinedReplyProcessor + func (p *PredefinedReplyProcessor) Process(update tgbotapi.Update, ctx context.Context) bool + type Private struct + func (p Private) Process(update tgbotapi.Update, ctx context.Context) bool + type Processor interface + Process func(update tgbotapi.Update, ctx context.Context) bool + type ResolveResult struct + Context context.Context + ForbidNext bool + Ok bool + func NewResolverResultNok() ResolveResult + func NewResolverResultOk(ctx context.Context) ResolveResult + func NewResolverResultStop() ResolveResult + type SimpleCommand struct + func (c SimpleCommand) Process(update tgbotapi.Update, ctx context.Context) bool + type SimpleCommandCtx struct + func (s SimpleCommandCtx) Command() string + type SimpleCommandMap map[string]Processor + func (p SimpleCommandMap) Process(update tgbotapi.Update, ctx context.Context) bool + type WithFile struct + func (w *WithFile) Process(update tgbotapi.Update, ctx context.Context) bool + type WithFileMimeTypes struct + func (w *WithFileMimeTypes) Process(update tgbotapi.Update, ctx context.Context) bool + type WithMessage struct + func (p WithMessage) Process(update tgbotapi.Update, ctx context.Context) bool