multibotkit 0.1.8__tar.gz → 0.1.9__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 (44) hide show
  1. {multibotkit-0.1.8 → multibotkit-0.1.9}/PKG-INFO +1 -1
  2. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/helpers/telegram.py +75 -0
  3. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/telegram/outgoing.py +10 -0
  4. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit.egg-info/PKG-INFO +1 -1
  5. {multibotkit-0.1.8 → multibotkit-0.1.9}/setup.py +1 -1
  6. {multibotkit-0.1.8 → multibotkit-0.1.9}/LICENSE +0 -0
  7. {multibotkit-0.1.8 → multibotkit-0.1.9}/README.md +0 -0
  8. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/__init__.py +0 -0
  9. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/dispatchers/__init__.py +0 -0
  10. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/dispatchers/base_dispatcher.py +0 -0
  11. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/dispatchers/fb.py +0 -0
  12. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/dispatchers/telegram.py +0 -0
  13. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/dispatchers/viber.py +0 -0
  14. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/dispatchers/vk.py +0 -0
  15. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/helpers/__init__.py +0 -0
  16. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/helpers/base_helper.py +0 -0
  17. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/helpers/fb.py +0 -0
  18. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/helpers/viber.py +0 -0
  19. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/helpers/vk.py +0 -0
  20. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/__init__.py +0 -0
  21. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/fb/__init__.py +0 -0
  22. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/fb/incoming.py +0 -0
  23. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/fb/outgoing.py +0 -0
  24. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/telegram/__init__.py +0 -0
  25. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/telegram/incoming.py +0 -0
  26. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/viber/__init__.py +0 -0
  27. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/viber/incoming.py +0 -0
  28. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/viber/outgoing.py +0 -0
  29. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/vk/__init__.py +0 -0
  30. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/vk/incoming.py +0 -0
  31. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/schemas/vk/outgoing.py +0 -0
  32. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/states/__init__.py +0 -0
  33. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/states/managers/__init__.py +0 -0
  34. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/states/managers/base.py +0 -0
  35. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/states/managers/memory.py +0 -0
  36. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/states/managers/mongo.py +0 -0
  37. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/states/managers/redis.py +0 -0
  38. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit/states/state.py +0 -0
  39. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit.egg-info/SOURCES.txt +0 -0
  40. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit.egg-info/dependency_links.txt +0 -0
  41. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit.egg-info/requires.txt +0 -0
  42. {multibotkit-0.1.8 → multibotkit-0.1.9}/multibotkit.egg-info/top_level.txt +0 -0
  43. {multibotkit-0.1.8 → multibotkit-0.1.9}/pyproject.toml +0 -0
  44. {multibotkit-0.1.8 → multibotkit-0.1.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Functional library for developing multiplatform chatbots
5
5
  Home-page: https://github.com/Appvelox/multibotkit
6
6
  Author: Appvelox LLC
@@ -25,6 +25,7 @@ from multibotkit.schemas.telegram.outgoing import (
25
25
  SetWebhookParams,
26
26
  WebhookInfo,
27
27
  MediaGroup, ReplyKeyboardRemove,
28
+ Sticker
28
29
  )
29
30
 
30
31
 
@@ -1075,3 +1076,77 @@ class TelegramHelper(BaseHelper):
1075
1076
 
1076
1077
  r = await self._perform_async_request(url, data)
1077
1078
  return r
1079
+
1080
+ async def async_send_sticker(
1081
+ self,
1082
+ chat_id: int,
1083
+ sticker: str,
1084
+ disable_notification: Optional[bool] = None,
1085
+ protect_content: Optional[bool] = None,
1086
+ reply_to_message_id: Optional[int] = None,
1087
+ allow_sending_without_reply: Optional[bool] = None,
1088
+ reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]] = None
1089
+ ):
1090
+ sticker_obj = Sticker(
1091
+ chat_id=chat_id,
1092
+ sticker=sticker,
1093
+ disable_notification=disable_notification,
1094
+ protect_content=protect_content,
1095
+ reply_to_message_id=reply_to_message_id,
1096
+ allow_sending_without_reply=allow_sending_without_reply,
1097
+ reply_markup=reply_markup
1098
+ )
1099
+
1100
+ url = self.tg_base_url + "sendSticker"
1101
+ data = sticker_obj.dict(exclude_none=True)
1102
+ if "reply_markup" in data.keys():
1103
+ data["reply_markup"] = json.dumps(data["reply_markup"])
1104
+
1105
+ r = await self._perform_async_request(url, data)
1106
+ return r
1107
+
1108
+ def sync_send_sticker(
1109
+ self,
1110
+ chat_id: int,
1111
+ sticker: str,
1112
+ disable_notification: Optional[bool] = None,
1113
+ protect_content: Optional[bool] = None,
1114
+ reply_to_message_id: Optional[int] = None,
1115
+ allow_sending_without_reply: Optional[bool] = None,
1116
+ reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]] = None
1117
+ ):
1118
+ sticker_obj = Sticker(
1119
+ chat_id=chat_id,
1120
+ sticker=sticker,
1121
+ disable_notification=disable_notification,
1122
+ protect_content=protect_content,
1123
+ reply_to_message_id=reply_to_message_id,
1124
+ allow_sending_without_reply=allow_sending_without_reply,
1125
+ reply_markup=reply_markup
1126
+ )
1127
+
1128
+ url = self.tg_base_url + "sendSticker"
1129
+ data = sticker_obj.dict(exclude_none=True)
1130
+ if "reply_markup" in data.keys():
1131
+ data["reply_markup"] = json.dumps(data["reply_markup"])
1132
+
1133
+ r = self._perform_sync_request(url, data)
1134
+ return r
1135
+
1136
+ def sync_get_sticker_set(
1137
+ self,
1138
+ sticker_set: str,
1139
+ ):
1140
+ url = self.tg_base_url + "getStickerSet"
1141
+ data = {"name": sticker_set}
1142
+ r = self._perform_sync_request(url, data)
1143
+ return r
1144
+
1145
+ async def async_get_sticker_set(
1146
+ self,
1147
+ sticker_set: str,
1148
+ ):
1149
+ url = self.tg_base_url + "getStickerSet"
1150
+ data = {"name": sticker_set}
1151
+ r = await self._perform_async_request(url, data)
1152
+ return r
@@ -218,3 +218,13 @@ class Audio(BaseModel):
218
218
  reply_to_message_id: Optional[int] = Field(None, title="reply to message id")
219
219
  allow_sending_without_reply: Optional[bool] = Field(None, title="allow sending without reply")
220
220
  reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]] = Field(None, title="reply markup")
221
+
222
+
223
+ class Sticker(BaseModel):
224
+ chat_id: int = Field(..., title="chat id")
225
+ sticker: str = Field(..., title="document")
226
+ disable_notification: Optional[bool] = Field(None, title="disable notification")
227
+ protect_content: Optional[bool] = Field(None, title="protect content")
228
+ reply_to_message_id: Optional[int] = Field(None, title="reply to message id")
229
+ allow_sending_without_reply: Optional[bool] = Field(None, title="allow sending without reply")
230
+ reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]] = Field(None, title="reply markup")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Functional library for developing multiplatform chatbots
5
5
  Home-page: https://github.com/Appvelox/multibotkit
6
6
  Author: Appvelox LLC
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="multibotkit",
8
- version="0.1.8",
8
+ version="0.1.9",
9
9
  author="Appvelox LLC",
10
10
  author_email="team@appvelox.ru",
11
11
  description="Functional library for developing multiplatform chatbots",
File without changes
File without changes
File without changes
File without changes