From 3ee94bdc5e3ddb472b1b47b55e5689dc24e02111 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 7 Mar 2021 16:09:47 +0100 Subject: [PATCH] Update known errors and error message Closes #1713 --- telethon/client/chats.py | 2 +- telethon_generator/data/errors.csv | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/telethon/client/chats.py b/telethon/client/chats.py index 1402ae7e..5e552dd9 100644 --- a/telethon/client/chats.py +++ b/telethon/client/chats.py @@ -1274,7 +1274,7 @@ class ChatMethods: """ entity = await self.get_input_entity(entity) if helpers._entity_type(entity) != helpers._EntityType.CHANNEL: - raise TypeError('You must pass a user entity') + raise TypeError('You must pass a channel entity') # Don't bother fetching the Channel entity (costs a request), instead # try to guess and if it fails we know it's the other one (best case diff --git a/telethon_generator/data/errors.csv b/telethon_generator/data/errors.csv index 394190c0..135d4888 100644 --- a/telethon_generator/data/errors.csv +++ b/telethon_generator/data/errors.csv @@ -108,6 +108,7 @@ ENCRYPTION_OCCUPY_FAILED,500,TDLib developer claimed it is not an error while ac ENTITIES_TOO_LONG,400,It is no longer possible to send such long data inside entity tags (for example inline text URLs) ENTITY_MENTION_USER_INVALID,400,You can't use this entity ERROR_TEXT_EMPTY,400,The provided error message is empty +EXPIRE_FORBIDDEN,400, EXPORT_CARD_INVALID,400,Provided card is invalid EXTERNAL_URL_INVALID,400,External URL invalid FIELD_NAME_EMPTY,400,The field with the name FIELD_NAME is missing @@ -176,6 +177,7 @@ MEDIA_EMPTY,400,The provided media object is invalid or the current account may 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) +MEDIA_TTL_INVALID,400, 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 MEGAGROUP_REQUIRED,400,The request can only be used with a megagroup channel