Documentation ¶
Index ¶
- func CreateMessage(chatId int64, text string) *tgbotapi.MessageConfig
- func CreateMessageWithOptions(chatId int64, text string, options ...MessageWithOptions) *tgbotapi.MessageConfig
- type Bot
- func (b *Bot) RegisterCommand(command string, handlers []func(*Context), responseHandler ...bool)
- func (b *Bot) RegisterScheduledHandler(cron string, handler func(*Context)) error
- func (b *Bot) RunUpdatesHandler()
- func (b *Bot) SendMessages(messages []*tgbotapi.MessageConfig)
- func (b *Bot) StopUpdatesHandler()
- type Context
- func (c *Context) Abort()
- func (c *Context) AbortWithMessage(message string)
- func (c *Context) AddMessage(message string)
- func (c *Context) AddMessageConfig(msg *tgbotapi.MessageConfig)
- func (c *Context) AddMessageWithOptions(message string, options MessageWithOptions)
- func (c *Context) GetMessages() []*tgbotapi.MessageConfig
- func (c *Context) IsAborted() bool
- func (c *Context) RegisterWaitForInput()
- type MessageWithOptions
- type WaitForCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMessage ¶
func CreateMessage(chatId int64, text string) *tgbotapi.MessageConfig
func CreateMessageWithOptions ¶
func CreateMessageWithOptions(chatId int64, text string, options ...MessageWithOptions) *tgbotapi.MessageConfig
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) RegisterCommand ¶
func (*Bot) RegisterScheduledHandler ¶
func (*Bot) RunUpdatesHandler ¶
func (b *Bot) RunUpdatesHandler()
func (*Bot) SendMessages ¶
func (b *Bot) SendMessages(messages []*tgbotapi.MessageConfig)
func (*Bot) StopUpdatesHandler ¶
func (b *Bot) StopUpdatesHandler()
type Context ¶
type Context struct { ChatId int64 Command string Update tgbotapi.Update // contains filtered or unexported fields }
func (*Context) AbortWithMessage ¶
func (*Context) AddMessage ¶
func (*Context) AddMessageConfig ¶
func (c *Context) AddMessageConfig(msg *tgbotapi.MessageConfig)
func (*Context) AddMessageWithOptions ¶
func (c *Context) AddMessageWithOptions(message string, options MessageWithOptions)
func (*Context) GetMessages ¶
func (c *Context) GetMessages() []*tgbotapi.MessageConfig
func (*Context) RegisterWaitForInput ¶
func (c *Context) RegisterWaitForInput()
type MessageWithOptions ¶
type WaitForCommand ¶
Click to show internal directories.
Click to hide internal directories.