Improve docs
This commit is contained in:
parent
87ebab50ce
commit
7c73af5aa0
@ -12,9 +12,9 @@ Change the phone number associated to this account
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|phone\_number|[CLICK ME string](../types/string.md) | Yes|Phone number|
|
|phone\_number|[string](../types/string.md) | Yes|Phone number|
|
||||||
|phone\_code\_hash|[CLICK ME string](../types/string.md) | Yes|Phone code hash returned by account.sendChangePhoneCode|
|
|phone\_code\_hash|[string](../types/string.md) | Yes|Phone code hash returned by account.sendChangePhoneCode|
|
||||||
|phone\_code|[CLICK ME string](../types/string.md) | Yes|The phone code sent by account.sendChangePhoneCode|
|
|phone\_code|[string](../types/string.md) | Yes|The phone code sent by account.sendChangePhoneCode|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [User](../types/User.md)
|
### Return type: [User](../types/User.md)
|
||||||
@ -22,13 +22,6 @@ Change the phone number associated to this account
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +62,10 @@ Or, if you're into Lua:
|
|||||||
User = account.changePhone({phone_number='string', phone_code_hash='string', phone_code='string', })
|
User = account.changePhone({phone_number='string', phone_code_hash='string', phone_code='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Check if this username is available
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|username|[CLICK ME string](../types/string.md) | Yes|The username to check|
|
|username|[string](../types/string.md) | Yes|The username to check|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -20,13 +20,6 @@ Check if this username is available
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|USERNAME_INVALID|The provided username is not valid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.checkUsername({username='string', })
|
Bool = account.checkUsername({username='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|USERNAME_INVALID|The provided username is not valid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Confirm this phone number is associated to this account, obtain phone_code_hash
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|phone\_code\_hash|[CLICK ME string](../types/string.md) | Yes|obtain phone_code_hash from sendConfirmPhoneCode|
|
|phone\_code\_hash|[string](../types/string.md) | Yes|obtain phone_code_hash from sendConfirmPhoneCode|
|
||||||
|phone\_code|[CLICK ME string](../types/string.md) | Yes|The code sent by sendConfirmPhoneCode|
|
|phone\_code|[string](../types/string.md) | Yes|The code sent by sendConfirmPhoneCode|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,14 +21,6 @@ Confirm this phone number is associated to this account, obtain phone_code_hash
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CODE_HASH_INVALID|Code hash invalid|
|
|
||||||
|PHONE_CODE_EMPTY|phone_code is missing|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -67,3 +59,11 @@ Or, if you're into Lua:
|
|||||||
Bool = account.confirmPhone({phone_code_hash='string', phone_code='string', })
|
Bool = account.confirmPhone({phone_code_hash='string', phone_code='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CODE_HASH_INVALID|Code hash invalid|
|
||||||
|
|PHONE_CODE_EMPTY|phone_code is missing|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Delete this account
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|reason|[CLICK ME string](../types/string.md) | Yes|Why are you going away? :(|
|
|reason|[string](../types/string.md) | Yes|Why are you going away? :(|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -12,7 +12,7 @@ Get notification settings
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[CLICK ME InputNotifyPeer](../types/InputNotifyPeer.md) | Yes|Notification source |
|
|peer|[InputNotifyPeer](../types/InputNotifyPeer.md) | Yes|Notification source |
|
||||||
|
|
||||||
|
|
||||||
### Return type: [PeerNotifySettings](../types/PeerNotifySettings.md)
|
### Return type: [PeerNotifySettings](../types/PeerNotifySettings.md)
|
||||||
@ -20,13 +20,6 @@ Get notification settings
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
PeerNotifySettings = account.getNotifySettings({peer=InputNotifyPeer, })
|
PeerNotifySettings = account.getNotifySettings({peer=InputNotifyPeer, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Get the current 2FA settings
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|current\_password\_hash|[CLICK ME bytes](../types/bytes.md) | Yes|Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()['current_salt']; $current_password_hash = hash('sha256', $current_salt.$password.$current_salt, true);`|
|
|current\_password\_hash|[bytes](../types/bytes.md) | Yes|Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()['current_salt']; $current_password_hash = hash('sha256', $current_salt.$password.$current_salt, true);`|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [account\_PasswordSettings](../types/account_PasswordSettings.md)
|
### Return type: [account\_PasswordSettings](../types/account_PasswordSettings.md)
|
||||||
@ -20,13 +20,6 @@ Get the current 2FA settings
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
account_PasswordSettings = account.getPasswordSettings({current_password_hash='bytes', })
|
account_PasswordSettings = account.getPasswordSettings({current_password_hash='bytes', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Get privacy settings
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|key|[CLICK ME InputPrivacyKey](../types/InputPrivacyKey.md) | Yes|Privacy setting key|
|
|key|[InputPrivacyKey](../types/InputPrivacyKey.md) | Yes|Privacy setting key|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [account\_PrivacyRules](../types/account_PrivacyRules.md)
|
### Return type: [account\_PrivacyRules](../types/account_PrivacyRules.md)
|
||||||
@ -20,13 +20,6 @@ Get privacy settings
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PRIVACY_KEY_INVALID|The privacy key is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
account_PrivacyRules = account.getPrivacy({key=InputPrivacyKey, })
|
account_PrivacyRules = account.getPrivacy({key=InputPrivacyKey, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PRIVACY_KEY_INVALID|The privacy key is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Get temporary password for buying products through bots
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|password\_hash|[CLICK ME bytes](../types/bytes.md) | Yes|The password hash|
|
|password\_hash|[bytes](../types/bytes.md) | Yes|The password hash|
|
||||||
|period|[CLICK ME int](../types/int.md) | Yes|The validity period|
|
|period|[int](../types/int.md) | Yes|The validity period|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [account\_TmpPassword](../types/account_TmpPassword.md)
|
### Return type: [account\_TmpPassword](../types/account_TmpPassword.md)
|
||||||
@ -21,14 +21,6 @@ Get temporary password for buying products through bots
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
|
||||||
|TMP_PASSWORD_DISABLED|The temporary password is disabled|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -67,3 +59,11 @@ Or, if you're into Lua:
|
|||||||
account_TmpPassword = account.getTmpPassword({password_hash='bytes', period=int, })
|
account_TmpPassword = account.getTmpPassword({password_hash='bytes', period=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
||||||
|
|TMP_PASSWORD_DISABLED|The temporary password is disabled|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ Register device for push notifications
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|token\_type|[CLICK ME int](../types/int.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone, 6 - Blackberry, and other, see source code of official apps for more info|
|
|token\_type|[int](../types/int.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone, 6 - Blackberry, and other, see source code of official apps for more info|
|
||||||
|token|[CLICK ME string](../types/string.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info|
|
|token|[string](../types/string.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info|
|
||||||
|app\_sandbox|[CLICK ME Bool](../types/Bool.md) | Yes|Should the app run in a sandbox?|
|
|app\_sandbox|[Bool](../types/Bool.md) | Yes|Should the app run in a sandbox?|
|
||||||
|other\_uids|Array of [CLICK ME int](../types/int.md) | Yes|Other UIDs|
|
|other\_uids|Array of [int](../types/int.md) | Yes|Other UIDs|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -23,13 +23,6 @@ Register device for push notifications
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|TOKEN_INVALID|The provided token is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -72,3 +65,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.registerDevice({token_type=int, token='string', app_sandbox=Bool, other_uids={int}, })
|
Bool = account.registerDevice({token_type=int, token='string', app_sandbox=Bool, other_uids={int}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|TOKEN_INVALID|The provided token is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Report for spam
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer to report|
|
||||||
|reason|[CLICK ME ReportReason](../types/ReportReason.md) | Yes|Why are you reporting this peer|
|
|reason|[ReportReason](../types/ReportReason.md) | Yes|Why are you reporting this peer|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,13 +21,6 @@ Report for spam
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.reportPeer({peer=InputPeer, reason=ReportReason, })
|
Bool = account.reportPeer({peer=InputPeer, reason=ReportReason, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Delete a certain session
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|hash|[CLICK ME long](../types/long.md) | Yes|The session hash, obtained from $MadelineProto->account->getAuthorizations|
|
|hash|[long](../types/long.md) | Yes|The session hash, obtained from $MadelineProto->account->getAuthorizations|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -20,13 +20,6 @@ Delete a certain session
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|HASH_INVALID|The provided hash is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.resetAuthorization({hash=long, })
|
Bool = account.resetAuthorization({hash=long, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|HASH_INVALID|The provided hash is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Delete a certain telegram web login authorization
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|hash|[CLICK ME long](../types/long.md) | Yes|The authorization's hash|
|
|hash|[long](../types/long.md) | Yes|The authorization's hash|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -12,9 +12,9 @@ Change the phone number
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|allow\_flashcall|[CLICK ME Bool](../types/Bool.md) | Optional|Can the code be sent using a flash call instead of an SMS?|
|
|allow\_flashcall|[Bool](../types/Bool.md) | Optional|Can the code be sent using a flash call instead of an SMS?|
|
||||||
|phone\_number|[CLICK ME string](../types/string.md) | Yes|New phone number|
|
|phone\_number|[string](../types/string.md) | Yes|New phone number|
|
||||||
|current\_number|[CLICK ME Bool](../types/Bool.md) | Optional|Current phone number|
|
|current\_number|[Bool](../types/Bool.md) | Optional|Current phone number|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
|
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
|
||||||
@ -22,13 +22,6 @@ Change the phone number
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +62,10 @@ Or, if you're into Lua:
|
|||||||
auth_SentCode = account.sendChangePhoneCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, })
|
auth_SentCode = account.sendChangePhoneCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ Send confirmation phone code
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|allow\_flashcall|[CLICK ME Bool](../types/Bool.md) | Optional|Can telegram call you instead of sending an SMS?|
|
|allow\_flashcall|[Bool](../types/Bool.md) | Optional|Can telegram call you instead of sending an SMS?|
|
||||||
|hash|[CLICK ME string](../types/string.md) | Yes|The hash|
|
|hash|[string](../types/string.md) | Yes|The hash|
|
||||||
|current\_number|[CLICK ME Bool](../types/Bool.md) | Optional|The current phone number|
|
|current\_number|[Bool](../types/Bool.md) | Optional|The current phone number|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
|
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
|
||||||
@ -22,13 +22,6 @@ Send confirmation phone code
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|HASH_INVALID|The provided hash is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +62,10 @@ Or, if you're into Lua:
|
|||||||
auth_SentCode = account.sendConfirmPhoneCode({allow_flashcall=Bool, hash='string', current_number=Bool, })
|
auth_SentCode = account.sendConfirmPhoneCode({allow_flashcall=Bool, hash='string', current_number=Bool, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|HASH_INVALID|The provided hash is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Set account TTL
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|ttl|[CLICK ME AccountDaysTTL](../types/AccountDaysTTL.md) | Yes|Time To Live of account|
|
|ttl|[AccountDaysTTL](../types/AccountDaysTTL.md) | Yes|Time To Live of account|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -20,13 +20,6 @@ Set account TTL
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|TTL_DAYS_INVALID|The provided TTL is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.setAccountTTL({ttl=AccountDaysTTL, })
|
Bool = account.setAccountTTL({ttl=AccountDaysTTL, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|TTL_DAYS_INVALID|The provided TTL is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Set privacy settings
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|key|[CLICK ME InputPrivacyKey](../types/InputPrivacyKey.md) | Yes|Privacy setting|
|
|key|[InputPrivacyKey](../types/InputPrivacyKey.md) | Yes|Privacy setting|
|
||||||
|rules|Array of [CLICK ME InputPrivacyRule](../types/InputPrivacyRule.md) | Yes|Privacy settings|
|
|rules|Array of [InputPrivacyRule](../types/InputPrivacyRule.md) | Yes|Privacy settings|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [account\_PrivacyRules](../types/account_PrivacyRules.md)
|
### Return type: [account\_PrivacyRules](../types/account_PrivacyRules.md)
|
||||||
@ -21,13 +21,6 @@ Set privacy settings
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PRIVACY_KEY_INVALID|The privacy key is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
account_PrivacyRules = account.setPrivacy({key=InputPrivacyKey, rules={InputPrivacyRule}, })
|
account_PrivacyRules = account.setPrivacy({key=InputPrivacyKey, rules={InputPrivacyRule}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PRIVACY_KEY_INVALID|The privacy key is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ Stop sending PUSH notifications to app
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|token\_type|[CLICK ME int](../types/int.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info|
|
|token\_type|[int](../types/int.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info|
|
||||||
|token|[CLICK ME string](../types/string.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info|
|
|token|[string](../types/string.md) | Yes|Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info|
|
||||||
|other\_uids|Array of [CLICK ME int](../types/int.md) | Yes|Other UIDs|
|
|other\_uids|Array of [int](../types/int.md) | Yes|Other UIDs|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -22,13 +22,6 @@ Stop sending PUSH notifications to app
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|TOKEN_INVALID|The provided token is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +62,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.unregisterDevice({token_type=int, token='string', other_uids={int}, })
|
Bool = account.unregisterDevice({token_type=int, token='string', other_uids={int}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|TOKEN_INVALID|The provided token is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Disable all notifications for a certain period
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|period|[CLICK ME int](../types/int.md) | Yes|For how long should notifications be disabled|
|
|period|[int](../types/int.md) | Yes|For how long should notifications be disabled|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -12,8 +12,8 @@ Change notification settings
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|peer|[CLICK ME InputNotifyPeer](../types/InputNotifyPeer.md) | Yes|The peers to which the notification settings should be applied|
|
|peer|[InputNotifyPeer](../types/InputNotifyPeer.md) | Yes|The peers to which the notification settings should be applied|
|
||||||
|settings|[CLICK ME InputPeerNotifySettings](../types/InputPeerNotifySettings.md) | Yes|Notification settings|
|
|settings|[InputPeerNotifySettings](../types/InputPeerNotifySettings.md) | Yes|Notification settings|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,13 +21,6 @@ Change notification settings
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.updateNotifySettings({peer=InputNotifyPeer, settings=InputPeerNotifySettings, })
|
Bool = account.updateNotifySettings({peer=InputNotifyPeer, settings=InputPeerNotifySettings, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Update the 2FA password settings
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|current\_password\_hash|[CLICK ME bytes](../types/bytes.md) | Yes|Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()['current_salt']; $current_password_hash = hash('sha256', $current_salt.$password.$current_salt, true);`|
|
|current\_password\_hash|[bytes](../types/bytes.md) | Yes|Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()['current_salt']; $current_password_hash = hash('sha256', $current_salt.$password.$current_salt, true);`|
|
||||||
|new\_settings|[CLICK ME account\_PasswordInputSettings](../types/account_PasswordInputSettings.md) | Yes|New 2FA settings|
|
|new\_settings|[account\_PasswordInputSettings](../types/account_PasswordInputSettings.md) | Yes|New 2FA settings|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,16 +21,6 @@ Update the 2FA password settings
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|EMAIL_UNCONFIRMED|Email unconfirmed|
|
|
||||||
|NEW_SALT_INVALID|The new salt is invalid|
|
|
||||||
|NEW_SETTINGS_INVALID|The new settings are invalid|
|
|
||||||
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +59,13 @@ Or, if you're into Lua:
|
|||||||
Bool = account.updatePasswordSettings({current_password_hash='bytes', new_settings=account_PasswordInputSettings, })
|
Bool = account.updatePasswordSettings({current_password_hash='bytes', new_settings=account_PasswordInputSettings, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|EMAIL_UNCONFIRMED|Email unconfirmed|
|
||||||
|
|NEW_SALT_INVALID|The new salt is invalid|
|
||||||
|
|NEW_SETTINGS_INVALID|The new settings are invalid|
|
||||||
|
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ Update profile info
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|first\_name|[CLICK ME string](../types/string.md) | Optional|The first name|
|
|first\_name|[string](../types/string.md) | Optional|The first name|
|
||||||
|last\_name|[CLICK ME string](../types/string.md) | Optional|The last name|
|
|last\_name|[string](../types/string.md) | Optional|The last name|
|
||||||
|about|[CLICK ME string](../types/string.md) | Optional|The bio/about field|
|
|about|[string](../types/string.md) | Optional|The bio/about field|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [User](../types/User.md)
|
### Return type: [User](../types/User.md)
|
||||||
@ -22,14 +22,6 @@ Update profile info
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -70,3 +62,11 @@ Or, if you're into Lua:
|
|||||||
User = account.updateProfile({first_name='string', last_name='string', about='string', })
|
User = account.updateProfile({first_name='string', last_name='string', about='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|ABOUT_TOO_LONG|The provided bio is too long|
|
||||||
|
|FIRSTNAME_INVALID|The first name is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Update online status
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|offline|[CLICK ME Bool](../types/Bool.md) | Yes|offline to set the status to offline|
|
|offline|[Bool](../types/Bool.md) | Yes|offline to set the status to offline|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -20,13 +20,6 @@ Update online status
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
Bool = account.updateStatus({offline=Bool, })
|
Bool = account.updateStatus({offline=Bool, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Update this user's username
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|username|[CLICK ME string](../types/string.md) | Yes|The new username|
|
|username|[string](../types/string.md) | Yes|The new username|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [User](../types/User.md)
|
### Return type: [User](../types/User.md)
|
||||||
@ -20,15 +20,6 @@ Update this user's username
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -65,3 +56,12 @@ Or, if you're into Lua:
|
|||||||
User = account.updateUsername({username='string', })
|
User = account.updateUsername({username='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Invalidate sent phone code
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|phone\_number|[CLICK ME string](../types/string.md) | Yes|Phone number|
|
|phone\_number|[string](../types/string.md) | Yes|Phone number|
|
||||||
|phone\_code\_hash|[CLICK ME string](../types/string.md) | Yes|Phone code hash|
|
|phone\_code\_hash|[string](../types/string.md) | Yes|Phone code hash|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,13 +21,6 @@ Invalidate sent phone code
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
Bool = auth.cancelCode({phone_number='string', phone_code_hash='string', })
|
Bool = auth.cancelCode({phone_number='string', phone_code_hash='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Check if this phone number is registered on telegram
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|phone\_number|[CLICK ME string](../types/string.md) | Yes|The phone number to check|
|
|phone\_number|[string](../types/string.md) | Yes|The phone number to check|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [auth\_CheckedPhone](../types/auth_CheckedPhone.md)
|
### Return type: [auth\_CheckedPhone](../types/auth_CheckedPhone.md)
|
||||||
@ -20,15 +20,6 @@ Check if this phone number is registered on telegram
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -65,3 +56,12 @@ Or, if you're into Lua:
|
|||||||
auth_CheckedPhone = auth.checkPhone({phone_number='string', })
|
auth_CheckedPhone = auth.checkPhone({phone_number='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Delete all temporary authorization keys except the ones provided
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|except\_auth\_keys|Array of [CLICK ME long](../types/long.md) | Yes|The temporary authorization keys to keep|
|
|except\_auth\_keys|Array of [long](../types/long.md) | Yes|The temporary authorization keys to keep|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -12,7 +12,7 @@ Use the code that was emailed to you after running $MadelineProto->auth->request
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|code|[CLICK ME string](../types/string.md) | Yes|The code that was emailed to you|
|
|code|[string](../types/string.md) | Yes|The code that was emailed to you|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
|
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
|
||||||
@ -20,13 +20,6 @@ Use the code that was emailed to you after running $MadelineProto->auth->request
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CODE_EMPTY|The provided code is empty|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
auth_Authorization = auth.recoverPassword({code='string', })
|
auth_Authorization = auth.recoverPassword({code='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CODE_EMPTY|The provided code is empty|
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,13 +15,6 @@ Send an email to recover the 2FA password
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PASSWORD_EMPTY|The provided password is empty|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -56,3 +49,10 @@ Or, if you're into Lua:
|
|||||||
auth_PasswordRecovery = auth.requestPasswordRecovery({})
|
auth_PasswordRecovery = auth.requestPasswordRecovery({})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PASSWORD_EMPTY|The provided password is empty|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Resend the SMS verification code
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|phone\_number|[CLICK ME string](../types/string.md) | Yes|The phone number|
|
|phone\_number|[string](../types/string.md) | Yes|The phone number|
|
||||||
|phone\_code\_hash|[CLICK ME string](../types/string.md) | Yes|The phone code hash|
|
|phone\_code\_hash|[string](../types/string.md) | Yes|The phone code hash|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
|
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
|
||||||
@ -21,13 +21,6 @@ Resend the SMS verification code
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
auth_SentCode = auth.resendCode({phone_number='string', phone_code_hash='string', })
|
auth_SentCode = auth.resendCode({phone_number='string', phone_code_hash='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,13 +15,6 @@ Delete all logged-in sessions.
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|Timeout|A timeout occurred while fetching data from the bot|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -56,3 +49,10 @@ Or, if you're into Lua:
|
|||||||
Bool = auth.resetAuthorizations({})
|
Bool = auth.resetAuthorizations({})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|Timeout|A timeout occurred while fetching data from the bot|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Invite friends to telegram!
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|phone\_numbers|Array of [CLICK ME string](../types/string.md) | Yes|Phone numbers to invite|
|
|phone\_numbers|Array of [string](../types/string.md) | Yes|Phone numbers to invite|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|The message to send|
|
|message|[string](../types/string.md) | Yes|The message to send|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,13 +21,6 @@ Invite friends to telegram!
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|MESSAGE_EMPTY|The provided message is empty|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -72,3 +65,10 @@ Bool = auth.sendInvites({phone_numbers={'string'}, message='string', })
|
|||||||
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.
|
If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of [Bool](../types/Bool.md) will be returned instead.
|
||||||
|
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|MESSAGE_EMPTY|The provided message is empty|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Send webhook request via bot API
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|query\_id|[CLICK ME long](../types/long.md) | Yes|The query ID|
|
|query\_id|[long](../types/long.md) | Yes|The query ID|
|
||||||
|data|[CLICK ME DataJSON](../types/DataJSON.md) | Yes|The parameters|
|
|data|[DataJSON](../types/DataJSON.md) | Yes|The parameters|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,14 +21,6 @@ Send webhook request via bot API
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -76,3 +68,11 @@ Or, if you're into Lua:
|
|||||||
Bool = bots.answerWebhookJSONQuery({query_id=long, data=DataJSON, })
|
Bool = bots.answerWebhookJSONQuery({query_id=long, data=DataJSON, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Send a custom request to the bot API
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|custom\_method|[CLICK ME string](../types/string.md) | Yes|The method to call|
|
|custom\_method|[string](../types/string.md) | Yes|The method to call|
|
||||||
|params|[CLICK ME DataJSON](../types/DataJSON.md) | Yes|Method parameters|
|
|params|[DataJSON](../types/DataJSON.md) | Yes|Method parameters|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [DataJSON](../types/DataJSON.md)
|
### Return type: [DataJSON](../types/DataJSON.md)
|
||||||
@ -21,13 +21,6 @@ Send a custom request to the bot API
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -75,3 +68,10 @@ Or, if you're into Lua:
|
|||||||
DataJSON = bots.sendCustomRequest({custom_method='string', params=DataJSON, })
|
DataJSON = bots.sendCustomRequest({custom_method='string', params=DataJSON, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|USER_BOT_INVALID|This method can only be called by a bot|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Check if this username is free and can be assigned to a channel/supergroup
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|username|[CLICK ME string](../types/string.md) | Yes|The new username for this channel/supergroup|
|
|username|[string](../types/string.md) | Yes|The new username for this channel/supergroup|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,15 +21,6 @@ Check if this username is free and can be assigned to a channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|USERNAME_INVALID|The provided username is not valid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -68,3 +59,12 @@ Or, if you're into Lua:
|
|||||||
Bool = channels.checkUsername({channel=InputChannel, username='string', })
|
Bool = channels.checkUsername({channel=InputChannel, username='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||||
|
|USERNAME_INVALID|The provided username is not valid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ Create channel/supergroup
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|broadcast|[CLICK ME Bool](../types/Bool.md) | Optional|Set this to true to create a channel|
|
|broadcast|[Bool](../types/Bool.md) | Optional|Set this to true to create a channel|
|
||||||
|megagroup|[CLICK ME Bool](../types/Bool.md) | Optional|Set this to true to create a supergroup|
|
|megagroup|[Bool](../types/Bool.md) | Optional|Set this to true to create a supergroup|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|Supergroup/channel title|
|
|title|[string](../types/string.md) | Yes|Supergroup/channel title|
|
||||||
|about|[CLICK ME string](../types/string.md) | Yes|About text|
|
|about|[string](../types/string.md) | Yes|About text|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -23,14 +23,6 @@ Create channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHAT_TITLE_EMPTY|No chat title provided|
|
|
||||||
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -73,3 +65,11 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.createChannel({broadcast=Bool, megagroup=Bool, title='string', about='string', })
|
Updates = channels.createChannel({broadcast=Bool, megagroup=Bool, title='string', about='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHAT_TITLE_EMPTY|No chat title provided|
|
||||||
|
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,14 +20,6 @@ Delete a channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -64,3 +56,11 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.deleteChannel({channel=InputChannel, })
|
Updates = channels.deleteChannel({channel=InputChannel, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Delete the history of a supergroup/channel
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to delete|
|
|max\_id|[int](../types/int.md) | Yes|Maximum message ID to delete|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -13,7 +13,7 @@ Delete channel/supergroup messages
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|The IDs of messages to delete|
|
|id|Array of [int](../types/int.md) | Yes|The IDs of messages to delete|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
||||||
@ -21,15 +21,6 @@ Delete channel/supergroup messages
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -77,3 +68,12 @@ Or, if you're into Lua:
|
|||||||
messages_AffectedMessages = channels.deleteMessages({channel=InputChannel, id={int}, })
|
messages_AffectedMessages = channels.deleteMessages({channel=InputChannel, id={int}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||||
|
|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,14 +21,6 @@ Delete all messages of a user in a channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -67,3 +59,11 @@ Or, if you're into Lua:
|
|||||||
messages_AffectedHistory = channels.deleteUserHistory({channel=InputChannel, user_id=InputUser, })
|
messages_AffectedHistory = channels.deleteUserHistory({channel=InputChannel, user_id=InputUser, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Edit the about text of a channel/supergroup
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
||||||
|about|[CLICK ME string](../types/string.md) | Yes|The new about text|
|
|about|[string](../types/string.md) | Yes|The new about text|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,16 +21,6 @@ Edit the about text of a channel/supergroup
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHANNEL_INVALID|The provided channel is invalid|
|
|
||||||
|CHAT_ABOUT_NOT_MODIFIED|About text has not changed|
|
|
||||||
|CHAT_ABOUT_TOO_LONG|Chat about too long|
|
|
||||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -78,3 +68,13 @@ Or, if you're into Lua:
|
|||||||
Bool = channels.editAbout({channel=InputChannel, about='string', })
|
Bool = channels.editAbout({channel=InputChannel, about='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHAT_ABOUT_NOT_MODIFIED|About text has not changed|
|
||||||
|
|CHAT_ABOUT_TOO_LONG|Chat about too long|
|
||||||
|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ Edit admin permissions of a user in a channel/supergroup
|
|||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user|
|
||||||
|admin\_rights|[CLICK ME ChannelAdminRights](../types/ChannelAdminRights.md) | Yes|The new admin rights|
|
|admin\_rights|[ChannelAdminRights](../types/ChannelAdminRights.md) | Yes|The new admin rights|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -22,22 +22,6 @@ Edit admin permissions of a user in a channel/supergroup
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|ADMINS_TOO_MUCH|Too many admins|
|
|
||||||
|BOT_CHANNELS_NA|Bots can't edit admin privileges|
|
|
||||||
|CHANNEL_INVALID|The provided channel is invalid|
|
|
||||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
|
||||||
|USER_CREATOR|You can't leave this channel, because you're its creator|
|
|
||||||
|USER_ID_INVALID|The provided user ID is invalid|
|
|
||||||
|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|
|
||||||
|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this|
|
|
||||||
|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this|
|
|
||||||
|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -87,3 +71,19 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.editAdmin({channel=InputChannel, user_id=InputUser, admin_rights=ChannelAdminRights, })
|
Updates = channels.editAdmin({channel=InputChannel, user_id=InputUser, admin_rights=ChannelAdminRights, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|ADMINS_TOO_MUCH|Too many admins|
|
||||||
|
|BOT_CHANNELS_NA|Bots can't edit admin privileges|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||||
|
|USER_CREATOR|You can't leave this channel, because you're its creator|
|
||||||
|
|USER_ID_INVALID|The provided user ID is invalid|
|
||||||
|
|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|
||||||
|
|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this|
|
||||||
|
|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this|
|
||||||
|
|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ Kick or ban a user from a channel/supergroup
|
|||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to kick/ban|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to kick/ban|
|
||||||
|banned\_rights|[CLICK ME ChannelBannedRights](../types/ChannelBannedRights.md) | Yes|Banned/kicked permissions|
|
|banned\_rights|[ChannelBannedRights](../types/ChannelBannedRights.md) | Yes|Banned/kicked permissions|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -22,17 +22,6 @@ Kick or ban a user from a channel/supergroup
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
|
||||||
|USER_ADMIN_INVALID|You're not an admin|
|
|
||||||
|USER_ID_INVALID|The provided user ID is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -82,3 +71,14 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.editBanned({channel=InputChannel, user_id=InputUser, banned_rights=ChannelBannedRights, })
|
Updates = channels.editBanned({channel=InputChannel, user_id=InputUser, banned_rights=ChannelBannedRights, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|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|
|
||||||
|
|USER_ADMIN_INVALID|You're not an admin|
|
||||||
|
|USER_ID_INVALID|The provided user ID is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Edit the photo of a supergroup/channel
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
||||||
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new photo|
|
|photo|[InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new photo|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -21,15 +21,6 @@ Edit the photo of a supergroup/channel
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|PHOTO_INVALID|Photo invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -77,3 +68,12 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.editPhoto({channel=InputChannel, photo=InputChatPhoto, })
|
Updates = channels.editPhoto({channel=InputChannel, photo=InputChatPhoto, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|PHOTO_INVALID|Photo invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Edit the title of a supergroup/channel
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|The new channel/supergroup title|
|
|title|[string](../types/string.md) | Yes|The new channel/supergroup title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -21,15 +21,6 @@ Edit the title of a supergroup/channel
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -77,3 +68,12 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.editTitle({channel=InputChannel, title='string', })
|
Updates = channels.editTitle({channel=InputChannel, title='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,15 +20,6 @@ Export the invite link of a channel
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|INVITE_HASH_EXPIRED|The invite link has expired|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -74,3 +65,12 @@ Or, if you're into Lua:
|
|||||||
ExportedChatInvite = channels.exportInvite({channel=InputChannel, })
|
ExportedChatInvite = channels.exportInvite({channel=InputChannel, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|INVITE_HASH_EXPIRED|The invite link has expired|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ Get the link of a message in a channel
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|id|[CLICK ME int](../types/int.md) | Yes|The ID of the message|
|
|id|[int](../types/int.md) | Yes|The ID of the message|
|
||||||
|grouped|[CLICK ME Bool](../types/Bool.md) | Yes|Is this an album?|
|
|grouped|[Bool](../types/Bool.md) | Yes|Is this an album?|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [ExportedMessageLink](../types/ExportedMessageLink.md)
|
### Return type: [ExportedMessageLink](../types/ExportedMessageLink.md)
|
||||||
@ -22,13 +22,6 @@ Get the link of a message in a channel
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHANNEL_INVALID|The provided channel is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +62,10 @@ Or, if you're into Lua:
|
|||||||
ExportedMessageLink = channels.exportMessageLink({channel=InputChannel, id=int, grouped=Bool, })
|
ExportedMessageLink = channels.exportMessageLink({channel=InputChannel, id=int, grouped=Bool, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,12 +13,12 @@ Get admin log of a channel/supergroup
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|q|[CLICK ME string](../types/string.md) | Yes|Search query|
|
|q|[string](../types/string.md) | Yes|Search query|
|
||||||
|events\_filter|[CLICK ME ChannelAdminLogEventsFilter](../types/ChannelAdminLogEventsFilter.md) | Optional|Event filter|
|
|events\_filter|[ChannelAdminLogEventsFilter](../types/ChannelAdminLogEventsFilter.md) | Optional|Event filter|
|
||||||
|admins|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|Fetch only actions from these admins|
|
|admins|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|Fetch only actions from these admins|
|
||||||
|max\_id|[CLICK ME long](../types/long.md) | Yes|Maximum message ID to fetch|
|
|max\_id|[long](../types/long.md) | Yes|Maximum message ID to fetch|
|
||||||
|min\_id|[CLICK ME long](../types/long.md) | Yes|Minimum message ID to fetch|
|
|min\_id|[long](../types/long.md) | Yes|Minimum message ID to fetch|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|Number of results to fetch|
|
|limit|[int](../types/int.md) | Yes|Number of results to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [channels\_AdminLogResults](../types/channels_AdminLogResults.md)
|
### Return type: [channels\_AdminLogResults](../types/channels_AdminLogResults.md)
|
||||||
@ -26,15 +26,6 @@ Get admin log of a channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -83,3 +74,12 @@ Or, if you're into Lua:
|
|||||||
channels_AdminLogResults = channels.getAdminLog({channel=InputChannel, q='string', events_filter=ChannelAdminLogEventsFilter, admins={InputUser}, max_id=long, min_id=long, limit=int, })
|
channels_AdminLogResults = channels.getAdminLog({channel=InputChannel, q='string', events_filter=ChannelAdminLogEventsFilter, admins={InputUser}, max_id=long, min_id=long, limit=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,15 +20,6 @@ Get info about multiple channels/supergroups
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|NEED_CHAT_INVALID|The provided chat is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -74,3 +65,12 @@ Or, if you're into Lua:
|
|||||||
messages_Chats = channels.getChannels({id={InputChannel}, })
|
messages_Chats = channels.getChannels({id={InputChannel}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||||
|
|NEED_CHAT_INVALID|The provided chat is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,15 +21,6 @@ Get channel/supergroup messages
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|MESSAGE_IDS_EMPTY|No message ids were provided|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -77,3 +68,12 @@ Or, if you're into Lua:
|
|||||||
messages_Messages = channels.getMessages({channel=InputChannel, id={InputMessage}, })
|
messages_Messages = channels.getMessages({channel=InputChannel, id={InputMessage}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||||
|
|MESSAGE_IDS_EMPTY|No message ids were provided|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,17 +21,6 @@ Get info about a certain channel/supergroup participant
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
|
||||||
|USER_ID_INVALID|The provided user ID is invalid|
|
|
||||||
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -79,3 +68,14 @@ Or, if you're into Lua:
|
|||||||
channels_ChannelParticipant = channels.getParticipant({channel=InputChannel, user_id=InputUser, })
|
channels_ChannelParticipant = channels.getParticipant({channel=InputChannel, user_id=InputUser, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|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|
|
||||||
|
|USER_ID_INVALID|The provided user ID is invalid|
|
||||||
|
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@ Get channel/supergroup participants (you should use `$MadelineProto->get_pwr_cha
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
||||||
|filter|[CLICK ME ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|Member filter|
|
|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes|Member filter|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|Offset|
|
|offset|[int](../types/int.md) | Yes|Offset|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|Limit|
|
|limit|[int](../types/int.md) | Yes|Limit|
|
||||||
|hash|[CLICK ME int](../types/int.md) | Yes|$MadelineProto->gen_vector_hash(ids of previously fetched participant IDs)|
|
|hash|[int](../types/int.md) | Yes|$MadelineProto->gen_vector_hash(ids of previously fetched participant IDs)|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md)
|
||||||
@ -24,17 +24,6 @@ Get channel/supergroup participants (you should use `$MadelineProto->get_pwr_cha
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
|
||||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
|
||||||
|Timeout|A timeout occurred while fetching data from the bot|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -88,3 +77,14 @@ Or, if you're into Lua:
|
|||||||
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, hash=int, })
|
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, hash=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|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|
|
||||||
|
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||||
|
|Timeout|A timeout occurred while fetching data from the bot|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,28 +21,6 @@ Add users to channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
|
||||||
|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|
|
||||||
|USER_BLOCKED|User blocked|
|
|
||||||
|USER_BOT|Bots can only be admins in channels.|
|
|
||||||
|USER_ID_INVALID|The provided user ID is invalid|
|
|
||||||
|USER_KICKED|This user was kicked from this supergroup/channel|
|
|
||||||
|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|
|
||||||
|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|
|
||||||
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|
|
||||||
|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups|
|
|
||||||
|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -81,3 +59,25 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.inviteToChannel({channel=InputChannel, users={InputUser}, })
|
Updates = channels.inviteToChannel({channel=InputChannel, users={InputUser}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
||||||
|
|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|
||||||
|
|USER_BLOCKED|User blocked|
|
||||||
|
|USER_BOT|Bots can only be admins in channels.|
|
||||||
|
|USER_ID_INVALID|The provided user ID is invalid|
|
||||||
|
|USER_KICKED|This user was kicked from this supergroup/channel|
|
||||||
|
|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|
||||||
|
|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|
||||||
|
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|
||||||
|
|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups|
|
||||||
|
|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,15 +20,6 @@ Join a channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -65,3 +56,12 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.joinChannel({channel=InputChannel, })
|
Updates = channels.joinChannel({channel=InputChannel, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||||
|
|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,17 +20,6 @@ Leave a channel/supergroup
|
|||||||
### Can bots use this method: **YES**
|
### 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|
|
|
||||||
|CHANNEL_PUBLIC_GROUP_NA|channel/supergroup not available|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -76,3 +65,14 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.leaveChannel({channel=InputChannel, })
|
Updates = channels.leaveChannel({channel=InputChannel, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|CHANNEL_PUBLIC_GROUP_NA|channel/supergroup not available|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Mark channel/supergroup history as read
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message ID to mark as read|
|
|max\_id|[int](../types/int.md) | Yes|Maximum message ID to mark as read|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,14 +21,6 @@ Mark channel/supergroup history as read
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -67,3 +59,11 @@ Or, if you're into Lua:
|
|||||||
Bool = channels.readHistory({channel=InputChannel, max_id=int, })
|
Bool = channels.readHistory({channel=InputChannel, max_id=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Mark channel/supergroup messages as read
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|List of message IDs|
|
|id|Array of [int](../types/int.md) | Yes|List of message IDs|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,14 +21,6 @@ Mark channel/supergroup messages as read
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -67,3 +59,11 @@ Or, if you're into Lua:
|
|||||||
Bool = channels.readMessageContents({channel=InputChannel, id={int}, })
|
Bool = channels.readMessageContents({channel=InputChannel, id={int}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ Report a message in a supergroup/channel for spam
|
|||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user that sent the messages|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user that sent the messages|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|The IDs of messages to report|
|
|id|Array of [int](../types/int.md) | Yes|The IDs of messages to report|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -22,14 +22,6 @@ Report a message in a supergroup/channel for spam
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHANNEL_INVALID|The provided channel is invalid|
|
|
||||||
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -70,3 +62,11 @@ Or, if you're into Lua:
|
|||||||
Bool = channels.reportSpam({channel=InputChannel, user_id=InputUser, id={int}, })
|
Bool = channels.reportSpam({channel=InputChannel, user_id=InputUser, id={int}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Set the supergroup/channel stickerpack
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergoup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergoup|
|
||||||
|stickerset|[CLICK ME InputStickerSet](../types/InputStickerSet.md) | Optional|The stickerset|
|
|stickerset|[InputStickerSet](../types/InputStickerSet.md) | Optional|The stickerset|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,14 +21,6 @@ Set the supergroup/channel stickerpack
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHANNEL_INVALID|The provided channel is invalid|
|
|
||||||
|PARTICIPANTS_TOO_FEW|Not enough participants|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -76,3 +68,11 @@ Or, if you're into Lua:
|
|||||||
Bool = channels.setStickers({channel=InputChannel, stickerset=InputStickerSet, })
|
Bool = channels.setStickers({channel=InputChannel, stickerset=InputStickerSet, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|PARTICIPANTS_TOO_FEW|Not enough participants|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Allow or disallow any user to invite users to this channel/supergroup
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|enabled|[CLICK ME Bool](../types/Bool.md) | Yes|Allow or disallow|
|
|enabled|[Bool](../types/Bool.md) | Yes|Allow or disallow|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -21,15 +21,6 @@ Allow or disallow any user to invite users to this channel/supergroup
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|CHAT_NOT_MODIFIED|The pinned message wasn't modified|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -68,3 +59,12 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.toggleInvites({channel=InputChannel, enabled=Bool, })
|
Updates = channels.toggleInvites({channel=InputChannel, enabled=Bool, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Enable or disable hidden history for new channel/supergroup users
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|enabled|[CLICK ME Bool](../types/Bool.md) | Yes|Enable or disable hidden history for new channel/supergroup users|
|
|enabled|[Bool](../types/Bool.md) | Yes|Enable or disable hidden history for new channel/supergroup users|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -13,7 +13,7 @@ Toggle channel signatures
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|enabled|[CLICK ME Bool](../types/Bool.md) | Yes|Enable or disable channel signatures?|
|
|enabled|[Bool](../types/Bool.md) | Yes|Enable or disable channel signatures?|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -21,13 +21,6 @@ Toggle channel signatures
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHANNEL_INVALID|The provided channel is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.toggleSignatures({channel=InputChannel, enabled=Bool, })
|
Updates = channels.toggleSignatures({channel=InputChannel, enabled=Bool, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ Set the pinned message of a channel/supergroup
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|silent|[CLICK ME Bool](../types/Bool.md) | Optional|Pin silently|
|
|silent|[Bool](../types/Bool.md) | Optional|Pin silently|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|id|[CLICK ME int](../types/int.md) | Yes|The ID of the message to pin|
|
|id|[int](../types/int.md) | Yes|The ID of the message to pin|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -22,16 +22,6 @@ Set the pinned message of a channel/supergroup
|
|||||||
### Can bots use this method: **YES**
|
### 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_ID_INVALID|The provided chat id is invalid|
|
|
||||||
|CHAT_NOT_MODIFIED|The pinned message wasn't modified|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -81,3 +71,13 @@ Or, if you're into Lua:
|
|||||||
Updates = channels.updatePinnedMessage({silent=Bool, channel=InputChannel, id=int, })
|
Updates = channels.updatePinnedMessage({silent=Bool, channel=InputChannel, id=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 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_ID_INVALID|The provided chat id is invalid|
|
||||||
|
|CHAT_NOT_MODIFIED|The pinned message wasn't modified|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Update the username of a supergroup/channel
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | Optional|The channel/supergroup|
|
||||||
|username|[CLICK ME string](../types/string.md) | Yes|The new username|
|
|username|[string](../types/string.md) | Yes|The new username|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -21,17 +21,6 @@ Update the username of a supergroup/channel
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHANNEL_INVALID|The provided channel is invalid|
|
|
||||||
|CHANNELS_ADMIN_PUBLIC_TOO_MUCH|You're admin of too many public channels, make some channels private to change the username of this channel|
|
|
||||||
|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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -70,3 +59,14 @@ Or, if you're into Lua:
|
|||||||
Bool = channels.updateUsername({channel=InputChannel, username='string', })
|
Bool = channels.updateUsername({channel=InputChannel, username='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHANNEL_INVALID|The provided channel is invalid|
|
||||||
|
|CHANNELS_ADMIN_PUBLIC_TOO_MUCH|You're admin of too many public channels, make some channels private to change the username of this channel|
|
||||||
|
|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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,13 +20,6 @@ Block a user
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
Bool = contacts.block({id=InputUser, })
|
Bool = contacts.block({id=InputUser, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,13 +20,6 @@ Delete a contact
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
contacts_Link = contacts.deleteContact({id=InputUser, })
|
contacts_Link = contacts.deleteContact({id=InputUser, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,14 +20,6 @@ Delete multiple contacts
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|NEED_MEMBER_INVALID|The provided member is invalid|
|
|
||||||
|Timeout|A timeout occurred while fetching data from the bot|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -64,3 +56,11 @@ Or, if you're into Lua:
|
|||||||
Bool = contacts.deleteContacts({id={InputUser}, })
|
Bool = contacts.deleteContacts({id={InputUser}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|NEED_MEMBER_INVALID|The provided member is invalid|
|
||||||
|
|Timeout|A timeout occurred while fetching data from the bot|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Get blocked users
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|Initially 0, then set to the number of blocked contacts previously fetched|
|
|offset|[int](../types/int.md) | Yes|Initially 0, then set to the number of blocked contacts previously fetched|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|How many blocked contacts to fetch|
|
|limit|[int](../types/int.md) | Yes|How many blocked contacts to fetch|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [contacts\_Blocked](../types/contacts_Blocked.md)
|
### Return type: [contacts\_Blocked](../types/contacts_Blocked.md)
|
||||||
|
@ -12,7 +12,7 @@ Get info about a certain contact
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|hash|[CLICK ME int](../types/int.md) | Yes|$ids is the list ids of previously fetched contacts, `$hash = $MadelineProto->gen_vector_hash($ids);`|
|
|hash|[int](../types/int.md) | Yes|$ids is the list ids of previously fetched contacts, `$hash = $MadelineProto->gen_vector_hash($ids);`|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [contacts\_Contacts](../types/contacts_Contacts.md)
|
### Return type: [contacts\_Contacts](../types/contacts_Contacts.md)
|
||||||
|
@ -12,15 +12,15 @@ Get most used chats
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|correspondents|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch users?|
|
|correspondents|[Bool](../types/Bool.md) | Optional|Fetch users?|
|
||||||
|bots\_pm|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch bots?|
|
|bots\_pm|[Bool](../types/Bool.md) | Optional|Fetch bots?|
|
||||||
|bots\_inline|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch inline bots?|
|
|bots\_inline|[Bool](../types/Bool.md) | Optional|Fetch inline bots?|
|
||||||
|phone\_calls|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch phone calls?|
|
|phone\_calls|[Bool](../types/Bool.md) | Optional|Fetch phone calls?|
|
||||||
|groups|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch groups?|
|
|groups|[Bool](../types/Bool.md) | Optional|Fetch groups?|
|
||||||
|channels|[CLICK ME Bool](../types/Bool.md) | Optional|Fetch channels and supergroups?|
|
|channels|[Bool](../types/Bool.md) | Optional|Fetch channels and supergroups?|
|
||||||
|offset|[CLICK ME int](../types/int.md) | Yes|Initially 0, then `$offset += $contacts_TopPeers['categories']['count'];`|
|
|offset|[int](../types/int.md) | Yes|Initially 0, then `$offset += $contacts_TopPeers['categories']['count'];`|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|How many results to fetch|
|
|limit|[int](../types/int.md) | Yes|How many results to fetch|
|
||||||
|hash|[CLICK ME int](../types/int.md) | Yes|$MadelineProto->gen_vector_hash(previously fetched peer ids);|
|
|hash|[int](../types/int.md) | Yes|$MadelineProto->gen_vector_hash(previously fetched peer ids);|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [contacts\_TopPeers](../types/contacts_TopPeers.md)
|
### Return type: [contacts\_TopPeers](../types/contacts_TopPeers.md)
|
||||||
@ -28,13 +28,6 @@ Get most used chats
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|TYPES_EMPTY|The types field is empty|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -87,3 +80,10 @@ Or, if you're into Lua:
|
|||||||
contacts_TopPeers = contacts.getTopPeers({correspondents=Bool, bots_pm=Bool, bots_inline=Bool, phone_calls=Bool, groups=Bool, channels=Bool, offset=int, limit=int, hash=int, })
|
contacts_TopPeers = contacts.getTopPeers({correspondents=Bool, bots_pm=Bool, bots_inline=Bool, phone_calls=Bool, groups=Bool, channels=Bool, offset=int, limit=int, hash=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|TYPES_EMPTY|The types field is empty|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Import card as contact
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|export\_card|Array of [CLICK ME int](../types/int.md) | Yes|The card|
|
|export\_card|Array of [int](../types/int.md) | Yes|The card|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [User](../types/User.md)
|
### Return type: [User](../types/User.md)
|
||||||
@ -20,14 +20,6 @@ Import card as contact
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|EXPORT_CARD_INVALID|Provided card is invalid|
|
|
||||||
|NEED_MEMBER_INVALID|The provided member is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -64,3 +56,11 @@ Or, if you're into Lua:
|
|||||||
User = contacts.importCard({export_card={int}, })
|
User = contacts.importCard({export_card={int}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|EXPORT_CARD_INVALID|Provided card is invalid|
|
||||||
|
|NEED_MEMBER_INVALID|The provided member is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Add phone number as contact
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|contacts|Array of [CLICK ME InputContact](../types/InputContact.md) | Yes|The numbers to import|
|
|contacts|Array of [InputContact](../types/InputContact.md) | Yes|The numbers to import|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [contacts\_ImportedContacts](../types/contacts_ImportedContacts.md)
|
### Return type: [contacts\_ImportedContacts](../types/contacts_ImportedContacts.md)
|
||||||
|
@ -12,7 +12,7 @@ Reset top peer rating for a certain category/peer
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|category|[CLICK ME TopPeerCategory](../types/TopPeerCategory.md) | Yes|The category |
|
|category|[TopPeerCategory](../types/TopPeerCategory.md) | Yes|The category |
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The peer|
|
||||||
|
|
||||||
|
|
||||||
@ -21,13 +21,6 @@ Reset top peer rating for a certain category/peer
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
Bool = contacts.resetTopPeerRating({category=TopPeerCategory, peer=InputPeer, })
|
Bool = contacts.resetTopPeerRating({category=TopPeerCategory, peer=InputPeer, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Search contacts
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|q|[CLICK ME string](../types/string.md) | Yes|The search query|
|
|q|[string](../types/string.md) | Yes|The search query|
|
||||||
|limit|[CLICK ME int](../types/int.md) | Yes|How many results should be returned|
|
|limit|[int](../types/int.md) | Yes|How many results should be returned|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [contacts\_Found](../types/contacts_Found.md)
|
### Return type: [contacts\_Found](../types/contacts_Found.md)
|
||||||
@ -21,15 +21,6 @@ Search contacts
|
|||||||
### Can bots use this method: **NO**
|
### 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|
|
|
||||||
|Timeout|A timeout occurred while fetching data from the bot|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -68,3 +59,12 @@ Or, if you're into Lua:
|
|||||||
contacts_Found = contacts.search({q='string', limit=int, })
|
contacts_Found = contacts.search({q='string', limit=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|QUERY_TOO_SHORT|The query string is too short|
|
||||||
|
|SEARCH_QUERY_EMPTY|The search query is empty|
|
||||||
|
|Timeout|A timeout occurred while fetching data from the bot|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,13 +20,6 @@ Unblock a user
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
Bool = contacts.unblock({id=InputUser, })
|
Bool = contacts.unblock({id=InputUser, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Get the changelog of this app
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|prev\_app\_version|[CLICK ME string](../types/string.md) | Yes|Previous app version|
|
|prev\_app\_version|[string](../types/string.md) | Yes|Previous app version|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
|
@ -15,13 +15,6 @@ Get CDN configuration
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|Timeout|A timeout occurred while fetching data from the bot|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -65,3 +58,10 @@ Or, if you're into Lua:
|
|||||||
CdnConfig = help.getCdnConfig({})
|
CdnConfig = help.getCdnConfig({})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|Timeout|A timeout occurred while fetching data from the bot|
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,13 +15,6 @@ Get server configuration
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|Timeout|A timeout occurred while fetching data from the bot|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -65,3 +58,10 @@ Or, if you're into Lua:
|
|||||||
Config = help.getConfig({})
|
Config = help.getConfig({})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|Timeout|A timeout occurred while fetching data from the bot|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Get recent t.me URLs
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|referer|[CLICK ME string](../types/string.md) | Yes|Referrer|
|
|referer|[string](../types/string.md) | Yes|Referrer|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [help\_RecentMeUrls](../types/help_RecentMeUrls.md)
|
### Return type: [help\_RecentMeUrls](../types/help_RecentMeUrls.md)
|
||||||
|
@ -12,7 +12,7 @@ Log data for developer of this app
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|events|Array of [CLICK ME InputAppEvent](../types/InputAppEvent.md) | Yes|Event list|
|
|events|Array of [InputAppEvent](../types/InputAppEvent.md) | Yes|Event list|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -12,8 +12,8 @@ Set the update status of webhook
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|pending\_updates\_count|[CLICK ME int](../types/int.md) | Yes|Pending update count|
|
|pending\_updates\_count|[int](../types/int.md) | Yes|Pending update count|
|
||||||
|message|[CLICK ME string](../types/string.md) | Yes|Message|
|
|message|[string](../types/string.md) | Yes|Message|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -12,14 +12,14 @@ Initializes connection and save information on the user's device and application
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|api\_id|[CLICK ME int](../types/int.md) | Yes|Application identifier|
|
|api\_id|[int](../types/int.md) | Yes|Application identifier|
|
||||||
|device\_model|[CLICK ME string](../types/string.md) | Yes|Device model|
|
|device\_model|[string](../types/string.md) | Yes|Device model|
|
||||||
|system\_version|[CLICK ME string](../types/string.md) | Yes|System version|
|
|system\_version|[string](../types/string.md) | Yes|System version|
|
||||||
|app\_version|[CLICK ME string](../types/string.md) | Yes|App version|
|
|app\_version|[string](../types/string.md) | Yes|App version|
|
||||||
|system\_lang\_code|[CLICK ME string](../types/string.md) | Yes|Language code|
|
|system\_lang\_code|[string](../types/string.md) | Yes|Language code|
|
||||||
|lang\_pack|[CLICK ME string](../types/string.md) | Yes|Language pack to use|
|
|lang\_pack|[string](../types/string.md) | Yes|Language pack to use|
|
||||||
|lang\_code|[CLICK ME string](../types/string.md) | Yes|Language code to set|
|
|lang\_code|[string](../types/string.md) | Yes|Language code to set|
|
||||||
|query|[CLICK ME !X](../types/!X.md) | Yes|Nested query|
|
|query|[!X](../types/!X.md) | Yes|Nested query|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [X](../types/X.md)
|
### Return type: [X](../types/X.md)
|
||||||
@ -27,14 +27,6 @@ Initializes connection and save information on the user's device and application
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CONNECTION_LAYER_INVALID|Layer invalid|
|
|
||||||
|INPUT_FETCH_FAIL|Failed deserializing TL payload|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -94,3 +86,11 @@ Or, if you're into Lua:
|
|||||||
X = initConnection({api_id=int, device_model='string', system_version='string', app_version='string', system_lang_code='string', lang_pack='string', lang_code='string', query=!X, })
|
X = initConnection({api_id=int, device_model='string', system_version='string', app_version='string', system_lang_code='string', lang_pack='string', lang_code='string', query=!X, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CONNECTION_LAYER_INVALID|Layer invalid|
|
||||||
|
|INPUT_FETCH_FAIL|Failed deserializing TL payload|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Invokes a query after successfull completion of one of the previous queries.
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|msg\_id|[CLICK ME long](../types/long.md) | Yes|Message identifier on which a current query depends|
|
|msg\_id|[long](../types/long.md) | Yes|Message identifier on which a current query depends|
|
||||||
|query|[CLICK ME !X](../types/!X.md) | Yes|The query itself|
|
|query|[!X](../types/!X.md) | Yes|The query itself|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [X](../types/X.md)
|
### Return type: [X](../types/X.md)
|
||||||
|
@ -12,8 +12,8 @@ Result type returned by a current query.
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|msg\_ids|Array of [CLICK ME long](../types/long.md) | Yes|List of messages on which a current query depends|
|
|msg\_ids|Array of [long](../types/long.md) | Yes|List of messages on which a current query depends|
|
||||||
|query|[CLICK ME !X](../types/!X.md) | Yes|The query itself|
|
|query|[!X](../types/!X.md) | Yes|The query itself|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [X](../types/X.md)
|
### Return type: [X](../types/X.md)
|
||||||
|
@ -12,8 +12,8 @@ Invoke this method with layer X
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|layer|[CLICK ME int](../types/int.md) | Yes|The layer version|
|
|layer|[int](../types/int.md) | Yes|The layer version|
|
||||||
|query|[CLICK ME !X](../types/!X.md) | Yes|The query|
|
|query|[!X](../types/!X.md) | Yes|The query|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [X](../types/X.md)
|
### Return type: [X](../types/X.md)
|
||||||
@ -21,23 +21,6 @@ Invoke this method with layer X
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|AUTH_BYTES_INVALID|The provided authorization is invalid|
|
|
||||||
|CDN_METHOD_INVALID|You can't call this method in a CDN DC|
|
|
||||||
|CONNECTION_API_ID_INVALID|The provided API id is invalid|
|
|
||||||
|CONNECTION_DEVICE_MODEL_EMPTY|Device model empty|
|
|
||||||
|CONNECTION_LANG_PACK_INVALID|Language pack invalid|
|
|
||||||
|CONNECTION_NOT_INITED|Connection not initialized|
|
|
||||||
|CONNECTION_SYSTEM_EMPTY|Connection system empty|
|
|
||||||
|INPUT_LAYER_INVALID|The provided layer is invalid|
|
|
||||||
|INVITE_HASH_EXPIRED|The invite link has expired|
|
|
||||||
|NEED_MEMBER_INVALID|The provided member is invalid|
|
|
||||||
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -85,3 +68,20 @@ Or, if you're into Lua:
|
|||||||
X = invokeWithLayer({layer=int, query=!X, })
|
X = invokeWithLayer({layer=int, query=!X, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|AUTH_BYTES_INVALID|The provided authorization is invalid|
|
||||||
|
|CDN_METHOD_INVALID|You can't call this method in a CDN DC|
|
||||||
|
|CONNECTION_API_ID_INVALID|The provided API id is invalid|
|
||||||
|
|CONNECTION_DEVICE_MODEL_EMPTY|Device model empty|
|
||||||
|
|CONNECTION_LANG_PACK_INVALID|Language pack invalid|
|
||||||
|
|CONNECTION_NOT_INITED|Connection not initialized|
|
||||||
|
|CONNECTION_SYSTEM_EMPTY|Connection system empty|
|
||||||
|
|INPUT_LAYER_INVALID|The provided layer is invalid|
|
||||||
|
|INVITE_HASH_EXPIRED|The invite link has expired|
|
||||||
|
|NEED_MEMBER_INVALID|The provided member is invalid|
|
||||||
|
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Invoke with method without returning updates in the socket
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|query|[CLICK ME !X](../types/!X.md) | Yes|The query|
|
|query|[!X](../types/!X.md) | Yes|The query|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [X](../types/X.md)
|
### Return type: [X](../types/X.md)
|
||||||
|
@ -12,7 +12,7 @@ Get language pack updates
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|from\_version|[CLICK ME int](../types/int.md) | Yes|Previous version|
|
|from\_version|[int](../types/int.md) | Yes|Previous version|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [LangPackDifference](../types/LangPackDifference.md)
|
### Return type: [LangPackDifference](../types/LangPackDifference.md)
|
||||||
@ -20,13 +20,6 @@ Get language pack updates
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
LangPackDifference = langpack.getDifference({from_version=int, })
|
LangPackDifference = langpack.getDifference({from_version=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Get language pack
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|lang\_code|[CLICK ME string](../types/string.md) | Yes|Language code|
|
|lang\_code|[string](../types/string.md) | Yes|Language code|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [LangPackDifference](../types/LangPackDifference.md)
|
### Return type: [LangPackDifference](../types/LangPackDifference.md)
|
||||||
@ -20,13 +20,6 @@ Get language pack
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -63,3 +56,10 @@ Or, if you're into Lua:
|
|||||||
LangPackDifference = langpack.getLangPack({lang_code='string', })
|
LangPackDifference = langpack.getLangPack({lang_code='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,13 +15,6 @@ Get available languages
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -56,3 +49,10 @@ Or, if you're into Lua:
|
|||||||
Vector_of_LangPackLanguage = langpack.getLanguages({})
|
Vector_of_LangPackLanguage = langpack.getLanguages({})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Get language pack strings
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|lang\_code|[CLICK ME string](../types/string.md) | Yes|Language code|
|
|lang\_code|[string](../types/string.md) | Yes|Language code|
|
||||||
|keys|Array of [CLICK ME string](../types/string.md) | Yes|Keys|
|
|keys|Array of [string](../types/string.md) | Yes|Keys|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Vector\_of\_LangPackString](../types/LangPackString.md)
|
### Return type: [Vector\_of\_LangPackString](../types/LangPackString.md)
|
||||||
@ -21,13 +21,6 @@ Get language pack strings
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -66,3 +59,10 @@ Or, if you're into Lua:
|
|||||||
Vector_of_LangPackString = langpack.getStrings({lang_code='string', keys={'string'}, })
|
Vector_of_LangPackString = langpack.getStrings({lang_code='string', keys={'string'}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
|||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to invite users|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat where to invite users|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to invite|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user to invite|
|
||||||
|fwd\_limit|[CLICK ME int](../types/int.md) | Yes|Number of old messages the user will see|
|
|fwd\_limit|[int](../types/int.md) | Yes|Number of old messages the user will see|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -22,21 +22,6 @@ Add a user to a normal chat (use channels->inviteToChannel for supergroups)
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
|
||||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
|
||||||
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|USER_ALREADY_PARTICIPANT|The user is already in the group|
|
|
||||||
|USER_ID_INVALID|The provided user ID is invalid|
|
|
||||||
|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|
|
||||||
|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|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -77,3 +62,18 @@ Or, if you're into Lua:
|
|||||||
Updates = messages.addChatUser({chat_id=InputPeer, user_id=InputUser, fwd_limit=int, })
|
Updates = messages.addChatUser({chat_id=InputPeer, user_id=InputUser, fwd_limit=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||||
|
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||||
|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|USER_ALREADY_PARTICIPANT|The user is already in the group|
|
||||||
|
|USER_ID_INVALID|The provided user ID is invalid|
|
||||||
|
|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|
||||||
|
|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|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Check if an invitation link is valid
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|hash|[CLICK ME string](../types/string.md) | Yes|The invite link in t.me/joinchat/aflakf format|
|
|hash|[string](../types/string.md) | Yes|The invite link in t.me/joinchat/aflakf format|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [ChatInvite](../types/ChatInvite.md)
|
### Return type: [ChatInvite](../types/ChatInvite.md)
|
||||||
@ -20,15 +20,6 @@ Check if an invitation link is valid
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|INVITE_HASH_EMPTY|The invite hash is empty|
|
|
||||||
|INVITE_HASH_EXPIRED|The invite link has expired|
|
|
||||||
|INVITE_HASH_INVALID|The invite hash is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -65,3 +56,12 @@ Or, if you're into Lua:
|
|||||||
ChatInvite = messages.checkChatInvite({hash='string', })
|
ChatInvite = messages.checkChatInvite({hash='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|INVITE_HASH_EMPTY|The invite hash is empty|
|
||||||
|
|INVITE_HASH_EXPIRED|The invite link has expired|
|
||||||
|
|INVITE_HASH_INVALID|The invite hash is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Clear all recent stickers
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|attached|[CLICK ME Bool](../types/Bool.md) | Optional|Clear recent stickers attached to images?|
|
|attached|[Bool](../types/Bool.md) | Optional|Clear recent stickers attached to images?|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
|
@ -13,7 +13,7 @@ Create a chat (not supergroup)
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|The users to add to the chat|
|
|users|Array of [Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Yes|The users to add to the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|The new chat's title|
|
|title|[string](../types/string.md) | Yes|The new chat's title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -21,14 +21,6 @@ Create a chat (not supergroup)
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|USERS_TOO_FEW|Not enough users (to create a chat, for example)|
|
|
||||||
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -67,3 +59,11 @@ Or, if you're into Lua:
|
|||||||
Updates = messages.createChat({users={InputUser}, title='string', })
|
Updates = messages.createChat({users={InputUser}, title='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|USERS_TOO_FEW|Not enough users (to create a chat, for example)|
|
||||||
|
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,15 +21,6 @@ Delete a user from a chat (not supergroup)
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -77,3 +68,12 @@ Or, if you're into Lua:
|
|||||||
Updates = messages.deleteChatUser({chat_id=InputPeer, user_id=InputUser, })
|
Updates = messages.deleteChatUser({chat_id=InputPeer, user_id=InputUser, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ Delete chat history
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|just\_clear|[CLICK ME Bool](../types/Bool.md) | Optional|Only clear it from your side|
|
|just\_clear|[Bool](../types/Bool.md) | Optional|Only clear it from your side|
|
||||||
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it|
|
|peer|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|Where to clear it|
|
||||||
|max\_id|[CLICK ME int](../types/int.md) | Yes|Maximum message id of messages to delete|
|
|max\_id|[int](../types/int.md) | Yes|Maximum message id of messages to delete|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
### Return type: [messages\_AffectedHistory](../types/messages_AffectedHistory.md)
|
||||||
@ -22,13 +22,6 @@ Delete chat history
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +62,10 @@ Or, if you're into Lua:
|
|||||||
messages_AffectedHistory = messages.deleteHistory({just_clear=Bool, peer=InputPeer, max_id=int, })
|
messages_AffectedHistory = messages.deleteHistory({just_clear=Bool, peer=InputPeer, max_id=int, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ Delete messages
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|revoke|[CLICK ME Bool](../types/Bool.md) | Optional|Delete the messages for everyone?|
|
|revoke|[Bool](../types/Bool.md) | Optional|Delete the messages for everyone?|
|
||||||
|id|Array of [CLICK ME int](../types/int.md) | Yes|IDs of messages to delete, use channels->deleteMessages for supergroups|
|
|id|Array of [int](../types/int.md) | Yes|IDs of messages to delete, use channels->deleteMessages for supergroups|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
### Return type: [messages\_AffectedMessages](../types/messages_AffectedMessages.md)
|
||||||
@ -21,13 +21,6 @@ Delete messages
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -75,3 +68,10 @@ Or, if you're into Lua:
|
|||||||
messages_AffectedMessages = messages.deleteMessages({revoke=Bool, id={int}, })
|
messages_AffectedMessages = messages.deleteMessages({revoke=Bool, id={int}, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ Edit admin permissions
|
|||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat ID (no supergroups)|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The chat ID (no supergroups)|
|
||||||
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user ID|
|
|user\_id|[Username, chat ID, Update, Message or InputUser](../types/InputUser.md) | Optional|The user ID|
|
||||||
|is\_admin|[CLICK ME Bool](../types/Bool.md) | Yes|Should the user be admin?|
|
|is\_admin|[Bool](../types/Bool.md) | Yes|Should the user be admin?|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -22,13 +22,6 @@ Edit admin permissions
|
|||||||
### Can bots use this method: **NO**
|
### Can bots use this method: **NO**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +62,10 @@ Or, if you're into Lua:
|
|||||||
Bool = messages.editChatAdmin({chat_id=InputPeer, user_id=InputUser, is_admin=Bool, })
|
Bool = messages.editChatAdmin({chat_id=InputPeer, user_id=InputUser, is_admin=Bool, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Edit the photo of a normal chat (not supergroup)
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The ID of the chat|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The ID of the chat|
|
||||||
|photo|[CLICK ME InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new phto|
|
|photo|[InputChatPhoto](../types/InputChatPhoto.md) | Optional|The new phto|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -21,17 +21,6 @@ Edit the photo of a normal chat (not supergroup)
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
|
||||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
|
||||||
|INPUT_FETCH_FAIL|Failed deserializing TL payload|
|
|
||||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
|
||||||
|PHOTO_EXT_INVALID|The extension of the photo is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -79,3 +68,14 @@ Or, if you're into Lua:
|
|||||||
Updates = messages.editChatPhoto({chat_id=InputPeer, photo=InputChatPhoto, })
|
Updates = messages.editChatPhoto({chat_id=InputPeer, photo=InputChatPhoto, })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||||
|
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||||
|
|INPUT_FETCH_FAIL|Failed deserializing TL payload|
|
||||||
|
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||||
|
|PHOTO_EXT_INVALID|The extension of the photo is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Edit the title of a normal chat (not supergroup)
|
|||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The ID of the chat|
|
|chat\_id|[Username, chat ID, Update, Message or InputPeer](../types/InputPeer.md) | Optional|The ID of the chat|
|
||||||
|title|[CLICK ME string](../types/string.md) | Yes|The new title|
|
|title|[string](../types/string.md) | Yes|The new title|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Updates](../types/Updates.md)
|
### Return type: [Updates](../types/Updates.md)
|
||||||
@ -21,14 +21,6 @@ Edit the title of a normal chat (not supergroup)
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
|
||||||
|NEED_CHAT_INVALID|The provided chat is invalid|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -76,3 +68,11 @@ Or, if you're into Lua:
|
|||||||
Updates = messages.editChatTitle({chat_id=InputPeer, title='string', })
|
Updates = messages.editChatTitle({chat_id=InputPeer, title='string', })
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||||
|
|NEED_CHAT_INVALID|The provided chat is invalid|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,14 +12,14 @@ Edit a sent inline message
|
|||||||
|
|
||||||
| Name | Type | Required | Description |
|
| Name | Type | Required | Description |
|
||||||
|----------|---------------|----------|-------------|
|
|----------|---------------|----------|-------------|
|
||||||
|no\_webpage|[CLICK ME Bool](../types/Bool.md) | Optional|Disable webpage preview|
|
|no\_webpage|[Bool](../types/Bool.md) | Optional|Disable webpage preview|
|
||||||
|stop\_geo\_live|[CLICK ME Bool](../types/Bool.md) | Optional|Stop live location|
|
|stop\_geo\_live|[Bool](../types/Bool.md) | Optional|Stop live location|
|
||||||
|id|[CLICK ME InputBotInlineMessageID](../types/InputBotInlineMessageID.md) | Yes|The message ID|
|
|id|[InputBotInlineMessageID](../types/InputBotInlineMessageID.md) | Yes|The message ID|
|
||||||
|message|[CLICK ME string](../types/string.md) | Optional|The new message|
|
|message|[string](../types/string.md) | Optional|The new message|
|
||||||
|reply\_markup|[CLICK ME ReplyMarkup](../types/ReplyMarkup.md) | Optional|The new keyboard|
|
|reply\_markup|[ReplyMarkup](../types/ReplyMarkup.md) | Optional|The new keyboard|
|
||||||
|entities|Array of [CLICK ME MessageEntity](../types/MessageEntity.md) | Optional|The new entities (for styled text)|
|
|entities|Array of [MessageEntity](../types/MessageEntity.md) | Optional|The new entities (for styled text)|
|
||||||
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
|parse\_mode| [string](../types/string.md) | Optional |Whether to parse HTML or Markdown markup in the message|
|
||||||
|geo\_point|[CLICK ME InputGeoPoint](../types/InputGeoPoint.md) | Optional|The new location|
|
|geo\_point|[InputGeoPoint](../types/InputGeoPoint.md) | Optional|The new location|
|
||||||
|
|
||||||
|
|
||||||
### Return type: [Bool](../types/Bool.md)
|
### Return type: [Bool](../types/Bool.md)
|
||||||
@ -27,14 +27,6 @@ Edit a sent inline message
|
|||||||
### Can bots use this method: **YES**
|
### Can bots use this method: **YES**
|
||||||
|
|
||||||
|
|
||||||
### Errors this method can return:
|
|
||||||
|
|
||||||
| Error | Description |
|
|
||||||
|----------|---------------|
|
|
||||||
|MESSAGE_ID_INVALID|The provided message id is invalid|
|
|
||||||
|MESSAGE_NOT_MODIFIED|The message text has not changed|
|
|
||||||
|
|
||||||
|
|
||||||
### MadelineProto Example:
|
### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
@ -124,3 +116,11 @@ You can also use normal markdown, note that to create mentions you must use the
|
|||||||
```
|
```
|
||||||
|
|
||||||
MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php).
|
MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php).
|
||||||
|
### Errors this method can return:
|
||||||
|
|
||||||
|
| Error | Description |
|
||||||
|
|----------|---------------|
|
||||||
|
|MESSAGE_ID_INVALID|The provided message id is invalid|
|
||||||
|
|MESSAGE_NOT_MODIFIED|The message text has not changed|
|
||||||
|
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user