d4rktg 1.1.0__tar.gz → 1.1.2__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.
Files changed (31) hide show
  1. {d4rktg-1.1.0/d4rktg.egg-info → d4rktg-1.1.2}/PKG-INFO +1 -1
  2. d4rktg-1.1.2/VERSION.txt +1 -0
  3. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Handlers/_custom.py +6 -4
  4. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_decorators.py +13 -7
  5. {d4rktg-1.1.0 → d4rktg-1.1.2/d4rktg.egg-info}/PKG-INFO +1 -1
  6. d4rktg-1.1.0/VERSION.txt +0 -1
  7. {d4rktg-1.1.0 → d4rktg-1.1.2}/MANIFEST.in +0 -0
  8. {d4rktg-1.1.0 → d4rktg-1.1.2}/README.rst +0 -0
  9. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Database/__init__.py +0 -0
  10. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Database/db.py +0 -0
  11. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Handlers/__init__.py +0 -0
  12. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Handlers/_bot.py +0 -0
  13. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Handlers/_scheduler.py +0 -0
  14. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Logs/__init__.py +0 -0
  15. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Logs/_logger.py +0 -0
  16. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/__init__.py +0 -0
  17. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_buttons.py +0 -0
  18. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_filters.py +0 -0
  19. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_fonts.py +0 -0
  20. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_ip.py +0 -0
  21. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_movie_parser.py +0 -0
  22. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_ractions.py +0 -0
  23. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/Utils/_terminal.py +0 -0
  24. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rk/__init__.py +0 -0
  25. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rktg.egg-info/SOURCES.txt +0 -0
  26. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rktg.egg-info/dependency_links.txt +0 -0
  27. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rktg.egg-info/requires.txt +0 -0
  28. {d4rktg-1.1.0 → d4rktg-1.1.2}/d4rktg.egg-info/top_level.txt +0 -0
  29. {d4rktg-1.1.0 → d4rktg-1.1.2}/requirements.txt +0 -0
  30. {d4rktg-1.1.0 → d4rktg-1.1.2}/setup.cfg +0 -0
  31. {d4rktg-1.1.0 → d4rktg-1.1.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: d4rktg
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: A module for create with easy and fast
5
5
  Author: D4rkShell
6
6
  Author-email: premiumqtrst@gmail.com
@@ -0,0 +1 @@
1
+ 1.1.2
@@ -20,10 +20,12 @@ class FontMessageMixin(Client):
20
20
 
21
21
  async def send_reaction(self,chat_id:Union[int,str], message_id:int=None, story_id:int=None, emoji:Union[int,str,List[Union[int,str]]]=None, big:bool=False, add_to_recent:bool=False, *args, **kwargs):
22
22
  global worker_running
23
- await reaction_queue.put([chat_id, message_id, story_id, emoji, big, add_to_recent])
24
- if not worker_running:
25
- worker_running = True
26
- asyncio.create_task(self.reaction_worker())
23
+ try:return await super().send_reaction(chat_id=chat_id,message_id=message_id,story_id=story_id,emoji=emoji,big=big,add_to_recent=add_to_recent)
24
+ except FloodWait:
25
+ await reaction_queue.put([chat_id, message_id, story_id, emoji, big, add_to_recent])
26
+ if not worker_running:
27
+ worker_running = True
28
+ asyncio.create_task(self.reaction_worker())
27
29
 
28
30
 
29
31
  async def reaction_worker(self) -> None:
@@ -39,7 +39,8 @@ def new_task():
39
39
  def decorator(func):
40
40
  @wraps(func)
41
41
  async def wrapper(*args, **kwargs):
42
- asyncio.create_task(func(*args, **kwargs))
42
+ task = asyncio.create_task(func(*args, **kwargs))
43
+ return await task
43
44
  return wrapper
44
45
  return decorator
45
46
 
@@ -47,11 +48,14 @@ def retry():
47
48
  def decorator(func):
48
49
  @wraps(func)
49
50
  async def wrapper(*args, **kwargs):
50
- try:return await func(*args, **kwargs)
51
- except FloodWait as e:
52
- await asyncio.sleep(e.value)
51
+ async def runner():
53
52
  try:return await func(*args, **kwargs)
54
- except:pass
53
+ except FloodWait as e:
54
+ await asyncio.sleep(e.value)
55
+ try:return await func(*args, **kwargs)
56
+ except:pass
57
+ task = asyncio.create_task(runner())
58
+ return await task
55
59
  return wrapper
56
60
  return decorator
57
61
 
@@ -63,7 +67,8 @@ def round_robin():
63
67
  msg_id = message.id
64
68
 
65
69
  if message.chat.type.name.lower() == "private":
66
- return await func(client, message)
70
+ task = await asyncio.create_task(func(client, message))
71
+ return await task
67
72
 
68
73
  if chat_id not in bot_order_per_chat:
69
74
  bot_order_per_chat[chat_id] = [client.me.id]
@@ -81,7 +86,8 @@ def round_robin():
81
86
  selected_bot_id = bot_order_per_chat[chat_id][current_index]
82
87
 
83
88
  if client.me.id == selected_bot_id:
84
- result = await func(client, message)
89
+ task = asyncio.create_task(func(client, message))
90
+ result = await task
85
91
  responded_messages[chat_id].add(msg_id)
86
92
  last_index_per_chat[chat_id] = (current_index + 1) % len(bot_order_per_chat[chat_id])
87
93
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: d4rktg
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: A module for create with easy and fast
5
5
  Author: D4rkShell
6
6
  Author-email: premiumqtrst@gmail.com
d4rktg-1.1.0/VERSION.txt DELETED
@@ -1 +0,0 @@
1
- 1.1.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes