Documentation ¶
Index ¶
- func NewPollerWithAllowedChats(pollTimout time.Duration, chats []int) *tb.MiddlewarePoller
- type Bot
- type Config
- type Context
- type HandlerFunc
- type Route
- type TeleBot
- type WrapBot
- func (b *WrapBot) Delete(chatID int64, messageID int) error
- func (b *WrapBot) Handle(path string, handler HandlerFunc)
- func (b *WrapBot) HandleButton(path *tb.InlineButton, handler HandlerFunc)
- func (b *WrapBot) HandleMultiRegExp(paths []string, handler HandlerFunc)
- func (b *WrapBot) HandleRegExp(path string, handler HandlerFunc)
- func (b *WrapBot) Respond(callback *tb.Callback, responseOptional ...*tb.CallbackResponse) error
- func (b *WrapBot) Send(to tb.Recipient, what interface{}, options ...interface{}) (*tb.Message, error)
- func (b *WrapBot) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPollerWithAllowedChats ¶
func NewPollerWithAllowedChats(pollTimout time.Duration, chats []int) *tb.MiddlewarePoller
Types ¶
type Context ¶
type Context interface { Param(key string) string Bind(i interface{}) error Message() *tb.Message ChatID() int64 Text() string Callback() *tb.Callback Respond(callback *tb.Callback, response ...*tb.CallbackResponse) error Send(msg string, options ...interface{}) (*tb.Message, error) Delete(chatID int64, messageID int) error }
type HandlerFunc ¶
type Route ¶
type Route struct { Path *regexp.Regexp Handler HandlerFunc }
type WrapBot ¶
type WrapBot struct {
// contains filtered or unexported fields
}
func (*WrapBot) Handle ¶
func (b *WrapBot) Handle(path string, handler HandlerFunc)
func (*WrapBot) HandleButton ¶
func (b *WrapBot) HandleButton(path *tb.InlineButton, handler HandlerFunc)
func (*WrapBot) HandleMultiRegExp ¶
func (b *WrapBot) HandleMultiRegExp(paths []string, handler HandlerFunc)
func (*WrapBot) HandleRegExp ¶
func (b *WrapBot) HandleRegExp(path string, handler HandlerFunc)
Click to show internal directories.
Click to hide internal directories.