Skip to content

Commit

Permalink
Texts and small fixes for setcommands command
Browse files Browse the repository at this point in the history
  • Loading branch information
luzrain committed Sep 25, 2023
1 parent 9abb164 commit e5e9a6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/TelegramBot/Command/ButtonSetCommandsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

if ($commands === []) {
$io->warning('Could not find publish commands');
$io->warning('Could not find any commands to publish');

return Command::SUCCESS;
}
Expand All @@ -67,7 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return Command::FAILURE;
}

$io->success('Bot\'s menu button set');
$io->success('Bot\'s menu button has been set');

return Command::SUCCESS;
}
Expand Down
9 changes: 3 additions & 6 deletions src/TelegramBot/CommandMetadataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,16 @@ public function __construct(
}

/**
* @return list<OnCommand>
* @return \Generator<OnCommand>
*/
public function gelMetadataList(): array
public function gelMetadataList(): \Generator
{
$list = [];
foreach ($this->controllersMap as ['controller' => $controller]) {
$command = $this->instantiateAttribute($controller);
if ($command !== null) {
$list[] = $command;
yield $command;
}
}

return $list;
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/TelegramBot/LongPollingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
final class LongPollingService
{
private const LIMIT = 50;

private int $timeout = 15;
private int $offset = 0;

Expand Down

0 comments on commit e5e9a6f

Please sign in to comment.