irazasyed / telegram-bot-sdk

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Home Page:https://telegram-bot-sdk.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enabe long-polling for commandsHandler method

PavelFil opened this issue · comments

PHP version

8.3

irazasyed/telegram-bot-sdk version

3.14

Laravel version (if any)

No response

Code To Reproduce the bug

In documentation we have the code $telegram->commandsHandler(false, ['timeout' => 30]);. But it doesn't work because the method commandsHandler doesn't take array as of second argument.

This is them code:

Telegram\Bot\Traits\CommandsHandler::commandsHandler(bool $webhook = false, ?RequestInterface $request = null): Update|array

There is no way to configure command handler to use ['timeout' => 30] param.

That functional was added on #418 and removed at the moment.

Error stacktrace (if any)

No response