File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111use Botasis \Runtime \Update \UpdateFactory ;
1212use Psr \Log \LoggerInterface ;
1313use Psr \Log \NullLogger ;
14+ use Symfony \Component \Console \Attribute \AsCommand ;
1415use Symfony \Component \Console \Command \Command ;
1516use Symfony \Component \Console \Input \InputInterface ;
1617use Symfony \Component \Console \Input \InputOption ;
1718use Symfony \Component \Console \Output \OutputInterface ;
1819use Throwable ;
1920
21+ #[AsCommand(name: 'botasis:telegram:updates ' , description: 'Get updates from the bot and process them ' )]
2022final class GetUpdatesCommand extends Command
2123{
22- protected static $ defaultName = 'botasis/telegram/updates ' ;
23- protected static $ defaultDescription = 'Get updates from the bot and process them ' ;
24-
2524 public function __construct (
2625 private readonly ClientInterface $ client ,
2726 private readonly Application $ application ,
Original file line number Diff line number Diff line change 77use Botasis \Client \Telegram \Client \ClientInterface ;
88use Botasis \Client \Telegram \Request \TelegramRequest ;
99use InvalidArgumentException ;
10+ use Symfony \Component \Console \Attribute \AsCommand ;
1011use Symfony \Component \Console \Command \Command ;
1112use Symfony \Component \Console \Helper \QuestionHelper ;
1213use Symfony \Component \Console \Input \InputInterface ;
1718use function str_contains ;
1819use function str_starts_with ;
1920
21+ #[AsCommand(name: 'botasis:telegram:set-webhook ' , description: 'Set TG webhook address ' )]
2022final class SetTelegramWebhookCommand extends Command
2123{
22- protected static $ defaultName = 'botasis/telegram/set-webhook ' ;
23- protected static $ defaultDescription = 'Set TG webhook address ' ;
24-
2524 public function __construct (
2625 private readonly ClientInterface $ client ,
2726 private readonly QuestionHelper $ questionHelper ,
You can’t perform that action at this time.
0 commit comments