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

Fix triggerCommand issues #733

Merged
merged 1 commit into from
Apr 18, 2020
Merged

Fix triggerCommand issues #733

merged 1 commit into from
Apr 18, 2020

Conversation

jonnywilliamson
Copy link
Contributor

Fixes #724 #649 #401 #520

@irazasyed irazasyed merged commit 036760e into irazasyed:develop Apr 18, 2020
@irazasyed
Copy link
Owner

Thanks 👍

@jonnywilliamson jonnywilliamson deleted the fixTriggerCommand branch April 18, 2020 23:44
@MrFiregore
Copy link

MrFiregore commented Apr 21, 2020

I try to use the Trait "CommandHandler" in my command classto send parameters when triggered other command and get the following error:

PHP Fatal error: Access level to Telegram\Bot\Traits\CommandsHandler::getCommandBus() must be public (as in class Telegram\Bot\Commands\Command) in /E:/wamp64/www/telegramnew/src/Commands/StartCommand.php on line 9

image

SOLVED, BUT......

I solved calling to:

$this->getTelegram()->triggerCommand('getcommands',$update);
but, how I can pass arguments to the function triggered?

@MrFiregore
Copy link

With this solution the only way that I find is rewritte the message of the update and then send to the triggerCommand...

image

image

@jonnywilliamson jonnywilliamson restored the fixTriggerCommand branch April 25, 2020 18:00
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.

triggerCommand with arguments
3 participants