multibotkit 0.1.25__tar.gz → 0.1.26__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.25 → multibotkit-0.1.26}/PKG-INFO +1 -1
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/helpers/telegram.py +64 -4
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/telegram/outgoing.py +5 -5
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit.egg-info/PKG-INFO +1 -1
- {multibotkit-0.1.25 → multibotkit-0.1.26}/setup.py +1 -1
- {multibotkit-0.1.25 → multibotkit-0.1.26}/LICENSE +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/README.md +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/dispatchers/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/dispatchers/base_dispatcher.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/dispatchers/fb.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/dispatchers/telegram.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/dispatchers/viber.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/dispatchers/vk.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/helpers/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/helpers/base_helper.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/helpers/fb.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/helpers/viber.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/helpers/vk.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/fb/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/fb/incoming.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/fb/outgoing.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/telegram/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/telegram/incoming.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/viber/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/viber/incoming.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/viber/outgoing.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/vk/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/vk/incoming.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/schemas/vk/outgoing.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/states/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/states/managers/__init__.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/states/managers/base.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/states/managers/memory.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/states/managers/mongo.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/states/managers/redis.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit/states/state.py +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit.egg-info/SOURCES.txt +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit.egg-info/dependency_links.txt +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit.egg-info/requires.txt +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/multibotkit.egg-info/top_level.txt +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/pyproject.toml +0 -0
- {multibotkit-0.1.25 → multibotkit-0.1.26}/setup.cfg +0 -0
|
@@ -208,6 +208,66 @@ class TelegramHelper(BaseHelper):
|
|
|
208
208
|
r = await self._perform_async_request(url, data)
|
|
209
209
|
return r
|
|
210
210
|
|
|
211
|
+
def sync_create_chat_invite_link(
|
|
212
|
+
self,
|
|
213
|
+
chat_id: int,
|
|
214
|
+
creates_join_request: Optional[bool] = False,
|
|
215
|
+
):
|
|
216
|
+
url = self.tg_base_url + "createChatInviteLink"
|
|
217
|
+
data = {"chat_id": chat_id, "creates_join_request": creates_join_request}
|
|
218
|
+
r = self._perform_sync_request(url, data)
|
|
219
|
+
return r
|
|
220
|
+
|
|
221
|
+
async def async_create_chat_invite_link(
|
|
222
|
+
self,
|
|
223
|
+
chat_id: int,
|
|
224
|
+
creates_join_request: Optional[bool] = False,
|
|
225
|
+
):
|
|
226
|
+
url = self.tg_base_url + "createChatInviteLink"
|
|
227
|
+
data = {"chat_id": chat_id, "creates_join_request": creates_join_request}
|
|
228
|
+
r = await self._perform_async_request(url, data)
|
|
229
|
+
return r
|
|
230
|
+
|
|
231
|
+
def sync_approve_chat_join_request(
|
|
232
|
+
self,
|
|
233
|
+
chat_id: int,
|
|
234
|
+
user_id: int,
|
|
235
|
+
):
|
|
236
|
+
url = self.tg_base_url + "approveChatJoinRequest"
|
|
237
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
238
|
+
r = self._perform_sync_request(url, data)
|
|
239
|
+
return r
|
|
240
|
+
|
|
241
|
+
async def async_approve_chat_join_request(
|
|
242
|
+
self,
|
|
243
|
+
chat_id: int,
|
|
244
|
+
user_id: int,
|
|
245
|
+
):
|
|
246
|
+
url = self.tg_base_url + "approveChatJoinRequest"
|
|
247
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
248
|
+
r = await self._perform_async_request(url, data)
|
|
249
|
+
return r
|
|
250
|
+
|
|
251
|
+
def sync_decline_chat_join_request(
|
|
252
|
+
self,
|
|
253
|
+
chat_id: int,
|
|
254
|
+
user_id: int,
|
|
255
|
+
):
|
|
256
|
+
url = self.tg_base_url + "declineChatJoinRequest"
|
|
257
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
258
|
+
r = self._perform_sync_request(url, data)
|
|
259
|
+
return r
|
|
260
|
+
|
|
261
|
+
async def async_decline_chat_join_request(
|
|
262
|
+
self,
|
|
263
|
+
chat_id: int,
|
|
264
|
+
user_id: int,
|
|
265
|
+
):
|
|
266
|
+
url = self.tg_base_url + "declineChatJoinRequest"
|
|
267
|
+
data = {"chat_id": chat_id, "user_id": user_id}
|
|
268
|
+
r = await self._perform_async_request(url, data)
|
|
269
|
+
return r
|
|
270
|
+
|
|
211
271
|
def sync_delete_message(
|
|
212
272
|
self,
|
|
213
273
|
chat_id: int,
|
|
@@ -237,11 +297,11 @@ class TelegramHelper(BaseHelper):
|
|
|
237
297
|
message_id: int,
|
|
238
298
|
):
|
|
239
299
|
url = self.tg_base_url + "copyMessage"
|
|
240
|
-
|
|
300
|
+
copy_message = CopyMessage(
|
|
241
301
|
chat_id=chat_id, message_id=message_id, from_chat_id=from_chat_id
|
|
242
302
|
)
|
|
243
303
|
|
|
244
|
-
r = self._perform_sync_request(url,
|
|
304
|
+
r = self._perform_sync_request(url, copy_message.dict())
|
|
245
305
|
return r
|
|
246
306
|
|
|
247
307
|
async def async_copy_message(
|
|
@@ -251,11 +311,11 @@ class TelegramHelper(BaseHelper):
|
|
|
251
311
|
message_id: int,
|
|
252
312
|
):
|
|
253
313
|
url = self.tg_base_url + "copyMessage"
|
|
254
|
-
|
|
314
|
+
copy_message = CopyMessage(
|
|
255
315
|
chat_id=chat_id, message_id=message_id, from_chat_id=from_chat_id
|
|
256
316
|
)
|
|
257
317
|
|
|
258
|
-
r = await self._perform_async_request(url,
|
|
318
|
+
r = await self._perform_async_request(url, copy_message.dict())
|
|
259
319
|
return r
|
|
260
320
|
|
|
261
321
|
def sync_edit_message_text(
|
|
@@ -40,26 +40,26 @@ class DeleteWebhookParams(BaseModel):
|
|
|
40
40
|
|
|
41
41
|
class DeleteMessage(BaseModel):
|
|
42
42
|
chat_id: int = Field(
|
|
43
|
-
|
|
43
|
+
...,
|
|
44
44
|
title="Unique identifier for the target chat or username of the"
|
|
45
45
|
" target channel (in the format @channelusername)",
|
|
46
46
|
)
|
|
47
|
-
message_id: int = Field(
|
|
47
|
+
message_id: int = Field(..., title="Identifier of the message to delete")
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
class CopyMessage(BaseModel):
|
|
51
51
|
chat_id: int = Field(
|
|
52
|
-
|
|
52
|
+
...,
|
|
53
53
|
title="Unique identifier for the target chat or username of the target channel "
|
|
54
54
|
"(in the format @channelusername)",
|
|
55
55
|
)
|
|
56
56
|
from_chat_id: int = Field(
|
|
57
|
-
|
|
57
|
+
...,
|
|
58
58
|
title="Unique identifier for the chat where the original message was sent (or channel username in "
|
|
59
59
|
"the format @channelusername)",
|
|
60
60
|
)
|
|
61
61
|
message_id: int = Field(
|
|
62
|
-
|
|
62
|
+
..., title="Message identifier in the chat specified in from_chat_id"
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
|
|
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
|