mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 23:14:38 +01:00
CI stuff
This commit is contained in:
parent
ee14d6cf27
commit
f2636016df
@ -257,8 +257,8 @@ $MadelineProto->loop(function () use ($MadelineProto) {
|
||||
if (!\getenv('TEST_USERNAME')) {
|
||||
throw new Exception('No TEST_USERNAME environment variable was provided!');
|
||||
}
|
||||
yield $MadelineProto->refreshPeerCache(\getenv('TEST_USERNAME'));
|
||||
yield $MadelineProto->refreshFullPeerCache(\getenv('TEST_USERNAME'));
|
||||
/*yield $MadelineProto->refreshPeerCache(\getenv('TEST_USERNAME'));
|
||||
yield $MadelineProto->refreshFullPeerCache(\getenv('TEST_USERNAME'));*/
|
||||
$mention = yield $MadelineProto->getInfo(\getenv('TEST_USERNAME')); // Returns an array with all of the constructors that can be extracted from a username or an id
|
||||
$mention = $mention['user_id']; // Selects only the numeric user id
|
||||
$media = [];
|
||||
@ -295,11 +295,11 @@ $MadelineProto->loop(function () use ($MadelineProto) {
|
||||
|
||||
foreach ($media as $type => $inputMedia) {
|
||||
if ($type !== 'sticker' && $type !== 'voice') {
|
||||
$MadelineProto->logger("Sending multi $type");
|
||||
/*$MadelineProto->logger("Sending multi $type");
|
||||
yield $MadelineProto->messages->sendMultiMedia(['peer' => $peer, 'multi_media' => [
|
||||
['_' => 'inputSingleMedia', 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown'],
|
||||
['_' => 'inputSingleMedia', 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown'],
|
||||
]]);
|
||||
]]);*/
|
||||
}
|
||||
$MadelineProto->logger("Sending $type");
|
||||
yield $MadelineProto->messages->sendMedia(['peer' => $peer, 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown']);
|
||||
|
Loading…
Reference in New Issue
Block a user