-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathHelpCommand.php
More file actions
32 lines (26 loc) · 773 Bytes
/
Copy pathHelpCommand.php
File metadata and controls
32 lines (26 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/*
* This file is part of the boshurik-bot-example.
*
* (c) Alexander Borisov <boshurik@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Help\Telegram\Command;
use Psr\Log\LoggerInterface;
use BoShurik\TelegramBotBundle\Telegram\Command\HelpCommand as BaseCommand;
use TelegramBot\Api\Types\Update;
class HelpCommand extends BaseCommand
{
private $logger;
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
public function isApplicable(Update $update): bool
{
$this->logger->info('Checking applicability of HelpCommand');
return $update->getMessage() !== null;
}
}