Update documentation and list of known errors

Closes #3151.
This commit is contained in:
Lonami Exo 2021-09-11 11:02:10 +02:00
parent 28d3d4b122
commit 3f5f5dbe48
5 changed files with 20 additions and 1 deletions

View File

@ -84,6 +84,10 @@ use is very straightforward, or :tl:`InviteToChannelRequest` for channels:
[users_to_add]
))
Note that this method will only really work for friends or bot accounts.
Trying to mass-add users with this approach will not work, and can put both
your account and group to risk, possibly being flagged as spam and limited.
Checking a link without joining
===============================

View File

@ -169,6 +169,7 @@ Updates
remove_event_handler
list_event_handlers
catch_up
set_receive_updates
Bots
----

View File

@ -482,6 +482,16 @@ class DialogMethods:
Creates a `Conversation <telethon.tl.custom.conversation.Conversation>`
with the given entity.
.. note::
This Conversation API has certain shortcomings, such as lacking
persistence, poor interaction with other event handlers, and
overcomplicated usage for anything beyond the simplest case.
If you plan to interact with a bot without handlers, this works
fine, but when running a bot yourself, you may instead prefer
to follow the advice from https://stackoverflow.com/a/62246569/.
This is not the same as just sending a message to create a "dialog"
with them, but rather a way to easily send messages and await for
responses or other reactions. Refer to its documentation for more.

View File

@ -151,6 +151,7 @@ GIF_CONTENT_TYPE_INVALID,400,
GIF_ID_INVALID,400,The provided GIF ID is invalid
GRAPH_INVALID_RELOAD,400,
GRAPH_OUTDATED_RELOAD,400,"Data can't be used for the channel statistics, graphs outdated"
GROUPCALL_ADD_PARTICIPANTS_FAILED,500,
GROUPCALL_ALREADY_DISCARDED,400,
GROUPCALL_FORBIDDEN,403,
GROUPCALL_JOIN_MISSING,400,
@ -359,9 +360,11 @@ TMP_PASSWORD_DISABLED,400,The temporary password is disabled
TMP_PASSWORD_INVALID,400,Password auth needs to be regenerated
TOKEN_INVALID,400,The provided token is invalid
TTL_DAYS_INVALID,400,The provided TTL is invalid
TTL_MEDIA_INVALID,400,The provided media cannot be used with a TTL
TTL_PERIOD_INVALID,400,The provided TTL Period is invalid
TYPES_EMPTY,400,The types field is empty
TYPE_CONSTRUCTOR_INVALID,400,The type constructor is invalid
UNKNOWN_ERROR,400,
UNKNOWN_METHOD,500,The method you tried to call cannot be called on non-CDN DCs
UNTIL_DATE_INVALID,400,That date cannot be specified in this request (try using None)
URL_INVALID,400,The URL used was invalid (e.g. when answering a callback with a URL that's not t.me/yourbot or your game's URL)

1 name codes description
151 GIF_ID_INVALID 400 The provided GIF ID is invalid
152 GRAPH_INVALID_RELOAD 400
153 GRAPH_OUTDATED_RELOAD 400 Data can't be used for the channel statistics, graphs outdated
154 GROUPCALL_ADD_PARTICIPANTS_FAILED 500
155 GROUPCALL_ALREADY_DISCARDED 400
156 GROUPCALL_FORBIDDEN 403
157 GROUPCALL_JOIN_MISSING 400
360 TMP_PASSWORD_INVALID 400 Password auth needs to be regenerated
361 TOKEN_INVALID 400 The provided token is invalid
362 TTL_DAYS_INVALID 400 The provided TTL is invalid
363 TTL_MEDIA_INVALID 400 The provided media cannot be used with a TTL
364 TTL_PERIOD_INVALID 400 The provided TTL Period is invalid
365 TYPES_EMPTY 400 The types field is empty
366 TYPE_CONSTRUCTOR_INVALID 400 The type constructor is invalid
367 UNKNOWN_ERROR 400
368 UNKNOWN_METHOD 500 The method you tried to call cannot be called on non-CDN DCs
369 UNTIL_DATE_INVALID 400 That date cannot be specified in this request (try using None)
370 URL_INVALID 400 The URL used was invalid (e.g. when answering a callback with a URL that's not t.me/yourbot or your game's URL)

View File

@ -124,6 +124,7 @@ channels.togglePreHistoryHidden,user,CHAT_LINK_EXISTS
channels.toggleSignatures,user,CHANNEL_INVALID
channels.toggleSlowMode,user,SECONDS_INVALID
channels.updateUsername,user,CHANNELS_ADMIN_PUBLIC_TOO_MUCH CHANNEL_INVALID CHAT_ADMIN_REQUIRED USERNAME_INVALID USERNAME_OCCUPIED
channels.viewSponsoredMessage,user,UNKNOWN_ERROR
contacts.acceptContact,user,
contacts.addContact,user,CONTACT_NAME_EMPTY
contacts.block,user,CONTACT_ID_INVALID
@ -319,7 +320,7 @@ phone.discardGroupCallRequest,user,GROUPCALL_ALREADY_DISCARDED
phone.editGroupCallParticipant,user,USER_VOLUME_INVALID
phone.getCallConfig,user,
phone.inviteToGroupCall,user,GROUPCALL_FORBIDDEN
phone.joinGroupCall,user,GROUPCALL_SSRC_DUPLICATE_MUCH
phone.joinGroupCall,user,GROUPCALL_ADD_PARTICIPANTS_FAILED GROUPCALL_SSRC_DUPLICATE_MUCH
phone.joinGroupCallPresentation,user, PARTICIPANT_JOIN_MISSING
phone.receivedCall,user,CALL_ALREADY_DECLINED CALL_PEER_INVALID
phone.requestCall,user,CALL_PROTOCOL_FLAGS_INVALID PARTICIPANT_CALL_FAILED PARTICIPANT_VERSION_OUTDATED USER_ID_INVALID USER_IS_BLOCKED USER_PRIVACY_RESTRICTED

1 method usability errors
124 channels.toggleSignatures user CHANNEL_INVALID
125 channels.toggleSlowMode user SECONDS_INVALID
126 channels.updateUsername user CHANNELS_ADMIN_PUBLIC_TOO_MUCH CHANNEL_INVALID CHAT_ADMIN_REQUIRED USERNAME_INVALID USERNAME_OCCUPIED
127 channels.viewSponsoredMessage user UNKNOWN_ERROR
128 contacts.acceptContact user
129 contacts.addContact user CONTACT_NAME_EMPTY
130 contacts.block user CONTACT_ID_INVALID
320 phone.editGroupCallParticipant user USER_VOLUME_INVALID
321 phone.getCallConfig user
322 phone.inviteToGroupCall user GROUPCALL_FORBIDDEN
323 phone.joinGroupCall user GROUPCALL_SSRC_DUPLICATE_MUCH GROUPCALL_ADD_PARTICIPANTS_FAILED GROUPCALL_SSRC_DUPLICATE_MUCH
324 phone.joinGroupCallPresentation user PARTICIPANT_JOIN_MISSING
325 phone.receivedCall user CALL_ALREADY_DECLINED CALL_PEER_INVALID
326 phone.requestCall user CALL_PROTOCOL_FLAGS_INVALID PARTICIPANT_CALL_FAILED PARTICIPANT_VERSION_OUTDATED USER_ID_INVALID USER_IS_BLOCKED USER_PRIVACY_RESTRICTED