Commit Graph

65 Commits

Author SHA1 Message Date
Devesh Pal
391fbab674
Implement Sticker Choosing Action (#3144) 2021-09-01 15:08:58 +02:00
Lonami Exo
9285e50c63 Handle non-user bans when iterating banned participants
Closes #3105.
2021-08-22 13:24:02 +02:00
Lonami Exo
2df1dd7215 Don't call getFullChannel during iter_participants unless necessary
This should reduce the floodwaits of this request by a lot.
2021-07-09 20:11:21 +02:00
MiyukiKun
249670827c
Change manage_call permission to default to None (#3093) 2021-07-02 21:42:57 +02:00
Anonymous
7c5efee1de
Update to layer 129 and other additions/enhancements (#3074)
* Apply code corrections for the new layer types.
* Support not passing `user` to `get_permissions`.
* `download_profile_photo` now supports `MessageService`.
* `thumb` in send and edit message.
* Document new known errors.
2021-06-15 22:57:32 +02:00
Lonami Exo
f326769fa8 Add support for messages to get_stats 2021-03-20 20:20:36 +01:00
Lonami Exo
3ee94bdc5e Update known errors and error message
Closes #1713
2021-03-07 16:09:47 +01:00
Lonami Exo
d0ee3c3a56 Return the service message produced when kicking somebody
Helps with #1664.
2021-01-02 12:13:53 +01:00
Lonami Exo
0a4d54fca4 Update to layer 122
Closes #1645.
2020-12-11 16:55:49 +01:00
Lonami Exo
4db51dff8a Update to v1.17 2020-10-18 14:11:52 +02:00
Lonami Exo
cf1645b598 Improve documentation for ParticipantPermissions 2020-10-06 11:14:16 +02:00
Lonami Exo
7f61b92f81 Add anonymous permission to edit_admin and get_permissions 2020-10-06 11:14:16 +02:00
Nick80835
ce120cba13
Fix get_permissions in chats and when using self user (#1584) 2020-10-05 19:21:07 +02:00
kolay
fc765f6014
Add new get_permissions method (#1575)
Closes #1574.
2020-10-03 16:59:54 +02:00
Lonami Exo
75fbd28d3e Add a workaround for sometimes-missing photos from channels 2020-09-22 11:08:17 +02:00
Lonami Exo
73109eb819 Add a workaround for channels that claim have no photos but do 2020-08-13 15:13:29 +02:00
Lonami Exo
f18ab08334 Add new friendly method to get channel stats 2020-07-26 13:45:30 +02:00
Lonami Exo
393da7e57a Expose missing embed_links param in edit_permissions 2020-05-09 17:35:26 +02:00
TishSerg
a16c60c886
Fix action 'song' should alias 'audio' (#1444) 2020-04-26 11:00:00 +02:00
Lonami Exo
fa736f81af Handle all entity types on isinstance checks
Only the uses of `isinstance` against `InputPeer*` types were
reviewed. Notably, `utils` is exempt on this because it needs
to deal with everything on a case-by-case basis.

Since the addition of `*FromMessage` peers, any manual `isinstance`
checks to determine the type were prone to breaking or being
forgotten to be updated, so a common `helpers._entity_type()`
method was made to share this logic.

Since the conversion to `Peer` would be too expensive, a simpler
check against the name is made, which should be fast and cheap.
2019-12-23 13:52:07 +01:00
YouTwitFace
b862f215c5 Ignore channel-only permissions in megagroups (#1292) 2019-10-11 18:04:41 +02:00
Tanner Collin
72dd36bc17 Allow edit_admin on yourself (#1285) 2019-09-29 09:19:44 +02:00
penn5
88d8424474 Fix kick_participant in channels (#1284)
Presumably some server-side change made insta-unbanning no longer work.
2019-09-28 09:38:41 +02:00
Lonami Exo
67183ff9e8 Improve method signatures in the docs 2019-09-08 10:56:35 +02:00
Lonami Exo
00b0319397 Update to layer 104 2019-08-14 00:03:24 +02:00
Lonami Exo
e1905d0d7a Avoid using telethon.sync in the examples 2019-08-13 23:33:39 +02:00
Lonami Exo
d3221a508a Add kick_participant 2019-08-01 19:21:01 +02:00
Lonami Exo
5498d14e54 Fix default edit_permissions and clarify documentation 2019-07-23 10:14:31 +02:00
Lonami Exo
cbcbda5276 Minor documentation and type hint updates 2019-07-17 12:37:16 +02:00
Lonami Exo
944fb10733 Add missing return self on action/download ctx managers 2019-07-13 21:21:29 +02:00
painor
ae1c1b3912 Improve permission-related errors (#1231) 2019-07-10 23:19:50 +02:00
Lonami Exo
97e4d83593 Rename and clarify docs for edit_permissions 2019-07-06 19:31:33 +02:00
Lonami Exo
8e36bb4c4d Link Python keywords with Python's documentation 2019-07-06 12:11:00 +02:00
painor
2d2afc5280 Add edit_admin and edit_restrictions (#1210) 2019-07-05 10:48:21 +02:00
Lonami Exo
9322c37a94 Document iteration order 2019-06-28 20:44:06 +02:00
Lonami Exo
b6b4ea669d Remove messy subclassing in the TelegramClient
Since it was easy to cause MRO inconsistencies, and it's
not really needed now that self is type hinted as the client.
2019-06-24 17:48:46 +02:00
Lonami Exo
e47f3ec1d6 Clarify some aspects of the documentation 2019-06-01 16:28:20 +02:00
Lonami Exo
9ea686ab14 Create new client.iter_profile_photos method 2019-05-30 16:51:19 +02:00
Lonami Exo
a9ff328e38 Fix iter_participants search on small group chats 2019-05-20 14:02:51 +02:00
Lonami Exo
7c1c040d50 Update docstrings to have consistent style 2019-05-20 11:57:11 +02:00
Lonami Exo
0a3d6106f0 Completely overhaul the documentation 2019-05-09 12:50:09 +02:00
Lonami Exo
d92d989569 Quote type hints
Otherwise, sphinx completely butchers the documentation.
2019-05-08 17:16:09 +02:00
Lonami Exo
cd4b915522 Add type hints to all public methods in the client 2019-05-03 21:38:41 +02:00
Lonami Exo
9090ede5db Reduce __enter__/__exit__ boilerplate for sync ctx managers 2019-04-13 10:53:33 +02:00
Lonami Exo
badefcec48 Add new action method to easily send chat actions like typing 2019-04-13 10:37:23 +02:00
Lonami Exo
6799295115 Fix iter_participants in non-channels 2019-03-02 21:17:36 +01:00
Lonami Exo
6b50152bb3 Use constants for chunk sizes, remove irrelevant TODO 2019-02-27 13:07:25 +01:00
Lonami Exo
d02d0e2d5e Handle negative limits gracefully in async generators
We rely on >= 0 for setting the batch size to use (which must
be valid), so it makes sense to make negative limits equal 0.

This is similar to how asyncio.sleep(negative) sleeps 0 seconds,
despite the fact that time.sleep(negative) fails.
2019-02-27 13:01:04 +01:00
Lonami Exo
d508e58d49 Remove the "private" _total parameter 2019-02-27 12:59:50 +01:00
Lonami Exo
b9133567af Remove weird map chr range from aggressive iter_participants 2019-02-27 12:51:09 +01:00