CliRemote 1.7.7__py3-none-any.whl → 1.7.8__py3-none-any.whl
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.
- {cliremote-1.7.7.dist-info → cliremote-1.7.8.dist-info}/METADATA +1 -1
- {cliremote-1.7.7.dist-info → cliremote-1.7.8.dist-info}/RECORD +6 -6
- remote/account_viewer.py +34 -13
- {cliremote-1.7.7.dist-info → cliremote-1.7.8.dist-info}/WHEEL +0 -0
- {cliremote-1.7.7.dist-info → cliremote-1.7.8.dist-info}/licenses/LICENSE +0 -0
- {cliremote-1.7.7.dist-info → cliremote-1.7.8.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
1
|
-
cliremote-1.7.
|
1
|
+
cliremote-1.7.8.dist-info/licenses/LICENSE,sha256=O-0zMbcEi6wXz1DiSdVgzMlQjJcNqNe5KDv08uYzqR0,1055
|
2
2
|
remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
remote/account_manager.py,sha256=TepnGIoE2hU-j_NmU5ByoS-JrboE0w3A1bYmQoQX5h8,15176
|
4
|
-
remote/account_viewer.py,sha256=
|
4
|
+
remote/account_viewer.py,sha256=j46KSjbgrBmBi7UxFeJ5tCwHIe0QvCvphkirGIbB2oo,5192
|
5
5
|
remote/admin_manager.py,sha256=WiUUVmSs5JTUdXeSry8PkK_3TRemAdSZjm0G1ilAA-A,3532
|
6
6
|
remote/analytics_manager.py,sha256=6jPvwt_ELA4RMbQdD8W_ltfAoaSgILnEkOAp6HZAqsU,7382
|
7
7
|
remote/batch_manager.py,sha256=jVGhYVwHMKJd7f7JxcWjKlwr03dq0RaGD1KdkyYdb00,1051
|
@@ -33,7 +33,7 @@ remote/text_manager.py,sha256=C2wNSXPSCDu8NSD3RsfbKmUQMWOYd1B5N4tzy-Jsriw,2195
|
|
33
33
|
remote/username_manager.py,sha256=nMNdke-2FIv86xR1Y6rR-43oUoQu_3Khw8wEo54noXI,3388
|
34
34
|
remote/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
remote/utils/sqlite_utils.py,sha256=5i0oUXsBgKC_8qHZPJ-Gyhp9D1TwqKHVvuZRIhKpS6w,1260
|
36
|
-
cliremote-1.7.
|
37
|
-
cliremote-1.7.
|
38
|
-
cliremote-1.7.
|
39
|
-
cliremote-1.7.
|
36
|
+
cliremote-1.7.8.dist-info/METADATA,sha256=JZFhSZPJGlEbUdniGYCIYs-rEzPZYAfLXsv3nhh7FfQ,1202
|
37
|
+
cliremote-1.7.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
38
|
+
cliremote-1.7.8.dist-info/top_level.txt,sha256=yBZidJ6zCix_a2ubGlYaewvlzBFXWbckQt20dudxJ1E,7
|
39
|
+
cliremote-1.7.8.dist-info/RECORD,,
|
remote/account_viewer.py
CHANGED
@@ -1,19 +1,29 @@
|
|
1
|
-
#
|
2
|
-
import asyncio, logging
|
1
|
+
# CliRemote/remote/account_viewer.py
|
2
|
+
import asyncio, logging, os
|
3
3
|
from pyrogram import errors
|
4
4
|
from .client_manager import client_pool, get_or_start_client, accounts
|
5
5
|
|
6
6
|
logger = logging.getLogger(__name__)
|
7
7
|
|
8
|
+
ACCOUNT_LIST_PATH = os.path.join(os.getcwd(), "account_list.txt")
|
9
|
+
|
8
10
|
async def list_accounts_cmd(message):
|
9
11
|
"""
|
10
12
|
نمایش دقیق وضعیت اکانتها (با حفظ اتصالها)
|
11
|
-
|
13
|
+
خروجی نهایی همیشه در account_list.txt ذخیره میشود و در انتها فایل ارسال میگردد.
|
12
14
|
"""
|
13
15
|
try:
|
14
16
|
acc_list = accounts()
|
15
17
|
if not acc_list:
|
16
|
-
|
18
|
+
text = 'لیست اکانتها:\n(هیچ اکانتی وجود ندارد)'
|
19
|
+
# ذخیره در فایل
|
20
|
+
with open(ACCOUNT_LIST_PATH, "w", encoding="utf-8", newline="\n") as f:
|
21
|
+
f.write(text)
|
22
|
+
# ارسال فایل
|
23
|
+
await message.reply_document(
|
24
|
+
document=ACCOUNT_LIST_PATH,
|
25
|
+
caption="📋 گزارش اکانتها (خالی)"
|
26
|
+
)
|
17
27
|
return
|
18
28
|
|
19
29
|
lines = ['📋 <b>لیست اکانتها:</b>']
|
@@ -89,14 +99,25 @@ async def list_accounts_cmd(message):
|
|
89
99
|
|
90
100
|
text = "\n".join(lines)
|
91
101
|
|
92
|
-
# ✅
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
102
|
+
# ✅ همیشه ذخیره در فایل account_list.txt
|
103
|
+
with open(ACCOUNT_LIST_PATH, "w", encoding="utf-8", newline="\n") as f:
|
104
|
+
f.write(text)
|
105
|
+
|
106
|
+
# ✅ ارسال فایل خروجی
|
107
|
+
await message.reply_document(
|
108
|
+
document=ACCOUNT_LIST_PATH,
|
109
|
+
caption="📋 گزارش کامل اکانتها"
|
110
|
+
)
|
100
111
|
|
101
112
|
except Exception as e:
|
102
|
-
|
113
|
+
# اگر جایی خطا خورد، باز هم خطا را در فایل ذخیره و فایل را ارسال میکنیم
|
114
|
+
err_text = f'<b>خطا در نمایش لیست اکانتها:</b>\n{e}'
|
115
|
+
try:
|
116
|
+
with open(ACCOUNT_LIST_PATH, "w", encoding="utf-8", newline="\n") as f:
|
117
|
+
f.write(err_text)
|
118
|
+
await message.reply_document(
|
119
|
+
document=ACCOUNT_LIST_PATH,
|
120
|
+
caption="⚠️ خطا هنگام تهیه گزارش"
|
121
|
+
)
|
122
|
+
except Exception:
|
123
|
+
await message.reply(err_text)
|
File without changes
|
File without changes
|
File without changes
|