Pytdbot 0.9.2.dev5__tar.gz → 0.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/PKG-INFO +2 -2
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/Pytdbot.egg-info/PKG-INFO +2 -2
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/README.md +1 -1
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/__init__.py +1 -1
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/client_manager.py +1 -1
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/handlers/decorators.py +3 -2
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/handlers/handler.py +3 -1
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/handlers/td_updates.py +90 -10
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/methods/methods.py +2 -3
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/methods/td_functions.py +444 -144
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/tdjson/tdjson.py +4 -5
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/__init__.py +109 -33
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/td_types/bound_methods/chatActions.py +2 -1
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/td_types/bound_methods/file.py +1 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/td_types/bound_methods/message.py +32 -3
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/td_types/types.py +1955 -368
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/text_format.py +39 -37
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/setup.py +1 -1
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/LICENSE +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/MANIFEST.in +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/Pytdbot.egg-info/SOURCES.txt +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/Pytdbot.egg-info/dependency_links.txt +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/Pytdbot.egg-info/requires.txt +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/Pytdbot.egg-info/top_level.txt +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/client.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/exception/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/filters.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/handlers/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/methods/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/tdjson/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/plugins/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/td_types/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/td_types/bound_methods/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/types/td_types/bound_methods/callback_query.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/__init__.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/asyncio_utils.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/escape.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/json_utils.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/obj_encoder.py +1 -1
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/strings.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/pytdbot/utils/webapps.py +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/requirements.txt +0 -0
- {pytdbot-0.9.2.dev5 → pytdbot-0.9.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Pytdbot
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
4
4
|
Summary: Easy-to-use asynchronous TDLib wrapper for Python.
|
|
5
5
|
Home-page: https://github.com/pytdbot/client
|
|
6
6
|
Author: AYMEN Mohammed
|
|
@@ -30,7 +30,7 @@ Dynamic: requires-dist
|
|
|
30
30
|
Dynamic: requires-python
|
|
31
31
|
Dynamic: summary
|
|
32
32
|
|
|
33
|
-
# Pytdbot [](https://pypi.org/project/Pytdbot) [](https://pypi.org/project/Pytdbot) [](https://github.com/tdlib/td) [](https://pepy.tech/project/pytdbot) [](https://t.me/pytdbotchat)
|
|
34
34
|
|
|
35
35
|
Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
36
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Pytdbot
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
4
4
|
Summary: Easy-to-use asynchronous TDLib wrapper for Python.
|
|
5
5
|
Home-page: https://github.com/pytdbot/client
|
|
6
6
|
Author: AYMEN Mohammed
|
|
@@ -30,7 +30,7 @@ Dynamic: requires-dist
|
|
|
30
30
|
Dynamic: requires-python
|
|
31
31
|
Dynamic: summary
|
|
32
32
|
|
|
33
|
-
# Pytdbot [](https://pypi.org/project/Pytdbot) [](https://pypi.org/project/Pytdbot) [](https://github.com/tdlib/td) [](https://pepy.tech/project/pytdbot) [](https://t.me/pytdbotchat)
|
|
34
34
|
|
|
35
35
|
Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
36
36
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Pytdbot [](https://pypi.org/project/Pytdbot) [](https://pypi.org/project/Pytdbot) [](https://github.com/tdlib/td) [](https://pepy.tech/project/pytdbot) [](https://t.me/pytdbotchat)
|
|
2
2
|
|
|
3
3
|
Pytdbot (Python TDLib) is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
4
4
|
|
|
@@ -189,7 +189,7 @@ class ClientManager:
|
|
|
189
189
|
await self.delete_client(client_id, close_client=True)
|
|
190
190
|
|
|
191
191
|
# Send dummy request to wake up receiver
|
|
192
|
-
self.send(
|
|
192
|
+
self.send(0, {"@type": "getOption", "name": "version"})
|
|
193
193
|
|
|
194
194
|
await self.__receiver_task
|
|
195
195
|
|
|
@@ -3256,6 +3256,86 @@ class Updates:
|
|
|
3256
3256
|
|
|
3257
3257
|
return decorator
|
|
3258
3258
|
|
|
3259
|
+
def on_updateGroupCallParticipants(
|
|
3260
|
+
self: "pytdbot.Client" = None,
|
|
3261
|
+
filters: "pytdbot.filters.Filter" = None,
|
|
3262
|
+
position: int = None,
|
|
3263
|
+
) -> Callable:
|
|
3264
|
+
r"""The list of group call participants that can send and receive encrypted call data has changed; for group calls not bound to a chat only
|
|
3265
|
+
|
|
3266
|
+
Parameters:
|
|
3267
|
+
filters (:class:`pytdbot.filters.Filter`, *optional*):
|
|
3268
|
+
An update filter
|
|
3269
|
+
|
|
3270
|
+
position (``int``, *optional*):
|
|
3271
|
+
The function position in handlers list. Default is ``None`` (append)
|
|
3272
|
+
|
|
3273
|
+
Raises:
|
|
3274
|
+
:py:class:`TypeError`
|
|
3275
|
+
"""
|
|
3276
|
+
|
|
3277
|
+
def decorator(func: Callable) -> Callable:
|
|
3278
|
+
if hasattr(func, "_handler"):
|
|
3279
|
+
return func
|
|
3280
|
+
elif isinstance(self, pytdbot.Client):
|
|
3281
|
+
if iscoroutinefunction(func):
|
|
3282
|
+
self.add_handler(
|
|
3283
|
+
"updateGroupCallParticipants", func, filters, position
|
|
3284
|
+
)
|
|
3285
|
+
else:
|
|
3286
|
+
raise TypeError("Handler must be async")
|
|
3287
|
+
elif isinstance(self, pytdbot.filters.Filter):
|
|
3288
|
+
func._handler = Handler(
|
|
3289
|
+
func, "updateGroupCallParticipants", self, position
|
|
3290
|
+
)
|
|
3291
|
+
else:
|
|
3292
|
+
func._handler = Handler(
|
|
3293
|
+
func, "updateGroupCallParticipants", filters, position
|
|
3294
|
+
)
|
|
3295
|
+
return func
|
|
3296
|
+
|
|
3297
|
+
return decorator
|
|
3298
|
+
|
|
3299
|
+
def on_updateGroupCallVerificationState(
|
|
3300
|
+
self: "pytdbot.Client" = None,
|
|
3301
|
+
filters: "pytdbot.filters.Filter" = None,
|
|
3302
|
+
position: int = None,
|
|
3303
|
+
) -> Callable:
|
|
3304
|
+
r"""The verification state of an encrypted group call has changed; for group calls not bound to a chat only
|
|
3305
|
+
|
|
3306
|
+
Parameters:
|
|
3307
|
+
filters (:class:`pytdbot.filters.Filter`, *optional*):
|
|
3308
|
+
An update filter
|
|
3309
|
+
|
|
3310
|
+
position (``int``, *optional*):
|
|
3311
|
+
The function position in handlers list. Default is ``None`` (append)
|
|
3312
|
+
|
|
3313
|
+
Raises:
|
|
3314
|
+
:py:class:`TypeError`
|
|
3315
|
+
"""
|
|
3316
|
+
|
|
3317
|
+
def decorator(func: Callable) -> Callable:
|
|
3318
|
+
if hasattr(func, "_handler"):
|
|
3319
|
+
return func
|
|
3320
|
+
elif isinstance(self, pytdbot.Client):
|
|
3321
|
+
if iscoroutinefunction(func):
|
|
3322
|
+
self.add_handler(
|
|
3323
|
+
"updateGroupCallVerificationState", func, filters, position
|
|
3324
|
+
)
|
|
3325
|
+
else:
|
|
3326
|
+
raise TypeError("Handler must be async")
|
|
3327
|
+
elif isinstance(self, pytdbot.filters.Filter):
|
|
3328
|
+
func._handler = Handler(
|
|
3329
|
+
func, "updateGroupCallVerificationState", self, position
|
|
3330
|
+
)
|
|
3331
|
+
else:
|
|
3332
|
+
func._handler = Handler(
|
|
3333
|
+
func, "updateGroupCallVerificationState", filters, position
|
|
3334
|
+
)
|
|
3335
|
+
return func
|
|
3336
|
+
|
|
3337
|
+
return decorator
|
|
3338
|
+
|
|
3259
3339
|
def on_updateNewCallSignalingData(
|
|
3260
3340
|
self: "pytdbot.Client" = None,
|
|
3261
3341
|
filters: "pytdbot.filters.Filter" = None,
|
|
@@ -3480,12 +3560,12 @@ class Updates:
|
|
|
3480
3560
|
|
|
3481
3561
|
return decorator
|
|
3482
3562
|
|
|
3483
|
-
def
|
|
3563
|
+
def on_updateStoryPostSucceeded(
|
|
3484
3564
|
self: "pytdbot.Client" = None,
|
|
3485
3565
|
filters: "pytdbot.filters.Filter" = None,
|
|
3486
3566
|
position: int = None,
|
|
3487
3567
|
) -> Callable:
|
|
3488
|
-
r"""A story has been successfully
|
|
3568
|
+
r"""A story has been successfully posted
|
|
3489
3569
|
|
|
3490
3570
|
Parameters:
|
|
3491
3571
|
filters (:class:`pytdbot.filters.Filter`, *optional*):
|
|
@@ -3504,28 +3584,28 @@ class Updates:
|
|
|
3504
3584
|
elif isinstance(self, pytdbot.Client):
|
|
3505
3585
|
if iscoroutinefunction(func):
|
|
3506
3586
|
self.add_handler(
|
|
3507
|
-
"
|
|
3587
|
+
"updateStoryPostSucceeded", func, filters, position
|
|
3508
3588
|
)
|
|
3509
3589
|
else:
|
|
3510
3590
|
raise TypeError("Handler must be async")
|
|
3511
3591
|
elif isinstance(self, pytdbot.filters.Filter):
|
|
3512
3592
|
func._handler = Handler(
|
|
3513
|
-
func, "
|
|
3593
|
+
func, "updateStoryPostSucceeded", self, position
|
|
3514
3594
|
)
|
|
3515
3595
|
else:
|
|
3516
3596
|
func._handler = Handler(
|
|
3517
|
-
func, "
|
|
3597
|
+
func, "updateStoryPostSucceeded", filters, position
|
|
3518
3598
|
)
|
|
3519
3599
|
return func
|
|
3520
3600
|
|
|
3521
3601
|
return decorator
|
|
3522
3602
|
|
|
3523
|
-
def
|
|
3603
|
+
def on_updateStoryPostFailed(
|
|
3524
3604
|
self: "pytdbot.Client" = None,
|
|
3525
3605
|
filters: "pytdbot.filters.Filter" = None,
|
|
3526
3606
|
position: int = None,
|
|
3527
3607
|
) -> Callable:
|
|
3528
|
-
r"""A story failed to
|
|
3608
|
+
r"""A story failed to post\. If the story posting is canceled, then updateStoryDeleted will be received instead of this update
|
|
3529
3609
|
|
|
3530
3610
|
Parameters:
|
|
3531
3611
|
filters (:class:`pytdbot.filters.Filter`, *optional*):
|
|
@@ -3543,14 +3623,14 @@ class Updates:
|
|
|
3543
3623
|
return func
|
|
3544
3624
|
elif isinstance(self, pytdbot.Client):
|
|
3545
3625
|
if iscoroutinefunction(func):
|
|
3546
|
-
self.add_handler("
|
|
3626
|
+
self.add_handler("updateStoryPostFailed", func, filters, position)
|
|
3547
3627
|
else:
|
|
3548
3628
|
raise TypeError("Handler must be async")
|
|
3549
3629
|
elif isinstance(self, pytdbot.filters.Filter):
|
|
3550
|
-
func._handler = Handler(func, "
|
|
3630
|
+
func._handler = Handler(func, "updateStoryPostFailed", self, position)
|
|
3551
3631
|
else:
|
|
3552
3632
|
func._handler = Handler(
|
|
3553
|
-
func, "
|
|
3633
|
+
func, "updateStoryPostFailed", filters, position
|
|
3554
3634
|
)
|
|
3555
3635
|
return func
|
|
3556
3636
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import pytdbot
|
|
2
|
-
|
|
3
1
|
from typing import List, Union
|
|
4
2
|
|
|
3
|
+
import pytdbot
|
|
4
|
+
|
|
5
5
|
from ..types import (
|
|
6
6
|
ChatTypeSupergroup,
|
|
7
7
|
Error,
|
|
@@ -37,7 +37,6 @@ from ..types import (
|
|
|
37
37
|
TextParseModeHTML,
|
|
38
38
|
TextParseModeMarkdown,
|
|
39
39
|
)
|
|
40
|
-
|
|
41
40
|
from .td_functions import TDLibFunctions
|
|
42
41
|
|
|
43
42
|
|