multibotkit 0.1.28__tar.gz → 0.1.30__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.30}/PKG-INFO +1 -1
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/helpers/telegram.py +138 -10
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit.egg-info/PKG-INFO +1 -1
- {multibotkit-0.1.28 → multibotkit-0.1.30}/setup.py +1 -1
- {multibotkit-0.1.28 → multibotkit-0.1.30}/LICENSE +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/README.md +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/dispatchers/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/dispatchers/base_dispatcher.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/dispatchers/fb.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/dispatchers/telegram.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/dispatchers/viber.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/dispatchers/vk.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/helpers/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/helpers/base_helper.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/helpers/fb.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/helpers/viber.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/helpers/vk.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/fb/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/fb/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/fb/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/telegram/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/telegram/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/telegram/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/viber/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/viber/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/viber/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/vk/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/vk/incoming.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/schemas/vk/outgoing.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/states/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/states/managers/__init__.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/states/managers/base.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/states/managers/memory.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/states/managers/mongo.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/states/managers/redis.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit/states/state.py +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit.egg-info/SOURCES.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit.egg-info/dependency_links.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit.egg-info/requires.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/multibotkit.egg-info/top_level.txt +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/pyproject.toml +0 -0
- {multibotkit-0.1.28 → multibotkit-0.1.30}/setup.cfg +0 -0
|
@@ -268,16 +268,6 @@ class TelegramHelper(BaseHelper):
|
|
|
268
268
|
r = await self._perform_async_request(url, data)
|
|
269
269
|
return r
|
|
270
270
|
|
|
271
|
-
def sync_decline_chat_join_request(
|
|
272
|
-
self,
|
|
273
|
-
chat_id: int,
|
|
274
|
-
user_id: int,
|
|
275
|
-
):
|
|
276
|
-
url = self.tg_base_url + "declineChatJoinRequest"
|
|
277
|
-
data = {"chat_id": chat_id, "user_id": user_id}
|
|
278
|
-
r = self._perform_sync_request(url, data)
|
|
279
|
-
return r
|
|
280
|
-
|
|
281
271
|
async def async_unban_chat_member(
|
|
282
272
|
self,
|
|
283
273
|
chat_id: int,
|
|
@@ -318,6 +308,116 @@ class TelegramHelper(BaseHelper):
|
|
|
318
308
|
r = self._perform_sync_request(url, data)
|
|
319
309
|
return r
|
|
320
310
|
|
|
311
|
+
async def async_promote_chat_member(
|
|
312
|
+
self,
|
|
313
|
+
chat_id: int,
|
|
314
|
+
user_id: int,
|
|
315
|
+
is_anonymous: Optional[bool] = None,
|
|
316
|
+
can_manage_chat: Optional[bool] = None,
|
|
317
|
+
can_delete_messages: Optional[bool] = None,
|
|
318
|
+
can_manage_video_chats: Optional[bool] = None,
|
|
319
|
+
can_restrict_members: Optional[bool] = None,
|
|
320
|
+
can_promote_members: Optional[bool] = None,
|
|
321
|
+
can_change_info: Optional[bool] = None,
|
|
322
|
+
can_invite_users: Optional[bool] = None,
|
|
323
|
+
can_post_stories: Optional[bool] = None,
|
|
324
|
+
can_edit_stories: Optional[bool] = None,
|
|
325
|
+
can_delete_stories: Optional[bool] = None,
|
|
326
|
+
can_post_messages: Optional[bool] = None,
|
|
327
|
+
can_edit_messages: Optional[bool] = None,
|
|
328
|
+
can_pin_messages: Optional[bool] = None,
|
|
329
|
+
can_manage_topics: Optional[bool] = None,
|
|
330
|
+
):
|
|
331
|
+
url = self.tg_base_url + "promoteChatMember"
|
|
332
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
333
|
+
if is_anonymous is not None:
|
|
334
|
+
data["is_anonymous"] = is_anonymous
|
|
335
|
+
if can_manage_chat is not None:
|
|
336
|
+
data["can_manage_chat"] = can_manage_chat
|
|
337
|
+
if can_delete_messages is not None:
|
|
338
|
+
data["can_delete_messages"] = can_delete_messages
|
|
339
|
+
if can_manage_video_chats is not None:
|
|
340
|
+
data["can_manage_video_chats"] = can_manage_video_chats
|
|
341
|
+
if can_restrict_members is not None:
|
|
342
|
+
data["can_restrict_members"] = can_restrict_members
|
|
343
|
+
if can_promote_members is not None:
|
|
344
|
+
data["can_promote_members"] = can_promote_members
|
|
345
|
+
if can_change_info is not None:
|
|
346
|
+
data["can_change_info"] = can_change_info
|
|
347
|
+
if can_invite_users is not None:
|
|
348
|
+
data["can_invite_users"] = can_invite_users
|
|
349
|
+
if can_post_stories is not None:
|
|
350
|
+
data["can_post_stories"] = can_post_stories
|
|
351
|
+
if can_edit_stories is not None:
|
|
352
|
+
data["can_edit_stories"] = can_edit_stories
|
|
353
|
+
if can_delete_stories is not None:
|
|
354
|
+
data["can_delete_stories"] = can_delete_stories
|
|
355
|
+
if can_post_messages is not None:
|
|
356
|
+
data["can_post_messages"] = can_post_messages
|
|
357
|
+
if can_edit_messages is not None:
|
|
358
|
+
data["can_edit_messages"] = can_edit_messages
|
|
359
|
+
if can_pin_messages is not None:
|
|
360
|
+
data["can_pin_messages"] = can_pin_messages
|
|
361
|
+
if can_manage_topics is not None:
|
|
362
|
+
data["can_manage_topics"] = can_manage_topics
|
|
363
|
+
r = await self._perform_async_request(url, data)
|
|
364
|
+
return r
|
|
365
|
+
|
|
366
|
+
def sync_promote_chat_member(
|
|
367
|
+
self,
|
|
368
|
+
chat_id: int,
|
|
369
|
+
user_id: int,
|
|
370
|
+
is_anonymous: Optional[bool] = None,
|
|
371
|
+
can_manage_chat: Optional[bool] = None,
|
|
372
|
+
can_delete_messages: Optional[bool] = None,
|
|
373
|
+
can_manage_video_chats: Optional[bool] = None,
|
|
374
|
+
can_restrict_members: Optional[bool] = None,
|
|
375
|
+
can_promote_members: Optional[bool] = None,
|
|
376
|
+
can_change_info: Optional[bool] = None,
|
|
377
|
+
can_invite_users: Optional[bool] = None,
|
|
378
|
+
can_post_stories: Optional[bool] = None,
|
|
379
|
+
can_edit_stories: Optional[bool] = None,
|
|
380
|
+
can_delete_stories: Optional[bool] = None,
|
|
381
|
+
can_post_messages: Optional[bool] = None,
|
|
382
|
+
can_edit_messages: Optional[bool] = None,
|
|
383
|
+
can_pin_messages: Optional[bool] = None,
|
|
384
|
+
can_manage_topics: Optional[bool] = None,
|
|
385
|
+
):
|
|
386
|
+
url = self.tg_base_url + "promoteChatMember"
|
|
387
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
388
|
+
if is_anonymous is not None:
|
|
389
|
+
data["is_anonymous"] = is_anonymous
|
|
390
|
+
if can_manage_chat is not None:
|
|
391
|
+
data["can_manage_chat"] = can_manage_chat
|
|
392
|
+
if can_delete_messages is not None:
|
|
393
|
+
data["can_delete_messages"] = can_delete_messages
|
|
394
|
+
if can_manage_video_chats is not None:
|
|
395
|
+
data["can_manage_video_chats"] = can_manage_video_chats
|
|
396
|
+
if can_restrict_members is not None:
|
|
397
|
+
data["can_restrict_members"] = can_restrict_members
|
|
398
|
+
if can_promote_members is not None:
|
|
399
|
+
data["can_promote_members"] = can_promote_members
|
|
400
|
+
if can_change_info is not None:
|
|
401
|
+
data["can_change_info"] = can_change_info
|
|
402
|
+
if can_invite_users is not None:
|
|
403
|
+
data["can_invite_users"] = can_invite_users
|
|
404
|
+
if can_post_stories is not None:
|
|
405
|
+
data["can_post_stories"] = can_post_stories
|
|
406
|
+
if can_edit_stories is not None:
|
|
407
|
+
data["can_edit_stories"] = can_edit_stories
|
|
408
|
+
if can_delete_stories is not None:
|
|
409
|
+
data["can_delete_stories"] = can_delete_stories
|
|
410
|
+
if can_post_messages is not None:
|
|
411
|
+
data["can_post_messages"] = can_post_messages
|
|
412
|
+
if can_edit_messages is not None:
|
|
413
|
+
data["can_edit_messages"] = can_edit_messages
|
|
414
|
+
if can_pin_messages is not None:
|
|
415
|
+
data["can_pin_messages"] = can_pin_messages
|
|
416
|
+
if can_manage_topics is not None:
|
|
417
|
+
data["can_manage_topics"] = can_manage_topics
|
|
418
|
+
r = self._perform_sync_request(url, data)
|
|
419
|
+
return r
|
|
420
|
+
|
|
321
421
|
async def async_set_chat_title(
|
|
322
422
|
self,
|
|
323
423
|
chat_id: int,
|
|
@@ -358,6 +458,34 @@ class TelegramHelper(BaseHelper):
|
|
|
358
458
|
r = self._perform_sync_request(url, data)
|
|
359
459
|
return r
|
|
360
460
|
|
|
461
|
+
async def async_get_chat(
|
|
462
|
+
self,
|
|
463
|
+
chat_id: int,
|
|
464
|
+
):
|
|
465
|
+
url = self.tg_base_url + "getChat"
|
|
466
|
+
data = {"chat_id": chat_id}
|
|
467
|
+
r = await self._perform_async_request(url, data)
|
|
468
|
+
return r
|
|
469
|
+
|
|
470
|
+
def sync_get_chat(
|
|
471
|
+
self,
|
|
472
|
+
chat_id: int,
|
|
473
|
+
):
|
|
474
|
+
url = self.tg_base_url + "getChat"
|
|
475
|
+
data = {"chat_id": chat_id}
|
|
476
|
+
r = self._perform_sync_request(url, data)
|
|
477
|
+
return r
|
|
478
|
+
|
|
479
|
+
def sync_decline_chat_join_request(
|
|
480
|
+
self,
|
|
481
|
+
chat_id: int,
|
|
482
|
+
user_id: int,
|
|
483
|
+
):
|
|
484
|
+
url = self.tg_base_url + "declineChatJoinRequest"
|
|
485
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
486
|
+
r = self._perform_sync_request(url, data)
|
|
487
|
+
return r
|
|
488
|
+
|
|
361
489
|
async def async_decline_chat_join_request(
|
|
362
490
|
self,
|
|
363
491
|
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
|