Началр работы с переработкой
This commit is contained in:
38
sources/API/Methods/Message.php
Normal file
38
sources/API/Methods/Message.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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()
|
||||
{
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user