Rubka 7.1.7__tar.gz → 7.1.8__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 (50) hide show
  1. {rubka-7.1.7 → rubka-7.1.8}/PKG-INFO +1 -1
  2. {rubka-7.1.7 → rubka-7.1.8}/Rubka.egg-info/PKG-INFO +1 -1
  3. {rubka-7.1.7 → rubka-7.1.8}/rubka/asynco.py +45 -0
  4. {rubka-7.1.7 → rubka-7.1.8}/setup.py +1 -1
  5. {rubka-7.1.7 → rubka-7.1.8}/README.md +0 -0
  6. {rubka-7.1.7 → rubka-7.1.8}/Rubka.egg-info/SOURCES.txt +0 -0
  7. {rubka-7.1.7 → rubka-7.1.8}/Rubka.egg-info/dependency_links.txt +0 -0
  8. {rubka-7.1.7 → rubka-7.1.8}/Rubka.egg-info/entry_points.txt +0 -0
  9. {rubka-7.1.7 → rubka-7.1.8}/Rubka.egg-info/not-zip-safe +0 -0
  10. {rubka-7.1.7 → rubka-7.1.8}/Rubka.egg-info/requires.txt +0 -0
  11. {rubka-7.1.7 → rubka-7.1.8}/Rubka.egg-info/top_level.txt +0 -0
  12. {rubka-7.1.7 → rubka-7.1.8}/rubka/__init__.py +0 -0
  13. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/__init__.py +0 -0
  14. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/client/__init__.py +0 -0
  15. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/client/client.py +0 -0
  16. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/crypto/__init__.py +0 -0
  17. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/crypto/crypto.py +0 -0
  18. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/enums.py +0 -0
  19. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/exceptions.py +0 -0
  20. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/methods/__init__.py +0 -0
  21. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/methods/methods.py +0 -0
  22. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/network/__init__.py +0 -0
  23. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/network/helper.py +0 -0
  24. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/network/network.py +0 -0
  25. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/network/socket.py +0 -0
  26. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/sessions/__init__.py +0 -0
  27. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/sessions/sessions.py +0 -0
  28. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/types/__init__.py +0 -0
  29. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/types/socket/__init__.py +0 -0
  30. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/types/socket/message.py +0 -0
  31. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/utils/__init__.py +0 -0
  32. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/utils/configs.py +0 -0
  33. {rubka-7.1.7 → rubka-7.1.8}/rubka/adaptorrubka/utils/utils.py +0 -0
  34. {rubka-7.1.7 → rubka-7.1.8}/rubka/api.py +0 -0
  35. {rubka-7.1.7 → rubka-7.1.8}/rubka/button.py +0 -0
  36. {rubka-7.1.7 → rubka-7.1.8}/rubka/config.py +0 -0
  37. {rubka-7.1.7 → rubka-7.1.8}/rubka/context.py +0 -0
  38. {rubka-7.1.7 → rubka-7.1.8}/rubka/decorators.py +0 -0
  39. {rubka-7.1.7 → rubka-7.1.8}/rubka/exceptions.py +0 -0
  40. {rubka-7.1.7 → rubka-7.1.8}/rubka/filters.py +0 -0
  41. {rubka-7.1.7 → rubka-7.1.8}/rubka/helpers.py +0 -0
  42. {rubka-7.1.7 → rubka-7.1.8}/rubka/jobs.py +0 -0
  43. {rubka-7.1.7 → rubka-7.1.8}/rubka/keyboards.py +0 -0
  44. {rubka-7.1.7 → rubka-7.1.8}/rubka/keypad.py +0 -0
  45. {rubka-7.1.7 → rubka-7.1.8}/rubka/logger.py +0 -0
  46. {rubka-7.1.7 → rubka-7.1.8}/rubka/rubino.py +0 -0
  47. {rubka-7.1.7 → rubka-7.1.8}/rubka/tv.py +0 -0
  48. {rubka-7.1.7 → rubka-7.1.8}/rubka/update.py +0 -0
  49. {rubka-7.1.7 → rubka-7.1.8}/rubka/utils.py +0 -0
  50. {rubka-7.1.7 → rubka-7.1.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Rubka
3
- Version: 7.1.7
3
+ Version: 7.1.8
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
  Metadata-Version: 2.4
2
2
  Name: Rubka
3
- Version: 7.1.7
3
+ Version: 7.1.8
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
@@ -2171,6 +2171,51 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
2171
2171
  async def get_username(self, chat_id: str) -> str:
2172
2172
  chat_info = await self.get_chat(chat_id)
2173
2173
  return chat_info.get("data", {}).get("chat", {}).get("username", "None")
2174
+ async def send_bulk_message(
2175
+ self,
2176
+ chat_ids: List[str],
2177
+ text: str,
2178
+ concurrency: int = 5,
2179
+ delay_between: float = 0.0,
2180
+ log_errors: bool = True,
2181
+ **kwargs
2182
+ ) -> Dict[str, Optional[Dict]]:
2183
+ if not chat_ids:return {}
2184
+ semaphore = asyncio.Semaphore(concurrency)
2185
+ results: Dict[str, Optional[Dict]] = {}
2186
+ async def _send(chat_id: str):
2187
+ async with semaphore:
2188
+ try:
2189
+ res = await self.send_message(chat_id, text, **kwargs)
2190
+ results[chat_id] = res
2191
+ except Exception as e:
2192
+ results[chat_id] = None
2193
+ if log_errors:print(f"[send_bulk_message] Error {chat_id} : {e}")
2194
+ if delay_between > 0:await asyncio.sleep(delay_between)
2195
+ await asyncio.gather(*[_send(cid) for cid in chat_ids])
2196
+ return results
2197
+ async def delete_bulk_message(self, chat_id: str, message_ids: list[str]):
2198
+ tasks = [self.delete_message(chat_id, mid) for mid in message_ids]
2199
+ return await asyncio.gather(*tasks, return_exceptions=True)
2200
+ async def edit_bulk_message(self, chat_id: str, messages: dict[str, str]):
2201
+ tasks = [self.edit_message_text(chat_id, mid, new_text) for mid, new_text in messages.items()]
2202
+ return await asyncio.gather(*tasks, return_exceptions=True)
2203
+ async def send_scheduled_message(self, chat_id: str, text: str, delay: int, **kwargs):
2204
+ await asyncio.sleep(delay)
2205
+ return await self.send_message(chat_id, text, **kwargs)
2206
+ async def disable_inline_keyboard(
2207
+ self,
2208
+ chat_id: str,
2209
+ message_id: str,
2210
+ text: Optional[str] = "~",
2211
+ delay: float = 5.0,
2212
+ ) -> Dict[str, any]:
2213
+ if text is not None:await self.edit_inline_keypad(chat_id, message_id, inline_keypad={}, text=text)
2214
+ if delay > 0:
2215
+ await asyncio.sleep(delay)
2216
+ response = await self.edit_inline_keypad(chat_id, message_id, inline_keypad={})
2217
+ return response
2218
+ else:return await self.edit_inline_keypad(chat_id, message_id, inline_keypad={})
2174
2219
  async def get_chat_admins(self, chat_id: str) -> Dict[str, Any]:
2175
2220
  return await self._post("getChatAdmins", {"chat_id": chat_id})
2176
2221
  async def get_chat_members(self, chat_id: str, start_id: str = "") -> Dict[str, Any]:
@@ -13,7 +13,7 @@ with open("README.md", "r", encoding="utf-8") as f:
13
13
 
14
14
  setup(
15
15
  name='Rubka',
16
- version='7.1.7',
16
+ version='7.1.8',
17
17
  description=(
18
18
  "Rubika: A Python library for interacting with the Rubika Bot API. "
19
19
  "This library provides an easy-to-use interface to send messages, polls, "
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
File without changes
File without changes
File without changes
File without changes