Answer the question
In order to leave comments, you need to log in
What kind of yield does not work?
So it was possible to establish that through this MadelineProto it is possible to upload to the TG server as part of a video of more than 50 mb.
This code was executed:
<?php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->async(true);
$MadelineProto->loop(function () use ($MadelineProto) {
yield $MadelineProto->start();
$me = yield $MadelineProto->getSelf();
$MadelineProto->logger($me);
if (!$me['bot']) {
yield $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => "Hi!\nThanks for creating MadelineProto! <3"]);
yield $MadelineProto->channels->joinChannel(['channel' => '@MadelineProto']);
try {
yield $MadelineProto->messages->importChatInvite(['hash' => 'https://t.me/joinchat/Bgrajz6K-aJKu0IpGsLpBg']);
} catch (\danog\MadelineProto\RPCErrorException $e) {
$MadelineProto->logger($e);
}
yield $MadelineProto->messages->sendMessage(['peer' => 'https://t.me/joinchat/Bgrajz6K-aJKu0IpGsLpBg', 'message' => 'Testing MadelineProto!']);
}
yield $MadelineProto->echo('OK, done!');
});
$sentMessage = yield $MadelineProto->messages->sendMedia([
'peer' => '@danogentili',
'media' => [
'_' => 'inputMediaUploadedDocument',
'file' => 'video.mp4',
'attributes' => [
['_' => 'documentAttributeVideo', 'round_message' => false, 'supports_streaming' => true]
]
],
'message' => '[This is the caption](https://t.me/MadelineProto)',
'parse_mode' => 'Markdown'
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question