telegram-bot-sdk icon indicating copy to clipboard operation
telegram-bot-sdk copied to clipboard

phpDoc for Telegram facade

Open Nurzzzone opened this issue 3 years ago • 3 comments

could you plz add phpDocs for autocomplition for Telegram facade in laravel

Nurzzzone avatar Jan 04 '22 15:01 Nurzzzone

Воспользуйся пакетом "ide-helper".

the-alex-mark avatar Feb 01 '22 16:02 the-alex-mark

Воспользуйся пакетом "ide-helper".

It marks many classes as "double", https://github.com/barryvdh/laravel-ide-helper/issues/592, so I wanted to remove "method not found" from Telegram::sendMessage, it's still not found, and plenty other warnings poped up...

new-user-name avatar Apr 16 '22 22:04 new-user-name

to avoid this issue, you can use DI and inject BotsManager class and then use

$bot = $botManager->bot()
$bot->sendMessage([...]);

Telegram facade proxies too much methods, for this reason it's difficult to maintain such PHPDoc. But BotsManager methods are already added as PHPDoc: https://github.com/irazasyed/telegram-bot-sdk/blob/9466c47b6b1aba8c60010b4f281494469cdd1245/src/Laravel/Facades/Telegram.php#L11-L14

alies-dev avatar Jul 18 '22 17:07 alies-dev