1st of April
This commit is contained in:
parent
b0652e74f6
commit
7044b4ca27
@ -60,9 +60,9 @@ foreach ($orderedfiles as $key => $filename) {
|
|||||||
if (isset($orderedfiles[$key + 1])) {
|
if (isset($orderedfiles[$key + 1])) {
|
||||||
$nextfile = 'https://docs.madelineproto.xyz/docs/'.basename($orderedfiles[$key + 1], '.md').'.html';
|
$nextfile = 'https://docs.madelineproto.xyz/docs/'.basename($orderedfiles[$key + 1], '.md').'.html';
|
||||||
$prevfile = $key === 0 ? 'https://docs.madelineproto.xyz' : 'https://docs.madelineproto.xyz/docs/'.basename($orderedfiles[$key - 1], '.md').'.html';
|
$prevfile = $key === 0 ? 'https://docs.madelineproto.xyz' : 'https://docs.madelineproto.xyz/docs/'.basename($orderedfiles[$key - 1], '.md').'.html';
|
||||||
$lines[count($lines)] = "\n<amp-form method=\"GET\" target=\"_top\" action=\"$prevfile\"><input type=\"submit\" value=\"Previous section\" /></form><amp-form action=\"$nextfile\" method=\"GET\" target=\"_top\"><input type=\"submit\" value=\"Next section\" /></form>";
|
$lines[count($lines)] = "\n<amp-form method=\"GET\" target=\"_top\" action=\"$prevfile\"><input type=\"submit\" value=\"Previous section\" /></amp-form><amp-form action=\"$nextfile\" method=\"GET\" target=\"_top\"><input type=\"submit\" value=\"Next section\" /></amp-form>";
|
||||||
} else {
|
} else {
|
||||||
$lines[count($lines)] = "\n<amp-form method=\"GET\" target=\"_top\" action=\"https://docs.madelineproto.xyz/#very-complex-and-complete-examples\"><input type=\"submit\" value=\"Next section\" /></form>";
|
$lines[count($lines)] = "\n<amp-form method=\"GET\" target=\"_top\" action=\"https://docs.madelineproto.xyz/#very-complex-and-complete-examples\"><input type=\"submit\" value=\"Next section\" /></amp-form>";
|
||||||
}
|
}
|
||||||
file_put_contents($filename, implode("\n", $lines));
|
file_put_contents($filename, implode("\n", $lines));
|
||||||
|
|
||||||
|
@ -111,4 +111,4 @@ foreach ($updates as $update) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/INLINE_BUTTONS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/SECRET_CHATS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/INLINE_BUTTONS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/SECRET_CHATS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -42,4 +42,4 @@ You can also use `get_info` to get chat info, see [here for the parameters and t
|
|||||||
* Speed: very fast
|
* Speed: very fast
|
||||||
* Caching: full
|
* Caching: full
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/FILES.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/DIALOGS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/FILES.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/DIALOGS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -88,4 +88,4 @@ While writing this client, I looked at many projects for inspiration and help. H
|
|||||||
|
|
||||||
Thanks to the devs that contributed to these projects, MadelineProto is now an easy, well-written and complete MTProto client.
|
Thanks to the devs that contributed to these projects, MadelineProto is now an easy, well-written and complete MTProto client.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/PROXY.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/TEMPLATES.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/PROXY.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/TEMPLATES.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -20,4 +20,4 @@ To change the session file after starting MadelineProto, do the following:
|
|||||||
$MadelineProto->session = 'newsession.madeline';
|
$MadelineProto->session = 'newsession.madeline';
|
||||||
```
|
```
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/LOGIN.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/LOGIN.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -29,4 +29,4 @@ foreach ($MadelineProto->API->chats as $bot_api_id => $chat) {
|
|||||||
Since bots cannot run `get_dialogs`, you must make use of the internal MadelineProto database to get a list of all users, chats and channels MadelineProto has seen.
|
Since bots cannot run `get_dialogs`, you must make use of the internal MadelineProto database to get a list of all users, chats and channels MadelineProto has seen.
|
||||||
`$MadelineProto->API->chats` contains a list of [Chat](../API_docs/types/Chat.html) and [User](../API_docs/types/User.html) objects, indexed by bot API id.
|
`$MadelineProto->API->chats` contains a list of [Chat](../API_docs/types/Chat.html) and [User](../API_docs/types/User.html) objects, indexed by bot API id.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/CHAT_INFO.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/INLINE_BUTTONS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/CHAT_INFO.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/INLINE_BUTTONS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -102,4 +102,4 @@ try {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/SELF.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/FLOOD_WAIT.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/SELF.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/FLOOD_WAIT.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -40,4 +40,4 @@
|
|||||||
|
|
||||||
* [Clickable inline buttons](#inline-buttons)!
|
* [Clickable inline buttons](#inline-buttons)!
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/LOGIN.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/REQUIREMENTS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/LOGIN.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/REQUIREMENTS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -426,4 +426,4 @@ $output_file_name = $MadelineProto->download_to_file(
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/USING_METHODS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/CHAT_INFO.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/USING_METHODS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/CHAT_INFO.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -11,4 +11,4 @@ floodwaitrate = time it took you to make the method calls + X
|
|||||||
|
|
||||||
Use sleep to execute max N calls in `floodwaitrate` seconds, this way you won't get flood waited!
|
Use sleep to execute max N calls in `floodwaitrate` seconds, this way you won't get flood waited!
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/EXCEPTIONS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/LOGGING.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/EXCEPTIONS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/LOGGING.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -48,4 +48,4 @@ And click them:
|
|||||||
$button->click();
|
$button->click();
|
||||||
```
|
```
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/DIALOGS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/CALLS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/DIALOGS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/CALLS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -118,4 +118,4 @@ cp -a *php tests userbots .env* ..
|
|||||||
|
|
||||||
Now open `.env` and edit its values as needed.
|
Now open `.env` and edit its values as needed.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/REQUIREMENTS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/UPDATES.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/REQUIREMENTS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/UPDATES.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -17,4 +17,4 @@ MadelineProto provides a unified class for logging messages to the logging desti
|
|||||||
|
|
||||||
By default, `$level` is `\danog\MadelineProto\Logger:NOTICE`.
|
By default, `$level` is `\danog\MadelineProto\Logger:NOTICE`.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/FLOOD_WAIT.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/USING_METHODS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/FLOOD_WAIT.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/USING_METHODS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -57,4 +57,4 @@ $MadelineProto->logout();
|
|||||||
|
|
||||||
**If** you want to logout, you can use the logout function, see [here for the parameters and the result](https://docs.madelineproto.xyz/logout.html).
|
**If** you want to logout, you can use the logout function, see [here for the parameters and the result](https://docs.madelineproto.xyz/logout.html).
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/CREATING_A_CLIENT.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/FEATURES.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/CREATING_A_CLIENT.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/FEATURES.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -16,4 +16,4 @@ All MadelineProto wrapper methods (for example upload, download, upload_encrypte
|
|||||||
|
|
||||||
td-cli wrappers are also present: you can use the tdcli_function in lua and pass mtproto updates to the tdcli_update_callback via PHP, they will be automatically converted to/from td objects. Please note that the object conversion is not complete, feel free to contribute to the conversion module in [`src/danog/MadelineProto/Conversion/TD.php`](https://github.com/danog/MadelineProto/raw/master/src/danog/MadelineProto/TL/Conversion/TD.php).
|
td-cli wrappers are also present: you can use the tdcli_function in lua and pass mtproto updates to the tdcli_update_callback via PHP, they will be automatically converted to/from td objects. Please note that the object conversion is not complete, feel free to contribute to the conversion module in [`src/danog/MadelineProto/Conversion/TD.php`](https://github.com/danog/MadelineProto/raw/master/src/danog/MadelineProto/TL/Conversion/TD.php).
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/SECRET_CHATS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/PROXY.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/SECRET_CHATS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/PROXY.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -119,4 +119,4 @@ Can return additional HTTP headers to use when the HTTP protocol is being used.
|
|||||||
|
|
||||||
Returns the resource used for socket communication: should call `$socket->getResource()`.
|
Returns the resource used for socket communication: should call `$socket->getResource()`.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/LUA.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/CONTRIB.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/LUA.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/CONTRIB.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -13,4 +13,4 @@ sudo apt-get install php7.2 php7.2-dev php7.2-fpm php7.2-curl php7.2-xml php7.2-
|
|||||||
|
|
||||||
Next, follow the instructions on [voip.madelineproto.xyz](https://voip.madelineproto.xyz) and [prime.madelineproto.xyz](https://prime.madelineproto.xyz) to install libtgvoip and PrimeModule.
|
Next, follow the instructions on [voip.madelineproto.xyz](https://voip.madelineproto.xyz) and [prime.madelineproto.xyz](https://prime.madelineproto.xyz) to install libtgvoip and PrimeModule.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/FEATURES.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/INSTALLATION.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/FEATURES.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/INSTALLATION.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -66,4 +66,4 @@ $secret_chat = $MadelineProto->get_secret_chat($chat);
|
|||||||
|
|
||||||
This method gets info about a certain chat.
|
This method gets info about a certain chat.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/CALLS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/LUA.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/CALLS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/LUA.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -8,4 +8,4 @@ $me = $MadelineProto->get_self();
|
|||||||
|
|
||||||
[`get_self`](https://docs.madelineproto.xyz/get_self.html) returns a [User object](../API_docs/types/User.html) that contains info about the currently logged in user/bot, or false if the current instance is not logged in.
|
[`get_self`](https://docs.madelineproto.xyz/get_self.html) returns a [User object](../API_docs/types/User.html) that contains info about the currently logged in user/bot, or false if the current instance is not logged in.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/SETTINGS.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/EXCEPTIONS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/SETTINGS.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/EXCEPTIONS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -410,4 +410,4 @@ The settings array can be accessed and modified in the instantiated class by acc
|
|||||||
$MadelineProto->settings['updates']['handle_updates'] = true; // reenable update fetching
|
$MadelineProto->settings['updates']['handle_updates'] = true; // reenable update fetching
|
||||||
```
|
```
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/UPDATES.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/SELF.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/UPDATES.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/SELF.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -31,4 +31,4 @@ $MadelineProto->set_web_template($new_template);
|
|||||||
|
|
||||||
The new template must have a structure similar the the default template.
|
The new template must have a structure similar the the default template.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/#very-complex-and-complete-examples"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/#very-complex-and-complete-examples"><input type="submit" value="Next section" /></amp-form>
|
@ -190,4 +190,4 @@ $MadelineProto->loop(-1);
|
|||||||
This way, each update will be managed in its own fork.
|
This way, each update will be managed in its own fork.
|
||||||
Note that multiprocessing is not the same as multithreading, and should be avoided unless lengthy operations are made in the update handler.
|
Note that multiprocessing is not the same as multithreading, and should be avoided unless lengthy operations are made in the update handler.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/INSTALLATION.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/SETTINGS.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/INSTALLATION.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/SETTINGS.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
@ -101,4 +101,4 @@ $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => 'l
|
|||||||
|
|
||||||
If the queue if the specified queue name does not exist, it will be created.
|
If the queue if the specified queue name does not exist, it will be created.
|
||||||
|
|
||||||
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/LOGGING.html"><input type="submit" value="Previous section" /></form><amp-form action="https://docs.madelineproto.xyz/docs/FILES.html" method="GET" target="_top"><input type="submit" value="Next section" /></form>
|
<amp-form method="GET" target="_top" action="https://docs.madelineproto.xyz/docs/LOGGING.html"><input type="submit" value="Previous section" /></amp-form><amp-form action="https://docs.madelineproto.xyz/docs/FILES.html" method="GET" target="_top"><input type="submit" value="Next section" /></amp-form>
|
Loading…
Reference in New Issue
Block a user