misc_pterodactyl-panel/app/Console/Commands/TelemetryCommand.php
2022-11-22 13:39:43 -07:00

34 lines
938 B
PHP

<?php
namespace Pterodactyl\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\VarDumper\VarDumper;
use Pterodactyl\Services\Telemetry\TelemetryCollectionService;
class TelemetryCommand extends Command
{
protected $description = 'Displays all the data that would be sent to the Pterodactyl Telemetry Service if telemetry collection is enabled.';
protected $signature = 'p:telemetry';
/**
* TelemetryCommand constructor.
*/
public function __construct(private TelemetryCollectionService $telemetryCollectionService)
{
parent::__construct();
}
/**
* Handle execution of command.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
*/
public function handle()
{
$this->output->info('Collecting telemetry data, this may take a while...');
VarDumper::dump($this->telemetryCollectionService->collect());
}
}