Skip to content

Fix Telegram::runCommands for User and nested calls #1223

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

Merged

Conversation

noplanman
Copy link
Member

@noplanman noplanman commented Jun 8, 2021

Fix running custom commands via Telegram::runCommands.
Fixes #1214

e.g.

// ParentCommand.php
public function execute(): ServerResponse
{
    $responses = $this->getTelegram()->runCommands(['/child with params']);

    // Do other stuff...

    return Request::emptyResponse();
}
// ChildCommand.php
public function execute(): ServerResponse
{
    // Do more stuff here...

    return Request::emptyResponse();
}

@noplanman noplanman self-assigned this Jun 8, 2021
@noplanman noplanman merged commit 4b6bc88 into php-telegram-bot:develop Jun 9, 2021
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