multibotkit 0.1.28__tar.gz → 0.1.29__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.
- {multibotkit-0.1.28 → multibotkit-0.1.29}/PKG-INFO +1 -1
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/helpers/telegram.py +110 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit.egg-info/PKG-INFO +1 -1
- {multibotkit-0.1.28 → multibotkit-0.1.29}/setup.py +1 -1
- {multibotkit-0.1.28 → multibotkit-0.1.29}/LICENSE +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/README.md +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/dispatchers/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/dispatchers/base_dispatcher.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/dispatchers/fb.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/dispatchers/telegram.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/dispatchers/viber.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/dispatchers/vk.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/helpers/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/helpers/base_helper.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/helpers/fb.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/helpers/viber.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/helpers/vk.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/fb/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/fb/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/fb/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/telegram/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/telegram/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/telegram/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/viber/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/viber/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/viber/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/vk/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/vk/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/schemas/vk/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/states/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/states/managers/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/states/managers/base.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/states/managers/memory.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/states/managers/mongo.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/states/managers/redis.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit/states/state.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit.egg-info/SOURCES.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit.egg-info/dependency_links.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit.egg-info/requires.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/multibotkit.egg-info/top_level.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/pyproject.toml +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.29}/setup.cfg +0 -0
|
@@ -318,6 +318,116 @@ class TelegramHelper(BaseHelper):
|
|
|
318
318
|
r = self._perform_sync_request(url, data)
|
|
319
319
|
return r
|
|
320
320
|
|
|
321
|
+
async def async_promote_chat_member(
|
|
322
|
+
self,
|
|
323
|
+
chat_id: int,
|
|
324
|
+
user_id: int,
|
|
325
|
+
is_anonymous: Optional[bool] = None,
|
|
326
|
+
can_manage_chat: Optional[bool] = None,
|
|
327
|
+
can_delete_messages: Optional[bool] = None,
|
|
328
|
+
can_manage_video_chats: Optional[bool] = None,
|
|
329
|
+
can_restrict_members: Optional[bool] = None,
|
|
330
|
+
can_promote_members: Optional[bool] = None,
|
|
331
|
+
can_change_info: Optional[bool] = None,
|
|
332
|
+
can_invite_users: Optional[bool] = None,
|
|
333
|
+
can_post_stories: Optional[bool] = None,
|
|
334
|
+
can_edit_stories: Optional[bool] = None,
|
|
335
|
+
can_delete_stories: Optional[bool] = None,
|
|
336
|
+
can_post_messages: Optional[bool] = None,
|
|
337
|
+
can_edit_messages: Optional[bool] = None,
|
|
338
|
+
can_pin_messages: Optional[bool] = None,
|
|
339
|
+
can_manage_topics: Optional[bool] = None,
|
|
340
|
+
):
|
|
341
|
+
url = self.tg_base_url + "promoteChatMember"
|
|
342
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
343
|
+
if is_anonymous is not None:
|
|
344
|
+
data["is_anonymous"] = is_anonymous
|
|
345
|
+
if can_manage_chat is not None:
|
|
346
|
+
data["can_manage_chat"] = can_manage_chat
|
|
347
|
+
if can_delete_messages is not None:
|
|
348
|
+
data["can_delete_messages"] = can_delete_messages
|
|
349
|
+
if can_manage_video_chats is not None:
|
|
350
|
+
data["can_manage_video_chats"] = can_manage_video_chats
|
|
351
|
+
if can_restrict_members is not None:
|
|
352
|
+
data["can_restrict_members"] = can_restrict_members
|
|
353
|
+
if can_promote_members is not None:
|
|
354
|
+
data["can_promote_members"] = can_promote_members
|
|
355
|
+
if can_change_info is not None:
|
|
356
|
+
data["can_change_info"] = can_change_info
|
|
357
|
+
if can_invite_users is not None:
|
|
358
|
+
data["can_invite_users"] = can_invite_users
|
|
359
|
+
if can_post_stories is not None:
|
|
360
|
+
data["can_post_stories"] = can_post_stories
|
|
361
|
+
if can_edit_stories is not None:
|
|
362
|
+
data["can_edit_stories"] = can_edit_stories
|
|
363
|
+
if can_delete_stories is not None:
|
|
364
|
+
data["can_delete_stories"] = can_delete_stories
|
|
365
|
+
if can_post_messages is not None:
|
|
366
|
+
data["can_post_messages"] = can_post_messages
|
|
367
|
+
if can_edit_messages is not None:
|
|
368
|
+
data["can_edit_messages"] = can_edit_messages
|
|
369
|
+
if can_pin_messages is not None:
|
|
370
|
+
data["can_pin_messages"] = can_pin_messages
|
|
371
|
+
if can_manage_topics is not None:
|
|
372
|
+
data["can_manage_topics"] = can_manage_topics
|
|
373
|
+
r = await self._perform_async_request(url, data)
|
|
374
|
+
return r
|
|
375
|
+
|
|
376
|
+
def sync_promote_chat_member(
|
|
377
|
+
self,
|
|
378
|
+
chat_id: int,
|
|
379
|
+
user_id: int,
|
|
380
|
+
is_anonymous: Optional[bool] = None,
|
|
381
|
+
can_manage_chat: Optional[bool] = None,
|
|
382
|
+
can_delete_messages: Optional[bool] = None,
|
|
383
|
+
can_manage_video_chats: Optional[bool] = None,
|
|
384
|
+
can_restrict_members: Optional[bool] = None,
|
|
385
|
+
can_promote_members: Optional[bool] = None,
|
|
386
|
+
can_change_info: Optional[bool] = None,
|
|
387
|
+
can_invite_users: Optional[bool] = None,
|
|
388
|
+
can_post_stories: Optional[bool] = None,
|
|
389
|
+
can_edit_stories: Optional[bool] = None,
|
|
390
|
+
can_delete_stories: Optional[bool] = None,
|
|
391
|
+
can_post_messages: Optional[bool] = None,
|
|
392
|
+
can_edit_messages: Optional[bool] = None,
|
|
393
|
+
can_pin_messages: Optional[bool] = None,
|
|
394
|
+
can_manage_topics: Optional[bool] = None,
|
|
395
|
+
):
|
|
396
|
+
url = self.tg_base_url + "promoteChatMember"
|
|
397
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
398
|
+
if is_anonymous is not None:
|
|
399
|
+
data["is_anonymous"] = is_anonymous
|
|
400
|
+
if can_manage_chat is not None:
|
|
401
|
+
data["can_manage_chat"] = can_manage_chat
|
|
402
|
+
if can_delete_messages is not None:
|
|
403
|
+
data["can_delete_messages"] = can_delete_messages
|
|
404
|
+
if can_manage_video_chats is not None:
|
|
405
|
+
data["can_manage_video_chats"] = can_manage_video_chats
|
|
406
|
+
if can_restrict_members is not None:
|
|
407
|
+
data["can_restrict_members"] = can_restrict_members
|
|
408
|
+
if can_promote_members is not None:
|
|
409
|
+
data["can_promote_members"] = can_promote_members
|
|
410
|
+
if can_change_info is not None:
|
|
411
|
+
data["can_change_info"] = can_change_info
|
|
412
|
+
if can_invite_users is not None:
|
|
413
|
+
data["can_invite_users"] = can_invite_users
|
|
414
|
+
if can_post_stories is not None:
|
|
415
|
+
data["can_post_stories"] = can_post_stories
|
|
416
|
+
if can_edit_stories is not None:
|
|
417
|
+
data["can_edit_stories"] = can_edit_stories
|
|
418
|
+
if can_delete_stories is not None:
|
|
419
|
+
data["can_delete_stories"] = can_delete_stories
|
|
420
|
+
if can_post_messages is not None:
|
|
421
|
+
data["can_post_messages"] = can_post_messages
|
|
422
|
+
if can_edit_messages is not None:
|
|
423
|
+
data["can_edit_messages"] = can_edit_messages
|
|
424
|
+
if can_pin_messages is not None:
|
|
425
|
+
data["can_pin_messages"] = can_pin_messages
|
|
426
|
+
if can_manage_topics is not None:
|
|
427
|
+
data["can_manage_topics"] = can_manage_topics
|
|
428
|
+
r = self._perform_sync_request(url, data)
|
|
429
|
+
return r
|
|
430
|
+
|
|
321
431
|
async def async_set_chat_title(
|
|
322
432
|
self,
|
|
323
433
|
chat_id: int,
|
|
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
|
|
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
|