Update documentation and list of known errors

This commit is contained in:
Lonami Exo 2022-12-14 20:00:55 +01:00
parent 4a6ef97910
commit b2925f8279
3 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,8 @@ send yourself the very first sticker you have:
stickers = await client(GetStickerSetRequest(
stickerset=InputStickerSetID(
id=sticker_set.id, access_hash=sticker_set.access_hash
)
),
hash=0
))
# Stickers are nothing more than files, so send that

View File

@ -395,6 +395,7 @@ USERNAME_INVALID,400,"Nobody is using this username, or the username is unaccept
USERNAME_NOT_MODIFIED,400,The username is not different from the current username
USERNAME_NOT_OCCUPIED,400,The username is not in use by anyone else yet
USERNAME_OCCUPIED,400,The username is already taken
USERNAME_PURCHASE_AVAILABLE,400,
USERS_TOO_FEW,400,"Not enough users (to create a chat, for example)"
USERS_TOO_MUCH,400,"The maximum number of users has been exceeded (to create a chat, for example)"
USER_ADMIN_INVALID,400,Either you're not an admin or you tried to ban an admin that you didn't promote

1 name codes description
395 USERNAME_NOT_MODIFIED 400 The username is not different from the current username
396 USERNAME_NOT_OCCUPIED 400 The username is not in use by anyone else yet
397 USERNAME_OCCUPIED 400 The username is already taken
398 USERNAME_PURCHASE_AVAILABLE 400
399 USERS_TOO_FEW 400 Not enough users (to create a chat, for example)
400 USERS_TOO_MUCH 400 The maximum number of users has been exceeded (to create a chat, for example)
401 USER_ADMIN_INVALID 400 Either you're not an admin or you tried to ban an admin that you didn't promote

View File

@ -123,7 +123,7 @@ channels.setStickers,both,CHANNEL_INVALID PARTICIPANTS_TOO_FEW STICKERSET_OWNER_
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.updateUsername,user,CHANNELS_ADMIN_PUBLIC_TOO_MUCH CHANNEL_INVALID CHAT_ADMIN_REQUIRED USERNAME_INVALID USERNAME_OCCUPIED USERNAME_PURCHASE_AVAILABLE
channels.viewSponsoredMessage,user,UNKNOWN_ERROR
contacts.acceptContact,user,
contacts.addContact,user,CONTACT_NAME_EMPTY

1 method usability errors
123 channels.togglePreHistoryHidden user CHAT_LINK_EXISTS
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 CHANNELS_ADMIN_PUBLIC_TOO_MUCH CHANNEL_INVALID CHAT_ADMIN_REQUIRED USERNAME_INVALID USERNAME_OCCUPIED USERNAME_PURCHASE_AVAILABLE
127 channels.viewSponsoredMessage user UNKNOWN_ERROR
128 contacts.acceptContact user
129 contacts.addContact user CONTACT_NAME_EMPTY