botapi-py 1.5.0__tar.gz → 1.5.1__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.5.0 → botapi_py-1.5.1}/PKG-INFO +1 -1
- {botapi_py-1.5.0 → botapi_py-1.5.1}/pyproject.toml +1 -1
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/enums.py +0 -14
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/methods.py +2 -2
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/types.py +22 -1
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/__init__.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/__init__.pyi +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/bot.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/core.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/dispatchers/__init__.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/dispatchers/__init__.pyi +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/dispatchers/common.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/dispatchers/get_updates_handler.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/dispatchers/redis_pubsub_handler.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/errors.py +0 -0
- {botapi_py-1.5.0 → botapi_py-1.5.1}/src/botapi/internals.py +0 -0
|
@@ -60,20 +60,6 @@ class MediaType(enum.StrEnum):
|
|
|
60
60
|
STORY = 'story' # does not have `file_id`, only `id`
|
|
61
61
|
PAID_MEDIA = 'paid_media' # this contains a `photo` attribute that is a list of `PhotoSize` objects
|
|
62
62
|
|
|
63
|
-
SendMediaGroupValidMediaTypes = Union[
|
|
64
|
-
MediaType.AUDIO,
|
|
65
|
-
MediaType.DOCUMENT,
|
|
66
|
-
MediaType.PHOTO,
|
|
67
|
-
MediaType.VIDEO,
|
|
68
|
-
]
|
|
69
|
-
'''
|
|
70
|
-
Valid media types you can use with the `send_media_group` method.
|
|
71
|
-
|
|
72
|
-
This is a subset of `MediaType`.
|
|
73
|
-
|
|
74
|
-
Source: https://core.telegram.org/bots/api#sendmediagroup
|
|
75
|
-
'''
|
|
76
|
-
|
|
77
63
|
class ServiceMessage(enum.StrEnum):
|
|
78
64
|
'''
|
|
79
65
|
Subset of `MessageType`.
|
|
@@ -325,7 +325,7 @@ class Methods(core.BaseBot):
|
|
|
325
325
|
offset: Optional[int] = None,
|
|
326
326
|
limit: Optional[int] = None,
|
|
327
327
|
timeout: Optional[int] = None,
|
|
328
|
-
allowed_updates: Optional[List[
|
|
328
|
+
allowed_updates: Optional[Union[List[str], List[enums.UpdateType]]] = None,
|
|
329
329
|
) -> List[Update]:
|
|
330
330
|
'''
|
|
331
331
|
Use this method to receive incoming updates using
|
|
@@ -349,7 +349,7 @@ class Methods(core.BaseBot):
|
|
|
349
349
|
certificate: Optional[InputFile] = None,
|
|
350
350
|
ip_address: Optional[str] = None,
|
|
351
351
|
max_connections: Optional[int] = None,
|
|
352
|
-
allowed_updates: Optional[List[
|
|
352
|
+
allowed_updates: Optional[Union[List[str], List[enums.UpdateType]]] = None,
|
|
353
353
|
drop_pending_updates: Optional[bool] = None,
|
|
354
354
|
secret_token: Optional[str] = None,
|
|
355
355
|
) -> bool:
|
|
@@ -4607,10 +4607,31 @@ class GameHighScore(BaseModel):
|
|
|
4607
4607
|
user: User
|
|
4608
4608
|
score: int
|
|
4609
4609
|
|
|
4610
|
+
|
|
4610
4611
|
# Raw Python type adapters
|
|
4611
4612
|
IntAdapter = TypeAdapter[int](int)
|
|
4612
4613
|
StrAdapter = TypeAdapter[str](str)
|
|
4613
4614
|
FloatAdapter = TypeAdapter[float](float)
|
|
4614
4615
|
BoolAdapter = TypeAdapter[bool](bool)
|
|
4615
4616
|
|
|
4616
|
-
|
|
4617
|
+
# Convenience manually-generated Unions & Type Adapters
|
|
4618
|
+
MediaTypeUnion = Union[
|
|
4619
|
+
Animation,
|
|
4620
|
+
Audio,
|
|
4621
|
+
Document,
|
|
4622
|
+
List[PhotoSize],
|
|
4623
|
+
Sticker,
|
|
4624
|
+
Video,
|
|
4625
|
+
VideoNote,
|
|
4626
|
+
Voice,
|
|
4627
|
+
Story,
|
|
4628
|
+
PaidMedia
|
|
4629
|
+
]
|
|
4630
|
+
|
|
4631
|
+
_InputMediaGroupTypes = Union[
|
|
4632
|
+
InputMediaAudio,
|
|
4633
|
+
InputMediaDocument,
|
|
4634
|
+
InputMediaPhoto,
|
|
4635
|
+
InputMediaVideo,
|
|
4636
|
+
]
|
|
4637
|
+
InputMediaGroupTypeAdapter = TypeAdapter[_InputMediaGroupTypes](_InputMediaGroupTypes)
|
|
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
|