Closed irpcpro closed 1 year ago
Read instructions here: https://telegram-bot-sdk.com/docs/guides/commands-system
thanks ..
but i've just checked it.
in this document says handle method has a input variable named $arguments
but when i used it, IDE got me an error which says :
Declaration must be compatible with Command->handle()
after i checked it, I found that in abstract class Telegram\Bot\Commands\Command
handler method, it doesn't have any input variable.
and i get this error :
Declaration of Vendor\App\Commands\StartCommand::handle($arguments) must be compatible with Telegram\Bot\Commands\Command::handle()
I think there is a conflict with version 3 and its document.
i think in vendor/irazasyed/telegram-bot-sdk/src/Commands/Command.php@make
we have to pass $update
to handle
method.
when i did that, i got the correct variable in handler method command which was my input data from telegram.
PHP version
8.1 irazasyed/telegram-bot-sdk version
3.10 Laravel version (if any)
10
hi. i search in issues and read the document. but still i'm confused how should i create my command?