Updated to layer 66, added CDN file download logic, added option to send messages longer than 4096 chars, fixed documentation, fixed bugs

This commit is contained in:
Daniil Gentili 2017-04-21 13:13:24 +02:00
parent 227273204a
commit 2bf609d044
280 changed files with 1890 additions and 571 deletions

2
.gitignore vendored
View File

@ -92,3 +92,5 @@ telegram-cli*
src/danog/MadelineProto/Fuzzer.php
fuzzer.php
tests/500mb
*.save
*.save.1

View File

@ -16,9 +16,9 @@ Also note that MadelineProto will perform better if python and a big math extens
This project is in beta state.
The MadelineProto API documentation can be found [here (layer 65)](https://daniil.it/MadelineProto/API_docs/). VERY IMPORTANT READ THIS.
The MadelineProto API documentation can be found [here (layer 66)](https://daniil.it/MadelineProto/API_docs/). VERY IMPORTANT READ THIS.
The TD documentation can be found [here](https://daniil.it/MadelineProto/TD_docs/).
The TD documentation can be found [here](https://daniil.it/MadelineProto/TD_docs/). (you cannot use the methods described here in MadelineProto without the lua extension)
The MadelineProto API documentation (mtproto tl scheme) can be found [here](https://daniil.it/MadelineProto/MTProto_docs/).
@ -82,12 +82,19 @@ Thanks to the devs that contributed to these projects, MadelineProto is now an e
If you have some questions about the usage of the methods of this library, you can join the [support group](https://telegram.me/pwrtelegramgroup) or contact [@danogentili](https://telegram.me/danogentili).
But first, please read this WHOLE page very carefully, follow all links to external documentation, and read all examples in the repo.
But first, please read this WHOLE page very carefully, follow all links to external documentation, and read all examples in the repo (bot.php, bots/, tests/testing.php).
If you don't understand something, read everything again.
You MUST know OOP programming in order to use this library.
I will NOT answer to questions that can be answered simply by reading this page; I will instead ask you to read it carefully twice.
A very important page you must read is the [API documentation](https://daniil.it/MadelineProto/API_docs/): if it's the first time you see a link to that page it means you didn't read the documentation carefully.
I can offer support, however, when it comes to MadelineProto bugs or problems in the documentation. I will not write code for you for free, however you can hire me to do that if you want (my rate is 50$ per hour); you can also buy an easy to use, customized MadelineProto base for only 30$.
If you're selling a MadelineProto base too, you really should consider donating at least 20% of the price of the base: [this is my PayPal](https://paypal.me/danog).
### Installation
@ -443,6 +450,8 @@ Methods that allow sending message entities (messages.sendMessage for example) a
To convert the results of methods to bot API objects you must provide a second parameter to method wrappers, containing an array with the `botAPI` key set to true.
To disable fetching the result of a method, the array that must be provided as second parameter to method wrapper must have the `noResponse` key set to true.
reply_markup accepts bot API reply markup objects as well as MTProto ones.
Note that when you login as a bot, MadelineProto also logins using the [PWRTelegram](https://pwrtelegram.xyz) API, to allow persistant storage of peers, even after a logout and another login.

View File

@ -38,9 +38,9 @@ $docs = [
'readme' => false,
],
[
'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v65.tl', 'calls' => __DIR__.'/src/danog/MadelineProto/TL_calls.tl', 'secret' => __DIR__.'/src/danog/MadelineProto/TL_secret.tl', 'td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'],
'title' => 'MadelineProto API documentation (layer 65)',
'description' => 'MadelineProto API documentation (layer 65)',
'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v66.tl', 'calls' => __DIR__.'/src/danog/MadelineProto/TL_calls.tl', 'secret' => __DIR__.'/src/danog/MadelineProto/TL_secret.tl', 'td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'],
'title' => 'MadelineProto API documentation (layer 66)',
'description' => 'MadelineProto API documentation (layer 66)',
'output_dir' => __DIR__.'/docs/API_docs',
'readme' => false,
],

View File

@ -55,7 +55,7 @@ if ($MadelineProto === false) {
}
if ($authorization['_'] === 'account.needSignup') {
\danog\MadelineProto\Logger::log(['Registering new user'], \danog\MadelineProto\Logger::NOTICE);
$authorization = $MadelineProto->complete_signup($code, readline('Please enter your first name: '), readline('Please enter your last name (can be empty): '));
$authorization = $MadelineProto->complete_signup(readline('Please enter your first name: '), readline('Please enter your last name (can be empty): '));
}
echo 'Serializing MadelineProto to calls.madeline...'.PHP_EOL;
echo 'Wrote '.\danog\MadelineProto\Serialization::serialize('calls.madeline', $MadelineProto).' bytes'.PHP_EOL;

View File

@ -14,6 +14,7 @@ description: dcOption attributes, type and example
|ipv6|[Bool](../types/Bool.md) | Optional|
|media\_only|[Bool](../types/Bool.md) | Optional|
|tcpo\_only|[Bool](../types/Bool.md) | Optional|
|cdn|[Bool](../types/Bool.md) | Optional|
|id|[int](../types/int.md) | Yes|
|ip\_address|[string](../types/string.md) | Yes|
|port|[int](../types/int.md) | Yes|
@ -26,14 +27,14 @@ description: dcOption attributes, type and example
### Example:
```
$dcOption = ['_' => 'dcOption', 'ipv6' => Bool, 'media_only' => Bool, 'tcpo_only' => Bool, 'id' => int, 'ip_address' => string, 'port' => int, ];
$dcOption = ['_' => 'dcOption', 'ipv6' => Bool, 'media_only' => Bool, 'tcpo_only' => Bool, 'cdn' => Bool, 'id' => int, 'ip_address' => string, 'port' => int, ];
```
Or, if you're into Lua:
```
dcOption={_='dcOption', ipv6=Bool, media_only=Bool, tcpo_only=Bool, id=int, ip_address=string, port=int, }
dcOption={_='dcOption', ipv6=Bool, media_only=Bool, tcpo_only=Bool, cdn=Bool, id=int, ip_address=string, port=int, }
```

View File

@ -11,6 +11,7 @@ description: documentAttributeVideo attributes, type and example
| Name | Type | Required |
|----------|:-------------:|---------:|
|round\_message|[Bool](../types/Bool.md) | Optional|
|duration|[int](../types/int.md) | Yes|
|w|[int](../types/int.md) | Yes|
|h|[int](../types/int.md) | Yes|
@ -23,14 +24,14 @@ description: documentAttributeVideo attributes, type and example
### Example:
```
$documentAttributeVideo = ['_' => 'documentAttributeVideo', 'duration' => int, 'w' => int, 'h' => int, ];
$documentAttributeVideo = ['_' => 'documentAttributeVideo', 'round_message' => Bool, 'duration' => int, 'w' => int, 'h' => int, ];
```
Or, if you're into Lua:
```
documentAttributeVideo={_='documentAttributeVideo', duration=int, w=int, h=int, }
documentAttributeVideo={_='documentAttributeVideo', round_message=Bool, duration=int, w=int, h=int, }
```

View File

@ -91,6 +91,12 @@ description: List of constructors
***
<br><br>[$botInlineResult](../constructors/botInlineResult.md) = \['id' => [string](../types/string.md), 'type' => [string](../types/string.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), 'url' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'content_url' => [string](../types/string.md), 'content_type' => [string](../types/string.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), 'duration' => [int](../types/int.md), 'send_message' => [BotInlineMessage](../types/BotInlineMessage.md), \];<a name="botInlineResult"></a>
***
<br><br>[$cdnConfig](../constructors/cdnConfig.md) = \['public_keys' => \[[CdnPublicKey](../types/CdnPublicKey.md)\], \];<a name="cdnConfig"></a>
***
<br><br>[$cdnPublicKey](../constructors/cdnPublicKey.md) = \['dc_id' => [int](../types/int.md), 'public_key' => [string](../types/string.md), \];<a name="cdnPublicKey"></a>
***
<br><br>[$channel](../constructors/channel.md) = \['creator' => [Bool](../types/Bool.md), 'kicked' => [Bool](../types/Bool.md), 'left' => [Bool](../types/Bool.md), 'editor' => [Bool](../types/Bool.md), 'moderator' => [Bool](../types/Bool.md), 'broadcast' => [Bool](../types/Bool.md), 'verified' => [Bool](../types/Bool.md), 'megagroup' => [Bool](../types/Bool.md), 'restricted' => [Bool](../types/Bool.md), 'democracy' => [Bool](../types/Bool.md), 'signatures' => [Bool](../types/Bool.md), 'min' => [Bool](../types/Bool.md), 'id' => [int](../types/int.md), 'access_hash' => [long](../types/long.md), 'title' => [string](../types/string.md), 'username' => [string](../types/string.md), 'photo' => [ChatPhoto](../types/ChatPhoto.md), 'date' => [int](../types/int.md), 'version' => [int](../types/int.md), 'restriction_reason' => [string](../types/string.md), \];<a name="channel"></a>
@ -247,7 +253,7 @@ description: List of constructors
<br><br>[$dataJSON](../constructors/dataJSON.md) = \['data' => [string](../types/string.md), \];<a name="dataJSON"></a>
***
<br><br>[$dcOption](../constructors/dcOption.md) = \['ipv6' => [Bool](../types/Bool.md), 'media_only' => [Bool](../types/Bool.md), 'tcpo_only' => [Bool](../types/Bool.md), 'id' => [int](../types/int.md), 'ip_address' => [string](../types/string.md), 'port' => [int](../types/int.md), \];<a name="dcOption"></a>
<br><br>[$dcOption](../constructors/dcOption.md) = \['ipv6' => [Bool](../types/Bool.md), 'media_only' => [Bool](../types/Bool.md), 'tcpo_only' => [Bool](../types/Bool.md), 'cdn' => [Bool](../types/Bool.md), 'id' => [int](../types/int.md), 'ip_address' => [string](../types/string.md), 'port' => [int](../types/int.md), \];<a name="dcOption"></a>
***
<br><br>[$decryptedDataBlock](../constructors/decryptedDataBlock.md) = \['voice_call_id' => [int128](../types/int128.md), 'in_seq_no' => [int](../types/int.md), 'out_seq_no' => [int](../types/int.md), 'recent_received_mask' => [int](../types/int.md), 'proto' => [int](../types/int.md), 'extra' => [string](../types/string.md), 'raw_data' => [string](../types/string.md), \];<a name="decryptedDataBlock"></a>
@ -640,6 +646,12 @@ description: List of constructors
***
<br><br>[$inputMessagesFilterPhotos](../constructors/inputMessagesFilterPhotos.md) = \[\];<a name="inputMessagesFilterPhotos"></a>
***
<br><br>[$inputMessagesFilterRoundVideo](../constructors/inputMessagesFilterRoundVideo.md) = \[\];<a name="inputMessagesFilterRoundVideo"></a>
***
<br><br>[$inputMessagesFilterRoundVoice](../constructors/inputMessagesFilterRoundVoice.md) = \[\];<a name="inputMessagesFilterRoundVoice"></a>
***
<br><br>[$inputMessagesFilterUrl](../constructors/inputMessagesFilterUrl.md) = \[\];<a name="inputMessagesFilterUrl"></a>
@ -1300,6 +1312,9 @@ description: List of constructors
***
<br><br>[$sendMessageRecordAudioAction\_17](../constructors/sendMessageRecordAudioAction_17.md) = \[\];<a name="sendMessageRecordAudioAction_17"></a>
***
<br><br>[$sendMessageRecordRoundAction](../constructors/sendMessageRecordRoundAction.md) = \[\];<a name="sendMessageRecordRoundAction"></a>
***
<br><br>[$sendMessageRecordVideoAction\_17](../constructors/sendMessageRecordVideoAction_17.md) = \[\];<a name="sendMessageRecordVideoAction_17"></a>
@ -1315,6 +1330,9 @@ description: List of constructors
***
<br><br>[$sendMessageUploadPhotoAction\_17](../constructors/sendMessageUploadPhotoAction_17.md) = \[\];<a name="sendMessageUploadPhotoAction_17"></a>
***
<br><br>[$sendMessageUploadRoundAction](../constructors/sendMessageUploadRoundAction.md) = \[\];<a name="sendMessageUploadRoundAction"></a>
***
<br><br>[$sendMessageUploadVideoAction\_17](../constructors/sendMessageUploadVideoAction_17.md) = \[\];<a name="sendMessageUploadVideoAction_17"></a>
@ -1637,12 +1655,18 @@ description: List of constructors
[$updates\_state](../constructors/updates_state.md) = \['pts' => [int](../types/int.md), 'qts' => [int](../types/int.md), 'date' => [int](../types/int.md), 'seq' => [int](../types/int.md), 'unread_count' => [int](../types/int.md), \];<a name="updates_state"></a>
***
<br><br>[$upload\_file](../constructors/upload_file.md) = \['type' => [storage\_FileType](../types/storage_FileType.md), 'mtime' => [int](../types/int.md), 'bytes' => [bytes](../types/bytes.md), \];<a name="upload_file"></a>
<br><br>[$upload\_cdnFile](../constructors/upload_cdnFile.md) = \['bytes' => [bytes](../types/bytes.md), \];<a name="upload_cdnFile"></a>
[$upload\_cdnFileReuploadNeeded](../constructors/upload_cdnFileReuploadNeeded.md) = \['request_token' => [bytes](../types/bytes.md), \];<a name="upload_cdnFileReuploadNeeded"></a>
[$upload\_file](../constructors/upload_file.md) = \['type' => [storage\_FileType](../types/storage_FileType.md), 'mtime' => [int](../types/int.md), 'bytes' => [bytes](../types/bytes.md), \];<a name="upload_file"></a>
[$upload\_fileCdnRedirect](../constructors/upload_fileCdnRedirect.md) = \['dc_id' => [int](../types/int.md), 'file_token' => [bytes](../types/bytes.md), 'encryption_key' => [bytes](../types/bytes.md), 'encryption_iv' => [bytes](../types/bytes.md), \];<a name="upload_fileCdnRedirect"></a>
[$upload\_webFile](../constructors/upload_webFile.md) = \['size' => [int](../types/int.md), 'mime_type' => [string](../types/string.md), 'file_type' => [storage\_FileType](../types/storage_FileType.md), 'mtime' => [int](../types/int.md), 'bytes' => [bytes](../types/bytes.md), \];<a name="upload_webFile"></a>
***
<br><br>[$user](../constructors/user.md) = \['self' => [Bool](../types/Bool.md), 'contact' => [Bool](../types/Bool.md), 'mutual_contact' => [Bool](../types/Bool.md), 'deleted' => [Bool](../types/Bool.md), 'bot' => [Bool](../types/Bool.md), 'bot_chat_history' => [Bool](../types/Bool.md), 'bot_nochats' => [Bool](../types/Bool.md), 'verified' => [Bool](../types/Bool.md), 'restricted' => [Bool](../types/Bool.md), 'min' => [Bool](../types/Bool.md), 'bot_inline_geo' => [Bool](../types/Bool.md), 'id' => [int](../types/int.md), 'access_hash' => [long](../types/long.md), 'first_name' => [string](../types/string.md), 'last_name' => [string](../types/string.md), 'username' => [string](../types/string.md), 'phone' => [string](../types/string.md), 'photo' => [UserProfilePhoto](../types/UserProfilePhoto.md), 'status' => [UserStatus](../types/UserStatus.md), 'bot_info_version' => [int](../types/int.md), 'restriction_reason' => [string](../types/string.md), 'bot_inline_placeholder' => [string](../types/string.md), \];<a name="user"></a>
<br><br>[$user](../constructors/user.md) = \['self' => [Bool](../types/Bool.md), 'contact' => [Bool](../types/Bool.md), 'mutual_contact' => [Bool](../types/Bool.md), 'deleted' => [Bool](../types/Bool.md), 'bot' => [Bool](../types/Bool.md), 'bot_chat_history' => [Bool](../types/Bool.md), 'bot_nochats' => [Bool](../types/Bool.md), 'verified' => [Bool](../types/Bool.md), 'restricted' => [Bool](../types/Bool.md), 'min' => [Bool](../types/Bool.md), 'bot_inline_geo' => [Bool](../types/Bool.md), 'id' => [int](../types/int.md), 'access_hash' => [long](../types/long.md), 'first_name' => [string](../types/string.md), 'last_name' => [string](../types/string.md), 'username' => [string](../types/string.md), 'phone' => [string](../types/string.md), 'photo' => [UserProfilePhoto](../types/UserProfilePhoto.md), 'status' => [UserStatus](../types/UserStatus.md), 'bot_info_version' => [int](../types/int.md), 'restriction_reason' => [string](../types/string.md), 'bot_inline_placeholder' => [string](../types/string.md), 'lang_code' => [string](../types/string.md), \];<a name="user"></a>
***
<br><br>[$userEmpty](../constructors/userEmpty.md) = \['id' => [int](../types/int.md), \];<a name="userEmpty"></a>

View File

@ -33,6 +33,7 @@ description: user attributes, type and example
|bot\_info\_version|[int](../types/int.md) | Optional|
|restriction\_reason|[string](../types/string.md) | Optional|
|bot\_inline\_placeholder|[string](../types/string.md) | Optional|
|lang\_code|[string](../types/string.md) | Optional|
@ -42,14 +43,14 @@ description: user attributes, type and example
### Example:
```
$user = ['_' => 'user', 'self' => Bool, 'contact' => Bool, 'mutual_contact' => Bool, 'deleted' => Bool, 'bot' => Bool, 'bot_chat_history' => Bool, 'bot_nochats' => Bool, 'verified' => Bool, 'restricted' => Bool, 'min' => Bool, 'bot_inline_geo' => Bool, 'id' => int, 'access_hash' => long, 'first_name' => string, 'last_name' => string, 'username' => string, 'phone' => string, 'photo' => UserProfilePhoto, 'status' => UserStatus, 'bot_info_version' => int, 'restriction_reason' => string, 'bot_inline_placeholder' => string, ];
$user = ['_' => 'user', 'self' => Bool, 'contact' => Bool, 'mutual_contact' => Bool, 'deleted' => Bool, 'bot' => Bool, 'bot_chat_history' => Bool, 'bot_nochats' => Bool, 'verified' => Bool, 'restricted' => Bool, 'min' => Bool, 'bot_inline_geo' => Bool, 'id' => int, 'access_hash' => long, 'first_name' => string, 'last_name' => string, 'username' => string, 'phone' => string, 'photo' => UserProfilePhoto, 'status' => UserStatus, 'bot_info_version' => int, 'restriction_reason' => string, 'bot_inline_placeholder' => string, 'lang_code' => string, ];
```
Or, if you're into Lua:
```
user={_='user', self=Bool, contact=Bool, mutual_contact=Bool, deleted=Bool, bot=Bool, bot_chat_history=Bool, bot_nochats=Bool, verified=Bool, restricted=Bool, min=Bool, bot_inline_geo=Bool, id=int, access_hash=long, first_name=string, last_name=string, username=string, phone=string, photo=UserProfilePhoto, status=UserStatus, bot_info_version=int, restriction_reason=string, bot_inline_placeholder=string, }
user={_='user', self=Bool, contact=Bool, mutual_contact=Bool, deleted=Bool, bot=Bool, bot_chat_history=Bool, bot_nochats=Bool, verified=Bool, restricted=Bool, min=Bool, bot_inline_geo=Bool, id=int, access_hash=long, first_name=string, last_name=string, username=string, phone=string, photo=UserProfilePhoto, status=UserStatus, bot_info_version=int, restriction_reason=string, bot_inline_placeholder=string, lang_code=string, }
```

View File

@ -1,8 +1,8 @@
---
title: MadelineProto API documentation (layer 65)
description: MadelineProto API documentation (layer 65)
title: MadelineProto API documentation (layer 66)
description: MadelineProto API documentation (layer 66)
---
# MadelineProto API documentation (layer 65)
# MadelineProto API documentation (layer 66)
[Methods](methods/)

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = auth.sendInvites({phone_numbers={string}, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = help.setBotUpdatesStatus({pending_updates_count=int, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -202,6 +202,8 @@ $MadelineProto->[destroy_session](destroy_session.md)(\['session_id' => [long](.
$MadelineProto->[help->getAppUpdate](help_getAppUpdate.md)(\[\]) === [$help\_AppUpdate](../types/help_AppUpdate.md)<a name="help_getAppUpdate"></a>
$MadelineProto->[help->getCdnConfig](help_getCdnConfig.md)(\[\]) === [$CdnConfig](../types/CdnConfig.md)<a name="help_getCdnConfig"></a>
$MadelineProto->[help->getConfig](help_getConfig.md)(\[\]) === [$Config](../types/Config.md)<a name="help_getConfig"></a>
$MadelineProto->[help->getInviteText](help_getInviteText.md)(\[\]) === [$help\_InviteText](../types/help_InviteText.md)<a name="help_getInviteText"></a>
@ -465,10 +467,14 @@ $MadelineProto->[updates->getDifference](updates_getDifference.md)(\['pts' => [i
$MadelineProto->[updates->getState](updates_getState.md)(\[\]) === [$updates\_State](../types/updates_State.md)<a name="updates_getState"></a>
***
<br><br>$MadelineProto->[upload->getFile](upload_getFile.md)(\['location' => [InputFileLocation](../types/InputFileLocation.md), 'offset' => [int](../types/int.md), 'limit' => [int](../types/int.md), \]) === [$upload\_File](../types/upload_File.md)<a name="upload_getFile"></a>
<br><br>$MadelineProto->[upload->getCdnFile](upload_getCdnFile.md)(\['file_token' => [bytes](../types/bytes.md), 'offset' => [int](../types/int.md), 'limit' => [int](../types/int.md), \]) === [$upload\_CdnFile](../types/upload_CdnFile.md)<a name="upload_getCdnFile"></a>
$MadelineProto->[upload->getFile](upload_getFile.md)(\['location' => [InputFileLocation](../types/InputFileLocation.md), 'offset' => [int](../types/int.md), 'limit' => [int](../types/int.md), \]) === [$upload\_File](../types/upload_File.md)<a name="upload_getFile"></a>
$MadelineProto->[upload->getWebFile](upload_getWebFile.md)(\['location' => [InputWebFileLocation](../types/InputWebFileLocation.md), 'offset' => [int](../types/int.md), 'limit' => [int](../types/int.md), \]) === [$upload\_WebFile](../types/upload_WebFile.md)<a name="upload_getWebFile"></a>
$MadelineProto->[upload->reuploadCdnFile](upload_reuploadCdnFile.md)(\['file_token' => [bytes](../types/bytes.md), 'request_token' => [bytes](../types/bytes.md), \]) === [$Bool](../types/Bool.md)<a name="upload_reuploadCdnFile"></a>
$MadelineProto->[upload->saveBigFilePart](upload_saveBigFilePart.md)(\['file_id' => [long](../types/long.md), 'file_part' => [int](../types/int.md), 'file_total_parts' => [int](../types/int.md), 'bytes' => [bytes](../types/bytes.md), \]) === [$Bool](../types/Bool.md)<a name="upload_saveBigFilePart"></a>
$MadelineProto->[upload->saveFilePart](upload_saveFilePart.md)(\['file_id' => [long](../types/long.md), 'file_part' => [int](../types/int.md), 'bytes' => [bytes](../types/bytes.md), \]) === [$Bool](../types/Bool.md)<a name="upload_saveFilePart"></a>

View File

@ -54,6 +54,12 @@ You can provide bot API reply_markup objects here.
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.
## Usage of parse_mode:
Set parse_mode to html to enable HTML parsing of the message.

View File

@ -55,6 +55,12 @@ You can provide bot API reply_markup objects here.
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Updates](../types/Updates.md) will be returned instead.
## Usage of parse_mode:
Set parse_mode to html to enable HTML parsing of the message.

View File

@ -42,3 +42,9 @@ Or, if you're into Lua:
MessageMedia = messages.getWebPagePreview({message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [MessageMedia](../types/MessageMedia.md) will be returned instead.

View File

@ -48,6 +48,12 @@ Bool = messages.saveDraft({no_webpage=Bool, reply_to_msg_id=int, peer=InputPeer,
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.
## Usage of parse_mode:
Set parse_mode to html to enable HTML parsing of the message.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncrypted({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedFile({peer=InputEncryptedChat, message=DecryptedMessage, file=InputEncryptedFile, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedService({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -58,6 +58,12 @@ You can provide bot API reply_markup objects here.
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Updates](../types/Updates.md) will be returned instead.
## Usage of parse_mode:
Set parse_mode to html to enable HTML parsing of the message.

View File

@ -46,3 +46,9 @@ Or, if you're into Lua:
Bool = messages.setBotCallbackAnswer({alert=Bool, query_id=long, message=string, url=string, cache_time=int, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ContactStatus
### Possible values (constructors):
[contactStatus](../constructors/contactStatus.md)
### Methods that return an object of this type (methods):

View File

@ -33,6 +33,10 @@ description: constructors and methods of type MessagesFilter
[inputMessagesFilterPhoneCalls](../constructors/inputMessagesFilterPhoneCalls.md)
[inputMessagesFilterRoundVoice](../constructors/inputMessagesFilterRoundVoice.md)
[inputMessagesFilterRoundVideo](../constructors/inputMessagesFilterRoundVideo.md)
### Methods that return an object of this type (methods):

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ReceivedNotifyMessage
### Possible values (constructors):
[receivedNotifyMessage](../constructors/receivedNotifyMessage.md)
### Methods that return an object of this type (methods):

View File

@ -33,6 +33,10 @@ Notifies about activity in chat
[sendMessageGamePlayAction](../constructors/sendMessageGamePlayAction.md)
[sendMessageRecordRoundAction](../constructors/sendMessageRecordRoundAction.md)
[sendMessageUploadRoundAction](../constructors/sendMessageUploadRoundAction.md)
[sendMessageTypingAction\_17](../constructors/sendMessageTypingAction_17.md)
[sendMessageCancelAction\_17](../constructors/sendMessageCancelAction_17.md)

View File

@ -9,6 +9,10 @@ description: constructors and methods of type StickerSetCovered
### Possible values (constructors):
[stickerSetCovered](../constructors/stickerSetCovered.md)
[stickerSetMultiCovered](../constructors/stickerSetMultiCovered.md)
### Methods that return an object of this type (methods):

View File

@ -26,11 +26,23 @@ A [Chat](Chat.md), a [User](User.md), an [InputPeer](InputPeer.md), an [InputUse
### Possible values (constructors):
[userEmpty](../constructors/userEmpty.md)
[user](../constructors/user.md)
### Methods that return an object of this type (methods):
[$MadelineProto->account->updateProfile](../methods/account_updateProfile.md)
[$MadelineProto->account->updateUsername](../methods/account_updateUsername.md)
[$MadelineProto->account->changePhone](../methods/account_changePhone.md)
[$MadelineProto->users->getUsers](../methods/users_getUsers.md)
[$MadelineProto->contacts->importCard](../methods/contacts_importCard.md)

View File

@ -17,5 +17,7 @@ description: constructors and methods of type WallPaper
### Methods that return an object of this type (methods):
[$MadelineProto->account->getWallPapers](../methods/account_getWallPapers.md)

View File

@ -22,6 +22,10 @@ description: List of types
[BotInlineResult](BotInlineResult.md)<a name="BotInlineResult"></a>
[CdnConfig](CdnConfig.md)<a name="CdnConfig"></a>
[CdnPublicKey](CdnPublicKey.md)<a name="CdnPublicKey"></a>
[ChannelMessagesFilter](ChannelMessagesFilter.md)<a name="ChannelMessagesFilter"></a>
[ChannelParticipant](ChannelParticipant.md)<a name="ChannelParticipant"></a>
@ -306,20 +310,6 @@ description: List of types
[UserStatus](UserStatus.md)<a name="UserStatus"></a>
[ContactStatus](ContactStatus.md)<a name="ContactStatus"></a>
[ReceivedNotifyMessage](ReceivedNotifyMessage.md)<a name="ReceivedNotifyMessage"></a>
[StickerSetCovered](StickerSetCovered.md)<a name="StickerSetCovered"></a>
[User](User.md)<a name="User"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[WebDocument](WebDocument.md)<a name="WebDocument"></a>
@ -380,6 +370,10 @@ description: List of types
[help\_TermsOfService](help_TermsOfService.md)<a name="help_TermsOfService"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[messages\_AffectedHistory](messages_AffectedHistory.md)<a name="messages_AffectedHistory"></a>
[messages\_AffectedMessages](messages_AffectedMessages.md)<a name="messages_AffectedMessages"></a>
@ -448,6 +442,8 @@ description: List of types
[updates\_State](updates_State.md)<a name="updates_State"></a>
[upload\_CdnFile](upload_CdnFile.md)<a name="upload_CdnFile"></a>
[upload\_File](upload_File.md)<a name="upload_File"></a>
[upload\_WebFile](upload_WebFile.md)<a name="upload_WebFile"></a>

View File

@ -11,6 +11,8 @@ description: constructors and methods of type upload_File
[upload\_file](../constructors/upload_file.md)
[upload\_fileCdnRedirect](../constructors/upload_fileCdnRedirect.md)
### Methods that return an object of this type (methods):

View File

@ -15,6 +15,7 @@ description: chat attributes, type and example
|access\_hash|[long](API_docs/types/long.md) | Yes|access hash of peer|
|first\_name|[string](API_docs/types/string.md) | Yes|First name of the user|
|last\_name|[string](API_docs/types/string.md) | Optional|Last name of the user|
|lang\_code|[string](API_docs/types/string.md) | Optional|Language of the user|
|username|[string](API_docs/types/string.md) | Optional|Username|
|verified|[Bool](API_docs/types/Bool.md) | Optional|Is the peer official?|
|restricted|[Bool](API_docs/types/Bool.md) | Optional|Is the peer restricted to the current user?|

View File

@ -20,9 +20,9 @@ Also note that MadelineProto will perform better if python and a big math extens
This project is in beta state.
The MadelineProto API documentation can be found [here (layer 65)](https://daniil.it/MadelineProto/API_docs/). VERY IMPORTANT READ THIS.
The MadelineProto API documentation can be found [here (layer 66)](https://daniil.it/MadelineProto/API_docs/). VERY IMPORTANT READ THIS.
The TD documentation can be found [here](https://daniil.it/MadelineProto/TD_docs/).
The TD documentation can be found [here](https://daniil.it/MadelineProto/TD_docs/). (you cannot use the methods described here in MadelineProto without the lua extension)
The MadelineProto API documentation (mtproto tl scheme) can be found [here](https://daniil.it/MadelineProto/MTProto_docs/).
@ -86,12 +86,19 @@ Thanks to the devs that contributed to these projects, MadelineProto is now an e
If you have some questions about the usage of the methods of this library, you can join the [support group](https://telegram.me/pwrtelegramgroup) or contact [@danogentili](https://telegram.me/danogentili).
But first, please read this WHOLE page very carefully, follow all links to external documentation, and read all examples in the repo.
But first, please read this WHOLE page very carefully, follow all links to external documentation, and read all examples in the repo (bot.php, bots/, tests/testing.php).
If you don't understand something, read everything again.
You MUST know OOP programming in order to use this library.
I will NOT answer to questions that can be answered simply by reading this page; I will instead ask you to read it carefully twice.
A very important page you must read is the [API documentation](https://daniil.it/MadelineProto/API_docs/): if it's the first time you see a link to that page it means you didn't read the documentation carefully.
I can offer support, however, when it comes to MadelineProto bugs or problems in the documentation. I will not write code for you for free, however you can hire me to do that if you want (my rate is 50$ per hour); you can also buy an easy to use, customized MadelineProto base for only 30$.
If you're selling a MadelineProto base too, you really should consider donating at least 20% of the price of the base: [this is my PayPal](https://paypal.me/danog).
### Installation
@ -447,6 +454,8 @@ Methods that allow sending message entities (messages.sendMessage for example) a
To convert the results of methods to bot API objects you must provide a second parameter to method wrappers, containing an array with the `botAPI` key set to true.
To disable fetching the result of a method, the array that must be provided as second parameter to method wrapper must have the `noResponse` key set to true.
reply_markup accepts bot API reply markup objects as well as MTProto ones.
Note that when you login as a bot, MadelineProto also logins using the [PWRTelegram](https://pwrtelegram.xyz) API, to allow persistant storage of peers, even after a logout and another login.

89
log
View File

@ -1,89 +0,0 @@
Deserializing MadelineProto from session.madeline...
MTProto, magnaluna: Resetting session id and seq_no in DC 2...
MTProto, magnaluna: Resetting session id and seq_no in DC 1...
MTProto, magnaluna: Resetting session id and seq_no in DC 3...
MTProto, magnaluna: Resetting session id and seq_no in DC 4...
MTProto, magnaluna: Resetting session id and seq_no in DC 5...
MTProto, magnaluna: Serialization is out of date, reconstructing object!
Exception, magnaluna: file_get_contents(http://ipv6.test-ipv6.com/): failed to open stream: Network is unreachable in MTProto.php:187
TL, magnaluna: Loading TL schemes...
TL, magnaluna: Parsing TL_mtproto_v1.json...
TL, magnaluna: Parsing TL_telegram_v62.tl...
TL, magnaluna: Parsing TL_secret.tl...
TL, magnaluna: Parsing TL_td.tl...
TL, magnaluna: Parsing TL_botAPI.tl...
CallHandler, magnaluna: Calling method (try number 1 for help.getNearestDc)...
ResponseHandler, magnaluna: Received msg_container.
ResponseHandler, magnaluna: Received new_session_created.
CallHandler, magnaluna: Calling method (try number 1 for updates.getDifference)...
ResponseHandler, magnaluna: Received new_session_created.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 3, is 1, new_session_created)
ResponseHandler, magnaluna: Received rpc_result.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 5, is 3, nearestDc)
ResponseHandler, magnaluna: Received rpc_result.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 7, is 5, rpc_error)
Exception, magnaluna: Received request to switch to DC 1 in ResponseHandler.php:327
CallHandler, magnaluna: An error occurred while calling method updates.getDifference: Received request to switch to DC 1 in ResponseHandler on line 327. Recreating connection and retrying to call method...
CallHandler, magnaluna: Calling method (try number 2 for updates.getDifference)...
ResponseHandler, magnaluna: Received msg_container.
ResponseHandler, magnaluna: Received new_session_created.
ResponseHandler, magnaluna: Received msgs_ack.
ResponseHandler, magnaluna: Received rpc_result.
UpdateHandler, magnaluna: Got updates.difference
MessageHandler, magnaluna: I do not have the secret chat -1302339158 in the database, skipping message...
MessageHandler, magnaluna: I do not have the secret chat -1302339158 in the database, skipping message...
UpdateHandler, magnaluna: Handling an update of type updateEncryptedMessagesRead...
UpdateHandler, magnaluna: Saving an update of type updateEncryptedMessagesRead...
ResponseHandler, magnaluna: Received msgs_ack.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 8, is 2, msgs_ack)
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 8, is 2, msg_container)
MTProto, magnaluna: We're in NL, current dc is 2, nearest dc is 4.
MTProto, magnaluna: Getting updates after deserialization...
CallHandler, magnaluna: Calling method (try number 1 for updates.getDifference)...
ResponseHandler, magnaluna: Received msg_container.
ResponseHandler, magnaluna: Received new_session_created.
ResponseHandler, magnaluna: Received msgs_ack.
ResponseHandler, magnaluna: Received rpc_result.
Exception, magnaluna: Received request to switch to DC 1 in ResponseHandler.php:327
CallHandler, magnaluna: An error occurred while calling method updates.getDifference: Received request to switch to DC 1 in ResponseHandler on line 327. Recreating connection and retrying to call method...
CallHandler, magnaluna: Calling method (try number 2 for updates.getDifference)...
ResponseHandler, magnaluna: Received msg_container.
ResponseHandler, magnaluna: Received rpc_result.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 5, is 3, updates.difference)
ResponseHandler, magnaluna: Received msgs_ack.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 6, is 4, msgs_ack)
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 6, is 4, msg_container)
ResponseHandler, magnaluna: Received rpc_result.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 7, is 5, updates.differenceEmpty)
UpdateHandler, magnaluna: Got updates.differenceEmpty
Loading .env...
Loading settings...
Serializing MadelineProto to session.madeline...
Wrote 643125 bytes
Size of MadelineProto instance is 643125 bytes
AuthKeyHandler, magnaluna: Creating secret chat with 219474624...
CallHandler, magnaluna: Calling method (try number 1 for messages.getDhConfig)...
ResponseHandler, magnaluna: Received rpc_result.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 9, is 7, messages.dhConfig)
AuthKeyHandler, magnaluna: Executing p/g checks (1/2)...
AuthKeyHandler, magnaluna: Executing p/g checks (2/2)...
AuthKeyHandler, magnaluna: Executing g check...
AuthKeyHandler, magnaluna: Generating a...
AuthKeyHandler, magnaluna: Generating g_a...
AuthKeyHandler, magnaluna: Executing g_a check (1/2)...
AuthKeyHandler, magnaluna: Executing g_a check (2/2)...
CallHandler, magnaluna: Calling method (try number 1 for messages.requestEncryption)...
ResponseHandler, magnaluna: Received updateShort.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 11, is 9, updateShort)
ResponseHandler, magnaluna: Parsing updates received via the socket...
UpdateHandler, magnaluna: Handling an update of type updateUserStatus...
UpdateHandler, magnaluna: Saving an update of type updateUserStatus...
ResponseHandler, magnaluna: Received rpc_result.
SeqNoHandler, magnaluna: SECURITY WARNING: Seqno mismatch (should be 13, is 11, rpc_error)
PHP Fatal error: Uncaught danog\MadelineProto\RPCErrorException: FLOOD_WAIT_169 in /home/pwrtelegram/repos/repos/BruhhBot-Madeline/MadelineProto/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php:354
Stack trace:
#0 /home/pwrtelegram/repos/repos/BruhhBot-Madeline/MadelineProto/src/danog/MadelineProto/MTProtoTools/CallHandler.php(93): danog\MadelineProto\MTProto->handle_rpc_error(Array, 1)
#1 /home/pwrtelegram/repos/repos/BruhhBot-Madeline/MadelineProto/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php(55): danog\MadelineProto\MTProto->method_call('messages.reques...', Array, Array)
#2 /home/pwrtelegram/repos/repos/BruhhBot-Madeline/MadelineProto/tests/testing.php(74): danog\MadelineProto\MTProto->request_secret_chat(Array)
#3 {main}
thrown in /home/pwrtelegram/repos/repos/BruhhBot-Madeline/MadelineProto/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php on line 354

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = auth.sendInvites({phone_numbers={string}, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_StatedMessages = messages.sendBroadcast({contacts={InputUser}, message=string, media=InputMedia, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_StatedMessages](../types/messages_StatedMessages.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncrypted({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedFile({peer=InputEncryptedChat, message=DecryptedMessage, file=InputEncryptedFile, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedService({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentMessage = messages.sendMessage({peer=InputPeer, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentMessage](../types/messages_SentMessage.md) will be returned instead.

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ContactStatus
### Possible values (constructors):
[contactStatus](../constructors/contactStatus.md)
### Methods that return an object of this type (methods):

View File

@ -132,16 +132,6 @@ description: List of types
[Vector t](Vector t.md)<a name="Vector t"></a>
[ContactStatus](ContactStatus.md)<a name="ContactStatus"></a>
[User](User.md)<a name="User"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[Video](Video.md)<a name="Video"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
@ -178,6 +168,10 @@ description: List of types
[help\_Support](help_Support.md)<a name="help_Support"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[messages\_AffectedHistory](messages_AffectedHistory.md)<a name="messages_AffectedHistory"></a>
[messages\_ChatFull](messages_ChatFull.md)<a name="messages_ChatFull"></a>

View File

@ -26,11 +26,29 @@ A [Chat](Chat.md), a [User](User.md), an [InputPeer](InputPeer.md), an [InputUse
### Possible values (constructors):
[userEmpty](../constructors/userEmpty.md)
[userSelf](../constructors/userSelf.md)
[userContact](../constructors/userContact.md)
[userRequest](../constructors/userRequest.md)
[userForeign](../constructors/userForeign.md)
[userDeleted](../constructors/userDeleted.md)
### Methods that return an object of this type (methods):
[$MadelineProto->account->updateProfile](../methods/account_updateProfile.md)
[$MadelineProto->users->getUsers](../methods/users_getUsers.md)
[$MadelineProto->contacts->importCard](../methods/contacts_importCard.md)
[$MadelineProto->account->updateUsername](../methods/account_updateUsername.md)

View File

@ -17,5 +17,7 @@ description: constructors and methods of type WallPaper
### Methods that return an object of this type (methods):
[$MadelineProto->account->getWallPapers](../methods/account_getWallPapers.md)

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = auth.sendInvites({phone_numbers={string}, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_StatedMessages = messages.sendBroadcast({contacts={InputUser}, message=string, media=InputMedia, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_StatedMessages](../types/messages_StatedMessages.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncrypted({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedFile({peer=InputEncryptedChat, message=DecryptedMessage, file=InputEncryptedFile, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedService({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentMessage = messages.sendMessage({peer=InputPeer, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentMessage](../types/messages_SentMessage.md) will be returned instead.

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ContactStatus
### Possible values (constructors):
[contactStatus](../constructors/contactStatus.md)
### Methods that return an object of this type (methods):

View File

@ -150,16 +150,6 @@ description: List of types
[Vector t](Vector t.md)<a name="Vector t"></a>
[ContactStatus](ContactStatus.md)<a name="ContactStatus"></a>
[User](User.md)<a name="User"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[Video](Video.md)<a name="Video"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
@ -200,6 +190,10 @@ description: List of types
[help\_Support](help_Support.md)<a name="help_Support"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[messages\_AffectedHistory](messages_AffectedHistory.md)<a name="messages_AffectedHistory"></a>
[messages\_AllStickers](messages_AllStickers.md)<a name="messages_AllStickers"></a>

View File

@ -26,11 +26,33 @@ A [Chat](Chat.md), a [User](User.md), an [InputPeer](InputPeer.md), an [InputUse
### Possible values (constructors):
[userEmpty](../constructors/userEmpty.md)
[userSelf](../constructors/userSelf.md)
[userContact](../constructors/userContact.md)
[userRequest](../constructors/userRequest.md)
[userForeign](../constructors/userForeign.md)
[userDeleted](../constructors/userDeleted.md)
### Methods that return an object of this type (methods):
[$MadelineProto->account->updateProfile](../methods/account_updateProfile.md)
[$MadelineProto->users->getUsers](../methods/users_getUsers.md)
[$MadelineProto->contacts->importCard](../methods/contacts_importCard.md)
[$MadelineProto->account->updateUsername](../methods/account_updateUsername.md)
[$MadelineProto->contacts->resolveUsername](../methods/contacts_resolveUsername.md)
[$MadelineProto->account->changePhone](../methods/account_changePhone.md)

View File

@ -17,5 +17,7 @@ description: constructors and methods of type WallPaper
### Methods that return an object of this type (methods):
[$MadelineProto->account->getWallPapers](../methods/account_getWallPapers.md)

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = auth.sendInvites({phone_numbers={string}, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
geochats_StatedMessage = geochats.sendMessage({peer=InputGeoChat, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [geochats\_StatedMessage](../types/geochats_StatedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_StatedMessages = messages.sendBroadcast({contacts={InputUser}, message=string, media=InputMedia, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_StatedMessages](../types/messages_StatedMessages.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncrypted({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedFile({peer=InputEncryptedChat, message=DecryptedMessage, file=InputEncryptedFile, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedService({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentMessage = messages.sendMessage({peer=InputPeer, reply_to_msg_id=int, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentMessage](../types/messages_SentMessage.md) will be returned instead.

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ContactStatus
### Possible values (constructors):
[contactStatus](../constructors/contactStatus.md)
### Methods that return an object of this type (methods):

View File

@ -154,16 +154,6 @@ description: List of types
[Vector t](Vector t.md)<a name="Vector t"></a>
[ContactStatus](ContactStatus.md)<a name="ContactStatus"></a>
[User](User.md)<a name="User"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[Video](Video.md)<a name="Video"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
@ -208,6 +198,10 @@ description: List of types
[help\_Support](help_Support.md)<a name="help_Support"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[messages\_AffectedHistory](messages_AffectedHistory.md)<a name="messages_AffectedHistory"></a>
[messages\_AffectedMessages](messages_AffectedMessages.md)<a name="messages_AffectedMessages"></a>

View File

@ -26,11 +26,33 @@ A [Chat](Chat.md), a [User](User.md), an [InputPeer](InputPeer.md), an [InputUse
### Possible values (constructors):
[userEmpty](../constructors/userEmpty.md)
[userSelf](../constructors/userSelf.md)
[userContact](../constructors/userContact.md)
[userRequest](../constructors/userRequest.md)
[userForeign](../constructors/userForeign.md)
[userDeleted](../constructors/userDeleted.md)
### Methods that return an object of this type (methods):
[$MadelineProto->account->updateProfile](../methods/account_updateProfile.md)
[$MadelineProto->users->getUsers](../methods/users_getUsers.md)
[$MadelineProto->contacts->importCard](../methods/contacts_importCard.md)
[$MadelineProto->account->updateUsername](../methods/account_updateUsername.md)
[$MadelineProto->contacts->resolveUsername](../methods/contacts_resolveUsername.md)
[$MadelineProto->account->changePhone](../methods/account_changePhone.md)

View File

@ -17,5 +17,7 @@ description: constructors and methods of type WallPaper
### Methods that return an object of this type (methods):
[$MadelineProto->account->getWallPapers](../methods/account_getWallPapers.md)

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = auth.sendInvites({phone_numbers={string}, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
geochats_StatedMessage = geochats.sendMessage({peer=InputGeoChat, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [geochats\_StatedMessage](../types/geochats_StatedMessage.md) will be returned instead.

View File

@ -42,3 +42,9 @@ Or, if you're into Lua:
MessageMedia = messages.getWebPagePreview({message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [MessageMedia](../types/MessageMedia.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
Updates = messages.sendBroadcast({contacts={InputUser}, message=string, media=InputMedia, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Updates](../types/Updates.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncrypted({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedFile({peer=InputEncryptedChat, message=DecryptedMessage, file=InputEncryptedFile, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedService({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentMessage = messages.sendMessage({peer=InputPeer, reply_to_msg_id=int, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentMessage](../types/messages_SentMessage.md) will be returned instead.

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ContactStatus
### Possible values (constructors):
[contactStatus](../constructors/contactStatus.md)
### Methods that return an object of this type (methods):

View File

@ -156,16 +156,6 @@ description: List of types
[Vector t](Vector t.md)<a name="Vector t"></a>
[ContactStatus](ContactStatus.md)<a name="ContactStatus"></a>
[User](User.md)<a name="User"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[Video](Video.md)<a name="Video"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
@ -220,6 +210,10 @@ description: List of types
[help\_Support](help_Support.md)<a name="help_Support"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[messages\_AffectedHistory](messages_AffectedHistory.md)<a name="messages_AffectedHistory"></a>
[messages\_AffectedMessages](messages_AffectedMessages.md)<a name="messages_AffectedMessages"></a>

View File

@ -26,11 +26,33 @@ A [Chat](Chat.md), a [User](User.md), an [InputPeer](InputPeer.md), an [InputUse
### Possible values (constructors):
[userEmpty](../constructors/userEmpty.md)
[userSelf](../constructors/userSelf.md)
[userContact](../constructors/userContact.md)
[userRequest](../constructors/userRequest.md)
[userForeign](../constructors/userForeign.md)
[userDeleted](../constructors/userDeleted.md)
### Methods that return an object of this type (methods):
[$MadelineProto->account->updateProfile](../methods/account_updateProfile.md)
[$MadelineProto->users->getUsers](../methods/users_getUsers.md)
[$MadelineProto->contacts->importCard](../methods/contacts_importCard.md)
[$MadelineProto->account->updateUsername](../methods/account_updateUsername.md)
[$MadelineProto->contacts->resolveUsername](../methods/contacts_resolveUsername.md)
[$MadelineProto->account->changePhone](../methods/account_changePhone.md)

View File

@ -17,5 +17,7 @@ description: constructors and methods of type WallPaper
### Methods that return an object of this type (methods):
[$MadelineProto->account->getWallPapers](../methods/account_getWallPapers.md)

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = auth.sendInvites({phone_numbers={string}, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
geochats_StatedMessage = geochats.sendMessage({peer=InputGeoChat, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [geochats\_StatedMessage](../types/geochats_StatedMessage.md) will be returned instead.

View File

@ -42,3 +42,9 @@ Or, if you're into Lua:
MessageMedia = messages.getWebPagePreview({message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [MessageMedia](../types/MessageMedia.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
Updates = messages.sendBroadcast({contacts={InputUser}, message=string, media=InputMedia, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Updates](../types/Updates.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncrypted({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedFile({peer=InputEncryptedChat, message=DecryptedMessage, file=InputEncryptedFile, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedService({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -51,3 +51,9 @@ messages_SentMessage = messages.sendMessage({peer=InputPeer, reply_to_msg_id=int
You can provide bot API reply_markup objects here.
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentMessage](../types/messages_SentMessage.md) will be returned instead.

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ContactStatus
### Possible values (constructors):
[contactStatus](../constructors/contactStatus.md)
### Methods that return an object of this type (methods):

View File

@ -176,18 +176,6 @@ description: List of types
[Vector t](Vector t.md)<a name="Vector t"></a>
[ContactStatus](ContactStatus.md)<a name="ContactStatus"></a>
[ReceivedNotifyMessage](ReceivedNotifyMessage.md)<a name="ReceivedNotifyMessage"></a>
[User](User.md)<a name="User"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[Video](Video.md)<a name="Video"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
@ -244,6 +232,10 @@ description: List of types
[help\_Support](help_Support.md)<a name="help_Support"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[messages\_AffectedHistory](messages_AffectedHistory.md)<a name="messages_AffectedHistory"></a>
[messages\_AffectedMessages](messages_AffectedMessages.md)<a name="messages_AffectedMessages"></a>

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ReceivedNotifyMessage
### Possible values (constructors):
[receivedNotifyMessage](../constructors/receivedNotifyMessage.md)
### Methods that return an object of this type (methods):

View File

@ -26,11 +26,25 @@ A [Chat](Chat.md), a [User](User.md), an [InputPeer](InputPeer.md), an [InputUse
### Possible values (constructors):
[userEmpty](../constructors/userEmpty.md)
[user](../constructors/user.md)
### Methods that return an object of this type (methods):
[$MadelineProto->account->updateProfile](../methods/account_updateProfile.md)
[$MadelineProto->users->getUsers](../methods/users_getUsers.md)
[$MadelineProto->contacts->importCard](../methods/contacts_importCard.md)
[$MadelineProto->account->updateUsername](../methods/account_updateUsername.md)
[$MadelineProto->contacts->resolveUsername](../methods/contacts_resolveUsername.md)
[$MadelineProto->account->changePhone](../methods/account_changePhone.md)

View File

@ -17,5 +17,7 @@ description: constructors and methods of type WallPaper
### Methods that return an object of this type (methods):
[$MadelineProto->account->getWallPapers](../methods/account_getWallPapers.md)

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
Bool = auth.sendInvites({phone_numbers={string}, message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.

View File

@ -42,3 +42,9 @@ Or, if you're into Lua:
MessageMedia = messages.getWebPagePreview({message=string, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [MessageMedia](../types/MessageMedia.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
Updates = messages.sendBroadcast({contacts={InputUser}, message=string, media=InputMedia, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Updates](../types/Updates.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncrypted({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -44,3 +44,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedFile({peer=InputEncryptedChat, message=DecryptedMessage, file=InputEncryptedFile, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -43,3 +43,9 @@ Or, if you're into Lua:
messages_SentEncryptedMessage = messages.sendEncryptedService({peer=InputEncryptedChat, message=DecryptedMessage, })
```
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [messages\_SentEncryptedMessage](../types/messages_SentEncryptedMessage.md) will be returned instead.

View File

@ -54,6 +54,12 @@ You can provide bot API reply_markup objects here.
## Return value
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Updates](../types/Updates.md) will be returned instead.
## Usage of parse_mode:
Set parse_mode to html to enable HTML parsing of the message.

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ContactStatus
### Possible values (constructors):
[contactStatus](../constructors/contactStatus.md)
### Methods that return an object of this type (methods):

View File

@ -184,18 +184,6 @@ description: List of types
[Vector t](Vector t.md)<a name="Vector t"></a>
[ContactStatus](ContactStatus.md)<a name="ContactStatus"></a>
[ReceivedNotifyMessage](ReceivedNotifyMessage.md)<a name="ReceivedNotifyMessage"></a>
[User](User.md)<a name="User"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[Video](Video.md)<a name="Video"></a>
[WallPaper](WallPaper.md)<a name="WallPaper"></a>
@ -252,6 +240,10 @@ description: List of types
[help\_Support](help_Support.md)<a name="help_Support"></a>
[int](int.md)<a name="int"></a>
[long](long.md)<a name="long"></a>
[messages\_AffectedHistory](messages_AffectedHistory.md)<a name="messages_AffectedHistory"></a>
[messages\_AffectedMessages](messages_AffectedMessages.md)<a name="messages_AffectedMessages"></a>

View File

@ -9,6 +9,8 @@ description: constructors and methods of type ReceivedNotifyMessage
### Possible values (constructors):
[receivedNotifyMessage](../constructors/receivedNotifyMessage.md)
### Methods that return an object of this type (methods):

View File

@ -26,11 +26,23 @@ A [Chat](Chat.md), a [User](User.md), an [InputPeer](InputPeer.md), an [InputUse
### Possible values (constructors):
[userEmpty](../constructors/userEmpty.md)
[user](../constructors/user.md)
### Methods that return an object of this type (methods):
[$MadelineProto->account->updateProfile](../methods/account_updateProfile.md)
[$MadelineProto->users->getUsers](../methods/users_getUsers.md)
[$MadelineProto->contacts->importCard](../methods/contacts_importCard.md)
[$MadelineProto->account->updateUsername](../methods/account_updateUsername.md)
[$MadelineProto->account->changePhone](../methods/account_changePhone.md)

Some files were not shown because too many files have changed in this diff Show More