This commit is contained in:
Daniil Gentili 2024-09-24 18:02:34 +02:00
parent fde9838eb2
commit 1f9cb68731
13 changed files with 48 additions and 12 deletions

View File

@ -23,6 +23,7 @@ Defines a video
|h|[int](/API_docs/types/int.html) | Optional|Video height|
|preload\_prefix\_size|[int](/API_docs/types/int.html) | Optional|Number of bytes to preload when preloading videos (particularly [video stories](https://core.telegram.org/api/stories)).|
|video\_start\_ts|[double](/API_docs/types/double.html) | Optional|
|video\_codec|[string](/API_docs/types/string.html) | Optional|
@ -32,5 +33,5 @@ Defines a video
### Example:
```
$documentAttributeVideo = ['_' => 'documentAttributeVideo', 'round_message' => Bool, 'supports_streaming' => Bool, 'nosound' => Bool, 'duration' => double, 'w' => int, 'h' => int, 'preload_prefix_size' => int, 'video_start_ts' => double];
$documentAttributeVideo = ['_' => 'documentAttributeVideo', 'round_message' => Bool, 'supports_streaming' => Bool, 'nosound' => Bool, 'duration' => double, 'w' => int, 'h' => int, 'preload_prefix_size' => int, 'video_start_ts' => double, 'video_codec' => 'string'];
```

View File

@ -1873,6 +1873,9 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
***
<br><br>[$keyboardButtonCallback](/API_docs/constructors/keyboardButtonCallback.html) = \['requires_password' => [Bool](/API_docs/types/Bool.html), 'text' => [string](/API_docs/types/string.html), 'data' => [bytes](/API_docs/types/bytes.html), \];<a name="keyboardButtonCallback"></a>
***
<br><br>[$keyboardButtonCopy](/API_docs/constructors/keyboardButtonCopy.html) = \['text' => [string](/API_docs/types/string.html), 'copy_text' => [string](/API_docs/types/string.html), \];<a name="keyboardButtonCopy"></a>
***
<br><br>[$keyboardButtonGame](/API_docs/constructors/keyboardButtonGame.html) = \['text' => [string](/API_docs/types/string.html), \];<a name="keyboardButtonGame"></a>
@ -2171,7 +2174,7 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
<br><br>[$messageMediaDice](/API_docs/constructors/messageMediaDice.html) = \['value' => [int](/API_docs/types/int.html), 'emoticon' => [string](/API_docs/types/string.html), \];<a name="messageMediaDice"></a>
***
<br><br>[$messageMediaDocument](/API_docs/constructors/messageMediaDocument.html) = \['nopremium' => [Bool](/API_docs/types/Bool.html), 'spoiler' => [Bool](/API_docs/types/Bool.html), 'video' => [Bool](/API_docs/types/Bool.html), 'round' => [Bool](/API_docs/types/Bool.html), 'voice' => [Bool](/API_docs/types/Bool.html), 'document' => [Document](/API_docs/types/Document.html), 'alt_document' => [Document](/API_docs/types/Document.html), 'ttl_seconds' => [int](/API_docs/types/int.html), \];<a name="messageMediaDocument"></a>
<br><br>[$messageMediaDocument](/API_docs/constructors/messageMediaDocument.html) = \['nopremium' => [Bool](/API_docs/types/Bool.html), 'spoiler' => [Bool](/API_docs/types/Bool.html), 'video' => [Bool](/API_docs/types/Bool.html), 'round' => [Bool](/API_docs/types/Bool.html), 'voice' => [Bool](/API_docs/types/Bool.html), 'document' => [Document](/API_docs/types/Document.html), 'alt_documents' => \[[Document](/API_docs/types/Document.html)\], 'ttl_seconds' => [int](/API_docs/types/int.html), \];<a name="messageMediaDocument"></a>
***
<br><br>[$messageMediaEmpty](/API_docs/constructors/messageMediaEmpty.html) = \[\];<a name="messageMediaEmpty"></a>

View File

@ -0,0 +1,28 @@
---
title: "keyboardButtonCopy"
description: "keyboardButtonCopy attributes, type and example"
nav_exclude: true
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: keyboardButtonCopy
[Back to constructors index](/API_docs/constructors/index.html)
### Attributes:
| Name | Type | Required |
|----------|---------------|----------|
|text|[string](/API_docs/types/string.html) | Yes|
|copy\_text|[string](/API_docs/types/string.html) | Yes|
### Type: [KeyboardButton](/API_docs/types/KeyboardButton.html)
### Example:
```
$keyboardButtonCopy = ['_' => 'keyboardButtonCopy', 'text' => 'string', 'copy_text' => 'string'];
```

View File

@ -21,7 +21,7 @@ Document (video, audio, voice, sticker, any media type except photo)
|round|[Bool](/API_docs/types/Bool.html) | Optional|Whether this is a round video.|
|voice|[Bool](/API_docs/types/Bool.html) | Optional|Whether this is a voice message.|
|document|[Document](/API_docs/types/Document.html) | Optional|Attached document|
|alt\_document|[Document](/API_docs/types/Document.html) | Optional|Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than `document`.|
|alt\_documents|Array of [Document](/API_docs/types/Document.html) | Optional|
|ttl\_seconds|[int](/API_docs/types/int.html) | Optional|Time to live of self-destructing document|
@ -32,5 +32,5 @@ Document (video, audio, voice, sticker, any media type except photo)
### Example:
```
$messageMediaDocument = ['_' => 'messageMediaDocument', 'nopremium' => Bool, 'spoiler' => Bool, 'video' => Bool, 'round' => Bool, 'voice' => Bool, 'document' => Document, 'alt_document' => Document, 'ttl_seconds' => int];
$messageMediaDocument = ['_' => 'messageMediaDocument', 'nopremium' => Bool, 'spoiler' => Bool, 'video' => Bool, 'round' => Bool, 'voice' => Bool, 'document' => Document, 'alt_documents' => [Document, Document], 'ttl_seconds' => int];
```

View File

@ -1,6 +1,6 @@
---
title: "Telegram RPC API"
description: "MadelineProto API documentation (layer 187)"
description: "MadelineProto API documentation (layer 188)"
has_children: true
has_toc: false
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

View File

@ -673,7 +673,7 @@ $MadelineProto->[channels->checkUsername](/API_docs/methods/channels.checkUserna
***
<br><br>
$MadelineProto->[channels->clickSponsoredMessage](/API_docs/methods/channels.clickSponsoredMessage.html)(\[channel: $[InputChannel](/API_docs/types/InputChannel.html), \]) === [$Bool](/API_docs/types/Bool.html)<a name="channels.clickSponsoredMessage"></a>
$MadelineProto->[channels->clickSponsoredMessage](/API_docs/methods/channels.clickSponsoredMessage.html)(\[media: $[Bool](/API_docs/types/Bool.html), fullscreen: $[Bool](/API_docs/types/Bool.html), channel: $[InputChannel](/API_docs/types/InputChannel.html), \]) === [$Bool](/API_docs/types/Bool.html)<a name="channels.clickSponsoredMessage"></a>
***
<br><br>

View File

@ -21,6 +21,8 @@ Informs the server that the user has either:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|media|[Bool](/API_docs/types/Bool.html) | | Optional|
|fullscreen|[Bool](/API_docs/types/Bool.html) | | Optional|
|channel|[Username, chat ID, Update, Message or InputChannel](/API_docs/types/InputChannel.html) | Channel where the sponsored message was posted | Optional|
@ -41,6 +43,6 @@ include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Bool = $MadelineProto->channels->clickSponsoredMessage(channel: $InputChannel, );
$Bool = $MadelineProto->channels->clickSponsoredMessage(media: $Bool, fullscreen: $Bool, channel: $InputChannel, );
```

View File

@ -66,6 +66,8 @@ You can also access the properties of the constructor as a normal array, for exa
[inputKeyboardButtonRequestPeer](/API_docs/constructors/inputKeyboardButtonRequestPeer.html)
[keyboardButtonCopy](/API_docs/constructors/keyboardButtonCopy.html)
### Methods that return an object of this type (methods):

View File

@ -24,7 +24,7 @@ Poll
* `$closePeriod`: `?int` Amount of time in seconds the poll will be active after creation, 5-600
* `$closeDate`: `?int` Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future
* `$recentVoters`: `list<int>` IDs of the last users that recently voted in the poll
* `$totalVoters`: `int` Total number of people that voted in the poll
* `$totalVoters`: `?int` Total number of people that voted in the poll
## Method list:
* [`fromRawPoll(array $rawPoll): \danog\MadelineProto\EventHandler\AbstractPoll`](#fromRawPoll)

View File

@ -24,7 +24,7 @@ Represents a poll with multiple options can be chosen as answer
* `$closePeriod`: `?int` Amount of time in seconds the poll will be active after creation, 5-600
* `$closeDate`: `?int` Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future
* `$recentVoters`: `list<int>` IDs of the last users that recently voted in the poll
* `$totalVoters`: `int` Total number of people that voted in the poll
* `$totalVoters`: `?int` Total number of people that voted in the poll
## Method list:
* [`fromRawPoll(array $rawPoll): \danog\MadelineProto\EventHandler\AbstractPoll`](#fromRawPoll)

View File

@ -26,7 +26,7 @@ Represents a quiz (with wrong and correct answers, results shown in the return t
* `$closePeriod`: `?int` Amount of time in seconds the poll will be active after creation, 5-600
* `$closeDate`: `?int` Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future
* `$recentVoters`: `list<int>` IDs of the last users that recently voted in the poll
* `$totalVoters`: `int` Total number of people that voted in the poll
* `$totalVoters`: `?int` Total number of people that voted in the poll
## Method list:
* [`getSolutionHTML(bool $allowTelegramTags = false): ?string`](#getSolutionHTML)

View File

@ -24,7 +24,7 @@ Represents a poll with a option can be chosen as answer
* `$closePeriod`: `?int` Amount of time in seconds the poll will be active after creation, 5-600
* `$closeDate`: `?int` Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future
* `$recentVoters`: `list<int>` IDs of the last users that recently voted in the poll
* `$totalVoters`: `int` Total number of people that voted in the poll
* `$totalVoters`: `?int` Total number of people that voted in the poll
## Method list:
* [`fromRawPoll(array $rawPoll): \danog\MadelineProto\EventHandler\AbstractPoll`](#fromRawPoll)

View File

@ -8,7 +8,7 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
There are simplifications for many, if not all of, these methods.
A list of all of the methods that can be called with MadelineProto can be found here: [here (layer 187)](https://docs.madelineproto.xyz/API_docs/).
A list of all of the methods that can be called with MadelineProto can be found here: [here (layer 188)](https://docs.madelineproto.xyz/API_docs/).
[Now fully async!](https://docs.madelineproto.xyz/docs/ASYNC.html)