Pytdbot 0.9.8.dev0__tar.gz → 0.9.9__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.8.dev0 → pytdbot-0.9.9}/PKG-INFO +12 -3
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/Pytdbot.egg-info/PKG-INFO +12 -3
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/README.md +11 -2
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/__init__.py +1 -1
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/client.py +3 -1
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/client_manager.py +9 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/handlers/td_updates.py +681 -91
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/methods/methods.py +43 -42
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/methods/td_functions.py +2801 -1935
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/tdjson/tdjson.py +19 -14
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/__init__.py +113 -5
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/bound_methods/chatActions.py +5 -4
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/bound_methods/file.py +16 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/bound_methods/message.py +24 -24
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/td_types.py +4399 -1532
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/setup.py +3 -3
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/LICENSE +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/MANIFEST.in +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/Pytdbot.egg-info/SOURCES.txt +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/Pytdbot.egg-info/dependency_links.txt +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/Pytdbot.egg-info/requires.txt +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/Pytdbot.egg-info/top_level.txt +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/exception/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/filters.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/handlers/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/handlers/decorators.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/handlers/handler.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/methods/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/tdjson/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/bound_methods/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/bound_methods/callback_query.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/bound_methods/sender_id.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/plugins/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/tdserver/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/tdserver/schedule.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/types/tdserver/stats.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/__init__.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/asyncio_utils.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/escape.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/json_utils.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/obj_encoder.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/strings.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/text_format.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/pytdbot/utils/webapps.py +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/requirements.txt +0 -0
- {pytdbot-0.9.8.dev0 → pytdbot-0.9.9}/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.9
|
|
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,9 +30,13 @@ 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
|
+
<a href="https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL&n=AYMEN&t=5&c=You+deserve+a+Cup+of+TON+for+Pytdbot%2521" target="_blank" rel="noopener">
|
|
36
|
+
<img src="https://cupofton.pages.dev/assets/badge-1.svg" alt="Buy me a Cup of TON" style="width: 600px; height: auto;">
|
|
37
|
+
</a>
|
|
38
|
+
|
|
39
|
+
Pytdbot is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
36
40
|
|
|
37
41
|
### Features
|
|
38
42
|
|
|
@@ -86,9 +90,14 @@ Basic example:
|
|
|
86
90
|
```python
|
|
87
91
|
|
|
88
92
|
import asyncio
|
|
93
|
+
import logging
|
|
89
94
|
|
|
90
95
|
from pytdbot import Client, types
|
|
91
96
|
|
|
97
|
+
logging.basicConfig(
|
|
98
|
+
level=logging.INFO,
|
|
99
|
+
format="[%(levelname)s][p %(process)d %(threadName)s][%(created)f][%(filename)s:%(lineno)d][%(funcName)s][%(name)s] %(message)s",
|
|
100
|
+
)
|
|
92
101
|
client = Client(
|
|
93
102
|
token="1088394097:AAQX2DnWiw4ihwiJUhIHOGog8gGOI", # Your bot token
|
|
94
103
|
api_id=0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Pytdbot
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.9
|
|
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,9 +30,13 @@ 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
|
+
<a href="https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL&n=AYMEN&t=5&c=You+deserve+a+Cup+of+TON+for+Pytdbot%2521" target="_blank" rel="noopener">
|
|
36
|
+
<img src="https://cupofton.pages.dev/assets/badge-1.svg" alt="Buy me a Cup of TON" style="width: 600px; height: auto;">
|
|
37
|
+
</a>
|
|
38
|
+
|
|
39
|
+
Pytdbot is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
36
40
|
|
|
37
41
|
### Features
|
|
38
42
|
|
|
@@ -86,9 +90,14 @@ Basic example:
|
|
|
86
90
|
```python
|
|
87
91
|
|
|
88
92
|
import asyncio
|
|
93
|
+
import logging
|
|
89
94
|
|
|
90
95
|
from pytdbot import Client, types
|
|
91
96
|
|
|
97
|
+
logging.basicConfig(
|
|
98
|
+
level=logging.INFO,
|
|
99
|
+
format="[%(levelname)s][p %(process)d %(threadName)s][%(created)f][%(filename)s:%(lineno)d][%(funcName)s][%(name)s] %(message)s",
|
|
100
|
+
)
|
|
92
101
|
client = Client(
|
|
93
102
|
token="1088394097:AAQX2DnWiw4ihwiJUhIHOGog8gGOI", # Your bot token
|
|
94
103
|
api_id=0,
|
|
@@ -1,6 +1,10 @@
|
|
|
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
|
+
<a href="https://cupofton.pages.dev/donate?a=UQCeySURtYxvqF2jNXlsFrXuTEqPjJhGx8uoev6tUbD_HELL&n=AYMEN&t=5&c=You+deserve+a+Cup+of+TON+for+Pytdbot%2521" target="_blank" rel="noopener">
|
|
4
|
+
<img src="https://cupofton.pages.dev/assets/badge-1.svg" alt="Buy me a Cup of TON" style="width: 600px; height: auto;">
|
|
5
|
+
</a>
|
|
6
|
+
|
|
7
|
+
Pytdbot is an asynchronous [**TDLib**](https://github.com/tdlib/td) wrapper for **Telegram** users/bots written in **Python**.
|
|
4
8
|
|
|
5
9
|
### Features
|
|
6
10
|
|
|
@@ -54,9 +58,14 @@ Basic example:
|
|
|
54
58
|
```python
|
|
55
59
|
|
|
56
60
|
import asyncio
|
|
61
|
+
import logging
|
|
57
62
|
|
|
58
63
|
from pytdbot import Client, types
|
|
59
64
|
|
|
65
|
+
logging.basicConfig(
|
|
66
|
+
level=logging.INFO,
|
|
67
|
+
format="[%(levelname)s][p %(process)d %(threadName)s][%(created)f][%(filename)s:%(lineno)d][%(funcName)s][%(name)s] %(message)s",
|
|
68
|
+
)
|
|
60
69
|
client = Client(
|
|
61
70
|
token="1088394097:AAQX2DnWiw4ihwiJUhIHOGog8gGOI", # Your bot token
|
|
62
71
|
api_id=0,
|
|
@@ -1133,7 +1133,9 @@ class Client(Decorators, Methods):
|
|
|
1133
1133
|
notify_queue = await self.__rchannel.declare_queue(
|
|
1134
1134
|
f"{self.my_id}_notify_{self._rabbitmq_instance_id}", exclusive=True
|
|
1135
1135
|
)
|
|
1136
|
-
await notify_queue.bind(
|
|
1136
|
+
await notify_queue.bind(
|
|
1137
|
+
await self.__rchannel.get_exchange(f"{self.my_id}_broadcast")
|
|
1138
|
+
)
|
|
1137
1139
|
|
|
1138
1140
|
responses_queue = await self.__rchannel.declare_queue(
|
|
1139
1141
|
f"{self.my_id}_res_{self._rabbitmq_instance_id}", exclusive=True
|
|
@@ -48,6 +48,7 @@ class ClientManager:
|
|
|
48
48
|
|
|
49
49
|
self.loop = loop or pytdbot.utils.get_running_loop()
|
|
50
50
|
self.__tdjson = TdJson(lib_path, verbosity)
|
|
51
|
+
self.check_tdlib_version()
|
|
51
52
|
|
|
52
53
|
self.__clients: dict[int, pytdbot.Client] = {}
|
|
53
54
|
|
|
@@ -137,6 +138,14 @@ class ClientManager:
|
|
|
137
138
|
|
|
138
139
|
self.__tdjson.send(client_id, request)
|
|
139
140
|
|
|
141
|
+
def check_tdlib_version(self):
|
|
142
|
+
if self.__tdjson.version != pytdbot.types.TDLIB_VERSION:
|
|
143
|
+
logger.warning(
|
|
144
|
+
f"Pytdbot v{pytdbot.VERSION} is designed for TDLib v{pytdbot.types.TDLIB_VERSION}, "
|
|
145
|
+
f"but the installed TDLib version is v{self.__tdjson.version}. "
|
|
146
|
+
"This may cause unexpected behavior or errors"
|
|
147
|
+
)
|
|
148
|
+
|
|
140
149
|
async def __td_receiver_loop(self) -> None:
|
|
141
150
|
with ThreadPoolExecutor(
|
|
142
151
|
max_workers=1, thread_name_prefix="ClientManager"
|