multibotkit 0.1.27__py3-none-any.whl → 0.1.29__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.
- multibotkit/helpers/telegram.py +210 -0
- {multibotkit-0.1.27.dist-info → multibotkit-0.1.29.dist-info}/METADATA +1 -1
- {multibotkit-0.1.27.dist-info → multibotkit-0.1.29.dist-info}/RECORD +6 -6
- {multibotkit-0.1.27.dist-info → multibotkit-0.1.29.dist-info}/LICENSE +0 -0
- {multibotkit-0.1.27.dist-info → multibotkit-0.1.29.dist-info}/WHEEL +0 -0
- {multibotkit-0.1.27.dist-info → multibotkit-0.1.29.dist-info}/top_level.txt +0 -0
multibotkit/helpers/telegram.py
CHANGED
|
@@ -228,6 +228,26 @@ class TelegramHelper(BaseHelper):
|
|
|
228
228
|
r = await self._perform_async_request(url, data)
|
|
229
229
|
return r
|
|
230
230
|
|
|
231
|
+
def sync_revoke_chat_invite_link(
|
|
232
|
+
self,
|
|
233
|
+
chat_id: int,
|
|
234
|
+
invite_link: str,
|
|
235
|
+
):
|
|
236
|
+
url = self.tg_base_url + "revokeChatInviteLink"
|
|
237
|
+
data = {"chat_id": chat_id, "invite_link": invite_link}
|
|
238
|
+
r = self._perform_sync_request(url, data)
|
|
239
|
+
return r
|
|
240
|
+
|
|
241
|
+
async def async_revoke_chat_invite_link(
|
|
242
|
+
self,
|
|
243
|
+
chat_id: int,
|
|
244
|
+
invite_link: str,
|
|
245
|
+
):
|
|
246
|
+
url = self.tg_base_url + "revokeChatInviteLink"
|
|
247
|
+
data = {"chat_id": chat_id, "invite_link": invite_link}
|
|
248
|
+
r = await self._perform_async_request(url, data)
|
|
249
|
+
return r
|
|
250
|
+
|
|
231
251
|
def sync_approve_chat_join_request(
|
|
232
252
|
self,
|
|
233
253
|
chat_id: int,
|
|
@@ -258,6 +278,196 @@ class TelegramHelper(BaseHelper):
|
|
|
258
278
|
r = self._perform_sync_request(url, data)
|
|
259
279
|
return r
|
|
260
280
|
|
|
281
|
+
async def async_unban_chat_member(
|
|
282
|
+
self,
|
|
283
|
+
chat_id: int,
|
|
284
|
+
user_id: int,
|
|
285
|
+
):
|
|
286
|
+
url = self.tg_base_url + "unbanChatMember"
|
|
287
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
288
|
+
r = await self._perform_async_request(url, data)
|
|
289
|
+
return r
|
|
290
|
+
|
|
291
|
+
def sync_unban_chat_member(
|
|
292
|
+
self,
|
|
293
|
+
chat_id: int,
|
|
294
|
+
user_id: int,
|
|
295
|
+
):
|
|
296
|
+
url = self.tg_base_url + "unbanChatMember"
|
|
297
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
298
|
+
r = self._perform_sync_request(url, data)
|
|
299
|
+
return r
|
|
300
|
+
|
|
301
|
+
async def async_get_chat_member(
|
|
302
|
+
self,
|
|
303
|
+
chat_id: int,
|
|
304
|
+
user_id: int,
|
|
305
|
+
):
|
|
306
|
+
url = self.tg_base_url + "getChatMember"
|
|
307
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
308
|
+
r = await self._perform_async_request(url, data)
|
|
309
|
+
return r
|
|
310
|
+
|
|
311
|
+
def sync_get_chat_member(
|
|
312
|
+
self,
|
|
313
|
+
chat_id: int,
|
|
314
|
+
user_id: int,
|
|
315
|
+
):
|
|
316
|
+
url = self.tg_base_url + "getChatMember"
|
|
317
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
318
|
+
r = self._perform_sync_request(url, data)
|
|
319
|
+
return r
|
|
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
|
+
|
|
431
|
+
async def async_set_chat_title(
|
|
432
|
+
self,
|
|
433
|
+
chat_id: int,
|
|
434
|
+
title: str,
|
|
435
|
+
):
|
|
436
|
+
url = self.tg_base_url + "setChatTitle"
|
|
437
|
+
data = {"chat_id": chat_id, "title": title}
|
|
438
|
+
r = await self._perform_async_request(url, data)
|
|
439
|
+
return r
|
|
440
|
+
|
|
441
|
+
def sync_set_chat_title(
|
|
442
|
+
self,
|
|
443
|
+
chat_id: int,
|
|
444
|
+
title: str,
|
|
445
|
+
):
|
|
446
|
+
url = self.tg_base_url + "setChatTitle"
|
|
447
|
+
data = {"chat_id": chat_id, "title": title}
|
|
448
|
+
r = self._perform_sync_request(url, data)
|
|
449
|
+
return r
|
|
450
|
+
|
|
451
|
+
async def async_set_chat_description(
|
|
452
|
+
self,
|
|
453
|
+
chat_id: int,
|
|
454
|
+
description: str,
|
|
455
|
+
):
|
|
456
|
+
url = self.tg_base_url + "setChatDescription"
|
|
457
|
+
data = {"chat_id": chat_id, "description": description}
|
|
458
|
+
r = await self._perform_async_request(url, data)
|
|
459
|
+
return r
|
|
460
|
+
|
|
461
|
+
def sync_set_chat_description(
|
|
462
|
+
self,
|
|
463
|
+
chat_id: int,
|
|
464
|
+
description: str,
|
|
465
|
+
):
|
|
466
|
+
url = self.tg_base_url + "setChatDescription"
|
|
467
|
+
data = {"chat_id": chat_id, "description": description}
|
|
468
|
+
r = self._perform_sync_request(url, data)
|
|
469
|
+
return r
|
|
470
|
+
|
|
261
471
|
async def async_decline_chat_join_request(
|
|
262
472
|
self,
|
|
263
473
|
chat_id: int,
|
|
@@ -8,7 +8,7 @@ multibotkit/dispatchers/vk.py,sha256=EsFOL2g3ju-nhsdyRY4JBTJxqQPmaPAB7Mkn462s4tk
|
|
|
8
8
|
multibotkit/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
multibotkit/helpers/base_helper.py,sha256=b4vlmwELwGUIJE0DvD2Lkk0LO-b-w0VWAnEnnYawOKQ,1462
|
|
10
10
|
multibotkit/helpers/fb.py,sha256=Z2Vo6A_fepVBQNcWCeelmH72zf_eKyXOXheUIlaIiBI,4329
|
|
11
|
-
multibotkit/helpers/telegram.py,sha256=
|
|
11
|
+
multibotkit/helpers/telegram.py,sha256=ZSl_LEZQ1Kh-NN2W_ItYKQnlkspcNbFigWuB2bGSyug,65316
|
|
12
12
|
multibotkit/helpers/viber.py,sha256=74UQ3RtHS3iR8qA5XVeMOYfXaaMq2pF0cpItwehdr4o,9246
|
|
13
13
|
multibotkit/helpers/vk.py,sha256=QlI9rGEjhzqS-jcFrnZJ651lDbC4m33SSHAC1zWDyUU,5930
|
|
14
14
|
multibotkit/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -31,8 +31,8 @@ multibotkit/states/managers/base.py,sha256=KOO-wtbj984-lLq6u6LhxR79NTftQV2c5uUG6
|
|
|
31
31
|
multibotkit/states/managers/memory.py,sha256=uN064uj2Q0ivK9LGEHJFaaaG6FEyXkIajS87TCAuYsI,1328
|
|
32
32
|
multibotkit/states/managers/mongo.py,sha256=K8upbLT0892YA2Qi9dDPXDP5jvQoS16T8FW-qapv1Xk,1927
|
|
33
33
|
multibotkit/states/managers/redis.py,sha256=XMpQ8LUdO9mZq3cZXlYOcGCC0VsSbsxBsEzVFH7TeEM,1681
|
|
34
|
-
multibotkit-0.1.
|
|
35
|
-
multibotkit-0.1.
|
|
36
|
-
multibotkit-0.1.
|
|
37
|
-
multibotkit-0.1.
|
|
38
|
-
multibotkit-0.1.
|
|
34
|
+
multibotkit-0.1.29.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
|
|
35
|
+
multibotkit-0.1.29.dist-info/METADATA,sha256=OvS9Mj20XXIPOJYSSahoB2kkpvEt8DONCz9MqY8Nq_o,826
|
|
36
|
+
multibotkit-0.1.29.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
37
|
+
multibotkit-0.1.29.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
|
|
38
|
+
multibotkit-0.1.29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|