Skip to content

api interface: add a trigger func#761

Open
platx wants to merge 1 commit intotucnak:v4from
platx:v4
Open

api interface: add a trigger func#761
platx wants to merge 1 commit intotucnak:v4from
platx:v4

Conversation

@platx
Copy link

@platx platx commented Dec 22, 2024

It could be useful in some scenarios when you want to trigger another handler from some specific handler, which doesn't have a link to a Bot struct, but has just a context provided.

For example:

func SomeHandlerFunc(c telebot.Context) error {
    // some business logic
    
   return c.Bot().Trigger("/another-command", c)
}

The original method was implemented here: #687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant