diff --git a/docs/docs/ASYNC.md b/docs/docs/ASYNC.md index 266c7559..14d1e617 100644 --- a/docs/docs/ASYNC.md +++ b/docs/docs/ASYNC.md @@ -21,6 +21,7 @@ Powered by [amphp](https://amphp.org), MadelineProto wraps the AMPHP APIs to pro * [Helper methods](#helper-methods) * [Async sleep](#async-sleep-does-not-block-the-main-thread) * [Async readline](#async-readline-does-not-block-the-main-thread) + * [Async echo](#async-echo-does-not-block-the-main-thread) * [MadelineProto artax HTTP client](#madelineproto-artax-http-client) * [Async forking](#async-forking-does-single-thread-forking) * [Combining async operations](#combining-async-operations) @@ -202,11 +203,17 @@ MadelineProto also provides a few generic async helper methods: when possible, a ```php yield $MadelineProto->sleep(3); ``` + #### Async readline (does not block the main thread) ```php $res = yield $MadelineProto->readLine('Optional prompt'); ``` +#### Async echo (does not block the main thread) +```php +yield $MadelineProto->echo('Hello'.PHP_EOL); +``` + #### MadelineProto artax HTTP client When using amphp's [artax](https://amphp.org/artax) to make high-speed asynchronous HTTP requests (downloading files, etc.), use MadelineProto's modified Artax client, instead. diff --git a/docs/docs/LOGIN.md b/docs/docs/LOGIN.md index 30a124aa..294fa82b 100644 --- a/docs/docs/LOGIN.md +++ b/docs/docs/LOGIN.md @@ -17,6 +17,22 @@ There are many ways you can login with MadelineProto. ## Getting permission to use the telegram API +Before you start using MadelineProto with the Telegram API, you have to understand that Telegram strictly controls userbots created on their platform. +If you use MadelineProto or any other Telegram client, **including official clients**, for flooding, spamming, botting channels, you **will be banned forever**. + +Due to excessive abuse of the Telegram API, **all phone numbers** that sign up or log in using **even official or approved by telegram** API clients like MadelineProto are put **under observation** in a **blacklist**, and __may__ get banned **even if you did nothing wrong**, simply because some internal flags are triggered in the **telegram servers**. + +To avoid this, you must let telegram know that you will use your account with a userbot: +When or before you first sign up or login you have to **send an email with the phone number to [recover@telegram.org](mailto:recover@telegram.org)**; explaining how **exactly** will you **use the account**. +**DO NOT LIE**, just tell them **what will you do with the userbot** you intend to create, asking them to not ban your account. + +If your account does get banned, write to [recover@telegram.org](mailto:recover@telegram.org) asking to unban it. + +**DO NOT ABUSE OF THIS OR ANY OTHER API FOR FLOODING; SPAMMING; BOTTING**; the consequences will fall not only on you, but on all other users of this and other libraries, and even normal users. + +There were cases when several **normal user accounts that did nothing wrong** were banned when telegram deployed a new spambot detection system: this is bad for the community, and it is bad for Telegram, so please do not abuse. + + ## Automatic ([now fully async!](https://docs.madelineproto.xyz/docs/ASYNC.html)) ```php