mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
Change InlineQueryResultType.MPEG to more correct (#1146)
* Change `InlineQueryResultType.MPEG` to `InlineQueryResultType.MPEG4GIF` * Change regexp for parse entities * Use code generator to fix types * Add changelog
This commit is contained in:
parent
268b7e759d
commit
46a7beb668
5 changed files with 8 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ description: |
|
||||||
Source: https://core.telegram.org/bots/api#inlinequeryresult
|
Source: https://core.telegram.org/bots/api#inlinequeryresult
|
||||||
multi_parse:
|
multi_parse:
|
||||||
attribute: type
|
attribute: type
|
||||||
regexp: "must be ([a-z_]+)"
|
regexp: "must be ([a-z_0-9]+)"
|
||||||
entities:
|
entities:
|
||||||
- InlineQueryResultCachedAudio
|
- InlineQueryResultCachedAudio
|
||||||
- InlineQueryResultCachedDocument
|
- InlineQueryResultCachedDocument
|
||||||
|
|
|
||||||
4
CHANGES/1146.bugfix.rst
Normal file
4
CHANGES/1146.bugfix.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
Change type of result in InlineQueryResult enum for `InlineQueryResultCachedMpeg4Gif`
|
||||||
|
and `InlineQueryResultMpeg4Gif` to more correct according to documentation.
|
||||||
|
|
||||||
|
Change regexp for entities parsing to more correct (`InlineQueryResultType.yml`).
|
||||||
|
|
@ -11,7 +11,7 @@ class InlineQueryResultType(str, Enum):
|
||||||
AUDIO = "audio"
|
AUDIO = "audio"
|
||||||
DOCUMENT = "document"
|
DOCUMENT = "document"
|
||||||
GIF = "gif"
|
GIF = "gif"
|
||||||
MPEG = "mpeg"
|
MPEG4_GIF = "mpeg4_gif"
|
||||||
PHOTO = "photo"
|
PHOTO = "photo"
|
||||||
STICKER = "sticker"
|
STICKER = "sticker"
|
||||||
VIDEO = "video"
|
VIDEO = "video"
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
|
||||||
Source: https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif
|
Source: https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif
|
||||||
"""
|
"""
|
||||||
|
|
||||||
type: str = Field(InlineQueryResultType.MPEG, const=True)
|
type: str = Field(InlineQueryResultType.MPEG4_GIF, const=True)
|
||||||
"""Type of the result, must be *mpeg4_gif*"""
|
"""Type of the result, must be *mpeg4_gif*"""
|
||||||
id: str
|
id: str
|
||||||
"""Unique identifier for this result, 1-64 bytes"""
|
"""Unique identifier for this result, 1-64 bytes"""
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
|
||||||
Source: https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
|
Source: https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
|
||||||
"""
|
"""
|
||||||
|
|
||||||
type: str = Field(InlineQueryResultType.MPEG, const=True)
|
type: str = Field(InlineQueryResultType.MPEG4_GIF, const=True)
|
||||||
"""Type of the result, must be *mpeg4_gif*"""
|
"""Type of the result, must be *mpeg4_gif*"""
|
||||||
id: str
|
id: str
|
||||||
"""Unique identifier for this result, 1-64 bytes"""
|
"""Unique identifier for this result, 1-64 bytes"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue