diff --git a/readthedocs/examples/chats-and-channels.rst b/readthedocs/examples/chats-and-channels.rst index 53b508be..2c3823c3 100644 --- a/readthedocs/examples/chats-and-channels.rst +++ b/readthedocs/examples/chats-and-channels.rst @@ -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 =============================== diff --git a/readthedocs/quick-references/client-reference.rst b/readthedocs/quick-references/client-reference.rst index 5b998344..6dd8245c 100644 --- a/readthedocs/quick-references/client-reference.rst +++ b/readthedocs/quick-references/client-reference.rst @@ -169,6 +169,7 @@ Updates remove_event_handler list_event_handlers catch_up + set_receive_updates Bots ---- diff --git a/telethon/client/dialogs.py b/telethon/client/dialogs.py index 3665c94e..8c0860fc 100644 --- a/telethon/client/dialogs.py +++ b/telethon/client/dialogs.py @@ -482,6 +482,16 @@ class DialogMethods: Creates a `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. diff --git a/telethon_generator/data/errors.csv b/telethon_generator/data/errors.csv index 1f2120e2..ff9d8168 100644 --- a/telethon_generator/data/errors.csv +++ b/telethon_generator/data/errors.csv @@ -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) diff --git a/telethon_generator/data/methods.csv b/telethon_generator/data/methods.csv index 266e352a..4427492b 100644 --- a/telethon_generator/data/methods.csv +++ b/telethon_generator/data/methods.csv @@ -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