mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Full support of Bot API 7.3 (#1480)
* Added full support of Bot API * Added full support of Bot API * Fixed tests * Added changelog * Bump version
This commit is contained in:
parent
6d655330af
commit
cf2980a9c1
137 changed files with 3422 additions and 929 deletions
|
|
@ -50,7 +50,7 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
|
|||
"""Required if *inline_message_id* is not specified. Identifier of the message to edit"""
|
||||
inline_message_id: Optional[str] = None
|
||||
"""Required if *chat_id* and *message_id* are not specified. Identifier of the inline message"""
|
||||
live_period: Optional[int] = None
|
||||
"""New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged"""
|
||||
horizontal_accuracy: Optional[float] = None
|
||||
"""The radius of uncertainty for the location, measured in meters; 0-1500"""
|
||||
heading: Optional[int] = None
|
||||
|
|
@ -47,6 +49,7 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
|
|||
chat_id: Optional[Union[int, str]] = None,
|
||||
message_id: Optional[int] = None,
|
||||
inline_message_id: Optional[str] = None,
|
||||
live_period: Optional[int] = None,
|
||||
horizontal_accuracy: Optional[float] = None,
|
||||
heading: Optional[int] = None,
|
||||
proximity_alert_radius: Optional[int] = None,
|
||||
|
|
@ -63,6 +66,7 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
|
|||
chat_id=chat_id,
|
||||
message_id=message_id,
|
||||
inline_message_id=inline_message_id,
|
||||
live_period=live_period,
|
||||
horizontal_accuracy=horizontal_accuracy,
|
||||
heading=heading,
|
||||
proximity_alert_radius=proximity_alert_radius,
|
||||
|
|
|
|||
|
|
@ -2,18 +2,18 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING, Any, Union
|
||||
|
||||
from ..types import Chat
|
||||
from ..types import ChatFullInfo
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class GetChat(TelegramMethod[Chat]):
|
||||
class GetChat(TelegramMethod[ChatFullInfo]):
|
||||
"""
|
||||
Use this method to get up to date information about the chat. Returns a :class:`aiogram.types.chat.Chat` object on success.
|
||||
Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#getchat
|
||||
"""
|
||||
|
||||
__returning__ = Chat
|
||||
__returning__ = ChatFullInfo
|
||||
__api_method__ = "getChat"
|
||||
|
||||
chat_id: Union[int, str]
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class PromoteChatMember(TelegramMethod[bool]):
|
|||
can_post_stories: Optional[bool] = None
|
||||
"""Pass :code:`True` if the administrator can post stories to the chat"""
|
||||
can_edit_stories: Optional[bool] = None
|
||||
"""Pass :code:`True` if the administrator can edit stories posted by other users"""
|
||||
"""Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive"""
|
||||
can_delete_stories: Optional[bool] = None
|
||||
"""Pass :code:`True` if the administrator can delete stories posted by other users"""
|
||||
can_post_messages: Optional[bool] = None
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from pydantic import Field
|
|||
|
||||
from ..client.default import Default
|
||||
from ..types import (
|
||||
UNSET_PARSE_MODE,
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputFile,
|
||||
|
|
@ -62,7 +61,7 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class SendAudio(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class SendContact(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class SendDice(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from pydantic import Field
|
|||
|
||||
from ..client.default import Default
|
||||
from ..types import (
|
||||
UNSET_PARSE_MODE,
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputFile,
|
||||
|
|
@ -56,7 +55,7 @@ class SendDocument(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class SendGame(TelegramMethod[Message]):
|
|||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None
|
||||
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account."""
|
||||
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game."""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class SendLocation(TelegramMethod[Message]):
|
|||
horizontal_accuracy: Optional[float] = None
|
||||
"""The radius of uncertainty for the location, measured in meters; 0-1500"""
|
||||
live_period: Optional[int] = None
|
||||
"""Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400."""
|
||||
"""Period in seconds during which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely."""
|
||||
heading: Optional[int] = None
|
||||
"""For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified."""
|
||||
proximity_alert_radius: Optional[int] = None
|
||||
|
|
@ -53,7 +53,7 @@ class SendLocation(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class SendMessage(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from pydantic import Field
|
|||
|
||||
from ..client.default import Default
|
||||
from ..types import (
|
||||
UNSET_PARSE_MODE,
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputFile,
|
||||
|
|
@ -54,7 +53,7 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ from pydantic import Field
|
|||
|
||||
from ..client.default import Default
|
||||
from ..types import (
|
||||
UNSET_PARSE_MODE,
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputPollOption,
|
||||
Message,
|
||||
MessageEntity,
|
||||
ReplyKeyboardMarkup,
|
||||
|
|
@ -33,12 +33,16 @@ class SendPoll(TelegramMethod[Message]):
|
|||
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
|
||||
question: str
|
||||
"""Poll question, 1-300 characters"""
|
||||
options: List[str]
|
||||
"""A JSON-serialized list of answer options, 2-10 strings 1-100 characters each"""
|
||||
options: List[Union[InputPollOption, str]]
|
||||
"""A JSON-serialized list of 2-10 answer options"""
|
||||
business_connection_id: Optional[str] = None
|
||||
"""Unique identifier of the business connection on behalf of which the message will be sent"""
|
||||
message_thread_id: Optional[int] = None
|
||||
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
|
||||
question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""Mode for parsing entities in the question. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Currently, only custom emoji entities are allowed"""
|
||||
question_entities: Optional[List[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*"""
|
||||
is_anonymous: Optional[bool] = None
|
||||
""":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`"""
|
||||
type: Optional[str] = None
|
||||
|
|
@ -52,7 +56,7 @@ class SendPoll(TelegramMethod[Message]):
|
|||
explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""Mode for parsing entities in the explanation. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
explanation_entities: Optional[List[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode*"""
|
||||
"""A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode*"""
|
||||
open_period: Optional[int] = None
|
||||
"""Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*."""
|
||||
close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
|
||||
|
|
@ -68,7 +72,7 @@ class SendPoll(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
@ -91,9 +95,11 @@ class SendPoll(TelegramMethod[Message]):
|
|||
*,
|
||||
chat_id: Union[int, str],
|
||||
question: str,
|
||||
options: List[str],
|
||||
options: List[Union[InputPollOption, str]],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
question_entities: Optional[List[MessageEntity]] = None,
|
||||
is_anonymous: Optional[bool] = None,
|
||||
type: Optional[str] = None,
|
||||
allows_multiple_answers: Optional[bool] = None,
|
||||
|
|
@ -124,6 +130,8 @@ class SendPoll(TelegramMethod[Message]):
|
|||
options=options,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
question_parse_mode=question_parse_mode,
|
||||
question_entities=question_entities,
|
||||
is_anonymous=is_anonymous,
|
||||
type=type,
|
||||
allows_multiple_answers=allows_multiple_answers,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class SendSticker(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account."""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class SendVenue(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from pydantic import Field
|
|||
|
||||
from ..client.default import Default
|
||||
from ..types import (
|
||||
UNSET_PARSE_MODE,
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputFile,
|
||||
|
|
@ -64,7 +63,7 @@ class SendVideo(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class SendVideoNote(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ from pydantic import Field
|
|||
|
||||
from ..client.default import Default
|
||||
from ..types import (
|
||||
UNSET_PARSE_MODE,
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputFile,
|
||||
|
|
@ -21,7 +20,7 @@ from .base import TelegramMethod
|
|||
|
||||
class SendVoice(TelegramMethod[Message]):
|
||||
"""
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#sendvoice
|
||||
"""
|
||||
|
|
@ -54,7 +53,7 @@ class SendVoice(TelegramMethod[Message]):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
|
||||
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
None, json_schema_extra={"deprecated": True}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue