Skip to content

Several onText handlers register #790

@khudaibirdin

Description

@khudaibirdin

Hi!
When I try to describe onText handler:

bot.Handle(tele.OnText, handler.OnText1)
bot.Handle(tele.OnText, handler.OnText2)
bot.Handle(tele.OnText, handler.OnText3)

I only describe last handler.OnText3 handler, because of:

type Bot struct {
...
handlers    map[string]HandlerFunc
...
}

in Bot struct.

Maybe realize possibility to add the slice of several handler functions.
When detecting handler by OnText it would be processed by all handlers in slice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions