botapi-py 1.4.12__tar.gz → 1.4.14__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.
- {botapi_py-1.4.12 → botapi_py-1.4.14}/PKG-INFO +1 -1
- {botapi_py-1.4.12 → botapi_py-1.4.14}/pyproject.toml +1 -1
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/enums.py +1 -1
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/shortcuts.py +1 -1
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/types.py +26 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/__init__.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/__init__.pyi +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/core.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/dispatchers/__init__.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/dispatchers/__init__.pyi +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/dispatchers/common.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/dispatchers/get_updates_handler.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/dispatchers/redis_pubsub_handler.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/errors.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/methods.py +0 -0
- {botapi_py-1.4.12 → botapi_py-1.4.14}/src/botapi/utils.py +0 -0
|
@@ -18,7 +18,7 @@ class BotShortcuts:
|
|
|
18
18
|
self,
|
|
19
19
|
chat_id: Union[int, str],
|
|
20
20
|
media: Union[types.InputFile, str, None],
|
|
21
|
-
file_type: Optional[enums.MediaType],
|
|
21
|
+
file_type: Optional[enums.MediaType | str],
|
|
22
22
|
caption: Optional[str] = None,
|
|
23
23
|
parse_mode: Optional[enums.ParseMode] = enums.ParseMode.HTML,
|
|
24
24
|
caption_entities: Optional[List[types.MessageEntity]] = None,
|
|
@@ -355,6 +355,32 @@ class Message(MaybeInaccessibleMessage, frozen=True):
|
|
|
355
355
|
|
|
356
356
|
return None
|
|
357
357
|
|
|
358
|
+
@property
|
|
359
|
+
def media_type(self) -> Optional[enums.MediaType]:
|
|
360
|
+
'''
|
|
361
|
+
Type of the actual multimedia message content (e.g., `photo`, `sticker`, `video`, etc.).
|
|
362
|
+
|
|
363
|
+
See `enums.MediaType` for all available media
|
|
364
|
+
'''
|
|
365
|
+
for media_type in enums.MediaType:
|
|
366
|
+
if getattr(self, media_type.value) is not None:
|
|
367
|
+
return media_type
|
|
368
|
+
|
|
369
|
+
return None
|
|
370
|
+
|
|
371
|
+
@property
|
|
372
|
+
def service_message_type(self) -> Optional[enums.ServiceMessage]:
|
|
373
|
+
'''
|
|
374
|
+
Type of the actual service message content (e.g., `new_chat_title`, `new_chat_title`, `pinned_message`, etc.).
|
|
375
|
+
|
|
376
|
+
See `enums.ServiceMessage` for all available service message
|
|
377
|
+
'''
|
|
378
|
+
for message_type in enums.ServiceMessage:
|
|
379
|
+
if getattr(self, message_type.value) is not None:
|
|
380
|
+
return message_type
|
|
381
|
+
|
|
382
|
+
return None
|
|
383
|
+
|
|
358
384
|
@property
|
|
359
385
|
def message_type(self) -> Optional[enums.MessageType]:
|
|
360
386
|
'''
|
|
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
|