Better docs

This commit is contained in:
Daniil Gentili 2017-08-28 12:44:50 +02:00
parent f93007f8b1
commit d69a27867f
3240 changed files with 22892 additions and 25363 deletions

View File

@ -17,14 +17,20 @@ description: account.changePhone parameters, return type and example
### Return type: [User](../types/User.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -40,15 +46,6 @@ $User = $MadelineProto->account->changePhone(['phone_number' => 'string', 'phone
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.changePhone
* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }`
### As a user:

View File

@ -15,14 +15,20 @@ description: account.checkUsername parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|USERNAME_INVALID|The provided username is not valid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Bool = $MadelineProto->account->checkUsername(['username' => 'string', ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.checkUsername
* params - `{"username": "string", }`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.confirmPhone parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PHONE_CODE_EMPTY|phone_code is missing|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->account->confirmPhone(['phone_code_hash' => 'string', 'p
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.confirmPhone
* params - `{"phone_code_hash": "string", "phone_code": "string", }`
### As a user:

View File

@ -15,14 +15,14 @@ description: account.deleteAccount parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $Bool = $MadelineProto->account->deleteAccount(['reason' => 'string', ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.deleteAccount
* params - `{"reason": "string", }`
### As a user:

View File

@ -10,14 +10,14 @@ description: account.getAccountTTL parameters, return type and example
### Return type: [AccountDaysTTL](../types/AccountDaysTTL.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $AccountDaysTTL = $MadelineProto->account->getAccountTTL();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getAccountTTL
* params - `{}`
### As a user:

View File

@ -10,14 +10,14 @@ description: account.getAuthorizations parameters, return type and example
### Return type: [account\_Authorizations](../types/account_Authorizations.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $account_Authorizations = $MadelineProto->account->getAuthorizations();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getAuthorizations
* params - `{}`
### As a user:

View File

@ -15,14 +15,20 @@ description: account.getNotifySettings parameters, return type and example
### Return type: [PeerNotifySettings](../types/PeerNotifySettings.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $PeerNotifySettings = $MadelineProto->account->getNotifySettings(['peer' => Inpu
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getNotifySettings
* params - `{"peer": InputNotifyPeer, }`
### As a user:

View File

@ -10,14 +10,14 @@ description: account.getPassword parameters, return type and example
### Return type: [account\_Password](../types/account_Password.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $account_Password = $MadelineProto->account->getPassword();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getPassword
* params - `{}`
### As a user:

View File

@ -15,14 +15,14 @@ description: account.getPasswordSettings parameters, return type and example
### Return type: [account\_PasswordSettings](../types/account_PasswordSettings.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $account_PasswordSettings = $MadelineProto->account->getPasswordSettings(['curre
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getPasswordSettings
* params - `{"current_password_hash": "bytes", }`
### As a user:

View File

@ -15,14 +15,20 @@ description: account.getPrivacy parameters, return type and example
### Return type: [account\_PrivacyRules](../types/account_PrivacyRules.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PRIVACY_KEY_INVALID|The privacy key is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $account_PrivacyRules = $MadelineProto->account->getPrivacy(['key' => InputPriva
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getPrivacy
* params - `{"key": InputPrivacyKey, }`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.getTmpPassword parameters, return type and example
### Return type: [account\_TmpPassword](../types/account_TmpPassword.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|TMP_PASSWORD_DISABLED|The temporary password is disabled|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $account_TmpPassword = $MadelineProto->account->getTmpPassword(['password_hash'
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getTmpPassword
* params - `{"password_hash": "bytes", "period": int, }`
### As a user:

View File

@ -10,14 +10,14 @@ description: account.getWallPapers parameters, return type and example
### Return type: [Vector\_of\_WallPaper](../types/WallPaper.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $Vector_of_WallPaper = $MadelineProto->account->getWallPapers();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.getWallPapers
* params - `{}`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.registerDevice parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|TOKEN_INVALID|The provided token is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->account->registerDevice(['token_type' => int, 'token' =>
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.registerDevice
* params - `{"token_type": int, "token": "string", }`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.reportPeer parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->account->reportPeer(['peer' => InputPeer, 'reason' => Re
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.reportPeer
* params - `{"peer": InputPeer, "reason": ReportReason, }`
### As a user:

View File

@ -15,14 +15,20 @@ description: account.resetAuthorization parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|HASH_INVALID|The provided hash is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Bool = $MadelineProto->account->resetAuthorization(['hash' => long, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.resetAuthorization
* params - `{"hash": long, }`
### As a user:

View File

@ -10,14 +10,14 @@ description: account.resetNotifySettings parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $Bool = $MadelineProto->account->resetNotifySettings();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.resetNotifySettings
* params - `{}`
### As a user:

View File

@ -17,14 +17,20 @@ description: account.sendChangePhoneCode parameters, return type and example
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -40,15 +46,6 @@ $auth_SentCode = $MadelineProto->account->sendChangePhoneCode(['allow_flashcall'
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.sendChangePhoneCode
* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, }`
### As a user:

View File

@ -17,14 +17,20 @@ description: account.sendConfirmPhoneCode parameters, return type and example
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|HASH_INVALID|The provided hash is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -40,15 +46,6 @@ $auth_SentCode = $MadelineProto->account->sendConfirmPhoneCode(['allow_flashcall
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.sendConfirmPhoneCode
* params - `{"allow_flashcall": Bool, "hash": "string", "current_number": Bool, }`
### As a user:

View File

@ -15,14 +15,20 @@ description: account.setAccountTTL parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|TTL_DAYS_INVALID|The provided TTL is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Bool = $MadelineProto->account->setAccountTTL(['ttl' => AccountDaysTTL, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.setAccountTTL
* params - `{"ttl": AccountDaysTTL, }`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.setPrivacy parameters, return type and example
### Return type: [account\_PrivacyRules](../types/account_PrivacyRules.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PRIVACY_KEY_INVALID|The privacy key is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $account_PrivacyRules = $MadelineProto->account->setPrivacy(['key' => InputPriva
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.setPrivacy
* params - `{"key": InputPrivacyKey, "rules": [InputPrivacyRule], }`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.unregisterDevice parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|TOKEN_INVALID|The provided token is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->account->unregisterDevice(['token_type' => int, 'token'
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.unregisterDevice
* params - `{"token_type": int, "token": "string", }`
### As a user:

View File

@ -15,14 +15,14 @@ description: account.updateDeviceLocked parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $Bool = $MadelineProto->account->updateDeviceLocked(['period' => int, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.updateDeviceLocked
* params - `{"period": int, }`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.updateNotifySettings parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->account->updateNotifySettings(['peer' => InputNotifyPeer
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.updateNotifySettings
* params - `{"peer": InputNotifyPeer, "settings": InputPeerNotifySettings, }`
### As a user:

View File

@ -16,14 +16,20 @@ description: account.updatePasswordSettings parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|NEW_SETTINGS_INVALID|The new settings are invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->account->updatePasswordSettings(['current_password_hash'
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.updatePasswordSettings
* params - `{"current_password_hash": "bytes", "new_settings": account_PasswordInputSettings, }`
### As a user:

View File

@ -17,14 +17,20 @@ description: account.updateProfile parameters, return type and example
### Return type: [User](../types/User.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|ABOUT_TOO_LONG|The provided bio is too long||FIRSTNAME_INVALID|The first name is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -40,15 +46,6 @@ $User = $MadelineProto->account->updateProfile(['first_name' => 'string', 'last_
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.updateProfile
* params - `{"first_name": "string", "last_name": "string", "about": "string", }`
### As a user:

View File

@ -15,14 +15,14 @@ description: account.updateStatus parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $Bool = $MadelineProto->account->updateStatus(['offline' => Bool, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.updateStatus
* params - `{"offline": Bool, }`
### As a user:

View File

@ -15,14 +15,20 @@ description: account.updateUsername parameters, return type and example
### Return type: [User](../types/User.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|USERNAME_INVALID|The provided username is not valid||USERNAME_NOT_MODIFIED|The username was not modified||USERNAME_OCCUPIED|The provided username is already occupied|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $User = $MadelineProto->account->updateUsername(['username' => 'string', ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - account.updateUsername
* params - `{"username": "string", }`
### As a user:

View File

@ -18,6 +18,15 @@ description: auth.bindTempAuthKey parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid||INPUT_REQUEST_TOO_LONG|The request is too big|
### Example:

View File

@ -16,14 +16,20 @@ description: auth.cancelCode parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->auth->cancelCode(['phone_number' => 'string', 'phone_cod
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.cancelCode
* params - `{"phone_number": "string", "phone_code_hash": "string", }`
### As a user:

View File

@ -15,14 +15,20 @@ description: auth.checkPassword parameters, return type and example
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $auth_Authorization = $MadelineProto->auth->checkPassword(['password_hash' => 'b
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.checkPassword
* params - `{"password_hash": "bytes", }`
### As a user:

View File

@ -15,14 +15,20 @@ description: auth.checkPhone parameters, return type and example
### Return type: [auth\_CheckedPhone](../types/auth_CheckedPhone.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram||PHONE_NUMBER_INVALID|The phone number is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $auth_CheckedPhone = $MadelineProto->auth->checkPhone(['phone_number' => 'string
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.checkPhone
* params - `{"phone_number": "string", }`
### As a user:

View File

@ -15,6 +15,9 @@ description: auth.dropTempAuthKeys parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Example:

View File

@ -15,6 +15,15 @@ description: auth.exportAuthorization parameters, return type and example
### Return type: [auth\_ExportedAuthorization](../types/auth_ExportedAuthorization.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|DC_ID_INVALID|The provided DC ID is invalid|
### Example:

View File

@ -16,6 +16,15 @@ description: auth.importAuthorization parameters, return type and example
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|AUTH_BYTES_INVALID|The provided authorization is invalid||USER_ID_INVALID|The provided user ID is invalid|
### Example:

View File

@ -15,14 +15,20 @@ description: auth.recoverPassword parameters, return type and example
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CODE_EMPTY|The provided code is empty|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $auth_Authorization = $MadelineProto->auth->recoverPassword(['code' => 'string',
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.recoverPassword
* params - `{"code": "string", }`
### As a user:

View File

@ -10,14 +10,20 @@ description: auth.requestPasswordRecovery parameters, return type and example
### Return type: [auth\_PasswordRecovery](../types/auth_PasswordRecovery.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PASSWORD_EMPTY|The provided password is empty|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +39,6 @@ $auth_PasswordRecovery = $MadelineProto->auth->requestPasswordRecovery();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.requestPasswordRecovery
* params - `{}`
### As a user:

View File

@ -16,14 +16,20 @@ description: auth.resendCode parameters, return type and example
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $auth_SentCode = $MadelineProto->auth->resendCode(['phone_number' => 'string', '
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.resendCode
* params - `{"phone_number": "string", "phone_code_hash": "string", }`
### As a user:

View File

@ -10,14 +10,20 @@ description: auth.resetAuthorizations parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|Timeout|A timeout occurred while fetching data from the bot|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +39,6 @@ $Bool = $MadelineProto->auth->resetAuthorizations();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.resetAuthorizations
* params - `{}`
### As a user:

View File

@ -16,14 +16,20 @@ description: auth.sendInvites parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|MESSAGE_EMPTY|The provided message is empty|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->auth->sendInvites(['phone_numbers' => ['string'], 'messa
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - auth.sendInvites
* params - `{"phone_numbers": ["string"], "message": "string", }`
### As a user:

View File

@ -16,6 +16,15 @@ description: bots.answerWebhookJSONQuery parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|QUERY_ID_INVALID|The query ID is invalid||USER_BOT_INVALID|This method can only be called by a bot|
### Example:

View File

@ -16,6 +16,15 @@ description: bots.sendCustomRequest parameters, return type and example
### Return type: [DataJSON](../types/DataJSON.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|USER_BOT_INVALID|This method can only be called by a bot|
### Example:

View File

@ -16,14 +16,20 @@ description: channels.checkUsername parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ID_INVALID|The provided chat id is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->channels->checkUsername(['channel' => InputChannel, 'use
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.checkUsername
* params - `{"channel": InputChannel, "username": "string", }`
### As a user:

View File

@ -18,14 +18,20 @@ description: channels.createChannel parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -41,15 +47,6 @@ $Updates = $MadelineProto->channels->createChannel(['broadcast' => Bool, 'megagr
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.createChannel
* params - `{"broadcast": Bool, "megagroup": Bool, "title": "string", "about": "string", }`
### As a user:

View File

@ -15,14 +15,20 @@ description: channels.deleteChannel parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Updates = $MadelineProto->channels->deleteChannel(['channel' => InputChannel, ]
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.deleteChannel
* params - `{"channel": InputChannel, }`
### As a user:

View File

@ -16,6 +16,15 @@ description: channels.deleteMessages parameters, return type and example
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|
### Example:

View File

@ -16,14 +16,20 @@ description: channels.deleteUserHistory parameters, return type and example
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $messages_AffectedHistory = $MadelineProto->channels->deleteUserHistory(['channe
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.deleteUserHistory
* params - `{"channel": InputChannel, "user_id": InputUser, }`
### As a user:

View File

@ -16,6 +16,15 @@ description: channels.editAbout parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:

View File

@ -17,6 +17,15 @@ description: channels.editAdmin parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this||USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
### Example:

View File

@ -17,6 +17,15 @@ description: channels.editBanned parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this||USER_ADMIN_INVALID|You're not an admin|
### Example:

View File

@ -16,6 +16,15 @@ description: channels.editPhoto parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:

View File

@ -16,6 +16,15 @@ description: channels.editTitle parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:

View File

@ -15,6 +15,15 @@ description: channels.exportInvite parameters, return type and example
### Return type: [ExportedChatInvite](../types/ExportedChatInvite.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
### Example:

View File

@ -16,14 +16,20 @@ description: channels.exportMessageLink parameters, return type and example
### Return type: [ExportedMessageLink](../types/ExportedMessageLink.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $ExportedMessageLink = $MadelineProto->channels->exportMessageLink(['channel' =>
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.exportMessageLink
* params - `{"channel": InputChannel, "id": int, }`
### As a user:

View File

@ -21,14 +21,20 @@ description: channels.getAdminLog parameters, return type and example
### Return type: [channels\_AdminLogResults](../types/channels_AdminLogResults.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -44,15 +50,6 @@ $channels_AdminLogResults = $MadelineProto->channels->getAdminLog(['channel' =>
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.getAdminLog
* params - `{"channel": InputChannel, "q": "string", "events_filter": ChannelAdminLogEventsFilter, "admins": [InputUser], "max_id": long, "min_id": long, "limit": int, }`
### As a user:

View File

@ -10,14 +10,14 @@ description: channels.getAdminedPublicChannels parameters, return type and examp
### Return type: [messages\_Chats](../types/messages_Chats.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $messages_Chats = $MadelineProto->channels->getAdminedPublicChannels();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.getAdminedPublicChannels
* params - `{}`
### As a user:

View File

@ -15,6 +15,15 @@ description: channels.getChannels parameters, return type and example
### Return type: [messages\_Chats](../types/messages_Chats.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|NEED_CHAT_INVALID|The provided chat is invalid|
### Example:

View File

@ -16,6 +16,15 @@ description: channels.getMessages parameters, return type and example
### Return type: [messages\_Messages](../types/messages_Messages.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:

View File

@ -16,6 +16,15 @@ description: channels.getParticipant parameters, return type and example
### Return type: [channels\_ChannelParticipant](../types/channels_ChannelParticipant.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
### Example:

View File

@ -16,14 +16,20 @@ description: channels.inviteToChannel parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|BOT_GROUPS_BLOCKED|This bot can't be added to groups||BOTS_TOO_MUCH|There are too many bots in this chat/channel||CHANNEL_INVALID|The provided channel is invalid||CHANNEL_PRIVATE|You haven't joined this channel/supergroup||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this||CHAT_WRITE_FORBIDDEN|You can't write in this chat||INPUT_USER_DEACTIVATED|The specified user was deleted||USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels||USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups||USER_KICKED|This user was kicked from this supergroup/channel||USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact||USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Updates = $MadelineProto->channels->inviteToChannel(['channel' => InputChannel,
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.inviteToChannel
* params - `{"channel": InputChannel, "users": [InputUser], }`
### As a user:

View File

@ -15,14 +15,20 @@ description: channels.joinChannel parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Updates = $MadelineProto->channels->joinChannel(['channel' => InputChannel, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.joinChannel
* params - `{"channel": InputChannel, }`
### As a user:

View File

@ -15,6 +15,15 @@ description: channels.leaveChannel parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHANNEL_PRIVATE|You haven't joined this channel/supergroup||USER_CREATOR|You can't leave this channel, because you're its creator||USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
### Example:

View File

@ -16,14 +16,20 @@ description: channels.readHistory parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->channels->readHistory(['channel' => InputChannel, 'max_i
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.readHistory
* params - `{"channel": InputChannel, "max_id": int, }`
### As a user:

View File

@ -16,6 +16,15 @@ description: channels.readMessageContents parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:

View File

@ -17,14 +17,20 @@ description: channels.reportSpam parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -40,15 +46,6 @@ $Bool = $MadelineProto->channels->reportSpam(['channel' => InputChannel, 'user_i
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.reportSpam
* params - `{"channel": InputChannel, "user_id": InputUser, "id": [int], }`
### As a user:

View File

@ -16,6 +16,15 @@ description: channels.setStickers parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:

View File

@ -16,14 +16,20 @@ description: channels.toggleInvites parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Updates = $MadelineProto->channels->toggleInvites(['channel' => InputChannel, '
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.toggleInvites
* params - `{"channel": InputChannel, "enabled": Bool, }`
### As a user:

View File

@ -16,14 +16,20 @@ description: channels.toggleSignatures parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Updates = $MadelineProto->channels->toggleSignatures(['channel' => InputChannel
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.toggleSignatures
* params - `{"channel": InputChannel, "enabled": Bool, }`
### As a user:

View File

@ -17,6 +17,15 @@ description: channels.updatePinnedMessage parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this||CHAT_NOT_MODIFIED|The pinned message wasn't modified|
### Example:

View File

@ -16,14 +16,20 @@ description: channels.updateUsername parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid||CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this||USERNAME_INVALID|The provided username is not valid||USERNAME_OCCUPIED|The provided username is already occupied|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->channels->updateUsername(['channel' => InputChannel, 'us
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - channels.updateUsername
* params - `{"channel": InputChannel, "username": "string", }`
### As a user:

View File

@ -15,14 +15,20 @@ description: contacts.block parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Bool = $MadelineProto->contacts->block(['id' => InputUser, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.block
* params - `{"id": InputUser, }`
### As a user:

View File

@ -15,14 +15,20 @@ description: contacts.deleteContact parameters, return type and example
### Return type: [contacts\_Link](../types/contacts_Link.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $contacts_Link = $MadelineProto->contacts->deleteContact(['id' => InputUser, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.deleteContact
* params - `{"id": InputUser, }`
### As a user:

View File

@ -15,14 +15,20 @@ description: contacts.deleteContacts parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|NEED_MEMBER_INVALID|The provided member is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Bool = $MadelineProto->contacts->deleteContacts(['id' => [InputUser], ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.deleteContacts
* params - `{"id": [InputUser], }`
### As a user:

View File

@ -10,14 +10,14 @@ description: contacts.exportCard parameters, return type and example
### Return type: [Vector\_of\_int](../types/int.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $Vector_of_int = $MadelineProto->contacts->exportCard();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.exportCard
* params - `{}`
### As a user:

View File

@ -16,14 +16,14 @@ description: contacts.getBlocked parameters, return type and example
### Return type: [contacts\_Blocked](../types/contacts_Blocked.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +39,6 @@ $contacts_Blocked = $MadelineProto->contacts->getBlocked(['offset' => int, 'limi
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.getBlocked
* params - `{"offset": int, "limit": int, }`
### As a user:

View File

@ -15,14 +15,14 @@ description: contacts.getContacts parameters, return type and example
### Return type: [contacts\_Contacts](../types/contacts_Contacts.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $contacts_Contacts = $MadelineProto->contacts->getContacts(['hash' => int, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.getContacts
* params - `{"hash": int, }`
### As a user:

View File

@ -10,14 +10,14 @@ description: contacts.getStatuses parameters, return type and example
### Return type: [Vector\_of\_ContactStatus](../types/ContactStatus.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $Vector_of_ContactStatus = $MadelineProto->contacts->getStatuses();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.getStatuses
* params - `{}`
### As a user:

View File

@ -23,14 +23,20 @@ description: contacts.getTopPeers parameters, return type and example
### Return type: [contacts\_TopPeers](../types/contacts_TopPeers.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|TYPES_EMPTY|The types field is empty|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -46,15 +52,6 @@ $contacts_TopPeers = $MadelineProto->contacts->getTopPeers(['correspondents' =>
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.getTopPeers
* params - `{"correspondents": Bool, "bots_pm": Bool, "bots_inline": Bool, "phone_calls": Bool, "groups": Bool, "channels": Bool, "offset": int, "limit": int, "hash": int, }`
### As a user:

View File

@ -15,14 +15,20 @@ description: contacts.importCard parameters, return type and example
### Return type: [User](../types/User.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|NEED_MEMBER_INVALID|The provided member is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $User = $MadelineProto->contacts->importCard(['export_card' => [int], ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.importCard
* params - `{"export_card": [int], }`
### As a user:

View File

@ -15,14 +15,14 @@ description: contacts.importContacts parameters, return type and example
### Return type: [contacts\_ImportedContacts](../types/contacts_ImportedContacts.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $contacts_ImportedContacts = $MadelineProto->contacts->importContacts(['contacts
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.importContacts
* params - `{"contacts": [InputContact], }`
### As a user:

View File

@ -10,6 +10,9 @@ description: contacts.resetSaved parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Example:

View File

@ -16,14 +16,20 @@ description: contacts.resetTopPeerRating parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $Bool = $MadelineProto->contacts->resetTopPeerRating(['category' => TopPeerCateg
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.resetTopPeerRating
* params - `{"category": TopPeerCategory, "peer": InputPeer, }`
### As a user:

View File

@ -16,14 +16,20 @@ description: contacts.search parameters, return type and example
### Return type: [contacts\_Found](../types/contacts_Found.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|QUERY_TOO_SHORT|The query string is too short||SEARCH_QUERY_EMPTY|The search query is empty|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -39,15 +45,6 @@ $contacts_Found = $MadelineProto->contacts->search(['q' => 'string', 'limit' =>
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.search
* params - `{"q": "string", "limit": int, }`
### As a user:

View File

@ -15,14 +15,20 @@ description: contacts.unblock parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +44,6 @@ $Bool = $MadelineProto->contacts->unblock(['id' => InputUser, ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - contacts.unblock
* params - `{"id": InputUser, }`
### As a user:

View File

@ -19,6 +19,9 @@ description: contest.saveDeveloperInfo parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Example:

View File

@ -10,6 +10,9 @@ description: destroy_auth_key parameters, return type and example
### Return type: [DestroyAuthKeyRes](../types/DestroyAuthKeyRes.md)
### Can bots use this method: **YES**
### Example:

View File

@ -15,6 +15,9 @@ description: destroy_session parameters, return type and example
### Return type: [DestroySessionRes](../types/DestroySessionRes.md)
### Can bots use this method: **YES**
### Example:

View File

@ -15,6 +15,9 @@ description: get_future_salts parameters, return type and example
### Return type: [FutureSalts](../types/FutureSalts.md)
### Can bots use this method: **YES**
### Example:

View File

@ -15,14 +15,14 @@ description: help.getAppChangelog parameters, return type and example
### Return type: [Updates](../types/Updates.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $Updates = $MadelineProto->help->getAppChangelog(['prev_app_version' => 'string'
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.getAppChangelog
* params - `{"prev_app_version": "string", }`
### As a user:

View File

@ -10,14 +10,14 @@ description: help.getAppUpdate parameters, return type and example
### Return type: [help\_AppUpdate](../types/help_AppUpdate.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $help_AppUpdate = $MadelineProto->help->getAppUpdate();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.getAppUpdate
* params - `{}`
### As a user:

View File

@ -10,6 +10,9 @@ description: help.getCdnConfig parameters, return type and example
### Return type: [CdnConfig](../types/CdnConfig.md)
### Can bots use this method: **YES**
### Example:

View File

@ -10,6 +10,9 @@ description: help.getConfig parameters, return type and example
### Return type: [Config](../types/Config.md)
### Can bots use this method: **YES**
### Example:

View File

@ -10,14 +10,14 @@ description: help.getInviteText parameters, return type and example
### Return type: [help\_InviteText](../types/help_InviteText.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $help_InviteText = $MadelineProto->help->getInviteText();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.getInviteText
* params - `{}`
### As a user:

View File

@ -10,14 +10,14 @@ description: help.getNearestDc parameters, return type and example
### Return type: [NearestDc](../types/NearestDc.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $NearestDc = $MadelineProto->help->getNearestDc();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.getNearestDc
* params - `{}`
### As a user:

View File

@ -10,14 +10,14 @@ description: help.getSupport parameters, return type and example
### Return type: [help\_Support](../types/help_Support.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $help_Support = $MadelineProto->help->getSupport();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.getSupport
* params - `{}`
### As a user:

View File

@ -10,14 +10,14 @@ description: help.getTermsOfService parameters, return type and example
### Return type: [help\_TermsOfService](../types/help_TermsOfService.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -33,15 +33,6 @@ $help_TermsOfService = $MadelineProto->help->getTermsOfService();
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.getTermsOfService
* params - `{}`
### As a user:

View File

@ -15,14 +15,14 @@ description: help.saveAppLog parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### Example:
```
$MadelineProto = new \danog\MadelineProto\API();
if (isset($token)) { // Login as a bot
$MadelineProto->bot_login($token);
}
if (isset($number)) { // Login as a user
$sentCode = $MadelineProto->phone_login($number);
echo 'Enter the code you received: ';
@ -38,15 +38,6 @@ $Bool = $MadelineProto->help->saveAppLog(['events' => [InputAppEvent], ]);
Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.saveAppLog
* params - `{"events": [InputAppEvent], }`
### As a user:

View File

@ -16,6 +16,9 @@ description: help.setBotUpdatesStatus parameters, return type and example
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### Example:

View File

@ -22,6 +22,15 @@ description: initConnection parameters, return type and example
### Return type: [X](../types/X.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|INPUT_FETCH_FAIL|Failed deserializing TL payload|
### Example:

View File

@ -16,6 +16,9 @@ description: invokeAfterMsg parameters, return type and example
### Return type: [X](../types/X.md)
### Can bots use this method: **YES**
### Example:

View File

@ -16,6 +16,9 @@ description: invokeAfterMsgs parameters, return type and example
### Return type: [X](../types/X.md)
### Can bots use this method: **YES**
### Example:

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