vk/sources/API/Methods/Message.php

39 lines
725 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace VK\API\Methods;
use VK\Core;
use VK\API\Traits\Request;
class Message
{
use Request;
private const METHOD = 'messages.send';
public static function post($from, $to, $message, $trolling)
{
if (is_int($from)) $from = Core::init()->get($from);
$params = [
'message' => $message,
'peer_id' => $to,
'access_token' => $from->token,
'v' => $from->version,
'random_id' => $trolling
];
self::request(self::METHOD, $params, $from->getBrowser());
}
public static function get()
{
}
public static function delete()
{
}
}