CliRemote 1.7.4__py3-none-any.whl → 1.7.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: CliRemote
3
- Version: 1.7.4
3
+ Version: 1.7.6
4
4
  Summary: Remote client framework for Telegram automation using Pyrogram
5
5
  Home-page: https://github.com/MohammadAhmadi-R/CliRemote
6
6
  Author: MrAhmadiRad
@@ -1,4 +1,4 @@
1
- cliremote-1.7.4.dist-info/licenses/LICENSE,sha256=O-0zMbcEi6wXz1DiSdVgzMlQjJcNqNe5KDv08uYzqR0,1055
1
+ cliremote-1.7.6.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
4
  remote/account_viewer.py,sha256=MQoH5lOz24651EjhlzVwi6O5hVUAT7Q5fFU6ZHjBlsM,4243
@@ -13,7 +13,7 @@ remote/client_picker.py,sha256=6WDIabYhcXSwcCAuRUfJfh6V1ZXP2EiFdAnutK2qLTk,139
13
13
  remote/config.py,sha256=VK0e96gEINRViKIq99CYYuYyaVZTLtlWlPKKkBd41Cg,2377
14
14
  remote/device_manager.py,sha256=SUCONe1qa5jMHOMqqS27ATtv3CaqAT8cN9jNi7AI_Go,5813
15
15
  remote/file_sender.py,sha256=5_3ptTkoFejhJhaSyzh-8y5l_k7frxFq9LS_WL5jsGc,3657
16
- remote/getcode_controller.py,sha256=Rz7Butx6YWj3vJvnOBOPIx7C6KwGe0l8lloGaa-e9VE,2191
16
+ remote/getcode_controller.py,sha256=0NU2EI6ohyP_tzNcrB2Z7uoUjWhupbi6s3bQUB_YDNk,2266
17
17
  remote/health.py,sha256=JVCxw8iB46PO4cQtoXP9CbwuSHZ3vEAVvdb_C8Uc7R4,1294
18
18
  remote/help_menu.py,sha256=onOmE8-MZmxaY2Sl_Ecgji0Axn2HeNJQFKY34udLfyw,228
19
19
  remote/init.py,sha256=hpJILTMikI5ZXVDdIPmDENQAgZB8R6sYjLk5Jvn-zp4,398
@@ -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.4.dist-info/METADATA,sha256=eDRGWBlYisBp4NAddCpwcb2vRhR4Fu8khxv57uSyWPY,1202
37
- cliremote-1.7.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- cliremote-1.7.4.dist-info/top_level.txt,sha256=yBZidJ6zCix_a2ubGlYaewvlzBFXWbckQt20dudxJ1E,7
39
- cliremote-1.7.4.dist-info/RECORD,,
36
+ cliremote-1.7.6.dist-info/METADATA,sha256=1cjA7NEZSF7yc32FrBd-iuGSCxWKSlyNHzJczrml-Bc,1202
37
+ cliremote-1.7.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ cliremote-1.7.6.dist-info/top_level.txt,sha256=yBZidJ6zCix_a2ubGlYaewvlzBFXWbckQt20dudxJ1E,7
39
+ cliremote-1.7.6.dist-info/RECORD,,
@@ -26,25 +26,26 @@ async def handle_getcode_cmd(message, get_app_info):
26
26
  cli = await get_or_start_client(phone)
27
27
  if cli and getattr(cli, "is_connected", False):
28
28
  logger.info("get_any_client: started %s", phone)
29
- return cli
29
+
30
30
  except Exception as e:
31
31
  logger.warning("get_any_client: failed start %s: %s: %s", phone, type(e).__name__, e)
32
32
  break
33
33
  else:
34
34
  logger.info(f"{phone}")
35
35
 
36
-
36
+ code_message = ''
37
37
  try:
38
- async with cli:
39
38
  messages = [msg async for msg in cli.get_chat_history(777000, limit=1)]
40
39
  if messages and messages[0].text:
41
- await message.reply(messages[0].text)
40
+ code_message = messages[0].text
42
41
  else:
43
- await message.reply('هیچ پیامی از تلگرام دریافت نشد')
42
+ code_message = 'هیچ پیامی از تلگرام دریافت نشد'
44
43
  except Exception as e:
45
44
  logger.error(f"Error while reading code for {number}: {e}")
46
45
  await message.reply(f'<b>هنگام فراخوانی سشن خطایی رخ داد:</b>\n{str(e)}')
47
-
46
+ if code_message:
47
+ await message.reply(code_message)
48
+
48
49
  except Exception as e:
49
50
  logger.error(f"getcode unknown error: {e}")
50
51
  await message.reply(f'<b>خطای ناشناخته:</b> {str(e)}')