Minor updates to the documentation and errors

This commit is contained in:
Lonami Exo 2019-06-07 15:48:34 +02:00
parent 770c2c504d
commit 9752f66eab
4 changed files with 6 additions and 8 deletions

View File

@ -91,7 +91,7 @@ You will still need an API ID and hash, but the process is very similar:
api_hash = '0123456789abcdef0123456789abcdef'
bot_token = '12345:0123456789abcdef0123456789abcdef
# We have to manually call "start" if we want a explicit bot token
# We have to manually call "start" if we want an explicit bot token
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
# But then we can use the client instance as usual

View File

@ -22,6 +22,7 @@ BOT_INVALID,400,This is not a valid bot
BOT_METHOD_INVALID,400,The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot
BOT_MISSING,400,This method can only be run by a bot
BOT_POLLS_DISABLED,400,You cannot create polls under a bot account
BROADCAST_ID_INVALID,400,The channel is invalid
BUTTON_DATA_INVALID,400,The provided button data is invalid
BUTTON_TYPE_INVALID,400,The type of one of the buttons you provided is invalid
BUTTON_URL_INVALID,400,Button URL invalid
@ -122,6 +123,7 @@ INVITE_HASH_INVALID,400,The invite hash is invalid
LANG_PACK_INVALID,400,The provided language pack is invalid
LASTNAME_INVALID,,The last name is invalid
LIMIT_INVALID,400,An invalid limit was provided. See https://core.telegram.org/api/files#downloading-files
LINK_NOT_MODIFIED,400,The channel is already linked to this group
LOCATION_INVALID,400,The location given for a file was invalid. See https://core.telegram.org/api/files#downloading-files
MAX_ID_INVALID,400,The provided max ID is invalid
MAX_QTS_INVALID,400,The provided QTS were invalid
@ -131,6 +133,7 @@ MEDIA_EMPTY,400,The provided media object is invalid
MEDIA_INVALID,400,Media invalid
MEDIA_NEW_INVALID,400,The new media to edit the message with is invalid (such as stickers or voice notes)
MEDIA_PREV_INVALID,400,The old media cannot be edited with anything else (such as stickers or voice notes)
MEGAGROUP_ID_INVALID,400,The group is invalid
MEGAGROUP_PREHISTORY_HIDDEN,400,You can't set this discussion group because it's history is hidden
MEMBER_NO_LOCATION,500,An internal failure occurred while fetching user info (couldn't find location)
MEMBER_OCCUPY_PRIMARY_LOC_FAILED,500,Occupation of primary member location failed

1 name codes description
22 BOT_METHOD_INVALID 400 The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot
23 BOT_MISSING 400 This method can only be run by a bot
24 BOT_POLLS_DISABLED 400 You cannot create polls under a bot account
25 BROADCAST_ID_INVALID 400 The channel is invalid
26 BUTTON_DATA_INVALID 400 The provided button data is invalid
27 BUTTON_TYPE_INVALID 400 The type of one of the buttons you provided is invalid
28 BUTTON_URL_INVALID 400 Button URL invalid
123 LANG_PACK_INVALID 400 The provided language pack is invalid
124 LASTNAME_INVALID The last name is invalid
125 LIMIT_INVALID 400 An invalid limit was provided. See https://core.telegram.org/api/files#downloading-files
126 LINK_NOT_MODIFIED 400 The channel is already linked to this group
127 LOCATION_INVALID 400 The location given for a file was invalid. See https://core.telegram.org/api/files#downloading-files
128 MAX_ID_INVALID 400 The provided max ID is invalid
129 MAX_QTS_INVALID 400 The provided QTS were invalid
133 MEDIA_INVALID 400 Media invalid
134 MEDIA_NEW_INVALID 400 The new media to edit the message with is invalid (such as stickers or voice notes)
135 MEDIA_PREV_INVALID 400 The old media cannot be edited with anything else (such as stickers or voice notes)
136 MEGAGROUP_ID_INVALID 400 The group is invalid
137 MEGAGROUP_PREHISTORY_HIDDEN 400 You can't set this discussion group because it's history is hidden You can't set this discussion group because it's history is hidden
138 MEMBER_NO_LOCATION 500 An internal failure occurred while fetching user info (couldn't find location)
139 MEMBER_OCCUPY_PRIMARY_LOC_FAILED 500 Occupation of primary member location failed

View File

@ -33,11 +33,6 @@
})();
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro" rel="stylesheet">
<style>
body {
overflow: scroll;
}
</style>
</head>
<body>
<div id="main_div">

View File

@ -93,7 +93,7 @@ channels.leaveChannel,both,CHANNEL_INVALID CHANNEL_PRIVATE CHANNEL_PUBLIC_GROUP_
channels.readHistory,user,CHANNEL_INVALID CHANNEL_PRIVATE
channels.readMessageContents,user,CHANNEL_INVALID CHANNEL_PRIVATE
channels.reportSpam,user,CHANNEL_INVALID INPUT_USER_DEACTIVATED
channels.setDiscussionGroup,user,MEGAGROUP_PREHISTORY_HIDDEN
channels.setDiscussionGroup,user,BROADCAST_ID_INVALID LINK_NOT_MODIFIED MEGAGROUP_ID_INVALID MEGAGROUP_PREHISTORY_HIDDEN
channels.setStickers,both,CHANNEL_INVALID PARTICIPANTS_TOO_FEW
channels.togglePreHistoryHidden,user,CHAT_LINK_EXISTS
channels.toggleSignatures,user,CHANNEL_INVALID

1 method usability errors
93 channels.readHistory user CHANNEL_INVALID CHANNEL_PRIVATE
94 channels.readMessageContents user CHANNEL_INVALID CHANNEL_PRIVATE
95 channels.reportSpam user CHANNEL_INVALID INPUT_USER_DEACTIVATED
96 channels.setDiscussionGroup user MEGAGROUP_PREHISTORY_HIDDEN BROADCAST_ID_INVALID LINK_NOT_MODIFIED MEGAGROUP_ID_INVALID MEGAGROUP_PREHISTORY_HIDDEN
97 channels.setStickers both CHANNEL_INVALID PARTICIPANTS_TOO_FEW
98 channels.togglePreHistoryHidden user CHAT_LINK_EXISTS
99 channels.toggleSignatures user CHANNEL_INVALID