Merge branch 'master' into tests

This commit is contained in:
Dan 2020-11-20 01:55:31 +01:00
commit d215f4b515
18 changed files with 410 additions and 188 deletions

View File

@ -1,149 +0,0 @@
id message
FIRSTNAME_INVALID The first name is invalid
LASTNAME_INVALID The last name is invalid
PHONE_NUMBER_INVALID The phone number is invalid
PHONE_CODE_HASH_EMPTY phone_code_hash is missing
PHONE_CODE_EMPTY phone_code is missing
PHONE_CODE_EXPIRED The confirmation code has expired
PHONE_CODE_INVALID The confirmation code is invalid
API_ID_INVALID The api_id/api_hash combination is invalid
PHONE_NUMBER_OCCUPIED The phone number is already in use
PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used
USERS_TOO_FEW Not enough users (to create a chat, for example)
USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example)
TYPE_CONSTRUCTOR_INVALID The type constructor is invalid
FILE_PART_INVALID The file part number is invalid. The value is not between 0 and 3999
FILE_PARTS_INVALID Invalid number of parts. The value is not between 1 and 4000
FILE_PART_X_MISSING Part {x} of the file is missing from storage
MD5_CHECKSUM_INVALID The file's checksum did not match the md5_checksum parameter
PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid
FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid
FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing
MSG_WAIT_FAILED A waiting call returned an error
PEER_ID_INVALID The id/access_hash combination is invalid
MESSAGE_EMPTY The message sent is empty
ENCRYPTED_MESSAGE_INVALID The special binding message (bind_auth_key_inner) contains invalid data
INPUT_METHOD_INVALID The method called is invalid
PASSWORD_HASH_INVALID Two-step verification password is invalid
USERNAME_NOT_OCCUPIED The username is not occupied by anyone
USERNAME_INVALID The username is invalid
MESSAGE_ID_INVALID The message id is invalid
MESSAGE_NOT_MODIFIED The message was not modified because you tried to edit it using the same content
ENTITY_MENTION_USER_INVALID The mentioned entity is not an user
MESSAGE_TOO_LONG The message text is over 4096 characters
ACCESS_TOKEN_EXPIRED The bot token is invalid
BOT_METHOD_INVALID The method can't be used by bots
QUERY_TOO_SHORT The query is too short
SEARCH_QUERY_EMPTY The query is empty
CHAT_ID_INVALID The chat id is invalid
DATE_EMPTY The date argument is empty
PERSISTENT_TIMESTAMP_EMPTY The pts is empty
CDN_METHOD_INVALID The method can't be used on CDN DCs
VOLUME_LOC_NOT_FOUND The volume location can't be found
FILE_ID_INVALID The file id is invalid
LOCATION_INVALID The file address is invalid
CHAT_ADMIN_REQUIRED The method requires chat admin privileges
PHONE_NUMBER_BANNED The phone number is banned
ABOUT_TOO_LONG The about text is too long
MULTI_MEDIA_TOO_LONG The album contains more than 10 items
USERNAME_OCCUPIED The username is already in use
BOT_INLINE_DISABLED The inline feature of the bot is disabled
INLINE_RESULT_EXPIRED The inline bot query expired
INVITE_HASH_INVALID The invite link hash is invalid
USER_ALREADY_PARTICIPANT The user is already a participant of this chat
TTL_MEDIA_INVALID The media does not support self-destruction
MAX_ID_INVALID The max_id parameter is invalid
CHANNEL_INVALID The channel parameter is invalid
DC_ID_INVALID The dc_id parameter is invalid
LIMIT_INVALID The limit parameter is invalid
OFFSET_INVALID The offset parameter is invalid
EMAIL_INVALID The email provided is invalid
USER_IS_BOT A bot cannot send messages to other bots or to itself
WEBPAGE_CURL_FAILED Telegram server could not fetch the provided URL
STICKERSET_INVALID The requested sticker set is invalid
PEER_FLOOD The method can't be used because your account is limited
MEDIA_CAPTION_TOO_LONG The media caption is longer than 1024 characters
USER_NOT_MUTUAL_CONTACT The user is not a mutual contact
USER_CHANNELS_TOO_MUCH The user is already in too many channels or supergroups
API_ID_PUBLISHED_FLOOD You are using an API key that is limited on the server side
USER_NOT_PARTICIPANT The user is not a member of this chat
CHANNEL_PRIVATE The channel/supergroup is not accessible
MESSAGE_IDS_EMPTY The requested message doesn't exist
WEBPAGE_MEDIA_EMPTY The URL doesn't contain any valid media
QUERY_ID_INVALID The callback query id is invalid
MEDIA_EMPTY The media is invalid
USER_IS_BLOCKED The user blocked you
YOU_BLOCKED_USER You blocked this user
ADMINS_TOO_MUCH The chat has too many administrators
BOTS_TOO_MUCH The chat has too many bots
USER_ADMIN_INVALID The action requires admin privileges
INPUT_USER_DEACTIVATED The target user has been deactivated
PASSWORD_RECOVERY_NA The password recovery e-mail is not available
PASSWORD_EMPTY The password entered is empty
PHONE_NUMBER_FLOOD This number has tried to login too many times
TAKEOUT_INVALID The takeout id is invalid
TAKEOUT_REQUIRED The method must be invoked inside a takeout session
MESSAGE_POLL_CLOSED You can't interact with a closed poll
MEDIA_INVALID The media is invalid
BOT_SCORE_NOT_MODIFIED The bot score was not modified
USER_BOT_REQUIRED The method can be used by bots only
IMAGE_PROCESS_FAILED The server failed to process your image
USERNAME_NOT_MODIFIED The username was not modified
CALL_ALREADY_ACCEPTED The call is already accepted
CALL_ALREADY_DECLINED The call is already declined
PHOTO_EXT_INVALID The photo extension is invalid
EXTERNAL_URL_INVALID The external media URL is invalid
CHAT_NOT_MODIFIED The chat settings were not modified
RESULTS_TOO_MUCH The result contains too many items
RESULT_ID_DUPLICATE The result contains items with duplicated identifiers
ACCESS_TOKEN_INVALID The bot access token is invalid
INVITE_HASH_EXPIRED The chat invite link is no longer valid
USER_BANNED_IN_CHANNEL You are limited, check @SpamBot for details
MESSAGE_EDIT_TIME_EXPIRED You can no longer edit this message
FOLDER_ID_INVALID The folder id is invalid
MEGAGROUP_PREHISTORY_HIDDEN The action failed because the supergroup has the pre-history hidden
CHAT_LINK_EXISTS The action failed because the supergroup is linked to a channel
LINK_NOT_MODIFIED The chat link was not modified because you tried to link to the same target
BROADCAST_ID_INVALID The channel is invalid
MEGAGROUP_ID_INVALID The supergroup is invalid
BUTTON_DATA_INVALID The button callback data contains invalid data or exceeds 64 bytes
START_PARAM_INVALID The start parameter is invalid
ARTICLE_TITLE_EMPTY The article title is empty
FILE_PART_TOO_BIG The size limit (512 KB) for the content of the file part has been exceeded
FILE_PART_EMPTY The file part sent is empty
FILE_PART_SIZE_INVALID 512 KB cannot be evenly divided by part_size
FILE_PART_SIZE_CHANGED The part size is different from the size of one of the previous parts in the same file
FILE_MIGRATE_X The file is in Data Center No. {x}
RESULT_TYPE_INVALID The result type is invalid
PHOTO_THUMB_URL_EMPTY The photo thumb URL is empty
PHOTO_THUMB_URL_INVALID The photo thumb URL is invalid
PHOTO_CONTENT_URL_EMPTY The photo content URL is empty
PHOTO_CONTENT_TYPE_INVALID The photo content type is invalid
WEBDOCUMENT_INVALID The web document is invalid
WEBDOCUMENT_URL_EMPTY The web document URL is empty
WEBDOCUMENT_URL_INVALID The web document URL is invalid
WEBDOCUMENT_MIME_INVALID The web document mime type is invalid
BUTTON_URL_INVALID The button url is invalid
AUTH_BYTES_INVALID The authorization bytes are invalid
USER_ID_INVALID The user ID is invalid
CHANNELS_TOO_MUCH You have joined too many channels or supergroups
ADMIN_RANK_INVALID The custom administrator title is invalid or is longer than 16 characters
ADMIN_RANK_EMOJI_NOT_ALLOWED Emojis are not allowed in custom administrator titles
FILE_REFERENCE_EMPTY The file reference is empty
FILE_REFERENCE_INVALID The file reference is invalid
REPLY_MARKUP_TOO_LONG The reply markup is too long
SECONDS_INVALID The seconds interval is invalid, for slow mode try with 0 (off), 10, 30, 60 (1m), 300 (5m), 900 (15m) or 3600 (1h)
QUIZ_MULTIPLE_INVALID A quiz can't have multiple answers
QUIZ_CORRECT_ANSWERS_EMPTY The correct answers of the quiz are empty
QUIZ_CORRECT_ANSWER_INVALID The correct answers of the quiz are invalid
QUIZ_CORRECT_ANSWERS_TOO_MUCH The quiz contains too many correct answers
OPTIONS_TOO_MUCH The poll options are too many
POLL_ANSWERS_INVALID The poll answers are invalid
POLL_QUESTION_INVALID The poll question is invalid
FRESH_CHANGE_ADMINS_FORBIDDEN Recently logged-in users cannot change admins
BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
INPUT_FILTER_INVALID The filter is invalid for this query
EMOTICON_EMPTY The emoticon parameter is empty
EMOTICON_INVALID The emoticon parameter is invalid
VIDEO_FILE_INVALID The video file is invalid
PRIVACY_TOO_LONG Your privacy exception list has exceeded the maximum capacity
1 id message
2 FIRSTNAME_INVALID The first name is invalid
3 LASTNAME_INVALID The last name is invalid
4 PHONE_NUMBER_INVALID The phone number is invalid
5 PHONE_CODE_HASH_EMPTY phone_code_hash is missing
6 PHONE_CODE_EMPTY phone_code is missing
7 PHONE_CODE_EXPIRED The confirmation code has expired
8 PHONE_CODE_INVALID The confirmation code is invalid
9 API_ID_INVALID The api_id/api_hash combination is invalid
10 PHONE_NUMBER_OCCUPIED The phone number is already in use
11 PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used
12 USERS_TOO_FEW Not enough users (to create a chat, for example)
13 USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example)
14 TYPE_CONSTRUCTOR_INVALID The type constructor is invalid
15 FILE_PART_INVALID The file part number is invalid. The value is not between 0 and 3999
16 FILE_PARTS_INVALID Invalid number of parts. The value is not between 1 and 4000
17 FILE_PART_X_MISSING Part {x} of the file is missing from storage
18 MD5_CHECKSUM_INVALID The file's checksum did not match the md5_checksum parameter
19 PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid
20 FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid
21 FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing
22 MSG_WAIT_FAILED A waiting call returned an error
23 PEER_ID_INVALID The id/access_hash combination is invalid
24 MESSAGE_EMPTY The message sent is empty
25 ENCRYPTED_MESSAGE_INVALID The special binding message (bind_auth_key_inner) contains invalid data
26 INPUT_METHOD_INVALID The method called is invalid
27 PASSWORD_HASH_INVALID Two-step verification password is invalid
28 USERNAME_NOT_OCCUPIED The username is not occupied by anyone
29 USERNAME_INVALID The username is invalid
30 MESSAGE_ID_INVALID The message id is invalid
31 MESSAGE_NOT_MODIFIED The message was not modified because you tried to edit it using the same content
32 ENTITY_MENTION_USER_INVALID The mentioned entity is not an user
33 MESSAGE_TOO_LONG The message text is over 4096 characters
34 ACCESS_TOKEN_EXPIRED The bot token is invalid
35 BOT_METHOD_INVALID The method can't be used by bots
36 QUERY_TOO_SHORT The query is too short
37 SEARCH_QUERY_EMPTY The query is empty
38 CHAT_ID_INVALID The chat id is invalid
39 DATE_EMPTY The date argument is empty
40 PERSISTENT_TIMESTAMP_EMPTY The pts is empty
41 CDN_METHOD_INVALID The method can't be used on CDN DCs
42 VOLUME_LOC_NOT_FOUND The volume location can't be found
43 FILE_ID_INVALID The file id is invalid
44 LOCATION_INVALID The file address is invalid
45 CHAT_ADMIN_REQUIRED The method requires chat admin privileges
46 PHONE_NUMBER_BANNED The phone number is banned
47 ABOUT_TOO_LONG The about text is too long
48 MULTI_MEDIA_TOO_LONG The album contains more than 10 items
49 USERNAME_OCCUPIED The username is already in use
50 BOT_INLINE_DISABLED The inline feature of the bot is disabled
51 INLINE_RESULT_EXPIRED The inline bot query expired
52 INVITE_HASH_INVALID The invite link hash is invalid
53 USER_ALREADY_PARTICIPANT The user is already a participant of this chat
54 TTL_MEDIA_INVALID The media does not support self-destruction
55 MAX_ID_INVALID The max_id parameter is invalid
56 CHANNEL_INVALID The channel parameter is invalid
57 DC_ID_INVALID The dc_id parameter is invalid
58 LIMIT_INVALID The limit parameter is invalid
59 OFFSET_INVALID The offset parameter is invalid
60 EMAIL_INVALID The email provided is invalid
61 USER_IS_BOT A bot cannot send messages to other bots or to itself
62 WEBPAGE_CURL_FAILED Telegram server could not fetch the provided URL
63 STICKERSET_INVALID The requested sticker set is invalid
64 PEER_FLOOD The method can't be used because your account is limited
65 MEDIA_CAPTION_TOO_LONG The media caption is longer than 1024 characters
66 USER_NOT_MUTUAL_CONTACT The user is not a mutual contact
67 USER_CHANNELS_TOO_MUCH The user is already in too many channels or supergroups
68 API_ID_PUBLISHED_FLOOD You are using an API key that is limited on the server side
69 USER_NOT_PARTICIPANT The user is not a member of this chat
70 CHANNEL_PRIVATE The channel/supergroup is not accessible
71 MESSAGE_IDS_EMPTY The requested message doesn't exist
72 WEBPAGE_MEDIA_EMPTY The URL doesn't contain any valid media
73 QUERY_ID_INVALID The callback query id is invalid
74 MEDIA_EMPTY The media is invalid
75 USER_IS_BLOCKED The user blocked you
76 YOU_BLOCKED_USER You blocked this user
77 ADMINS_TOO_MUCH The chat has too many administrators
78 BOTS_TOO_MUCH The chat has too many bots
79 USER_ADMIN_INVALID The action requires admin privileges
80 INPUT_USER_DEACTIVATED The target user has been deactivated
81 PASSWORD_RECOVERY_NA The password recovery e-mail is not available
82 PASSWORD_EMPTY The password entered is empty
83 PHONE_NUMBER_FLOOD This number has tried to login too many times
84 TAKEOUT_INVALID The takeout id is invalid
85 TAKEOUT_REQUIRED The method must be invoked inside a takeout session
86 MESSAGE_POLL_CLOSED You can't interact with a closed poll
87 MEDIA_INVALID The media is invalid
88 BOT_SCORE_NOT_MODIFIED The bot score was not modified
89 USER_BOT_REQUIRED The method can be used by bots only
90 IMAGE_PROCESS_FAILED The server failed to process your image
91 USERNAME_NOT_MODIFIED The username was not modified
92 CALL_ALREADY_ACCEPTED The call is already accepted
93 CALL_ALREADY_DECLINED The call is already declined
94 PHOTO_EXT_INVALID The photo extension is invalid
95 EXTERNAL_URL_INVALID The external media URL is invalid
96 CHAT_NOT_MODIFIED The chat settings were not modified
97 RESULTS_TOO_MUCH The result contains too many items
98 RESULT_ID_DUPLICATE The result contains items with duplicated identifiers
99 ACCESS_TOKEN_INVALID The bot access token is invalid
100 INVITE_HASH_EXPIRED The chat invite link is no longer valid
101 USER_BANNED_IN_CHANNEL You are limited, check @SpamBot for details
102 MESSAGE_EDIT_TIME_EXPIRED You can no longer edit this message
103 FOLDER_ID_INVALID The folder id is invalid
104 MEGAGROUP_PREHISTORY_HIDDEN The action failed because the supergroup has the pre-history hidden
105 CHAT_LINK_EXISTS The action failed because the supergroup is linked to a channel
106 LINK_NOT_MODIFIED The chat link was not modified because you tried to link to the same target
107 BROADCAST_ID_INVALID The channel is invalid
108 MEGAGROUP_ID_INVALID The supergroup is invalid
109 BUTTON_DATA_INVALID The button callback data contains invalid data or exceeds 64 bytes
110 START_PARAM_INVALID The start parameter is invalid
111 ARTICLE_TITLE_EMPTY The article title is empty
112 FILE_PART_TOO_BIG The size limit (512 KB) for the content of the file part has been exceeded
113 FILE_PART_EMPTY The file part sent is empty
114 FILE_PART_SIZE_INVALID 512 KB cannot be evenly divided by part_size
115 FILE_PART_SIZE_CHANGED The part size is different from the size of one of the previous parts in the same file
116 FILE_MIGRATE_X The file is in Data Center No. {x}
117 RESULT_TYPE_INVALID The result type is invalid
118 PHOTO_THUMB_URL_EMPTY The photo thumb URL is empty
119 PHOTO_THUMB_URL_INVALID The photo thumb URL is invalid
120 PHOTO_CONTENT_URL_EMPTY The photo content URL is empty
121 PHOTO_CONTENT_TYPE_INVALID The photo content type is invalid
122 WEBDOCUMENT_INVALID The web document is invalid
123 WEBDOCUMENT_URL_EMPTY The web document URL is empty
124 WEBDOCUMENT_URL_INVALID The web document URL is invalid
125 WEBDOCUMENT_MIME_INVALID The web document mime type is invalid
126 BUTTON_URL_INVALID The button url is invalid
127 AUTH_BYTES_INVALID The authorization bytes are invalid
128 USER_ID_INVALID The user ID is invalid
129 CHANNELS_TOO_MUCH You have joined too many channels or supergroups
130 ADMIN_RANK_INVALID The custom administrator title is invalid or is longer than 16 characters
131 ADMIN_RANK_EMOJI_NOT_ALLOWED Emojis are not allowed in custom administrator titles
132 FILE_REFERENCE_EMPTY The file reference is empty
133 FILE_REFERENCE_INVALID The file reference is invalid
134 REPLY_MARKUP_TOO_LONG The reply markup is too long
135 SECONDS_INVALID The seconds interval is invalid, for slow mode try with 0 (off), 10, 30, 60 (1m), 300 (5m), 900 (15m) or 3600 (1h)
136 QUIZ_MULTIPLE_INVALID A quiz can't have multiple answers
137 QUIZ_CORRECT_ANSWERS_EMPTY The correct answers of the quiz are empty
138 QUIZ_CORRECT_ANSWER_INVALID The correct answers of the quiz are invalid
139 QUIZ_CORRECT_ANSWERS_TOO_MUCH The quiz contains too many correct answers
140 OPTIONS_TOO_MUCH The poll options are too many
141 POLL_ANSWERS_INVALID The poll answers are invalid
142 POLL_QUESTION_INVALID The poll question is invalid
143 FRESH_CHANGE_ADMINS_FORBIDDEN Recently logged-in users cannot change admins
144 BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
145 INPUT_FILTER_INVALID The filter is invalid for this query
146 EMOTICON_EMPTY The emoticon parameter is empty
147 EMOTICON_INVALID The emoticon parameter is invalid
148 VIDEO_FILE_INVALID The video file is invalid
149 PRIVACY_TOO_LONG Your privacy exception list has exceeded the maximum capacity

View File

@ -1,7 +0,0 @@
id message
CHAT_WRITE_FORBIDDEN You don't have rights to send messages in this chat
RIGHT_FORBIDDEN One or more admin rights can't be applied to this kind of chat (channel/supergroup)
CHAT_ADMIN_INVITE_REQUIRED You don't have rights to invite other users
MESSAGE_DELETE_FORBIDDEN You don't have rights to delete messages in this chat
CHAT_SEND_MEDIA_FORBIDDEN You can't send media messages in this chat
MESSAGE_AUTHOR_REQUIRED You are not the author of this message
1 id message
2 CHAT_WRITE_FORBIDDEN You don't have rights to send messages in this chat
3 RIGHT_FORBIDDEN One or more admin rights can't be applied to this kind of chat (channel/supergroup)
4 CHAT_ADMIN_INVITE_REQUIRED You don't have rights to invite other users
5 MESSAGE_DELETE_FORBIDDEN You don't have rights to delete messages in this chat
6 CHAT_SEND_MEDIA_FORBIDDEN You can't send media messages in this chat
7 MESSAGE_AUTHOR_REQUIRED You are not the author of this message

View File

@ -1,4 +0,0 @@
id message
AUTH_KEY_DUPLICATED Authorization error - you must delete your session file and log in again with your phone number
FILEREF_UPGRADE_NEEDED The file reference has expired - you must obtain the original media message
STICKERSET_INVALID The sticker set is invalid
1 id message
2 AUTH_KEY_DUPLICATED Authorization error - you must delete your session file and log in again with your phone number
3 FILEREF_UPGRADE_NEEDED The file reference has expired - you must obtain the original media message
4 STICKERSET_INVALID The sticker set is invalid

View File

@ -1,14 +0,0 @@
id message
AUTH_RESTART User authorization has restarted
RPC_CALL_FAIL Telegram is having internal problems. Please try again later
RPC_MCGET_FAIL Telegram is having internal problems. Please try again later
PERSISTENT_TIMESTAMP_OUTDATED Telegram is having internal problems. Please try again later
HISTORY_GET_FAILED Telegram is having internal problems. Please try again later
REG_ID_GENERATE_FAILED Telegram is having internal problems. Please try again later
RANDOM_ID_DUPLICATE Telegram is having internal problems. Please try again later
WORKER_BUSY_TOO_LONG_RETRY Telegram is having internal problems. Please try again later
INTERDC_X_CALL_ERROR Telegram is having internal problems at DC{x}. Please try again later
INTERDC_X_CALL_RICH_ERROR Telegram is having internal problems at DC{x}. Please try again later
FOLDER_DEAC_AUTOFIX_ALL Telegram is having internal problems. Please try again later
MSGID_DECREASE_RETRY Telegram is having internal problems. Please try again later
MEMBER_OCCUPY_PRIMARY_LOC_FAILED Telegram is having internal problems. Please try again later
1 id message
2 AUTH_RESTART User authorization has restarted
3 RPC_CALL_FAIL Telegram is having internal problems. Please try again later
4 RPC_MCGET_FAIL Telegram is having internal problems. Please try again later
5 PERSISTENT_TIMESTAMP_OUTDATED Telegram is having internal problems. Please try again later
6 HISTORY_GET_FAILED Telegram is having internal problems. Please try again later
7 REG_ID_GENERATE_FAILED Telegram is having internal problems. Please try again later
8 RANDOM_ID_DUPLICATE Telegram is having internal problems. Please try again later
9 WORKER_BUSY_TOO_LONG_RETRY Telegram is having internal problems. Please try again later
10 INTERDC_X_CALL_ERROR Telegram is having internal problems at DC{x}. Please try again later
11 INTERDC_X_CALL_RICH_ERROR Telegram is having internal problems at DC{x}. Please try again later
12 FOLDER_DEAC_AUTOFIX_ALL Telegram is having internal problems. Please try again later
13 MSGID_DECREASE_RETRY Telegram is having internal problems. Please try again later
14 MEMBER_OCCUPY_PRIMARY_LOC_FAILED Telegram is having internal problems. Please try again later

35
compiler/errors/sort.py Normal file
View File

@ -0,0 +1,35 @@
# Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2020 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pyrogram is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
import csv
from pathlib import Path
for p in Path("source").glob("*.tsv"):
with open(p) as f:
reader = csv.reader(f, delimiter="\t")
dct = {k: v for k, v in reader if k != "id"}
keys = sorted(dct)
with open(p, "w") as f:
f.write("id\tmessage\n")
for i, item in enumerate(keys, start=1):
f.write(f"{item}\t{dct[item]}")
if i != len(keys):
f.write("\n")

View File

@ -1,5 +1,6 @@
id message id message
FILE_MIGRATE_X The file to be accessed is currently stored in DC{x} FILE_MIGRATE_X The file to be accessed is currently stored in DC{x}
PHONE_MIGRATE_X The phone number a user is trying to use for authorization is associated with DC{x}
NETWORK_MIGRATE_X The source IP address is associated with DC{x} (for registration) NETWORK_MIGRATE_X The source IP address is associated with DC{x} (for registration)
USER_MIGRATE_X The user whose identity is being used to execute queries is associated with DC{x} (for registration) PHONE_MIGRATE_X The phone number a user is trying to use for authorization is associated with DC{x}
STATS_MIGRATE_X The statistics of the group/channel are stored in DC{x}
USER_MIGRATE_X The user whose identity is being used to execute queries is associated with DC{x} (for registration)
1 id message
2 FILE_MIGRATE_X The file to be accessed is currently stored in DC{x}
PHONE_MIGRATE_X The phone number a user is trying to use for authorization is associated with DC{x}
3 NETWORK_MIGRATE_X The source IP address is associated with DC{x} (for registration)
4 USER_MIGRATE_X PHONE_MIGRATE_X The user whose identity is being used to execute queries is associated with DC{x} (for registration) The phone number a user is trying to use for authorization is associated with DC{x}
5 STATS_MIGRATE_X The statistics of the group/channel are stored in DC{x}
6 USER_MIGRATE_X The user whose identity is being used to execute queries is associated with DC{x} (for registration)

View File

@ -0,0 +1,299 @@
id message
ABOUT_TOO_LONG The provided about/bio text is too long
ACCESS_TOKEN_EXPIRED The bot token has expired
ACCESS_TOKEN_INVALID The bot access token is invalid
ADMINS_TOO_MUCH The chat has too many administrators
ADMIN_RANK_EMOJI_NOT_ALLOWED Emoji are not allowed in custom administrator titles
ADMIN_RANK_INVALID The custom administrator title is invalid or is longer than 16 characters
ALBUM_PHOTOS_TOO_MANY Too many photos were included in the album
API_ID_INVALID The api_id/api_hash combination is invalid
API_ID_PUBLISHED_FLOOD You are using an API key that is limited on the server side because it was published somewhere
ARTICLE_TITLE_EMPTY The article title is empty
AUDIO_TITLE_EMPTY The title attribute of the audio is empty
AUTH_BYTES_INVALID The authorization bytes are invalid
AUTH_TOKEN_ALREADY_ACCEPTED The authorization token was already used
AUTH_TOKEN_EXPIRED The provided authorization token has expired and the updated QR-code must be re-scanned
AUTH_TOKEN_INVALID An invalid authorization token was provided
AUTOARCHIVE_NOT_AVAILABLE This feature is not yet enabled for your account due to it not receiving too many private messages from strangers
BANK_CARD_NUMBER_INVALID The credit card number is invalid
BANNED_RIGHTS_INVALID You provided a set of restrictions that is invalid
BOTS_TOO_MUCH The chat has too many bots
BOT_CHANNELS_NA Bots can't edit admin privileges
BOT_COMMAND_DESCRIPTION_INVALID The command description was empty, too long or had invalid characters
BOT_DOMAIN_INVALID The domain used for the auth button does not match the one configured in @BotFather
BOT_GAMES_DISABLED Bot games cannot be used in this type of chat
BOT_GROUPS_BLOCKED This bot can't be added to groups
BOT_INLINE_DISABLED The inline feature of the bot is disabled
BOT_INVALID This is not a valid bot
BOT_METHOD_INVALID The method can't be used by bots
BOT_MISSING This method can only be run by a bot
BOT_PAYMENTS_DISABLED This method can only be run by a bot
BOT_POLLS_DISABLED Sending polls by bots has been disabled
BOT_RESPONSE_TIMEOUT The bot did not answer to the callback query in time
BOT_SCORE_NOT_MODIFIED The bot score was not modified
BROADCAST_ID_INVALID The channel is invalid
BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
BROADCAST_REQUIRED The request can only be used with a channel
BUTTON_DATA_INVALID The button callback data contains invalid data or exceeds 64 bytes
BUTTON_TYPE_INVALID The type of one of the buttons you provided is invalid
BUTTON_URL_INVALID The button url is invalid
CALL_ALREADY_ACCEPTED The call is already accepted
CALL_ALREADY_DECLINED The call is already declined
CALL_PEER_INVALID The provided call peer object is invalid
CALL_PROTOCOL_FLAGS_INVALID Call protocol flags invalid
CDN_METHOD_INVALID The method can't be used on CDN DCs
CHANNELS_ADMIN_PUBLIC_TOO_MUCH You are an administrator of too many public channels
CHANNELS_TOO_MUCH You have joined too many channels or supergroups, leave some and try again
CHANNEL_BANNED The channel is banned
CHANNEL_INVALID The channel parameter is invalid
CHANNEL_PRIVATE The channel/supergroup is not accessible
CHAT_ABOUT_NOT_MODIFIED The chat about text was not modified because you tried to edit it using the same content
CHAT_ABOUT_TOO_LONG The chat about text is too long
CHAT_ADMIN_REQUIRED The method requires chat admin privileges
CHAT_ID_EMPTY The provided chat id is empty
CHAT_ID_INVALID The chat id being used is invalid or not known yet. Make sure you see the chat before interacting with it
CHAT_INVALID The chat is invalid
CHAT_LINK_EXISTS The action failed because the supergroup is linked to a channel
CHAT_NOT_MODIFIED The chat settings (title, permissions, photo, etc..) were not modified because you tried to edit them using the same content
CHAT_RESTRICTED The chat is restricted and cannot be used
CHAT_SEND_INLINE_FORBIDDEN You cannot use inline bots to send messages in this chat
CHAT_TITLE_EMPTY The chat title is empty
CODE_EMPTY The provided code is empty
CODE_HASH_INVALID The provided code hash invalid
CODE_INVALID The provided code is invalid (i.e. from email)
CONNECTION_API_ID_INVALID The provided API id is invalid
CONNECTION_DEVICE_MODEL_EMPTY The device model is empty
CONNECTION_LANG_PACK_INVALID The specified language pack is not valid
CONNECTION_LAYER_INVALID The connection layer is invalid. Missing InvokeWithLayer-InitConnection call
CONNECTION_NOT_INITED The connection was not initialized
CONNECTION_SYSTEM_EMPTY The connection to the system is empty
CONNECTION_SYSTEM_LANG_CODE_EMPTY The system language code is empty
CONTACT_ID_INVALID The provided contact id is invalid
CONTACT_NAME_EMPTY The provided contact name is empty
DATA_INVALID The encrypted data is invalid
DATA_JSON_INVALID The provided JSON data is invalid
DATE_EMPTY The date argument is empty
DC_ID_INVALID The dc_id parameter is invalid
DH_G_A_INVALID The g_a parameter invalid
DOCUMENT_INVALID The document is invalid
EMAIL_HASH_EXPIRED The email hash expired and cannot be used to verify it
EMAIL_INVALID The email provided is invalid
EMAIL_UNCONFIRMED_X Email unconfirmed, the length of the code must be {x}
EMOTICON_EMPTY The emoticon parameter is empty
EMOTICON_INVALID The emoticon parameter is invalid
EMOTICON_STICKERPACK_MISSING The emoticon sticker pack you are trying to obtain is missing
ENCRYPTED_MESSAGE_INVALID The special binding message (bind_auth_key_inner) contains invalid data
ENCRYPTION_ALREADY_ACCEPTED The secret chat is already accepted
ENCRYPTION_ALREADY_DECLINED The secret chat is already declined
ENCRYPTION_DECLINED The secret chat was declined
ENCRYPTION_ID_INVALID The provided secret chat id is invalid
ENTITIES_TOO_LONG The entity provided contains data that is too long, or you passed too many entities to this message
ENTITY_MENTION_USER_INVALID The mentioned entity is not an user
ERROR_TEXT_EMPTY The provided error message is empty
EXPORT_CARD_INVALID The provided card is invalid
EXTERNAL_URL_INVALID The external media URL is invalid
FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing
FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid
FILE_ID_INVALID The file id is invalid
FILE_MIGRATE_X The file is in Data Center No. {x}
FILE_PARTS_INVALID Invalid number of parts. The value is not between 1 and 4000
FILE_PART_EMPTY The file part sent is empty
FILE_PART_INVALID The file part number is invalid. The value is not between 0 and 3999
FILE_PART_LENGTH_INVALID The length of a file part is invalid
FILE_PART_SIZE_CHANGED The part size is different from the size of one of the previous parts in the same file
FILE_PART_SIZE_INVALID 512 KB cannot be evenly divided by part_size
FILE_PART_TOO_BIG The size limit (512 KB) for the content of the file part has been exceeded
FILE_PART_X_MISSING Part {x} of the file is missing from storage
FILE_REFERENCE_EMPTY The file reference is empty
FILE_REFERENCE_EXPIRED The file reference has expired and is no longer valid or it belongs to self-destructing media and cannot be resent
FILE_REFERENCE_INVALID The file reference is invalid
FIRSTNAME_INVALID The first name is invalid
FOLDER_ID_EMPTY The folder you tried to delete was already empty
FOLDER_ID_INVALID The folder id is invalid
FRESH_CHANGE_ADMINS_FORBIDDEN You can't change administrator settings in this chat because your session was logged-in recently
GAME_BOT_INVALID You cannot send that game with the current bot
GIF_ID_INVALID The provided gif/animation id is invalid
GRAPH_OUTDATED_RELOAD The graph data is outdated
GROUPED_MEDIA_INVALID The album contains invalid media
HASH_INVALID The provided hash is invalid
IMAGE_PROCESS_FAILED The server failed to process your image
INLINE_RESULT_EXPIRED The inline bot query expired
INPUT_CONSTRUCTOR_INVALID The provided constructor is invalid
INPUT_FETCH_ERROR An error occurred while deserializing TL parameters
INPUT_FETCH_FAIL Failed deserializing TL payload
INPUT_FILTER_INVALID The filter is invalid for this query
INPUT_LAYER_INVALID The provided layer is invalid
INPUT_METHOD_INVALID The method invoked is invalid in the current schema
INPUT_REQUEST_TOO_LONG The input request is too long
INPUT_USER_DEACTIVATED The target user has been deleted/deactivated
INVITE_HASH_EMPTY The invite hash is empty
INVITE_HASH_EXPIRED The chat invite link is no longer valid
INVITE_HASH_INVALID The invite link hash is invalid
LANG_PACK_INVALID The provided language pack is invalid
LASTNAME_INVALID The last name is invalid
LIMIT_INVALID The limit parameter is invalid
LINK_NOT_MODIFIED The chat link was not modified because you tried to link to the same target
LOCATION_INVALID The file location is invalid
MAX_ID_INVALID The max_id parameter is invalid
MAX_QTS_INVALID The provided QTS is invalid
MD5_CHECKSUM_INVALID The file's checksum did not match the md5_checksum parameter
MEDIA_CAPTION_TOO_LONG The media caption is longer than 1024 characters
MEDIA_EMPTY The media you tried to send is invalid
MEDIA_INVALID The media is invalid
MEDIA_NEW_INVALID The new media to edit the message with is invalid
MEDIA_PREV_INVALID The previous media cannot be edited with anything else
MEGAGROUP_ID_INVALID The supergroup is invalid
MEGAGROUP_PREHISTORY_HIDDEN The action failed because the supergroup has the pre-history hidden
MEGAGROUP_REQUIRED The request can only be used with a supergroup
MESSAGE_EDIT_TIME_EXPIRED You can no longer edit this message because too much time has passed
MESSAGE_EMPTY The message sent is empty or contains invalid characters
MESSAGE_IDS_EMPTY The requested message doesn't exist or you provided no message id
MESSAGE_ID_INVALID The message id is invalid
MESSAGE_NOT_MODIFIED The message was not modified because you tried to edit it using the same content
MESSAGE_POLL_CLOSED You can't interact with a closed poll
MESSAGE_TOO_LONG The message text is over 4096 characters
METHOD_INVALID The API method is invalid and cannot be used
MSG_ID_INVALID The message ID used in the peer was invalid
MSG_WAIT_FAILED A waiting call returned an error
MULTI_MEDIA_TOO_LONG The album/media group contains too many items
NEW_SALT_INVALID The new salt is invalid
NEW_SETTINGS_INVALID The new settings are invalid
OFFSET_INVALID The offset parameter is invalid
OFFSET_PEER_ID_INVALID The provided offset peer is invalid
OPTIONS_TOO_MUCH The poll options are too many
OPTION_INVALID The option specified is invalid and does not exist in the target poll
PACK_SHORT_NAME_INVALID Invalid sticker pack name. It must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>".
PACK_SHORT_NAME_OCCUPIED A sticker pack with this name already exists
PARTICIPANTS_TOO_FEW The chat doesn't have enough participants
PARTICIPANT_VERSION_OUTDATED The other participant is using an outdated Telegram app version
PASSWORD_EMPTY The password provided is empty
PASSWORD_HASH_INVALID The two-step verification password is invalid
PASSWORD_MISSING The account is missing the two-step verification password
PASSWORD_RECOVERY_NA The password recovery e-mail is not available
PASSWORD_REQUIRED The two-step verification password is required for this method
PASSWORD_TOO_FRESH_X The two-step verification password was added recently and you are required to wait {x} seconds
PAYMENT_PROVIDER_INVALID The payment provider was not recognised or its token was invalid
PEER_FLOOD The method can't be used because your account is currently limited
PEER_ID_INVALID The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it
PEER_ID_NOT_SUPPORTED The provided peer id is not supported
PERSISTENT_TIMESTAMP_EMPTY The pts argument is empty
PERSISTENT_TIMESTAMP_INVALID The persistent timestamp is invalid
PHONE_CODE_EMPTY The phone code is missing
PHONE_CODE_EXPIRED The confirmation code has expired
PHONE_CODE_HASH_EMPTY The phone code hash is missing
PHONE_CODE_INVALID The confirmation code is invalid
PHONE_NUMBER_APP_SIGNUP_FORBIDDEN You can't sign up using this app
PHONE_NUMBER_BANNED The phone number is banned from Telegram and cannot be used
PHONE_NUMBER_FLOOD This number has tried to login too many times
PHONE_NUMBER_INVALID The phone number is invalid
PHONE_NUMBER_OCCUPIED The phone number is already in use
PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used
PHONE_PASSWORD_PROTECTED The phone is password protected
PHOTO_CONTENT_TYPE_INVALID The photo content type is invalid
PHOTO_CONTENT_URL_EMPTY The photo content URL is empty
PHOTO_CROP_SIZE_SMALL The photo is too small
PHOTO_EXT_INVALID The photo extension is invalid
PHOTO_ID_INVALID The photo id is invalid
PHOTO_INVALID The photo is invalid
PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid
PHOTO_SAVE_FILE_INVALID The photo you tried to send cannot be saved by Telegram. A reason may be that it exceeds 10 MB. Try resizing it locally
PHOTO_THUMB_URL_EMPTY The photo thumb URL is empty
PHOTO_THUMB_URL_INVALID The photo thumb URL is invalid
PIN_RESTRICTED You can't pin messages in private chats with other people
POLL_ANSWERS_INVALID The poll answers are invalid
POLL_OPTION_DUPLICATE A duplicate option was sent in the same poll
POLL_OPTION_INVALID A poll option used invalid data (the data may be too long)
POLL_QUESTION_INVALID The poll question is invalid
POLL_UNSUPPORTED This layer does not support polls in the invoked method
PRIVACY_KEY_INVALID The privacy key is invalid
PRIVACY_TOO_LONG Your privacy exception list has exceeded the maximum capacity
PRIVACY_VALUE_INVALID The privacy value is invalid
QUERY_ID_EMPTY The query ID is empty
QUERY_ID_INVALID The callback query id is invalid
QUERY_TOO_SHORT The query is too short
QUIZ_CORRECT_ANSWERS_EMPTY The correct answers of the quiz are empty
QUIZ_CORRECT_ANSWERS_TOO_MUCH The quiz contains too many correct answers
QUIZ_CORRECT_ANSWER_INVALID The correct answers of the quiz are invalid
QUIZ_MULTIPLE_INVALID A quiz can't have multiple answers
RANDOM_ID_INVALID The provided random ID is invalid
RANDOM_LENGTH_INVALID The random length is invalid
RANGES_INVALID Invalid range provided
REACTION_EMPTY The reaction provided is empty
REACTION_INVALID Invalid reaction provided (only emoji are allowed)
REPLY_MARKUP_GAME_EMPTY The provided reply markup for the game is empty
REPLY_MARKUP_INVALID The provided reply markup is invalid
REPLY_MARKUP_TOO_LONG The reply markup is too long
RESULTS_TOO_MUCH The result contains too many items
RESULT_ID_DUPLICATE The result contains items with duplicated identifiers
RESULT_ID_INVALID The given result cannot be used to send the selection to the bot
RESULT_TYPE_INVALID The result type is invalid
RSA_DECRYPT_FAILED Internal RSA decryption failed
SCHEDULE_BOT_NOT_ALLOWED Bots are not allowed to schedule messages
SCHEDULE_DATE_TOO_LATE The date you tried to schedule is too far in the future (more than one year)
SCHEDULE_STATUS_PRIVATE You cannot schedule a message until the person comes online if their privacy does not show this information
SCHEDULE_TOO_MUCH You cannot schedule more than 100 messages in this chat
SEARCH_QUERY_EMPTY The search query is empty
SECONDS_INVALID The seconds interval is invalid, for slow mode try with 0 (off), 10, 30, 60 (1m), 300 (5m), 900 (15m) or 3600 (1h)
SEND_MESSAGE_MEDIA_INVALID The message media is invalid
SEND_MESSAGE_TYPE_INVALID The message type is invalid
SESSION_TOO_FRESH_X You can't do this action because the current session was logged-in recently
SHA256_HASH_INVALID The provided SHA256 hash is invalid
SHORTNAME_OCCUPY_FAILED An error occurred when trying to register the short-name used for the sticker pack. Try a different name
START_PARAM_EMPTY The start parameter is empty
START_PARAM_INVALID The start parameter is invalid
STICKERSET_INVALID The requested sticker set is invalid
STICKERS_EMPTY The sticker provided is empty
STICKER_DOCUMENT_INVALID The sticker document is invalid
STICKER_EMOJI_INVALID The sticker emoji is invalid
STICKER_FILE_INVALID The sticker file is invalid
STICKER_ID_INVALID The provided sticker id is invalid
STICKER_INVALID The provided sticker is invalid
STICKER_PNG_DIMENSIONS The sticker png dimensions are invalid
STICKER_PNG_NOPNG Stickers must be png files but the provided image was not a png
TAKEOUT_INVALID The takeout id is invalid
TAKEOUT_REQUIRED The method must be invoked inside a takeout session
TEMP_AUTH_KEY_EMPTY The temporary auth key provided is empty
THEME_MIME_INVALID You cannot create this theme because the mime-type is invalid
TMP_PASSWORD_DISABLED The temporary password is disabled
TOKEN_INVALID The provided token is invalid
TTL_DAYS_INVALID The provided TTL days is invalid
TTL_MEDIA_INVALID The media does not support self-destruction
TYPES_EMPTY The types parameter is empty
TYPE_CONSTRUCTOR_INVALID The type constructor is invalid
UNTIL_DATE_INVALID That date parameter is invalid
URL_INVALID The URL provided is invalid
USERNAME_INVALID The username is invalid
USERNAME_NOT_MODIFIED The username was not modified because you tried to edit it using the same one
USERNAME_NOT_OCCUPIED The username is not occupied by anyone
USERNAME_OCCUPIED The username is already in use by someone else
USERS_TOO_FEW Not enough users (to create a chat, for example)
USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example)
USER_ADMIN_INVALID The action requires admin privileges. Probably you tried to edit admin privileges on someone you don't have rights to
USER_ALREADY_PARTICIPANT The user is already a participant of this chat
USER_BANNED_IN_CHANNEL You are limited from sending messages in supergroups/channels, check @SpamBot for details
USER_BLOCKED The user is blocked
USER_BOT Bots in channels can only be administrators, not members.
USER_BOT_INVALID This method can only be used by a bot
USER_BOT_REQUIRED The method can be used by bots only
USER_CHANNELS_TOO_MUCH The user is already in too many channels or supergroups
USER_CREATOR You can't leave this channel because you're its creator
USER_ID_INVALID The user id being used is invalid or not known yet. Make sure you meet the user before interacting with it
USER_INVALID The provided user is invalid
USER_IS_BLOCKED The user blocked you
USER_IS_BOT A bot cannot send messages to other bots or to itself
USER_KICKED This user was kicked from this chat
USER_NOT_MUTUAL_CONTACT The user is not a mutual contact
USER_NOT_PARTICIPANT The user is not a member of this chat
VIDEO_CONTENT_TYPE_INVALID The video content type is invalid (i.e.: not streamable)
VIDEO_FILE_INVALID The video file is invalid
VOLUME_LOC_NOT_FOUND The volume location can't be found
WALLPAPER_FILE_INVALID The provided file cannot be used as a wallpaper
WALLPAPER_INVALID The input wallpaper was not valid
WC_CONVERT_URL_INVALID WC convert URL invalid
WEBDOCUMENT_INVALID The web document is invalid
WEBDOCUMENT_MIME_INVALID The web document mime type is invalid
WEBDOCUMENT_URL_EMPTY The web document URL is empty
WEBDOCUMENT_URL_INVALID The web document URL is invalid
WEBPAGE_CURL_FAILED Telegram server could not fetch the provided URL
WEBPAGE_MEDIA_EMPTY The URL doesn't contain any valid media
YOU_BLOCKED_USER You blocked this user
Can't render this file because it contains an unexpected character in line 165 and column 135.

View File

@ -1,10 +1,10 @@
id message id message
AUTH_KEY_UNREGISTERED The key is not registered in the system
AUTH_KEY_INVALID The key is invalid
USER_DEACTIVATED The user has been deleted/deactivated
USER_DEACTIVATED_BAN The user has been deleted/deactivated
SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions
SESSION_EXPIRED The authorization has expired
ACTIVE_USER_REQUIRED The method is only available to already activated users ACTIVE_USER_REQUIRED The method is only available to already activated users
AUTH_KEY_INVALID The key is invalid
AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization key, not bound to permanent AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization key, not bound to permanent
SESSION_PASSWORD_NEEDED Two-step verification password required AUTH_KEY_UNREGISTERED The key is not registered in the system
SESSION_EXPIRED The authorization has expired
SESSION_PASSWORD_NEEDED The two-step verification is enabled and a password is required
SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions
USER_DEACTIVATED The user has been deleted/deactivated
USER_DEACTIVATED_BAN The user has been deleted/deactivated
1 id message
AUTH_KEY_UNREGISTERED The key is not registered in the system
AUTH_KEY_INVALID The key is invalid
USER_DEACTIVATED The user has been deleted/deactivated
USER_DEACTIVATED_BAN The user has been deleted/deactivated
SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions
SESSION_EXPIRED The authorization has expired
2 ACTIVE_USER_REQUIRED The method is only available to already activated users
3 AUTH_KEY_INVALID The key is invalid
4 AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization key, not bound to permanent
5 SESSION_PASSWORD_NEEDED AUTH_KEY_UNREGISTERED Two-step verification password required The key is not registered in the system
6 SESSION_EXPIRED The authorization has expired
7 SESSION_PASSWORD_NEEDED The two-step verification is enabled and a password is required
8 SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions
9 USER_DEACTIVATED The user has been deleted/deactivated
10 USER_DEACTIVATED_BAN The user has been deleted/deactivated

View File

@ -0,0 +1,20 @@
id message
BROADCAST_FORBIDDEN The request can't be used in channels
CHANNEL_PUBLIC_GROUP_NA The channel/supergroup is not available
CHAT_ADMIN_INVITE_REQUIRED You don't have rights to invite other users
CHAT_FORBIDDEN You cannot write in this chat
CHAT_SEND_GIFS_FORBIDDEN You can't send animations in this chat
CHAT_SEND_MEDIA_FORBIDDEN You can't send media messages in this chat
CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat
CHAT_WRITE_FORBIDDEN You don't have rights to send messages in this chat
INLINE_BOT_REQUIRED The action must be performed through an inline bot callback
MESSAGE_AUTHOR_REQUIRED You are not the author of this message
MESSAGE_DELETE_FORBIDDEN You don't have rights to delete messages in this chat, most likely because you are not the author of them
RIGHT_FORBIDDEN You don't have enough rights for this action, or you tried to set one or more admin rights that can't be applied to this kind of chat (channel or supergroup)
SENSITIVE_CHANGE_FORBIDDEN Your sensitive content settings can't be changed at this time
USER_BOT_INVALID This method can only be called by a bot
USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups
USER_IS_BLOCKED The user is blocked
USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact
USER_PRIVACY_RESTRICTED The user's privacy settings is preventing you to perform this action
USER_RESTRICTED You are limited/restricted. You can't perform this action.
1 id message
2 BROADCAST_FORBIDDEN The request can't be used in channels
3 CHANNEL_PUBLIC_GROUP_NA The channel/supergroup is not available
4 CHAT_ADMIN_INVITE_REQUIRED You don't have rights to invite other users
5 CHAT_FORBIDDEN You cannot write in this chat
6 CHAT_SEND_GIFS_FORBIDDEN You can't send animations in this chat
7 CHAT_SEND_MEDIA_FORBIDDEN You can't send media messages in this chat
8 CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat
9 CHAT_WRITE_FORBIDDEN You don't have rights to send messages in this chat
10 INLINE_BOT_REQUIRED The action must be performed through an inline bot callback
11 MESSAGE_AUTHOR_REQUIRED You are not the author of this message
12 MESSAGE_DELETE_FORBIDDEN You don't have rights to delete messages in this chat, most likely because you are not the author of them
13 RIGHT_FORBIDDEN You don't have enough rights for this action, or you tried to set one or more admin rights that can't be applied to this kind of chat (channel or supergroup)
14 SENSITIVE_CHANGE_FORBIDDEN Your sensitive content settings can't be changed at this time
15 USER_BOT_INVALID This method can only be called by a bot
16 USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups
17 USER_IS_BLOCKED The user is blocked
18 USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact
19 USER_PRIVACY_RESTRICTED The user's privacy settings is preventing you to perform this action
20 USER_RESTRICTED You are limited/restricted. You can't perform this action.

View File

@ -0,0 +1,9 @@
id message
AUTH_KEY_DUPLICATED The same authorization key (session file) was used in more than one place simultaneously. You must delete your session file and log in again with your phone number or bot token
FILEREF_UPGRADE_NEEDED The file reference has expired and you must use a refreshed one by obtaining the original media message
FRESH_CHANGE_PHONE_FORBIDDEN You can't change your phone number because your session was logged-in recently
FRESH_RESET_AUTHORISATION_FORBIDDEN You can't terminate other authorized sessions because the current was logged-in recently
PHONE_NUMBER_INVALID The phone number is invalid
PHONE_PASSWORD_FLOOD You have tried to log-in too many times
STICKERSET_INVALID The sticker set is invalid
STICKERSET_OWNER_ANONYMOUS This sticker set can't be used as the group's sticker set because it was created by one of its anonymous admins
1 id message
2 AUTH_KEY_DUPLICATED The same authorization key (session file) was used in more than one place simultaneously. You must delete your session file and log in again with your phone number or bot token
3 FILEREF_UPGRADE_NEEDED The file reference has expired and you must use a refreshed one by obtaining the original media message
4 FRESH_CHANGE_PHONE_FORBIDDEN You can't change your phone number because your session was logged-in recently
5 FRESH_RESET_AUTHORISATION_FORBIDDEN You can't terminate other authorized sessions because the current was logged-in recently
6 PHONE_NUMBER_INVALID The phone number is invalid
7 PHONE_PASSWORD_FLOOD You have tried to log-in too many times
8 STICKERSET_INVALID The sticker set is invalid
9 STICKERSET_OWNER_ANONYMOUS This sticker set can't be used as the group's sticker set because it was created by one of its anonymous admins

View File

@ -1,4 +1,5 @@
id message id message
FLOOD_TEST_PHONE_WAIT_X A wait of {x} seconds is required in the test servers
FLOOD_WAIT_X A wait of {x} seconds is required FLOOD_WAIT_X A wait of {x} seconds is required
TAKEOUT_INIT_DELAY_X You have to confirm the data export request using one of your mobile devices or wait {x} seconds SLOWMODE_WAIT_X A wait of {x} seconds is required to send messages in this chat.
SLOWMODE_WAIT_X A wait of {x} seconds is required to send messages in this chat. TAKEOUT_INIT_DELAY_X You have to confirm the data export request using one of your mobile devices or wait {x} seconds
1 id message
2 FLOOD_TEST_PHONE_WAIT_X A wait of {x} seconds is required in the test servers
3 FLOOD_WAIT_X A wait of {x} seconds is required
4 TAKEOUT_INIT_DELAY_X SLOWMODE_WAIT_X You have to confirm the data export request using one of your mobile devices or wait {x} seconds A wait of {x} seconds is required to send messages in this chat.
5 SLOWMODE_WAIT_X TAKEOUT_INIT_DELAY_X A wait of {x} seconds is required to send messages in this chat. You have to confirm the data export request using one of your mobile devices or wait {x} seconds

View File

@ -0,0 +1,25 @@
id message
AUTH_RESTART User authorization has restarted
CALL_OCCUPY_FAILED The call failed because the user is already making another call
ENCRYPTION_OCCUPY_FAILED Internal server error while accepting secret chat
FOLDER_DEAC_AUTOFIX_ALL Telegram is having internal problems. Please try again later
HISTORY_GET_FAILED The chat history couldn't be retrieved due to Telegram having internal problems. Please try again later
INTERDC_X_CALL_ERROR An error occurred while Telegram was intercommunicating with DC{x}. Please try again later
INTERDC_X_CALL_RICH_ERROR A rich error occurred while Telegram was intercommunicating with DC{x}. Please try again later
MEMBER_NO_LOCATION Couldn't find the member's location due to Telegram having internal problems. Please try again later
MEMBER_OCCUPY_PRIMARY_LOC_FAILED Telegram is having internal problems. Please try again later
MSGID_DECREASE_RETRY Telegram is having internal problems. Please try again later
MT_SEND_QUEUE_TOO_LONG The MTProto send queue has grown too much due to Telegram having internal problems. Please try again later
NEED_CHAT_INVALID The provided chat is invalid
NEED_MEMBER_INVALID The provided member is invalid or does not exist
PARTICIPANT_CALL_FAILED Failure while making call due to Telegram having internal problems. Please try again later
PERSISTENT_TIMESTAMP_OUTDATED The persistent timestamp is outdated due to Telegram having internal problems. Please try again later
PTS_CHANGE_EMPTY No PTS change
RANDOM_ID_DUPLICATE You provided a random ID that was already used
REG_ID_GENERATE_FAILED The registration id failed to generate due to Telegram having internal problems. Please try again later
RPC_CALL_FAIL Telegram is having internal problems. Please try again later
RPC_MCGET_FAIL Telegram is having internal problems. Please try again later
STORAGE_CHECK_FAILED Server storage check failed due to Telegram having internal problems. Please try again later
STORE_INVALID_SCALAR_TYPE Telegram is having internal problems. Please try again later
UNKNOWN_METHOD The method you tried to call cannot be called on non-CDN DCs
WORKER_BUSY_TOO_LONG_RETRY Server workers are too busy right now due to Telegram having internal problems. Please try again later
1 id message
2 AUTH_RESTART User authorization has restarted
3 CALL_OCCUPY_FAILED The call failed because the user is already making another call
4 ENCRYPTION_OCCUPY_FAILED Internal server error while accepting secret chat
5 FOLDER_DEAC_AUTOFIX_ALL Telegram is having internal problems. Please try again later
6 HISTORY_GET_FAILED The chat history couldn't be retrieved due to Telegram having internal problems. Please try again later
7 INTERDC_X_CALL_ERROR An error occurred while Telegram was intercommunicating with DC{x}. Please try again later
8 INTERDC_X_CALL_RICH_ERROR A rich error occurred while Telegram was intercommunicating with DC{x}. Please try again later
9 MEMBER_NO_LOCATION Couldn't find the member's location due to Telegram having internal problems. Please try again later
10 MEMBER_OCCUPY_PRIMARY_LOC_FAILED Telegram is having internal problems. Please try again later
11 MSGID_DECREASE_RETRY Telegram is having internal problems. Please try again later
12 MT_SEND_QUEUE_TOO_LONG The MTProto send queue has grown too much due to Telegram having internal problems. Please try again later
13 NEED_CHAT_INVALID The provided chat is invalid
14 NEED_MEMBER_INVALID The provided member is invalid or does not exist
15 PARTICIPANT_CALL_FAILED Failure while making call due to Telegram having internal problems. Please try again later
16 PERSISTENT_TIMESTAMP_OUTDATED The persistent timestamp is outdated due to Telegram having internal problems. Please try again later
17 PTS_CHANGE_EMPTY No PTS change
18 RANDOM_ID_DUPLICATE You provided a random ID that was already used
19 REG_ID_GENERATE_FAILED The registration id failed to generate due to Telegram having internal problems. Please try again later
20 RPC_CALL_FAIL Telegram is having internal problems. Please try again later
21 RPC_MCGET_FAIL Telegram is having internal problems. Please try again later
22 STORAGE_CHECK_FAILED Server storage check failed due to Telegram having internal problems. Please try again later
23 STORE_INVALID_SCALAR_TYPE Telegram is having internal problems. Please try again later
24 UNKNOWN_METHOD The method you tried to call cannot be called on non-CDN DCs
25 WORKER_BUSY_TOO_LONG_RETRY Server workers are too busy right now due to Telegram having internal problems. Please try again later

View File

@ -243,7 +243,10 @@ class Session:
else [data] else [data]
) )
log.debug(f"Received:\n{data}") # Call log.debug twice because calling it once by appending "data" to the previous string (i.e. f"Kind: {data}")
# will cause "data" to be evaluated as string every time instead of only when debug is actually enabled.
log.debug("Received:")
log.debug(data)
for msg in messages: for msg in messages:
if msg.seq_no == 0: if msg.seq_no == 0:
@ -367,7 +370,10 @@ class Session:
if wait_response: if wait_response:
self.results[msg_id] = Result() self.results[msg_id] = Result()
log.debug(f"Sent:\n{message}") # Call log.debug twice because calling it once by appending "data" to the previous string (i.e. f"Kind: {data}")
# will cause "data" to be evaluated as string every time instead of only when debug is actually enabled.
log.debug(f"Sent:")
log.debug(message)
if len(message) <= self.EXECUTOR_SIZE_THRESHOLD: if len(message) <= self.EXECUTOR_SIZE_THRESHOLD:
payload = mtproto.pack( payload = mtproto.pack(

View File

@ -25,7 +25,7 @@ from setuptools import setup, find_packages, Command
from compiler.api import compiler as api_compiler from compiler.api import compiler as api_compiler
from compiler.docs import compiler as docs_compiler from compiler.docs import compiler as docs_compiler
from compiler.error import compiler as error_compiler from compiler.errors import compiler as error_compiler
with open("requirements.txt", encoding="utf-8") as r: with open("requirements.txt", encoding="utf-8") as r:
requires = [i.strip() for i in r] requires = [i.strip() for i in r]