mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 20:54:42 +01:00
Bugfixes and docufixes
This commit is contained in:
parent
a022198396
commit
8c5de357d0
19
README.md
19
README.md
@ -148,19 +148,24 @@ You can find examples for nearly every MadelineProto function in
|
||||
|
||||
### Storing sessions
|
||||
|
||||
VERY IMPORTANT: An istance of MadelineProto MUST be serialized every time an update is fetched, and on shutdown. To serialize MadelineProto to a file, you must use the `\danog\MadelineProto\Serialization` class:
|
||||
VERY IMPORTANT: An istance of MadelineProto MUST be serialized every time an update is fetched, and on shutdown. To serialize MadelineProto to a file, do the following:
|
||||
|
||||
When loading an already logged in session:
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
|
||||
// Do stuff
|
||||
\danog\MadelineProto\Serialization::serialize('session.madeline', $MadelineProto);
|
||||
// or
|
||||
$MadelineProto->serialize('session.madeline');
|
||||
$MadelineProto->serialize();
|
||||
```
|
||||
|
||||
This way, if the scripts shutsdown normally (without ctrl+c or fatal errors/exceptions), the session will also be serialized automatically.
|
||||
When loading a new session:
|
||||
```
|
||||
$MadelineProto = new \danog\MadelineProto\API($settings);
|
||||
$MadelineProto->session = 'session.madeline';
|
||||
$MadelineProto->serialize();
|
||||
```
|
||||
|
||||
It is still recommended to serialize the session at every update.
|
||||
If the scripts shutsdown normally (without ctrl+c or fatal errors/exceptions), the session will be serialized automatically.
|
||||
|
||||
It is **strongly** recommended to serialize the session with `$MadelineProto->serialize()` after every `$MadelineProto->get_updates()`.
|
||||
|
||||
|
||||
## Methods
|
||||
|
@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|USERNAME_INVALID|The provided username is not valid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PRIVACY_KEY_INVALID|The privacy key is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: account.getTmpPassword parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|TOKEN_INVALID|The provided token is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|HASH_INVALID|The provided hash is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|HASH_INVALID|The provided hash is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|TTL_DAYS_INVALID|The provided TTL is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PRIVACY_KEY_INVALID|The privacy key is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|TOKEN_INVALID|The provided token is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|ABOUT_TOO_LONG|The provided bio is too long|
|
||||
|FIRSTNAME_INVALID|The first name is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|USERNAME_INVALID|The provided username is not valid|
|
||||
|USERNAME_NOT_MODIFIED|The username was not modified|
|
||||
|USERNAME_OCCUPIED|The provided username is already occupied|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid|
|
||||
|INPUT_REQUEST_TOO_LONG|The request is too big|
|
||||
|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|DC_ID_INVALID|The provided DC ID is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|AUTH_BYTES_INVALID|The provided authorization is invalid|
|
||||
|USER_ID_INVALID|The provided user ID is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CODE_EMPTY|The provided code is empty|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PASSWORD_EMPTY|The provided password is empty|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PHONE_NUMBER_INVALID|The phone number is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|MESSAGE_EMPTY|The provided message is empty|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: bots.answerWebhookJSONQuery parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|QUERY_ID_INVALID|The query ID is invalid|
|
||||
|USER_BOT_INVALID|This method can only be called by a bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: bots.sendCustomRequest parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|USER_BOT_INVALID|This method can only be called by a bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example
|
||||
### 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.|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example
|
||||
### 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.|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,17 @@ description: channels.editBanned parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|PHOTO_INVALID|Photo invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|CHAT_NOT_MODIFIED|The pinned message wasn't modified|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -24,6 +24,15 @@ description: channels.getAdminLog parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|USER_ID_INVALID|The provided user ID is invalid|
|
||||
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|USER_CREATOR|You can't leave this channel, because you're its creator|
|
||||
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: channels.readMessageContents parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: channels.setStickers parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|CHAT_NOT_MODIFIED|The pinned message wasn't modified|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHANNEL_INVALID|The provided channel is invalid|
|
||||
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|
||||
|USERNAME_INVALID|The provided username is not valid|
|
||||
|USERNAME_OCCUPIED|The provided username is already occupied|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -26,6 +26,13 @@ description: contacts.getTopPeers parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|TYPES_EMPTY|The types field is empty|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CONTACT_ID_INVALID|The provided contact ID is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -13,6 +13,13 @@ description: help.getCdnConfig parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -25,6 +25,14 @@ description: initConnection parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example
|
||||
### 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_LANG_PACK_INVALID|Language pack invalid|
|
||||
|INPUT_LAYER_INVALID|The provided layer is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: langpack.getDifference parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: langpack.getLangPack parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -13,6 +13,13 @@ description: langpack.getLanguages parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: langpack.getStrings parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|LANG_PACK_INVALID|The provided language pack is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example
|
||||
### 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.|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example
|
||||
### 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.|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -26,6 +26,22 @@ description: messages.editMessage parameters, return type and example
|
||||
### 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|
|
||||
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
||||
|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.|
|
||||
|MESSAGE_EMPTY|The provided message is empty|
|
||||
|MESSAGE_ID_INVALID|The provided message id is invalid|
|
||||
|MESSAGE_NOT_MODIFIED|The message text has not changed|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|
||||
|MESSAGE_AUTHOR_REQUIRED|Message author required|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: messages.faveSticker parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|STICKER_ID_INVALID|The provided sticker ID is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||
|MESSAGE_ID_INVALID|The provided message id is invalid|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|YOU_BLOCKED_USER|You blocked this user|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example
|
||||
### 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|
|
||||
|CHAT_ID_INVALID|The provided chat id is invalid|
|
||||
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|
||||
|MEDIA_EMPTY|The provided media object is invalid|
|
||||
|MESSAGE_ID_INVALID|The provided message id is invalid|
|
||||
|MESSAGE_IDS_EMPTY|No message ids were provided|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|RANDOM_ID_INVALID|A provided random ID is invalid|
|
||||
|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|
||||
|USER_IS_BLOCKED|User is blocked|
|
||||
|USER_IS_BOT|Bots can't send messages to other bots|
|
||||
|YOU_BLOCKED_USER|You blocked this user|
|
||||
|PTS_CHANGE_EMPTY|No PTS change|
|
||||
|RANDOM_ID_DUPLICATE|You provided a random ID that was already used|
|
||||
|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat|
|
||||
|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat|
|
||||
|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.|
|
||||
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|DATA_INVALID|Encrypted data invalid|
|
||||
|MESSAGE_ID_INVALID|The provided message id is invalid|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example
|
||||
### 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|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|USER_ID_INVALID|The provided user ID is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|RANDOM_LENGTH_INVALID|Random length invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example
|
||||
### Can bots use this method: **NO**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|
||||
|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid|
|
||||
|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|SHA256_HASH_INVALID|The provided SHA256 hash is invalid|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example
|
||||
### Can bots use this method: **YES**
|
||||
|
||||
|
||||
### Errors this method can return:
|
||||
|
||||
| Error | Description |
|
||||
|----------|---------------|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|USER_BOT_REQUIRED|This method can only be called by a bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example
|
||||
### 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_ID_INVALID|The provided chat id is invalid|
|
||||
|PEER_ID_INVALID|The provided peer id is invalid|
|
||||
|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.|
|
||||
|Timeout|A timeout occurred while fetching data from the bot|
|
||||
|
||||
|
||||
### Example:
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user