Documentation ¶
Index ¶
- func NewBot(b TbBot) bot.TelegramBot
- type Bot
- func (b *Bot) GetFile(fileID string) (io.ReadCloser, error)
- func (b *Bot) Handle(endpoint string, handler bot.TelegramHandler)
- func (b *Bot) Send(to string, what interface{}, options ...interface{}) error
- func (b *Bot) SetCommands(commands []bot.TelegramBotCommand) error
- func (b *Bot) Start()
- func (b *Bot) Stop()
- type TbBot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBot ¶
func NewBot(b TbBot) bot.TelegramBot
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) SetCommands ¶
func (b *Bot) SetCommands(commands []bot.TelegramBotCommand) error
type TbBot ¶
type TbBot interface { Start() Stop() SetCommands(opts ...interface{}) error Handle(endpoint interface{}, h tb.HandlerFunc, m ...tb.MiddlewareFunc) Send(to tb.Recipient, what interface{}, opts ...interface{}) (*tb.Message, error) File(file *tb.File) (io.ReadCloser, error) FileByID(fileID string) (tb.File, error) }
Click to show internal directories.
Click to hide internal directories.