Documentation ¶
Index ¶
- Constants
- Variables
- type Bot
- func (bot *Bot) Handle(key string, handler Handler)
- func (bot *Bot) HandleFunc(key string, handler func(*Event))
- func (bot *Bot) HandleFuncRegexp(expr string, handler func(*Event))
- func (bot *Bot) HandlePhoto(handler func(*Event))
- func (bot *Bot) HandleRegexp(regexp *regexp.Regexp, handler Handler)
- func (bot *Bot) Listen(host, port string) error
- type Event
- type Handler
- type HandlerFunc
- type MuxEntry
Constants ¶
View Source
const (
ChatTyping = "typing"
)
Constant values for ChatActions.
Variables ¶
View Source
var (
WebPagePreview = false
)
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot is structure representation of Bot instance.
func New ¶
New creates new instance of the Bot. Idiomatically, there is only one "Bot" instance per application.
func (*Bot) HandleFunc ¶
HandleFunc registers handler function by key.
func (*Bot) HandleFuncRegexp ¶
HandleFuncRegexp registers handler function by regular expression.
func (*Bot) HandlePhoto ¶ added in v0.0.17
func (*Bot) HandleRegexp ¶
HandleRegexp registers handler by regular expression.
type Event ¶
Event ...
type HandlerFunc ¶
type HandlerFunc func(msg *Event)
func (HandlerFunc) Handle ¶
func (f HandlerFunc) Handle(msg *Event)
Click to show internal directories.
Click to hide internal directories.