diff --git a/v1/core/dispatcher.go b/v1/core/dispatcher.go index 970a993..34401c9 100644 --- a/v1/core/dispatcher.go +++ b/v1/core/dispatcher.go @@ -78,6 +78,14 @@ func NewDispatcher(api *maxbot.Api, options ...DispatcherOption) *Dispatcher { return d } +func (d *Dispatcher) Handle(handler UpdateHandler, filters func(c *mcontext.Context) bool) { + d.rt.Handle(handler, filters) +} + +func (d *Dispatcher) HandleFunc(handler func(c *mcontext.Context) error, filters ...func(c *mcontext.Context) bool) { + d.rt.HandleFunc(handler, filters...) +} + func (d *Dispatcher) HandleUpdate(c *mcontext.Context) error { return d.rt.HandleUpdate(c) }