multibotkit 0.1.20__py3-none-any.whl → 0.1.22__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.
@@ -28,7 +28,7 @@ from multibotkit.schemas.telegram.outgoing import (
28
28
  ReplyKeyboardRemove,
29
29
  Sticker,
30
30
  Video,
31
- Location, DeleteWebhookParams,
31
+ Location, DeleteWebhookParams, DeleteMessage,
32
32
  )
33
33
 
34
34
 
@@ -205,6 +205,28 @@ class TelegramHelper(BaseHelper):
205
205
  r = await self._perform_async_request(url, data)
206
206
  return r
207
207
 
208
+ def sync_delete_message(
209
+ self,
210
+ chat_id: int,
211
+ message_id: int,
212
+ ):
213
+ url = self.tg_base_url + "deleteMessage"
214
+ delete_message = DeleteMessage(chat_id=chat_id, message_id=message_id)
215
+
216
+ r = self._perform_sync_request(url, delete_message.dict())
217
+ return r
218
+
219
+ async def async_delete_message(
220
+ self,
221
+ chat_id: int,
222
+ message_id: int,
223
+ ):
224
+ url = self.tg_base_url + "deleteMessage"
225
+ delete_message = DeleteMessage(chat_id=chat_id, message_id=message_id)
226
+
227
+ r = await self._perform_async_request(url, delete_message.dict())
228
+ return r
229
+
208
230
  def sync_edit_message_text(
209
231
  self,
210
232
  chat_id: int,
@@ -33,7 +33,18 @@ updates may be received for a short period of time.",
33
33
 
34
34
 
35
35
  class DeleteWebhookParams(BaseModel):
36
- drop_pending_updates: Optional[bool] = Field(None, title="Pass True to drop all pending updates")
36
+ drop_pending_updates: int = Field(
37
+ None, title="Pass True to drop all pending updates"
38
+ )
39
+
40
+
41
+ class DeleteMessage(BaseModel):
42
+ chat_id: int = Field(
43
+ None,
44
+ title="Unique identifier for the target chat or username of the"
45
+ " target channel (in the format @channelusername)",
46
+ )
47
+ message_id: int = Field(None, title="Identifier of the message to delete")
37
48
 
38
49
 
39
50
  class WebhookInfo(BaseModel):
@@ -68,6 +79,12 @@ to the webhook for update delivery",
68
79
  )
69
80
 
70
81
 
82
+ class WebAppInfo(BaseModel):
83
+ url: str = Field(
84
+ ..., title="HTTP url of WebApp to be started when button is pressed"
85
+ )
86
+
87
+
71
88
  class InlineKeyboardButton(BaseModel):
72
89
  text: str = Field(..., title="Label text on the button")
73
90
  url: Optional[str] = Field(
@@ -78,6 +95,9 @@ class InlineKeyboardButton(BaseModel):
78
95
  title=" Data to be sent in a callback query to the bot \
79
96
  when button is pressed, 1-64 bytes",
80
97
  )
98
+ web_app: Optional[WebAppInfo] = Field(
99
+ None, title="Info about WebApp to be started when button is pressed"
100
+ )
81
101
 
82
102
 
83
103
  class InlineKeyboardMarkup(BaseModel):
@@ -88,12 +108,6 @@ Array of InlineKeyboardButton objects",
88
108
  )
89
109
 
90
110
 
91
- class WebAppInfo(BaseModel):
92
- url: str = Field(
93
- ..., title="HTTP url of WebApp to be started when button is pressed"
94
- )
95
-
96
-
97
111
  class KeyboardButton(BaseModel):
98
112
  text: str = Field(..., title="Text of the button")
99
113
  request_contact: Optional[bool] = Field(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.20
3
+ Version: 0.1.22
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=8DDxLj5ia_-UPfnneXWldBHvFlI3OxWcB19Opm_5yvg,53584
11
+ multibotkit/helpers/telegram.py,sha256=5DmMpis9iGueSQ8aqyeM96MQ4RjEbrVkRTA2vArLu38,54235
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
@@ -17,7 +17,7 @@ multibotkit/schemas/fb/incoming.py,sha256=sp4CeQohaDMOxz113dNxJDv_fSaGW5i8qzVS7F
17
17
  multibotkit/schemas/fb/outgoing.py,sha256=Qm0gPHHipAolXpnOJC4J4bfYjQEWpX54vYygSwKtIV4,8036
18
18
  multibotkit/schemas/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  multibotkit/schemas/telegram/incoming.py,sha256=ba67RQT5phOEIWTMG72SomUQrdxiuoKlXOxiz5fiaeA,10881
20
- multibotkit/schemas/telegram/outgoing.py,sha256=9BGRAOQIaQWxL8lJ3_0WUN2N5GVZjlvBSO5EcqwxRDU,11711
20
+ multibotkit/schemas/telegram/outgoing.py,sha256=pm1j-N0mffQJHcTyGxDaJd6XkQaHGB8KCRu-aPzClho,12132
21
21
  multibotkit/schemas/viber/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  multibotkit/schemas/viber/incoming.py,sha256=0sS9g-NmQFl_uoVz8pkbQ9zdNsXvGE52KxmzADoFIRM,4193
23
23
  multibotkit/schemas/viber/outgoing.py,sha256=KI73IX-aawtAx3ejW2Hx0ivXBYuMVudUxhwyp1wv6rc,8252
@@ -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.20.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
- multibotkit-0.1.20.dist-info/METADATA,sha256=cLXXRKUNiQeNXNDpbPcbF6IPEI3VpSXEiyJyF0ePiWo,826
36
- multibotkit-0.1.20.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
37
- multibotkit-0.1.20.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
- multibotkit-0.1.20.dist-info/RECORD,,
34
+ multibotkit-0.1.22.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
+ multibotkit-0.1.22.dist-info/METADATA,sha256=wDfL6cn9NkiG0z0mgg-KFIZZ0Fq7grE0pUIB8OSXc4U,826
36
+ multibotkit-0.1.22.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
37
+ multibotkit-0.1.22.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
+ multibotkit-0.1.22.dist-info/RECORD,,