Началр работы с переработкой

This commit is contained in:
RedHood
2020-07-10 01:17:26 +10:00
parent 64e03a380b
commit 8635fbb301
50 changed files with 7855 additions and 2594 deletions

29
sources/API/LongPoll.php Normal file
View File

@@ -0,0 +1,29 @@
<?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();
}
}