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

Add parameters support to TelegramException #249

Merged
merged 2 commits into from Nov 14, 2022
Merged

Conversation

Lukasss93
Copy link
Member

$bot->onApiError('.*Too Many Requests.*', function(Nutgram $bot, TelegramException $e){
    $e->getParameters(); // ['retry_after' => 14]
    $e->getParameter('retry_after'); // 14
    $e->hasParameter('retry_after'); // true
});

@codeclimate
Copy link

codeclimate bot commented Nov 13, 2022

Code Climate has analyzed commit f3f680b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (60% is the threshold).

This pull request will bring the total coverage in the repository to 93.8%.

View more on Code Climate.

@Lukasss93 Lukasss93 marked this pull request as draft November 14, 2022 10:53
@Lukasss93
Copy link
Member Author

Lukasss93 commented Nov 14, 2022

there is a BC, I'll fix it later.

@Lukasss93 Lukasss93 marked this pull request as ready for review November 14, 2022 17:13
@Lukasss93 Lukasss93 merged commit d22e853 into master Nov 14, 2022
@Lukasss93 Lukasss93 deleted the error-parameters branch November 14, 2022 18:46
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.

None yet

2 participants