Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api interface: add a trigger func #761

Open
wants to merge 1 commit into
base: v4
Choose a base branch
from
Open

api interface: add a trigger func #761

wants to merge 1 commit into from

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