Documentation ¶
Index ¶
- type Bot
- type ChatProcessor
- type ChatProcessorFactory
- type CommandHandler
- type CommandParameter
- type InlineParameterHandler
- type Location
- type LocationParameterParser
- type Logger
- type Menu
- type MenuEntry
- type ProcessCommand
- type ReplySender
- type TextParameterParser
- type TgBot
- func (bot *TgBot) BotStat(user *tgbotapi.User, message tgbotapi.MessageConfig) *chatbase.Message
- func (bot *TgBot) CallbacStat(callback *tgbotapi.CallbackQuery, intent string) *chatbase.Message
- func (bot *TgBot) GetApi() *tgbotapi.BotAPI
- func (bot *TgBot) GetStat() *chatbase.Client
- func (bot *TgBot) MessageStat(message *tgbotapi.Message, intent string) *chatbase.Message
- func (bot *TgBot) QueryStat(query *tgbotapi.InlineQuery, intent string) *chatbase.Message
- func (bot *TgBot) Run(updatesTimeout int, handler UpdateHandler)
- func (bot *TgBot) RunAsync(updatesTimeout int, waitGroup *sync.WaitGroup, doneChannel <-chan bool, ...)
- func (bot *TgBot) SendBotReply(user *tgbotapi.User, message tgbotapi.MessageConfig)
- func (bot *TgBot) SendStat(statMessage *chatbase.Message)
- type UpdateHandler
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 (*Bot) AddCommand ¶
func (bot *Bot) AddCommand(handler *CommandHandler) *Bot
func (*Bot) SetChatProcessorFactory ¶
func (bot *Bot) SetChatProcessorFactory(chatProcessorFactory ChatProcessorFactory) *Bot
type ChatProcessor ¶
type ChatProcessor func(messageID int, message string) (ChatProcessor, string)
type ChatProcessorFactory ¶
type ChatProcessorFactory func(replySender ReplySender, logger Logger) ChatProcessor
type CommandHandler ¶
type CommandHandler struct { Name string // contains filtered or unexported fields }
func NewCommandHandler ¶
func NewCommandHandler(name string, processer ProcessCommand) *CommandHandler
func (*CommandHandler) AddParameter ¶
func (command *CommandHandler) AddParameter(parameter *CommandParameter) *CommandHandler
type CommandParameter ¶
type CommandParameter struct { Name string AskQuestion string ParseText TextParameterParser ParseLocation LocationParameterParser InlineHandler InlineParameterHandler }
type InlineParameterHandler ¶
type LocationParameterParser ¶
type Menu ¶
func (*Menu) AddCommand ¶
func (menu *Menu) AddCommand(name string, command *CommandHandler) *Menu
func (*Menu) AddSumbenu ¶
type MenuEntry ¶
type MenuEntry struct { Name string Command *CommandHandler }
type ProcessCommand ¶
type ProcessCommand func(parsedParams map[string]string, replySender ReplySender)
type ReplySender ¶
type TextParameterParser ¶
type TgBot ¶
type TgBot struct {
// contains filtered or unexported fields
}
func NewDefaultTgBot ¶
func (*TgBot) BotStat ¶
func (bot *TgBot) BotStat(user *tgbotapi.User, message tgbotapi.MessageConfig) *chatbase.Message
func (*TgBot) CallbacStat ¶
func (*TgBot) MessageStat ¶
func (*TgBot) Run ¶
func (bot *TgBot) Run(updatesTimeout int, handler UpdateHandler)
func (*TgBot) SendBotReply ¶
func (bot *TgBot) SendBotReply(user *tgbotapi.User, message tgbotapi.MessageConfig)
type UpdateHandler ¶
type UpdateHandler func(update tgbotapi.Update)
Click to show internal directories.
Click to hide internal directories.