Commit Graph

46 Commits

Author SHA1 Message Date
Lonami Exo
0bc598c121 Stop auto-accepting ToS on sign_up, add get_tos instead 2022-02-17 12:40:38 +01:00
Lonami Exo
5c6fdf9a71 Return custom User from sign_in/sign_up 2022-02-17 12:40:38 +01:00
Lonami Exo
df0e710fa1 Add a custom SentCode type 2022-02-17 12:40:38 +01:00
Lonami Exo
483e2aadf1 Begin updating the way updates are built 2022-02-17 12:40:38 +01:00
Lonami Exo
c914a92dcf Start using the new Sender and Chat Getter interface 2022-02-17 12:40:38 +01:00
Lonami Exo
f0654a0833 Change Chat and Sender Getter interface to match new description 2022-02-17 12:40:38 +01:00
Lonami Exo
9bfe4cddf5 Begin major entity overhaul
Introduce User and Chat as better alternatives to raw API.
Document the rationale and new intended usage.
2022-02-17 12:40:38 +01:00
Lonami Exo
2c4ff8803f Remove strange except in to_dict 2022-02-17 12:40:38 +01:00
Mohammadreza Jafari
8aa4d9a263
Make document title a required parameter (#3182) 2022-02-16 12:40:07 +01:00
Shrimadhav U K
c45b919109
Add a friendly method to react to messages (#3681) 2022-02-16 11:26:09 +01:00
Lonami Exo
8df66c0b47 Add markdown and html properties to Message 2022-02-08 11:40:40 +01:00
Lonami Exo
07faa53c5a Remove client.edit_folder
Not happy with the design, and keeping it would mean
having to maintain it. It can be added back with a better design.
2022-02-08 10:23:55 +01:00
Lonami Exo
84b016cf1c Make more TLObject methods private
Even though raw API is somewhat necessary at times,
these methods should remain implementation details.
2022-02-08 10:02:59 +01:00
Lonami Exo
1f3ce07594 Manually set random_id in requests
Getting the response message relies on this ID.
Because requests are now immutable, and resolve sets the random_id,
the method to obtain the response message would lack the random_id,
as the original request is not touched by resolve.
2022-02-07 11:30:27 +01:00
Lonami Exo
bd7675581d Make custom.Message properties mutable
It is convenient to, for example, change the text before resending.
2022-02-07 11:30:27 +01:00
Lonami Exo
faaa038825 Fix RpcError catch-all 2022-02-07 11:30:27 +01:00
Lonami Exo
a6f53baaba Remove client check in custom Message 2022-02-07 11:30:27 +01:00
Lonami Exo
ae43a47602 Update iter_ usages with get_ 2022-02-07 11:30:27 +01:00
Lonami Exo
3b12cc3e51 Fix stringify for custom Message 2022-02-07 11:30:27 +01:00
Lonami Exo
56faccf151 Fix and update usage of parse_mode 2022-02-07 11:30:27 +01:00
Devesh Pal
acc512683c
Update to layer 138 (#3698) 2022-02-04 14:22:51 +01:00
Devesh Pal
7778e54467
Allow restricting channels (#3679) 2022-01-24 21:09:51 +01:00
Devesh Pal
539e3cb808
Add new features from new layer (#3676)
Updated some documentation regarding raw API.
get_permissions has been adjusted.
Expose more parameters when sending messages.
Update chat action.
Support sending spoilers.
Update buttons.
2022-01-24 13:15:02 +01:00
Lonami Exo
f8264abb5a Clean-up client's __init__ and remove entity cache
Entity cache uses are removed. It was a source of ever-growing memory
usage that has to be reworked. This affects everything that tried to
obtain an input entity, input sender or input chat (such as the
SenderGetter or calls to _get_entity_pair). Input entities need to be
reworked in any case.

Its removal also affects the automatic cache of any raw API request.

Raise last error parameter is removed, and its behaviour made default.

The connection type parameter has been removed, since users really have
no need to change it.

A few more attributes have been made private, since users should not
mess with those.
2022-01-18 12:56:17 +01:00
Lonami Exo
721c803af9 Stop opening webbrowser on clicking URL buttons 2022-01-09 12:23:06 +01:00
Lonami Exo
232e76e73a Stop setting the sender to be the channel when missing 2022-01-09 12:20:58 +01:00
Lonami Exo
010ee0813a Rename send_read_acknowledge 2022-01-09 12:18:15 +01:00
Lonami Exo
b566e59036 Add stringify back to custom Message 2022-01-09 12:18:15 +01:00
Lonami Exo
a5dce81d0f Actually fill parameters in Message._as_input 2021-10-12 18:01:34 +02:00
Lonami Exo
72fc8f6808 Continue work on Message sending overhaul 2021-10-12 17:59:30 +02:00
Lonami Exo
3853f98e5f Begin work into making Message a viable way to send them 2021-10-09 12:01:45 +02:00
Lonami Exo
197a1ca996 Fix some modules were public when they should not have been 2021-09-26 19:58:42 +02:00
Lonami Exo
6f602a203e Fix custom.Forward not using the new __slots__ 2021-09-26 18:33:03 +02:00
Lonami Exo
86c47a2771 Use __slots__ in all generated classes 2021-09-26 17:52:16 +02:00
Lonami Exo
8bd4835eb2 Remove build_reply_markup from the client 2021-09-26 17:24:18 +02:00
Lonami Exo
1762f554df Make events subpackage private 2021-09-24 21:11:50 +02:00
Lonami Exo
debde6e856 Completely overhaul errors to be generated dynamically 2021-09-24 20:12:00 +02:00
Lonami Exo
3b1660669e Remove self input user and bot cache from client
The session_state cache can be used instead.
This does put get_me with input_peer at a disadvantage, but I expect
this is not used all that often, since 'me' does just fine.
2021-09-19 18:16:12 +02:00
Lonami Exo
8114fb6c9b Stop checking fwd_from or not out in message.edit 2021-09-18 13:34:21 +02:00
Lonami Exo
9af8ec8cce Officially remove bot_file_id support 2021-09-18 13:06:52 +02:00
Lonami Exo
783c1771ab Fix remaining uses of old types namespace 2021-09-17 21:05:09 +02:00
Lonami Exo
943ad892f7 Address remaining uses of the Request suffix with raw API 2021-09-13 21:00:31 +02:00
Lonami Exo
334a847de7 Make custom.Message functional 2021-09-13 20:39:41 +02:00
Lonami Exo
499fc9f603 Move alltlobjects.py and fix imports 2021-09-12 16:58:06 +02:00
Lonami Exo
5fd2a017b2 Fix imports 2021-09-12 16:23:55 +02:00
Lonami Exo
604c3de070 Move custom and core objects to a new subpackage
This should keep it cleaner, as now _tl is fully auto-generated.
2021-09-12 16:05:56 +02:00