package
0.0.0-20170115211335-b7abf87c449e
Repository: https://github.com/bot-api/telegram.git
Documentation: pkg.go.dev
# Functions
Callbacks middleware takes map of callbacks.
Commands middleware takes map of commands.
Empty does nothing.
EmptyHandler returns a handler that does nothing.
GetAPI takes telegram API from context.
GetSession returns SessionData or nil for current context.
GetUpdate takes telegram Update from context.
IsWebhook returns true if update received by webhook.
New returns bot with default api client.
NewWithAPI returns bot with custom API client.
Recover returns a middleware which recovers from panics anywhere in the chain and returns nil error.
RecoverWithConfig returns a middleware which recovers from panics anywhere in the chain and returns nil error.
Session is a default middleware to work with sessions.
SessionWithConfig takes SessionConfig and returns SessionMiddleware.
StringHandler sends user a text.
WithAPI returns context with telegram api inside.
WithSession returns a new context with SessionData inside.
WithUpdate returns context with telegram Update inside.
# Variables
DefaultRecoverConfig is the default recover middleware config.
DefaultRecoverLogger is used to print recover information if RecoverCfg.LogFunc is not set.
# Structs
A Bot object helps to work with telegram bot api using handlers.
No description provided by the author
SessionConfig helps to configure Session Middleware.
# Interfaces
A Commander takes command message.
A Handler takes update message.
InlineCallback interface describes inline callback function.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SessionData describes key:value data.
UpdateFunc describes a func to update session data.