Commit graph

11 commits

Author SHA1 Message Date
DevOps117
6e1425ada3
Drop support for iterators where they are not needed (#969)
* delete_messages: Drop support for generators

Since we used a list there anyway, this approach will lead to more localized errors and can reduce function overhead.

Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>

* delete_messages: Return pts_count:int

An example usecase would be for a normal bot which uses range based on message ids
instead of keeping a track of messages and using the DeletedMessagesHandler.

Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>

* Drop support for Iterators and update docstrings and some cleanups.

Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>

* Update get_users.py

* Update get_messages.py

* Update delete_messages.py

* Update forward_messages.py

* Update get_messages.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2022-05-14 08:58:30 +02:00
Dan
b47591e6d2 Turn examples asynchronous 2022-04-24 11:56:07 +02:00
Dan
78efb04b40 Rename Client.send to Client.invoke 2022-04-24 11:56:07 +02:00
Dan
32624ef5e6 Improve type hints 2022-04-24 11:56:06 +02:00
Dan
626a1bd938 Update copyright year 2022-01-07 10:23:45 +01:00
Dan
8c8288412f Various improvements 2022-01-07 10:18:51 +01:00
Dan
808346f15b Fix wrong example due to a method rename 2021-03-21 22:13:41 +01:00
Dan
c971616808 Add add_contact, improve delete_contacts and import_contacts 2021-03-20 10:13:40 +01:00
Dan
7dda167c09 Update copyright notice
Year 2021
2021-01-01 22:58:48 +01:00
Dan
c139d78b34 Fix wrong imports in examples 2020-10-31 19:29:39 +01:00
Dan
538f1e3972 Deep rewrite: preparing for v1.0
- Pyrogram core is now fully asynchronous
- Ditched Python 3.5, welcome 3.6 as minimum version.
- Moved all types to pyrogram.types
- Turned the Filters class into a module (filters)
- Moved all filters to pyrogram.filters
- Moved all handlers to pyrogram.handlers
- Moved all emoji to pyrogram.emoji
- Renamed pyrogram.api to pyrogram.raw
- Clock is now synced with server's time
- Telegram schema updated to Layer 117
- Greatly improved the TL compiler (proper type-constructor hierarchy)
- Added "do not edit" warning in generated files
- Crypto parts are executed in a thread pool to avoid blocking the event loop
- idle() is now a separate function (it doesn't deal with Client instances)
- Async storage, async filters and async progress callback (optional, can be sync too)
- Added getpass back, for hidden password inputs
2020-08-22 08:05:05 +02:00