diff --git a/docs/API_docs/constructors/documentAttributeAnimated_23.md b/docs/API_docs/constructors/documentAttributeAnimated_23.md deleted file mode 100644 index ae0ca6ce..00000000 --- a/docs/API_docs/constructors/documentAttributeAnimated_23.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: documentAttributeAnimated -description: documentAttributeAnimated attributes, type and example ---- -## Constructor: documentAttributeAnimated\_23 -[Back to constructors index](index.md) - - - - - - -### Type: [DocumentAttribute](../types/DocumentAttribute.md) - - -### Example: - -``` -$documentAttributeAnimated_23 = ['_' => 'documentAttributeAnimated']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "documentAttributeAnimated"} -``` - - -Or, if you're into Lua: - - -``` -documentAttributeAnimated_23={_='documentAttributeAnimated'} - -``` - - diff --git a/docs/API_docs/constructors/documentAttributeFilename_23.md b/docs/API_docs/constructors/documentAttributeFilename_23.md deleted file mode 100644 index 77bd15cb..00000000 --- a/docs/API_docs/constructors/documentAttributeFilename_23.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: documentAttributeFilename -description: documentAttributeFilename attributes, type and example ---- -## Constructor: documentAttributeFilename\_23 -[Back to constructors index](index.md) - - - -### Attributes: - -| Name | Type | Required | -|----------|---------------|----------| -|file\_name|[string](../types/string.md) | Yes| - - - -### Type: [DocumentAttribute](../types/DocumentAttribute.md) - - -### Example: - -``` -$documentAttributeFilename_23 = ['_' => 'documentAttributeFilename', 'file_name' => 'string']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "documentAttributeFilename", "file_name": "string"} -``` - - -Or, if you're into Lua: - - -``` -documentAttributeFilename_23={_='documentAttributeFilename', file_name='string'} - -``` - - diff --git a/docs/API_docs/constructors/documentAttributeImageSize_23.md b/docs/API_docs/constructors/documentAttributeImageSize_23.md deleted file mode 100644 index 409bce5a..00000000 --- a/docs/API_docs/constructors/documentAttributeImageSize_23.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: documentAttributeImageSize -description: documentAttributeImageSize attributes, type and example ---- -## Constructor: documentAttributeImageSize\_23 -[Back to constructors index](index.md) - - - -### Attributes: - -| Name | Type | Required | -|----------|---------------|----------| -|w|[int](../types/int.md) | Yes| -|h|[int](../types/int.md) | Yes| - - - -### Type: [DocumentAttribute](../types/DocumentAttribute.md) - - -### Example: - -``` -$documentAttributeImageSize_23 = ['_' => 'documentAttributeImageSize', 'w' => int, 'h' => int]; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "documentAttributeImageSize", "w": int, "h": int} -``` - - -Or, if you're into Lua: - - -``` -documentAttributeImageSize_23={_='documentAttributeImageSize', w=int, h=int} - -``` - - diff --git a/docs/API_docs/constructors/documentAttributeVideo.md b/docs/API_docs/constructors/documentAttributeVideo.md index 38ce9302..1e515c2d 100644 --- a/docs/API_docs/constructors/documentAttributeVideo.md +++ b/docs/API_docs/constructors/documentAttributeVideo.md @@ -12,6 +12,7 @@ description: documentAttributeVideo attributes, type and example | Name | Type | Required | |----------|---------------|----------| |round\_message|[Bool](../types/Bool.md) | Optional| +|supports\_streaming|[Bool](../types/Bool.md) | Optional| |duration|[int](../types/int.md) | Yes| |w|[int](../types/int.md) | Yes| |h|[int](../types/int.md) | Yes| @@ -24,13 +25,13 @@ description: documentAttributeVideo attributes, type and example ### Example: ``` -$documentAttributeVideo = ['_' => 'documentAttributeVideo', 'round_message' => Bool, 'duration' => int, 'w' => int, 'h' => int]; +$documentAttributeVideo = ['_' => 'documentAttributeVideo', 'round_message' => Bool, 'supports_streaming' => Bool, 'duration' => int, 'w' => int, 'h' => int]; ``` [PWRTelegram](https://pwrtelegram.xyz) json-encoded version: ``` -{"_": "documentAttributeVideo", "round_message": Bool, "duration": int, "w": int, "h": int} +{"_": "documentAttributeVideo", "round_message": Bool, "supports_streaming": Bool, "duration": int, "w": int, "h": int} ``` @@ -38,7 +39,7 @@ Or, if you're into Lua: ``` -documentAttributeVideo={_='documentAttributeVideo', round_message=Bool, duration=int, w=int, h=int} +documentAttributeVideo={_='documentAttributeVideo', round_message=Bool, supports_streaming=Bool, duration=int, w=int, h=int} ``` diff --git a/docs/API_docs/constructors/documentAttributeVideo_66.md b/docs/API_docs/constructors/documentAttributeVideo_66.md deleted file mode 100644 index 9afee0be..00000000 --- a/docs/API_docs/constructors/documentAttributeVideo_66.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: documentAttributeVideo -description: documentAttributeVideo attributes, type and example ---- -## Constructor: documentAttributeVideo\_66 -[Back to constructors index](index.md) - - - -### Attributes: - -| 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| - - - -### Type: [DocumentAttribute](../types/DocumentAttribute.md) - - -### Example: - -``` -$documentAttributeVideo_66 = ['_' => 'documentAttributeVideo', 'round_message' => Bool, 'duration' => int, 'w' => int, 'h' => int]; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "documentAttributeVideo", "round_message": Bool, "duration": int, "w": int, "h": int} -``` - - -Or, if you're into Lua: - - -``` -documentAttributeVideo_66={_='documentAttributeVideo', round_message=Bool, duration=int, w=int, h=int} - -``` - - diff --git a/docs/API_docs/constructors/fileLocationUnavailable_23.md b/docs/API_docs/constructors/fileLocationUnavailable_23.md deleted file mode 100644 index 9eea7860..00000000 --- a/docs/API_docs/constructors/fileLocationUnavailable_23.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: fileLocationUnavailable -description: fileLocationUnavailable attributes, type and example ---- -## Constructor: fileLocationUnavailable\_23 -[Back to constructors index](index.md) - - - -### Attributes: - -| Name | Type | Required | -|----------|---------------|----------| -|volume\_id|[long](../types/long.md) | Yes| -|local\_id|[int](../types/int.md) | Yes| -|secret|[long](../types/long.md) | Yes| - - - -### Type: [FileLocation](../types/FileLocation.md) - - -### Example: - -``` -$fileLocationUnavailable_23 = ['_' => 'fileLocationUnavailable', 'volume_id' => long, 'local_id' => int, 'secret' => long]; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "fileLocationUnavailable", "volume_id": long, "local_id": int, "secret": long} -``` - - -Or, if you're into Lua: - - -``` -fileLocationUnavailable_23={_='fileLocationUnavailable', volume_id=long, local_id=int, secret=long} - -``` - - diff --git a/docs/API_docs/constructors/fileLocation_23.md b/docs/API_docs/constructors/fileLocation_23.md deleted file mode 100644 index dfd3905b..00000000 --- a/docs/API_docs/constructors/fileLocation_23.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: fileLocation -description: fileLocation attributes, type and example ---- -## Constructor: fileLocation\_23 -[Back to constructors index](index.md) - - - -### Attributes: - -| Name | Type | Required | -|----------|---------------|----------| -|dc\_id|[int](../types/int.md) | Yes| -|volume\_id|[long](../types/long.md) | Yes| -|local\_id|[int](../types/int.md) | Yes| -|secret|[long](../types/long.md) | Yes| - - - -### Type: [FileLocation](../types/FileLocation.md) - - -### Example: - -``` -$fileLocation_23 = ['_' => 'fileLocation', 'dc_id' => int, 'volume_id' => long, 'local_id' => int, 'secret' => long]; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "fileLocation", "dc_id": int, "volume_id": long, "local_id": int, "secret": long} -``` - - -Or, if you're into Lua: - - -``` -fileLocation_23={_='fileLocation', dc_id=int, volume_id=long, local_id=int, secret=long} - -``` - - diff --git a/docs/API_docs/constructors/index.md b/docs/API_docs/constructors/index.md index 19f228b0..4e343743 100644 --- a/docs/API_docs/constructors/index.md +++ b/docs/API_docs/constructors/index.md @@ -417,7 +417,7 @@ description: List of constructors

[$documentAttributeSticker\_55](../constructors/documentAttributeSticker_55.md) = \['alt' => [string](../types/string.md), 'stickerset' => [InputStickerSet](../types/InputStickerSet.md), \]; *** -

[$documentAttributeVideo](../constructors/documentAttributeVideo.md) = \['round_message' => [Bool](../types/Bool.md), 'duration' => [int](../types/int.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), \]; +

[$documentAttributeVideo\_23](../constructors/documentAttributeVideo_23.md) = \['duration' => [int](../types/int.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), \]; ***

[$documentEmpty](../constructors/documentEmpty.md) = \['id' => [long](../types/long.md), \]; diff --git a/docs/API_docs/constructors/photoCachedSize_23.md b/docs/API_docs/constructors/photoCachedSize_23.md deleted file mode 100644 index dc466b30..00000000 --- a/docs/API_docs/constructors/photoCachedSize_23.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: photoCachedSize -description: photoCachedSize attributes, type and example ---- -## Constructor: photoCachedSize\_23 -[Back to constructors index](index.md) - - - -### Attributes: - -| Name | Type | Required | -|----------|---------------|----------| -|type|[string](../types/string.md) | Yes| -|location|[FileLocation](../types/FileLocation.md) | Yes| -|w|[int](../types/int.md) | Yes| -|h|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - - -### Type: [PhotoSize](../types/PhotoSize.md) - - -### Example: - -``` -$photoCachedSize_23 = ['_' => 'photoCachedSize', 'type' => 'string', 'location' => FileLocation, 'w' => int, 'h' => int, 'bytes' => 'bytes']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "photoCachedSize", "type": "string", "location": FileLocation, "w": int, "h": int, "bytes": "bytes"} -``` - - -Or, if you're into Lua: - - -``` -photoCachedSize_23={_='photoCachedSize', type='string', location=FileLocation, w=int, h=int, bytes='bytes'} - -``` - - diff --git a/docs/API_docs/constructors/photoSizeEmpty_23.md b/docs/API_docs/constructors/photoSizeEmpty_23.md deleted file mode 100644 index 7a8bb301..00000000 --- a/docs/API_docs/constructors/photoSizeEmpty_23.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: photoSizeEmpty -description: photoSizeEmpty attributes, type and example ---- -## Constructor: photoSizeEmpty\_23 -[Back to constructors index](index.md) - - - -### Attributes: - -| Name | Type | Required | -|----------|---------------|----------| -|type|[string](../types/string.md) | Yes| - - - -### Type: [PhotoSize](../types/PhotoSize.md) - - -### Example: - -``` -$photoSizeEmpty_23 = ['_' => 'photoSizeEmpty', 'type' => 'string']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "photoSizeEmpty", "type": "string"} -``` - - -Or, if you're into Lua: - - -``` -photoSizeEmpty_23={_='photoSizeEmpty', type='string'} - -``` - - diff --git a/docs/API_docs/constructors/photoSize_23.md b/docs/API_docs/constructors/photoSize_23.md deleted file mode 100644 index 11e181fd..00000000 --- a/docs/API_docs/constructors/photoSize_23.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: photoSize -description: photoSize attributes, type and example ---- -## Constructor: photoSize\_23 -[Back to constructors index](index.md) - - - -### Attributes: - -| Name | Type | Required | -|----------|---------------|----------| -|type|[string](../types/string.md) | Yes| -|location|[FileLocation](../types/FileLocation.md) | Yes| -|w|[int](../types/int.md) | Yes| -|h|[int](../types/int.md) | Yes| -|size|[int](../types/int.md) | Yes| - - - -### Type: [PhotoSize](../types/PhotoSize.md) - - -### Example: - -``` -$photoSize_23 = ['_' => 'photoSize', 'type' => 'string', 'location' => FileLocation, 'w' => int, 'h' => int, 'size' => int]; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "photoSize", "type": "string", "location": FileLocation, "w": int, "h": int, "size": int} -``` - - -Or, if you're into Lua: - - -``` -photoSize_23={_='photoSize', type='string', location=FileLocation, w=int, h=int, size=int} - -``` - - diff --git a/docs/API_docs/constructors/sendMessageCancelAction_17.md b/docs/API_docs/constructors/sendMessageCancelAction_17.md deleted file mode 100644 index c5333102..00000000 --- a/docs/API_docs/constructors/sendMessageCancelAction_17.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: sendMessageCancelAction -description: sendMessageCancelAction attributes, type and example ---- -## Constructor: sendMessageCancelAction\_17 -[Back to constructors index](index.md) - - - - - - -### Type: [SendMessageAction](../types/SendMessageAction.md) - - -### Example: - -``` -$sendMessageCancelAction_17 = ['_' => 'sendMessageCancelAction']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "sendMessageCancelAction"} -``` - - -Or, if you're into Lua: - - -``` -sendMessageCancelAction_17={_='sendMessageCancelAction'} - -``` - - diff --git a/docs/API_docs/constructors/sendMessageChooseContactAction_17.md b/docs/API_docs/constructors/sendMessageChooseContactAction_17.md deleted file mode 100644 index 61efb32f..00000000 --- a/docs/API_docs/constructors/sendMessageChooseContactAction_17.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: sendMessageChooseContactAction -description: sendMessageChooseContactAction attributes, type and example ---- -## Constructor: sendMessageChooseContactAction\_17 -[Back to constructors index](index.md) - - - - - - -### Type: [SendMessageAction](../types/SendMessageAction.md) - - -### Example: - -``` -$sendMessageChooseContactAction_17 = ['_' => 'sendMessageChooseContactAction']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "sendMessageChooseContactAction"} -``` - - -Or, if you're into Lua: - - -``` -sendMessageChooseContactAction_17={_='sendMessageChooseContactAction'} - -``` - - diff --git a/docs/API_docs/constructors/sendMessageGeoLocationAction_17.md b/docs/API_docs/constructors/sendMessageGeoLocationAction_17.md deleted file mode 100644 index a0791b5a..00000000 --- a/docs/API_docs/constructors/sendMessageGeoLocationAction_17.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: sendMessageGeoLocationAction -description: sendMessageGeoLocationAction attributes, type and example ---- -## Constructor: sendMessageGeoLocationAction\_17 -[Back to constructors index](index.md) - - - - - - -### Type: [SendMessageAction](../types/SendMessageAction.md) - - -### Example: - -``` -$sendMessageGeoLocationAction_17 = ['_' => 'sendMessageGeoLocationAction']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "sendMessageGeoLocationAction"} -``` - - -Or, if you're into Lua: - - -``` -sendMessageGeoLocationAction_17={_='sendMessageGeoLocationAction'} - -``` - - diff --git a/docs/API_docs/constructors/sendMessageRecordAudioAction_17.md b/docs/API_docs/constructors/sendMessageRecordAudioAction_17.md deleted file mode 100644 index d5d1c334..00000000 --- a/docs/API_docs/constructors/sendMessageRecordAudioAction_17.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: sendMessageRecordAudioAction -description: sendMessageRecordAudioAction attributes, type and example ---- -## Constructor: sendMessageRecordAudioAction\_17 -[Back to constructors index](index.md) - - - - - - -### Type: [SendMessageAction](../types/SendMessageAction.md) - - -### Example: - -``` -$sendMessageRecordAudioAction_17 = ['_' => 'sendMessageRecordAudioAction']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "sendMessageRecordAudioAction"} -``` - - -Or, if you're into Lua: - - -``` -sendMessageRecordAudioAction_17={_='sendMessageRecordAudioAction'} - -``` - - diff --git a/docs/API_docs/constructors/sendMessageRecordVideoAction_17.md b/docs/API_docs/constructors/sendMessageRecordVideoAction_17.md deleted file mode 100644 index 2879a155..00000000 --- a/docs/API_docs/constructors/sendMessageRecordVideoAction_17.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: sendMessageRecordVideoAction -description: sendMessageRecordVideoAction attributes, type and example ---- -## Constructor: sendMessageRecordVideoAction\_17 -[Back to constructors index](index.md) - - - - - - -### Type: [SendMessageAction](../types/SendMessageAction.md) - - -### Example: - -``` -$sendMessageRecordVideoAction_17 = ['_' => 'sendMessageRecordVideoAction']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "sendMessageRecordVideoAction"} -``` - - -Or, if you're into Lua: - - -``` -sendMessageRecordVideoAction_17={_='sendMessageRecordVideoAction'} - -``` - - diff --git a/docs/API_docs/constructors/sendMessageTypingAction_17.md b/docs/API_docs/constructors/sendMessageTypingAction_17.md deleted file mode 100644 index 27e40334..00000000 --- a/docs/API_docs/constructors/sendMessageTypingAction_17.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: sendMessageTypingAction -description: sendMessageTypingAction attributes, type and example ---- -## Constructor: sendMessageTypingAction\_17 -[Back to constructors index](index.md) - - - - - - -### Type: [SendMessageAction](../types/SendMessageAction.md) - - -### Example: - -``` -$sendMessageTypingAction_17 = ['_' => 'sendMessageTypingAction']; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -{"_": "sendMessageTypingAction"} -``` - - -Or, if you're into Lua: - - -``` -sendMessageTypingAction_17={_='sendMessageTypingAction'} - -``` - - diff --git a/docs/API_docs/types/DocumentAttribute.md b/docs/API_docs/types/DocumentAttribute.md index 57778cc6..a8614ed7 100644 --- a/docs/API_docs/types/DocumentAttribute.md +++ b/docs/API_docs/types/DocumentAttribute.md @@ -9,38 +9,30 @@ description: constructors and methods of type DocumentAttribute ### Possible values (constructors): -[documentAttributeImageSize\_23](../constructors/documentAttributeImageSize_23.md) - -[documentAttributeAnimated\_23](../constructors/documentAttributeAnimated_23.md) - -[documentAttributeSticker](../constructors/documentAttributeSticker.md) - -[documentAttributeVideo\_66](../constructors/documentAttributeVideo_66.md) - -[documentAttributeAudio](../constructors/documentAttributeAudio.md) - -[documentAttributeFilename\_23](../constructors/documentAttributeFilename_23.md) - -[documentAttributeHasStickers](../constructors/documentAttributeHasStickers.md) - [documentAttributeImageSize](../constructors/documentAttributeImageSize.md) [documentAttributeAnimated](../constructors/documentAttributeAnimated.md) +[documentAttributeSticker](../constructors/documentAttributeSticker.md) + +[documentAttributeVideo](../constructors/documentAttributeVideo.md) + +[documentAttributeAudio](../constructors/documentAttributeAudio.md) + +[documentAttributeFilename](../constructors/documentAttributeFilename.md) + +[documentAttributeHasStickers](../constructors/documentAttributeHasStickers.md) + [documentAttributeSticker\_23](../constructors/documentAttributeSticker_23.md) [documentAttributeVideo\_23](../constructors/documentAttributeVideo_23.md) [documentAttributeAudio\_23](../constructors/documentAttributeAudio_23.md) -[documentAttributeFilename](../constructors/documentAttributeFilename.md) - [documentAttributeAudio\_46](../constructors/documentAttributeAudio_46.md) [documentAttributeSticker\_55](../constructors/documentAttributeSticker_55.md) -[documentAttributeVideo](../constructors/documentAttributeVideo.md) - ### Methods that return an object of this type (methods): diff --git a/docs/API_docs/types/FileLocation.md b/docs/API_docs/types/FileLocation.md index 61500d17..09ad6ded 100644 --- a/docs/API_docs/types/FileLocation.md +++ b/docs/API_docs/types/FileLocation.md @@ -9,10 +9,6 @@ description: constructors and methods of type FileLocation ### Possible values (constructors): -[fileLocationUnavailable\_23](../constructors/fileLocationUnavailable_23.md) - -[fileLocation\_23](../constructors/fileLocation_23.md) - [fileLocationUnavailable](../constructors/fileLocationUnavailable.md) [fileLocation](../constructors/fileLocation.md) diff --git a/docs/API_docs/types/PhotoSize.md b/docs/API_docs/types/PhotoSize.md index 47e53d88..c62ec0ae 100644 --- a/docs/API_docs/types/PhotoSize.md +++ b/docs/API_docs/types/PhotoSize.md @@ -9,12 +9,6 @@ description: constructors and methods of type PhotoSize ### Possible values (constructors): -[photoSizeEmpty\_23](../constructors/photoSizeEmpty_23.md) - -[photoSize\_23](../constructors/photoSize_23.md) - -[photoCachedSize\_23](../constructors/photoCachedSize_23.md) - [photoSizeEmpty](../constructors/photoSizeEmpty.md) [photoSize](../constructors/photoSize.md) diff --git a/docs/API_docs/types/SendMessageAction.md b/docs/API_docs/types/SendMessageAction.md index a8a75cd1..1fe1dd54 100644 --- a/docs/API_docs/types/SendMessageAction.md +++ b/docs/API_docs/types/SendMessageAction.md @@ -9,15 +9,15 @@ description: constructors and methods of type SendMessageAction ### Possible values (constructors): -[sendMessageTypingAction\_17](../constructors/sendMessageTypingAction_17.md) +[sendMessageTypingAction](../constructors/sendMessageTypingAction.md) -[sendMessageCancelAction\_17](../constructors/sendMessageCancelAction_17.md) +[sendMessageCancelAction](../constructors/sendMessageCancelAction.md) -[sendMessageRecordVideoAction\_17](../constructors/sendMessageRecordVideoAction_17.md) +[sendMessageRecordVideoAction](../constructors/sendMessageRecordVideoAction.md) [sendMessageUploadVideoAction](../constructors/sendMessageUploadVideoAction.md) -[sendMessageRecordAudioAction\_17](../constructors/sendMessageRecordAudioAction_17.md) +[sendMessageRecordAudioAction](../constructors/sendMessageRecordAudioAction.md) [sendMessageUploadAudioAction](../constructors/sendMessageUploadAudioAction.md) @@ -25,9 +25,9 @@ description: constructors and methods of type SendMessageAction [sendMessageUploadDocumentAction](../constructors/sendMessageUploadDocumentAction.md) -[sendMessageGeoLocationAction\_17](../constructors/sendMessageGeoLocationAction_17.md) +[sendMessageGeoLocationAction](../constructors/sendMessageGeoLocationAction.md) -[sendMessageChooseContactAction\_17](../constructors/sendMessageChooseContactAction_17.md) +[sendMessageChooseContactAction](../constructors/sendMessageChooseContactAction.md) [sendMessageGamePlayAction](../constructors/sendMessageGamePlayAction.md) @@ -35,26 +35,14 @@ description: constructors and methods of type SendMessageAction [sendMessageUploadRoundAction](../constructors/sendMessageUploadRoundAction.md) -[sendMessageTypingAction](../constructors/sendMessageTypingAction.md) - -[sendMessageCancelAction](../constructors/sendMessageCancelAction.md) - -[sendMessageRecordVideoAction](../constructors/sendMessageRecordVideoAction.md) - [sendMessageUploadVideoAction\_17](../constructors/sendMessageUploadVideoAction_17.md) -[sendMessageRecordAudioAction](../constructors/sendMessageRecordAudioAction.md) - [sendMessageUploadAudioAction\_17](../constructors/sendMessageUploadAudioAction_17.md) [sendMessageUploadPhotoAction\_17](../constructors/sendMessageUploadPhotoAction_17.md) [sendMessageUploadDocumentAction\_17](../constructors/sendMessageUploadDocumentAction_17.md) -[sendMessageGeoLocationAction](../constructors/sendMessageGeoLocationAction.md) - -[sendMessageChooseContactAction](../constructors/sendMessageChooseContactAction.md) - ### Methods that return an object of this type (methods): diff --git a/old_docs/README.md b/old_docs/README.md index 948bbc11..f139d7bb 100644 --- a/old_docs/README.md +++ b/old_docs/README.md @@ -4,4 +4,3 @@ description: Documentation of old mtproto layers --- # Documentation of old mtproto layers -[Layer v73](API_docs_v73/) diff --git a/phar.php b/phar.php new file mode 100644 index 00000000..82c696f8 --- /dev/null +++ b/phar.php @@ -0,0 +1,10 @@ +handle_messages($aargs['datacenter']); // This method receives data from the socket, and parses stuff } catch (\danog\MadelineProto\Exception $e) { - if ($e->getMessage() === 'I had to recreate the temporary authorization key' || $e->getCode() === 404) { + if (in_array($e->getMessage(), ['I had to recreate the temporary authorization key', 'Got bad message notification']) || $e->getCode() === 404) { continue 2; } \danog\MadelineProto\Logger::log(['An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...'], \danog\MadelineProto\Logger::WARNING); @@ -191,23 +191,7 @@ trait CallHandler break; case 'bad_server_salt': case 'bad_msg_notification': - switch ($server_answer['error_code']) { - case 48: - $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key['server_salt'] = $server_answer['new_server_salt']; - continue 3; - case 16: - case 17: - \danog\MadelineProto\Logger::log(['Received bad_msg_notification: '.self::BAD_MSG_ERROR_CODES[$server_answer['error_code']]], \danog\MadelineProto\Logger::WARNING); - $this->datacenter->sockets[$aargs['datacenter']]->time_delta = (int) (new \phpseclib\Math\BigInteger(strrev($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]['response']), 256))->bitwise_rightShift(32)->subtract(new \phpseclib\Math\BigInteger(time()))->toString(); - \danog\MadelineProto\Logger::log(['Set time delta to '.$this->datacenter->sockets[$aargs['datacenter']]->time_delta], \danog\MadelineProto\Logger::WARNING); - $this->reset_session(); - $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key = null; - $this->init_authorization(); - continue 3; - } - throw new \danog\MadelineProto\RPCErrorException('Received bad_msg_notification: '.self::BAD_MSG_ERROR_CODES[$server_answer['error_code']], $server_answer['error_code']); - break; case 'boolTrue': case 'boolFalse': $server_answer = $server_answer['_'] === 'boolTrue'; diff --git a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php index 97f0b2c4..dd161fa5 100644 --- a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php @@ -101,12 +101,14 @@ trait ResponseHandler $only_updates = false; $this->ack_outgoing_message_id($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id'], $datacenter); // Acknowledge that the server received my request - $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id']]['response'] = $current_msg_id; + + unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); + unset($this->datacenter->sockets[$datacenter]->new_outgoing[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id']]); switch ($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['error_code']) { case 48: $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'] = $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['new_server_salt']; - break; + throw new \danog\MadelineProto\Exception('Got bad message notification'); case 16: case 17: \danog\MadelineProto\Logger::log(['Received bad_msg_notification: '.self::BAD_MSG_ERROR_CODES[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['error_code']]], \danog\MadelineProto\Logger::WARNING); @@ -115,10 +117,9 @@ trait ResponseHandler $this->reset_session(); $this->datacenter->sockets[$datacenter]->temp_auth_key = null; $this->init_authorization(); - break; + throw new \danog\MadelineProto\Exception('Got bad message notification'); } - unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - unset($this->datacenter->sockets[$datacenter]->new_outgoing[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id']]); + $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id']]['response'] = $current_msg_id; break; case 'pong': $this->check_in_seq_no($datacenter, $current_msg_id); diff --git a/src/danog/MadelineProto/TL/TLConstructor.php b/src/danog/MadelineProto/TL/TLConstructor.php index 5ab20083..bde9cb3f 100644 --- a/src/danog/MadelineProto/TL/TLConstructor.php +++ b/src/danog/MadelineProto/TL/TLConstructor.php @@ -33,7 +33,11 @@ class TLConstructor public function add($json_dict, $scheme_type) { + if (isset($this->by_id[$json_dict['id']]) && (!isset($this->by_id[$json_dict['id']]['layer']) || $this->by_id[$json_dict['id']]['layer'] > $json_dict['layer'])) return false; + $predicate = (string) (($scheme_type === 'mtproto' && $json_dict['predicate'] === 'message' ? 'MT' : '').$json_dict['predicate']); + + $this->by_id[$json_dict['id']] = ['predicate' => $predicate, 'params' => $json_dict['params'], 'type' => ($scheme_type === 'mtproto' && $json_dict['type'] === 'Message' ? 'MT' : '').$json_dict['type']]; if ($scheme_type === 'secret') { $this->by_id[$json_dict['id']]['layer'] = $json_dict['layer']; @@ -51,7 +55,6 @@ class TLConstructor foreach ($this->by_id as $id => $constructor) { if ($constructor['type'] === $type) { $constructor['id'] = $id; - $constructor['params'] = $constructor['params']; return $constructor; } @@ -77,14 +80,12 @@ class TLConstructor } $constructor = $this->by_id[$chosenid]; $constructor['id'] = $chosenid; - $constructor['params'] = $constructor['params']; return $constructor; } if (isset($this->by_predicate_and_layer[$predicate])) { $constructor = $this->by_id[$this->by_predicate_and_layer[$predicate]]; $constructor['id'] = $this->by_predicate_and_layer[$predicate]; - $constructor['params'] = $constructor['params']; return $constructor; } @@ -97,7 +98,6 @@ class TLConstructor if (isset($this->by_id[$id])) { $constructor = $this->by_id[$id]; $constructor['id'] = $id; - $constructor['params'] = $constructor['params']; return $constructor; }