multibotkit 0.1.32__py3-none-any.whl → 0.1.33__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.
@@ -31,7 +31,9 @@ from multibotkit.schemas.telegram.outgoing import (
31
31
  Location,
32
32
  DeleteWebhookParams,
33
33
  DeleteMessage,
34
- CopyMessage, BotCommand, SetMyCommands,
34
+ CopyMessage,
35
+ BotCommand,
36
+ SetMyCommands,
35
37
  )
36
38
 
37
39
 
@@ -58,16 +60,20 @@ class TelegramHelper(BaseHelper):
58
60
  return WebhookInfo(**r["result"])
59
61
  return None
60
62
 
61
- def sync_set_webhook(self, webhook_url: str):
63
+ def sync_set_webhook(
64
+ self, webhook_url: str, allowed_updates: Optional[List[str]] = None
65
+ ):
62
66
  url = self.tg_base_url + "setWebhook"
63
- params = SetWebhookParams(url=webhook_url)
67
+ params = SetWebhookParams(url=webhook_url, allowed_updates=allowed_updates)
64
68
  data = params.dict(exclude_none=True)
65
69
  r = self._perform_sync_request(url, data)
66
70
  return r
67
71
 
68
- async def async_set_webhook(self, webhook_url: str):
72
+ async def async_set_webhook(
73
+ self, webhook_url: str, allowed_updates: Optional[List[str]] = None
74
+ ):
69
75
  url = self.tg_base_url + "setWebhook"
70
- params = SetWebhookParams(url=webhook_url)
76
+ params = SetWebhookParams(url=webhook_url, allowed_updates=allowed_updates)
71
77
  data = params.dict(exclude_none=True)
72
78
  r = await self._perform_async_request(url, data)
73
79
  return r
@@ -1813,38 +1819,24 @@ class TelegramHelper(BaseHelper):
1813
1819
  r = await self._perform_async_request(url, data)
1814
1820
  return r
1815
1821
 
1816
- def sync_set_my_commands(
1817
- self,
1818
- commands: List[Tuple[str, str]]
1819
- ):
1822
+ def sync_set_my_commands(self, commands: List[Tuple[str, str]]):
1820
1823
  url = self.tg_base_url + "setMyCommands"
1821
1824
  commands_list = []
1822
1825
  for command, description in commands:
1823
- commands_list.append(
1824
- BotCommand(command=command, description=description)
1825
- )
1826
+ commands_list.append(BotCommand(command=command, description=description))
1826
1827
 
1827
- set_my_commands = SetMyCommands(
1828
- commands=commands_list
1829
- )
1828
+ set_my_commands = SetMyCommands(commands=commands_list)
1830
1829
 
1831
1830
  r = self._perform_sync_request(url, set_my_commands.dict())
1832
1831
  return r
1833
1832
 
1834
- async def async_set_my_commands(
1835
- self,
1836
- commands: List[Tuple[str, str]]
1837
- ):
1833
+ async def async_set_my_commands(self, commands: List[Tuple[str, str]]):
1838
1834
  url = self.tg_base_url + "setMyCommands"
1839
1835
  commands_list = []
1840
1836
  for command, description in commands:
1841
- commands_list.append(
1842
- BotCommand(command=command, description=description)
1843
- )
1837
+ commands_list.append(BotCommand(command=command, description=description))
1844
1838
 
1845
- set_my_commands = SetMyCommands(
1846
- commands=commands_list
1847
- )
1839
+ set_my_commands = SetMyCommands(commands=commands_list)
1848
1840
 
1849
1841
  r = await self._perform_async_request(url, set_my_commands.dict())
1850
1842
  return r
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.32
3
+ Version: 0.1.33
4
4
  Summary: Functional library for developing multiplatform chatbots
5
5
  Home-page: https://github.com/Appvelox/multibotkit
6
6
  Author: Appvelox LLC
@@ -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=hxyx-DzqgdZcTC_AO5l9D8ZOsmk0ore0F_YnZtrheTs,67310
11
+ multibotkit/helpers/telegram.py,sha256=wZ9JN2fDV4wYZXK9rqe9DqGfB2DRa1Ga42m8z_s6hUs,67354
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.32.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
- multibotkit-0.1.32.dist-info/METADATA,sha256=aZue0F4eDs3sWysDn-hYElzn9D4s9rC1Y5km0ZoxFbI,826
36
- multibotkit-0.1.32.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
37
- multibotkit-0.1.32.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
- multibotkit-0.1.32.dist-info/RECORD,,
34
+ multibotkit-0.1.33.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
+ multibotkit-0.1.33.dist-info/METADATA,sha256=TMpmpoFeRVJDpR9pTR4O7YliKP7o9SRTqAD1MVhRXFw,826
36
+ multibotkit-0.1.33.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
37
+ multibotkit-0.1.33.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
+ multibotkit-0.1.33.dist-info/RECORD,,