vk/sources/API/LongPoll.php

30 lines
800 B
PHP

<?php
declare(strict_types=1);
namespace VK\API;
class LongPoll extends LongPollAbstract
{
public function __construct(object $robot, array $params = [])
{
return;
echo get_class($robot), PHP_EOL;
die;
if ($_ENV['ROBOT_TYPE']) {
$this->vk->auth_type = 'user';
$this->user_id = $data['id'];
} else {
$this->vk->auth_type = 'group';
$this->group_id = $this->vk->request('groups.getById', [])[0]['id'];
$this->vk->request('groups.setLongPollSettings', [
'group_id' => $this->group_id,
'enabled' => 1,
'api_version' => $this->vk->version,
'message_new' => 1,
]);
}
$this->getLongPollServer();
}
}