for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Commands\AdminCommands;
use Longman\TelegramBot\Commands\AdminCommand;
use Longman\TelegramBot\DB;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Exception\TelegramException;
use Longman\TelegramBot\Request;
class ChatsCommand extends AdminCommand
{
* @var string
protected $name = 'chats';
protected $description = 'List or search all chats stored by the bot';
protected $usage = '/chats, /chats * or /chats <search string>';
protected $version = '1.2.0';
* @var bool
protected $need_mysql = true;
* Command execute method
* @return ServerResponse
* @throws TelegramException
public function execute(): ServerResponse
$usage = $this->getUsage();
return $this->replyToChat(sprintf('This command is not available because the database feature has been removed.%sUsage: %s', PHP_EOL, $usage));
}