mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support of Bot API 7.4 (#1498)
* Added full support of Bot API 7.4 * Added changelog
This commit is contained in:
parent
f50e058725
commit
b08ba78898
118 changed files with 1821 additions and 409 deletions
|
|
@ -120,6 +120,7 @@ from .unpin_all_forum_topic_messages import UnpinAllForumTopicMessages
|
|||
from .unpin_all_general_forum_topic_messages import UnpinAllGeneralForumTopicMessages
|
||||
from .unpin_chat_message import UnpinChatMessage
|
||||
from .upload_sticker_file import UploadStickerFile
|
||||
from .refund_star_payment import RefundStarPayment
|
||||
|
||||
__all__ = (
|
||||
"AddStickerToSet",
|
||||
|
|
@ -187,6 +188,7 @@ __all__ = (
|
|||
"LogOut",
|
||||
"PinChatMessage",
|
||||
"PromoteChatMember",
|
||||
"RefundStarPayment",
|
||||
"ReopenForumTopic",
|
||||
"ReopenGeneralForumTopic",
|
||||
"ReplaceStickerInSet",
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
"""Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*"""
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media")
|
||||
"""Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified."""
|
||||
disable_notification: Optional[bool] = None
|
||||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
|
|
@ -78,6 +80,9 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default(
|
||||
"show_caption_above_media"
|
||||
),
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
|
|
@ -100,6 +105,7 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
show_caption_above_media=show_caption_above_media,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
reply_parameters=reply_parameters,
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ class CreateInvoiceLink(TelegramMethod[str]):
|
|||
"""Product description, 1-255 characters"""
|
||||
payload: str
|
||||
"""Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes."""
|
||||
provider_token: str
|
||||
"""Payment provider token, obtained via `BotFather <https://t.me/botfather>`_"""
|
||||
currency: str
|
||||
"""Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_"""
|
||||
"""Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
prices: List[LabeledPrice]
|
||||
"""Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)"""
|
||||
"""Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
provider_token: Optional[str] = None
|
||||
"""Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
max_tip_amount: Optional[int] = None
|
||||
"""The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0"""
|
||||
"""The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
suggested_tip_amounts: Optional[List[int]] = None
|
||||
"""A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*."""
|
||||
provider_data: Optional[str] = None
|
||||
|
|
@ -43,19 +43,19 @@ class CreateInvoiceLink(TelegramMethod[str]):
|
|||
photo_height: Optional[int] = None
|
||||
"""Photo height"""
|
||||
need_name: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's full name to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
need_phone_number: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's phone number to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
need_email: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's email address to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
need_shipping_address: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's shipping address to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
send_phone_number_to_provider: Optional[bool] = None
|
||||
"""Pass :code:`True` if the user's phone number should be sent to the provider"""
|
||||
"""Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
send_email_to_provider: Optional[bool] = None
|
||||
"""Pass :code:`True` if the user's email address should be sent to the provider"""
|
||||
"""Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
is_flexible: Optional[bool] = None
|
||||
"""Pass :code:`True` if the final price depends on the shipping method"""
|
||||
"""Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -67,9 +67,9 @@ class CreateInvoiceLink(TelegramMethod[str]):
|
|||
title: str,
|
||||
description: str,
|
||||
payload: str,
|
||||
provider_token: str,
|
||||
currency: str,
|
||||
prices: List[LabeledPrice],
|
||||
provider_token: Optional[str] = None,
|
||||
max_tip_amount: Optional[int] = None,
|
||||
suggested_tip_amounts: Optional[List[int]] = None,
|
||||
provider_data: Optional[str] = None,
|
||||
|
|
@ -94,9 +94,9 @@ class CreateInvoiceLink(TelegramMethod[str]):
|
|||
title=title,
|
||||
description=description,
|
||||
payload=payload,
|
||||
provider_token=provider_token,
|
||||
currency=currency,
|
||||
prices=prices,
|
||||
provider_token=provider_token,
|
||||
max_tip_amount=max_tip_amount,
|
||||
suggested_tip_amounts=suggested_tip_amounts,
|
||||
provider_data=provider_data,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
|
|||
"""Mode for parsing entities in the message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media")
|
||||
"""Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages."""
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None
|
||||
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_."""
|
||||
|
||||
|
|
@ -45,6 +47,9 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default(
|
||||
"show_caption_above_media"
|
||||
),
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
|
|
@ -59,6 +64,7 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
|
|||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
show_caption_above_media=show_caption_above_media,
|
||||
reply_markup=reply_markup,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
|
|
|||
42
aiogram/methods/refund_star_payment.py
Normal file
42
aiogram/methods/refund_star_payment.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class RefundStarPayment(TelegramMethod[bool]):
|
||||
"""
|
||||
Refunds a successful payment in `Telegram Stars <https://t.me/BotNews/90>`_. Returns :code:`True` on success.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#refundstarpayment
|
||||
"""
|
||||
|
||||
__returning__ = bool
|
||||
__api_method__ = "refundStarPayment"
|
||||
|
||||
user_id: int
|
||||
"""Identifier of the user whose payment will be refunded"""
|
||||
telegram_payment_charge_id: str
|
||||
"""Telegram payment identifier"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
user_id: int,
|
||||
telegram_payment_charge_id: str,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This method was auto-generated via `butcher`
|
||||
# Is needed only for type checking and IDE support without any additional plugins
|
||||
|
||||
super().__init__(
|
||||
user_id=user_id,
|
||||
telegram_payment_charge_id=telegram_payment_charge_id,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
|
@ -50,12 +50,16 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
"""Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media")
|
||||
"""Pass :code:`True`, if the caption must be shown above the message media"""
|
||||
has_spoiler: Optional[bool] = None
|
||||
"""Pass :code:`True` if the animation needs to be covered with a spoiler animation"""
|
||||
disable_notification: Optional[bool] = None
|
||||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -93,9 +97,13 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default(
|
||||
"show_caption_above_media"
|
||||
),
|
||||
has_spoiler: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -120,9 +128,11 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
show_caption_above_media=show_caption_above_media,
|
||||
has_spoiler=has_spoiler,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ class SendAudio(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -94,6 +96,7 @@ class SendAudio(TelegramMethod[Message]):
|
|||
thumbnail: Optional[InputFile] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -120,6 +123,7 @@ class SendAudio(TelegramMethod[Message]):
|
|||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ class SendContact(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -79,6 +81,7 @@ class SendContact(TelegramMethod[Message]):
|
|||
vcard: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -101,6 +104,7 @@ class SendContact(TelegramMethod[Message]):
|
|||
vcard=vcard,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class SendDice(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -70,6 +72,7 @@ class SendDice(TelegramMethod[Message]):
|
|||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -89,6 +92,7 @@ class SendDice(TelegramMethod[Message]):
|
|||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ class SendDocument(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -87,6 +89,7 @@ class SendDocument(TelegramMethod[Message]):
|
|||
disable_content_type_detection: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -111,6 +114,7 @@ class SendDocument(TelegramMethod[Message]):
|
|||
disable_content_type_detection=disable_content_type_detection,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ class SendGame(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None
|
||||
|
|
@ -61,6 +63,7 @@ class SendGame(TelegramMethod[Message]):
|
|||
message_thread_id: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
|
|
@ -78,6 +81,7 @@ class SendGame(TelegramMethod[Message]):
|
|||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -27,16 +27,16 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
"""Product description, 1-255 characters"""
|
||||
payload: str
|
||||
"""Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes."""
|
||||
provider_token: str
|
||||
"""Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_"""
|
||||
currency: str
|
||||
"""Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_"""
|
||||
"""Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
prices: List[LabeledPrice]
|
||||
"""Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)"""
|
||||
"""Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
message_thread_id: Optional[int] = None
|
||||
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
|
||||
provider_token: Optional[str] = None
|
||||
"""Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
max_tip_amount: Optional[int] = None
|
||||
"""The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0"""
|
||||
"""The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
suggested_tip_amounts: Optional[List[int]] = None
|
||||
"""A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*."""
|
||||
start_parameter: Optional[str] = None
|
||||
|
|
@ -52,23 +52,25 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
photo_height: Optional[int] = None
|
||||
"""Photo height"""
|
||||
need_name: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's full name to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
need_phone_number: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's phone number to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
need_email: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's email address to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
need_shipping_address: Optional[bool] = None
|
||||
"""Pass :code:`True` if you require the user's shipping address to complete the order"""
|
||||
"""Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
send_phone_number_to_provider: Optional[bool] = None
|
||||
"""Pass :code:`True` if the user's phone number should be sent to provider"""
|
||||
"""Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
send_email_to_provider: Optional[bool] = None
|
||||
"""Pass :code:`True` if the user's email address should be sent to provider"""
|
||||
"""Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
is_flexible: Optional[bool] = None
|
||||
"""Pass :code:`True` if the final price depends on the shipping method"""
|
||||
"""Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
disable_notification: Optional[bool] = None
|
||||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None
|
||||
|
|
@ -97,10 +99,10 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
title: str,
|
||||
description: str,
|
||||
payload: str,
|
||||
provider_token: str,
|
||||
currency: str,
|
||||
prices: List[LabeledPrice],
|
||||
message_thread_id: Optional[int] = None,
|
||||
provider_token: Optional[str] = None,
|
||||
max_tip_amount: Optional[int] = None,
|
||||
suggested_tip_amounts: Optional[List[int]] = None,
|
||||
start_parameter: Optional[str] = None,
|
||||
|
|
@ -118,6 +120,7 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
is_flexible: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
|
|
@ -133,10 +136,10 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
title=title,
|
||||
description=description,
|
||||
payload=payload,
|
||||
provider_token=provider_token,
|
||||
currency=currency,
|
||||
prices=prices,
|
||||
message_thread_id=message_thread_id,
|
||||
provider_token=provider_token,
|
||||
max_tip_amount=max_tip_amount,
|
||||
suggested_tip_amounts=suggested_tip_amounts,
|
||||
start_parameter=start_parameter,
|
||||
|
|
@ -154,6 +157,7 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
is_flexible=is_flexible,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ class SendLocation(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -85,6 +87,7 @@ class SendLocation(TelegramMethod[Message]):
|
|||
proximity_alert_radius: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -109,6 +112,7 @@ class SendLocation(TelegramMethod[Message]):
|
|||
proximity_alert_radius=proximity_alert_radius,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
|
|||
"""Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent messages from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
allow_sending_without_reply: Optional[bool] = Field(
|
||||
|
|
@ -72,6 +74,7 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
|
|||
message_thread_id: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
|
|
@ -88,6 +91,7 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
|
|||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_to_message_id=reply_to_message_id,
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ class SendMessage(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -90,6 +92,7 @@ class SendMessage(TelegramMethod[Message]):
|
|||
),
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -115,6 +118,7 @@ class SendMessage(TelegramMethod[Message]):
|
|||
link_preview_options=link_preview_options,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -42,12 +42,16 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
"""Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media")
|
||||
"""Pass :code:`True`, if the caption must be shown above the message media"""
|
||||
has_spoiler: Optional[bool] = None
|
||||
"""Pass :code:`True` if the photo needs to be covered with a spoiler animation"""
|
||||
disable_notification: Optional[bool] = None
|
||||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -81,9 +85,13 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default(
|
||||
"show_caption_above_media"
|
||||
),
|
||||
has_spoiler: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -104,9 +112,11 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
show_caption_above_media=show_caption_above_media,
|
||||
has_spoiler=has_spoiler,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ class SendPoll(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -112,6 +114,7 @@ class SendPoll(TelegramMethod[Message]):
|
|||
is_closed: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -144,6 +147,7 @@ class SendPoll(TelegramMethod[Message]):
|
|||
is_closed=is_closed,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ class SendSticker(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -74,6 +76,7 @@ class SendSticker(TelegramMethod[Message]):
|
|||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -94,6 +97,7 @@ class SendSticker(TelegramMethod[Message]):
|
|||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ class SendVenue(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -91,6 +93,7 @@ class SendVenue(TelegramMethod[Message]):
|
|||
google_place_type: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -117,6 +120,7 @@ class SendVenue(TelegramMethod[Message]):
|
|||
google_place_type=google_place_type,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ class SendVideo(TelegramMethod[Message]):
|
|||
"""Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media")
|
||||
"""Pass :code:`True`, if the caption must be shown above the message media"""
|
||||
has_spoiler: Optional[bool] = None
|
||||
"""Pass :code:`True` if the video needs to be covered with a spoiler animation"""
|
||||
supports_streaming: Optional[bool] = None
|
||||
|
|
@ -58,6 +60,8 @@ class SendVideo(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -95,10 +99,14 @@ class SendVideo(TelegramMethod[Message]):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default(
|
||||
"show_caption_above_media"
|
||||
),
|
||||
has_spoiler: Optional[bool] = None,
|
||||
supports_streaming: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -123,10 +131,12 @@ class SendVideo(TelegramMethod[Message]):
|
|||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
show_caption_above_media=show_caption_above_media,
|
||||
has_spoiler=has_spoiler,
|
||||
supports_streaming=supports_streaming,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ class SendVideoNote(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -80,6 +82,7 @@ class SendVideoNote(TelegramMethod[Message]):
|
|||
thumbnail: Optional[InputFile] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -102,6 +105,7 @@ class SendVideoNote(TelegramMethod[Message]):
|
|||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ class SendVoice(TelegramMethod[Message]):
|
|||
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content")
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
message_effect_id: Optional[str] = None
|
||||
"""Unique identifier of the message effect to be added to the message; for private chats only"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -84,6 +86,7 @@ class SendVoice(TelegramMethod[Message]):
|
|||
duration: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -107,6 +110,7 @@ class SendVoice(TelegramMethod[Message]):
|
|||
duration=duration,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue