mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Regen code (Bot API 5.0)
This commit is contained in:
parent
a339514fb9
commit
2495836469
4 changed files with 15 additions and 5 deletions
|
|
@ -149,7 +149,7 @@ def prepare_parse_mode(
|
|||
entities_property=entities_property,
|
||||
)
|
||||
elif root.get(parse_mode_property, UNSET) is UNSET:
|
||||
if bot.parse_mode and not root.get(entities_property, None):
|
||||
if bot.parse_mode and root.get(entities_property, None) is None:
|
||||
root[parse_mode_property] = bot.parse_mode
|
||||
else:
|
||||
root[parse_mode_property] = None
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
|
||||
|
||||
from ..types import InlineKeyboardMarkup, InputMedia, Message, InputFile
|
||||
from .base import Request, TelegramMethod, prepare_parse_mode, prepare_media_file
|
||||
from ..types import InlineKeyboardMarkup, InputFile, InputMedia, Message
|
||||
from .base import Request, TelegramMethod, prepare_media_file, prepare_parse_mode
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..client.bot import Bot
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
|
||||
|
||||
from ..types import InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo
|
||||
from .base import Request, TelegramMethod
|
||||
from ..types import (
|
||||
InputFile,
|
||||
InputMediaAudio,
|
||||
InputMediaDocument,
|
||||
InputMediaPhoto,
|
||||
InputMediaVideo,
|
||||
Message,
|
||||
)
|
||||
from .base import Request, TelegramMethod, prepare_input_media, prepare_parse_mode
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..client.bot import Bot
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ class InlineQueryResultVideo(InlineQueryResult):
|
|||
"""Caption of the video to be sent, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = UNSET
|
||||
"""Mode for parsing entities in the video caption. See formatting options for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""List of special entities that appear in the caption, which can be specified instead of
|
||||
parse_mode"""
|
||||
video_width: Optional[int] = None
|
||||
"""Video width"""
|
||||
video_height: Optional[int] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue