Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { // CallbackQuery contains the raw received query *tgo.CallbackQuery // Bot is the bot instance which got the update. Bot *tgo.Bot // Storage contains an in-context storage used for middlewares to pass some data // to the next middleware or even the handler. Storage sync.Map }
func (*Context) Answer ¶
func (ctx *Context) Answer(options *tgo.AnswerCallbackQuery) error
Answer answers to the sent callback query. it fills the CallbackQueryId field by default.
func (*Context) Ask ¶
func (ctx *Context) Ask(msg tgo.Sendable, timeout time.Duration) (question, answer *message.Context, err error)
Ask asks a question from the callback query sender and waits for the passed timeout for their response.
type Middleware ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(middlewares ...Middleware) *Router
NewRouter returns a new message router
func (*Router) Handle ¶
func (r *Router) Handle(filter tgo.Filter, handler Handler, middlewares ...Middleware)
Handle adds a new route to the Router
func (*Router) HandleUpdate ¶
HandleUpdate implements tgo.Router interface
Click to show internal directories.
Click to hide internal directories.