Rubka 7.1.13__py3-none-any.whl → 7.1.14__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.
rubka/asynco.py CHANGED
@@ -379,8 +379,11 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
379
379
  async def get_me(self) -> Dict[str, Any]:
380
380
  return await self._post("getMe", {})
381
381
  async def geteToken(self):
382
- if (await self.get_me())['status'] != "OK":
383
- raise InvalidTokenError("The provided bot token is invalid or expired.")
382
+ try:
383
+ if (await self.get_me())['status'] != "OK":
384
+ raise InvalidTokenError("The provided bot token is invalid or expired.")
385
+ except Exception as e:
386
+ print(e)
384
387
  from typing import Callable, Any, Optional, List
385
388
 
386
389
 
@@ -1764,11 +1767,12 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
1764
1767
 
1765
1768
 
1766
1769
  _log("Auto-restart requested. You can call run(...) again as needed.", "warning")
1767
- def run(self, sleep_time : float = 0.1 ,*args, **kwargs):
1770
+ def run(self, sleep_time: float = 0.1, *args, **kwargs):
1768
1771
  print("Connecting to the server...")
1769
- loop = asyncio.get_event_loop()
1770
- if loop.is_running():return loop.create_task(self.run_progelry(sleep_time=sleep_time,*args, **kwargs))
1771
- else:return asyncio.run(self.run_progelry(sleep_time=sleep_time,*args, **kwargs))
1772
+ try:
1773
+ loop = asyncio.get_running_loop()
1774
+ return loop.create_task(self.run_progelry(sleep_time=sleep_time, *args, **kwargs))
1775
+ except RuntimeError:return asyncio.run(self.run_progelry(sleep_time=sleep_time, *args, **kwargs))
1772
1776
  async def _delete_after_task(self, chat_id: str, message_id: str, delay: int):
1773
1777
  try:
1774
1778
  await asyncio.sleep(delay)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Rubka
3
- Version: 7.1.13
3
+ Version: 7.1.14
4
4
  Summary: Rubika: A Python library for interacting with the Rubika Bot API. This library provides an easy-to-use interface to send messages, polls, stickers, media files, manage groups and channels, handle inline keyboards, and implement advanced bot features like subscription management, user authentication, and message handling. Ideal for developers looking to automate and extend their Rubika bots with Python.
5
5
  Home-page: https://github.com/Mahdy-Ahmadi/Rubka
6
6
  Download-URL: https://github.com/Mahdy-Ahmadi/rubka/archive/refs/tags/v6.6.4.zip
@@ -1,6 +1,6 @@
1
1
  rubka/__init__.py,sha256=P6IBiORfp-GqKHe5LZ-5lldWyG7tnrUYUcAQDUgwXmY,1973
2
2
  rubka/api.py,sha256=71B10uy2iU3gP6yHQltjyTkq2mgkzWuV1TsE2kgHOZg,68092
3
- rubka/asynco.py,sha256=WZ8P3fdnD5d-JoAsA8pEsMeARtjmupCEeIwFbf1y3-M,119353
3
+ rubka/asynco.py,sha256=f54Pc7tb2awE0qz-uALA_gExvBiCFlxlKR7ICTLdPSs,119448
4
4
  rubka/button.py,sha256=woSzZVd5MtTqOrP-YgkH5b0GS9y4DuKBsFSc9-KuLnk,13320
5
5
  rubka/config.py,sha256=Bck59xkOiqioLv0GkQ1qPGnBXVctz1hKk6LT4h2EPx0,78
6
6
  rubka/context.py,sha256=brl7WXe4nzpLpcaMiOLVMfOs8BFTU5z5Sw6AIecCtOA,42492
@@ -38,8 +38,8 @@ rubka/adaptorrubka/types/socket/message.py,sha256=0WgLMZh4eow8Zn7AiSX4C3GZjQTkIg
38
38
  rubka/adaptorrubka/utils/__init__.py,sha256=OgCFkXdNFh379quNwIVOAWY2NP5cIOxU5gDRRALTk4o,54
39
39
  rubka/adaptorrubka/utils/configs.py,sha256=nMUEOJh1NqDJsf9W9PurkN_DLYjO6kKPMm923i4Jj_A,492
40
40
  rubka/adaptorrubka/utils/utils.py,sha256=5-LioLNYX_TIbQGDeT50j7Sg9nAWH2LJUUs-iEXpsUY,8816
41
- rubka-7.1.13.dist-info/METADATA,sha256=gfg_3nV10xDFmoJs4zuNw9h7u8Qsal422PerW4Hq3MM,34645
42
- rubka-7.1.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
- rubka-7.1.13.dist-info/entry_points.txt,sha256=4aESuUmuUOALMUy7Kucv_Gb5YlqhsJmTmdXLlZU9sJ0,46
44
- rubka-7.1.13.dist-info/top_level.txt,sha256=vy2A4lot11cRMdQS-F4HDCIXL3JK8RKfu7HMDkezJW4,6
45
- rubka-7.1.13.dist-info/RECORD,,
41
+ rubka-7.1.14.dist-info/METADATA,sha256=aP-fn92U05-HDs5cs2N2EE7TTD5Byl-HeqbGaSsweeE,34645
42
+ rubka-7.1.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
+ rubka-7.1.14.dist-info/entry_points.txt,sha256=4aESuUmuUOALMUy7Kucv_Gb5YlqhsJmTmdXLlZU9sJ0,46
44
+ rubka-7.1.14.dist-info/top_level.txt,sha256=vy2A4lot11cRMdQS-F4HDCIXL3JK8RKfu7HMDkezJW4,6
45
+ rubka-7.1.14.dist-info/RECORD,,
File without changes