mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support of Bot API 7.11 (#1601)
* Added full support of Bot API 7.11 * Small fixes * Added changelog
This commit is contained in:
parent
4531c3628c
commit
405bbcc36f
165 changed files with 1619 additions and 573 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ class AnswerInlineQuery(TelegramMethod[bool]):
|
|||
|
||||
inline_query_id: str
|
||||
"""Unique identifier for the answered query"""
|
||||
results: List[
|
||||
results: list[
|
||||
Union[
|
||||
InlineQueryResultCachedAudio,
|
||||
InlineQueryResultCachedDocument,
|
||||
|
|
@ -96,7 +96,7 @@ class AnswerInlineQuery(TelegramMethod[bool]):
|
|||
__pydantic__self__,
|
||||
*,
|
||||
inline_query_id: str,
|
||||
results: List[
|
||||
results: list[
|
||||
Union[
|
||||
InlineQueryResultCachedAudio,
|
||||
InlineQueryResultCachedDocument,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from ..types import ShippingOption
|
||||
from .base import TelegramMethod
|
||||
|
|
@ -20,7 +20,7 @@ class AnswerShippingQuery(TelegramMethod[bool]):
|
|||
"""Unique identifier for the query to be answered"""
|
||||
ok: bool
|
||||
"""Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)"""
|
||||
shipping_options: Optional[List[ShippingOption]] = None
|
||||
shipping_options: Optional[list[ShippingOption]] = None
|
||||
"""Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options."""
|
||||
error_message: Optional[str] = None
|
||||
"""Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user."""
|
||||
|
|
@ -34,7 +34,7 @@ class AnswerShippingQuery(TelegramMethod[bool]):
|
|||
*,
|
||||
shipping_query_id: str,
|
||||
ok: bool,
|
||||
shipping_options: Optional[List[ShippingOption]] = None,
|
||||
shipping_options: Optional[list[ShippingOption]] = None,
|
||||
error_message: Optional[str] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
"""New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""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
|
||||
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."""
|
||||
|
|
@ -47,6 +47,8 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
"""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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -79,12 +81,13 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
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"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -108,6 +111,7 @@ class CopyMessage(TelegramMethod[MessageId]):
|
|||
show_caption_above_media=show_caption_above_media,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from ..types import MessageId
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class CopyMessages(TelegramMethod[List[MessageId]]):
|
||||
class CopyMessages(TelegramMethod[list[MessageId]]):
|
||||
"""
|
||||
Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#copymessages
|
||||
"""
|
||||
|
||||
__returning__ = List[MessageId]
|
||||
__returning__ = list[MessageId]
|
||||
__api_method__ = "copyMessages"
|
||||
|
||||
chat_id: Union[int, str]
|
||||
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
|
||||
from_chat_id: Union[int, str]
|
||||
"""Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)"""
|
||||
message_ids: List[int]
|
||||
message_ids: list[int]
|
||||
"""A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order."""
|
||||
message_thread_id: Optional[int] = None
|
||||
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
|
||||
|
|
@ -38,7 +38,7 @@ class CopyMessages(TelegramMethod[List[MessageId]]):
|
|||
*,
|
||||
chat_id: Union[int, str],
|
||||
from_chat_id: Union[int, str],
|
||||
message_ids: List[int],
|
||||
message_ids: list[int],
|
||||
message_thread_id: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from ..types import LabeledPrice
|
||||
from .base import TelegramMethod
|
||||
|
|
@ -24,13 +24,13 @@ class CreateInvoiceLink(TelegramMethod[str]):
|
|||
"""Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."""
|
||||
currency: str
|
||||
"""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]
|
||||
prices: list[LabeledPrice]
|
||||
"""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. Not supported for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
suggested_tip_amounts: Optional[List[int]] = None
|
||||
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
|
||||
"""JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider."""
|
||||
|
|
@ -68,10 +68,10 @@ class CreateInvoiceLink(TelegramMethod[str]):
|
|||
description: str,
|
||||
payload: str,
|
||||
currency: str,
|
||||
prices: List[LabeledPrice],
|
||||
prices: list[LabeledPrice],
|
||||
provider_token: Optional[str] = None,
|
||||
max_tip_amount: Optional[int] = None,
|
||||
suggested_tip_amounts: Optional[List[int]] = None,
|
||||
suggested_tip_amounts: Optional[list[int]] = None,
|
||||
provider_data: Optional[str] = None,
|
||||
photo_url: Optional[str] = None,
|
||||
photo_size: Optional[int] = None,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ class CreateNewStickerSet(TelegramMethod[bool]):
|
|||
"""Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_<bot_username>"`. :code:`<bot_username>` is case insensitive. 1-64 characters."""
|
||||
title: str
|
||||
"""Sticker set title, 1-64 characters"""
|
||||
stickers: List[InputSticker]
|
||||
stickers: list[InputSticker]
|
||||
"""A JSON-serialized list of 1-50 initial stickers to be added to the sticker set"""
|
||||
sticker_type: Optional[str] = None
|
||||
"""Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created."""
|
||||
|
|
@ -46,7 +46,7 @@ class CreateNewStickerSet(TelegramMethod[bool]):
|
|||
user_id: int,
|
||||
name: str,
|
||||
title: str,
|
||||
stickers: List[InputSticker],
|
||||
stickers: list[InputSticker],
|
||||
sticker_type: Optional[str] = None,
|
||||
needs_repainting: Optional[bool] = None,
|
||||
sticker_format: Optional[str] = None,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from typing import TYPE_CHECKING, Any, List, Union
|
||||
from typing import TYPE_CHECKING, Any, Union
|
||||
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ class DeleteMessages(TelegramMethod[bool]):
|
|||
|
||||
chat_id: Union[int, str]
|
||||
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
|
||||
message_ids: List[int]
|
||||
message_ids: list[int]
|
||||
"""A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -26,7 +26,7 @@ class DeleteMessages(TelegramMethod[bool]):
|
|||
__pydantic__self__,
|
||||
*,
|
||||
chat_id: Union[int, str],
|
||||
message_ids: List[int],
|
||||
message_ids: list[int],
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from ..client.default import Default
|
||||
from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity
|
||||
from ..types import InlineKeyboardMarkup, Message, MessageEntity
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
|
|||
"""New caption of the message, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""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
|
||||
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."""
|
||||
|
|
@ -49,7 +49,7 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
|
|||
inline_message_id: Optional[str] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
caption_entities: Optional[list[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default(
|
||||
"show_caption_above_media"
|
||||
),
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from .base import TelegramMethod
|
|||
|
||||
class EditMessageMedia(TelegramMethod[Union[Message, bool]]):
|
||||
"""
|
||||
Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.
|
||||
Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#editmessagemedia
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]):
|
|||
"""Required if *chat_id* and *message_id* are not specified. Identifier of the inline message"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
entities: Optional[List[MessageEntity]] = None
|
||||
entities: Optional[list[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*"""
|
||||
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default("link_preview")
|
||||
"""Link preview generation options for the message"""
|
||||
|
|
@ -64,7 +64,7 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]):
|
|||
message_id: Optional[int] = None,
|
||||
inline_message_id: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
entities: Optional[List[MessageEntity]] = None,
|
||||
entities: Optional[list[MessageEntity]] = None,
|
||||
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default(
|
||||
"link_preview"
|
||||
),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ from typing import TYPE_CHECKING, Any, Optional, Union
|
|||
|
||||
from ..client.default import Default
|
||||
from ..types import Message
|
||||
from ..types.base import UNSET_PROTECT_CONTENT
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from ..types import MessageId
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class ForwardMessages(TelegramMethod[List[MessageId]]):
|
||||
class ForwardMessages(TelegramMethod[list[MessageId]]):
|
||||
"""
|
||||
Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#forwardmessages
|
||||
"""
|
||||
|
||||
__returning__ = List[MessageId]
|
||||
__returning__ = list[MessageId]
|
||||
__api_method__ = "forwardMessages"
|
||||
|
||||
chat_id: Union[int, str]
|
||||
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
|
||||
from_chat_id: Union[int, str]
|
||||
"""Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)"""
|
||||
message_ids: List[int]
|
||||
message_ids: list[int]
|
||||
"""A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order."""
|
||||
message_thread_id: Optional[int] = None
|
||||
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
|
||||
|
|
@ -36,7 +36,7 @@ class ForwardMessages(TelegramMethod[List[MessageId]]):
|
|||
*,
|
||||
chat_id: Union[int, str],
|
||||
from_chat_id: Union[int, str],
|
||||
message_ids: List[int],
|
||||
message_ids: list[int],
|
||||
message_thread_id: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Union
|
||||
from typing import TYPE_CHECKING, Any, Union
|
||||
|
||||
from ..types import (
|
||||
ChatMemberAdministrator,
|
||||
|
|
@ -15,7 +15,7 @@ from .base import TelegramMethod
|
|||
|
||||
class GetChatAdministrators(
|
||||
TelegramMethod[
|
||||
List[
|
||||
list[
|
||||
Union[
|
||||
ChatMemberOwner,
|
||||
ChatMemberAdministrator,
|
||||
|
|
@ -33,7 +33,7 @@ class GetChatAdministrators(
|
|||
Source: https://core.telegram.org/bots/api#getchatadministrators
|
||||
"""
|
||||
|
||||
__returning__ = List[
|
||||
__returning__ = list[
|
||||
Union[
|
||||
ChatMemberOwner,
|
||||
ChatMemberAdministrator,
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from ..types import Sticker
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]):
|
||||
class GetCustomEmojiStickers(TelegramMethod[list[Sticker]]):
|
||||
"""
|
||||
Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#getcustomemojistickers
|
||||
"""
|
||||
|
||||
__returning__ = List[Sticker]
|
||||
__returning__ = list[Sticker]
|
||||
__api_method__ = "getCustomEmojiStickers"
|
||||
|
||||
custom_emoji_ids: List[str]
|
||||
custom_emoji_ids: list[str]
|
||||
"""A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified."""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -24,7 +24,7 @@ class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]):
|
|||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__, *, custom_emoji_ids: List[str], **__pydantic_kwargs: Any
|
||||
__pydantic__self__, *, custom_emoji_ids: list[str], **__pydantic_kwargs: Any
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This method was auto-generated via `butcher`
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import List
|
||||
|
||||
from ..types import Sticker
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class GetForumTopicIconStickers(TelegramMethod[List[Sticker]]):
|
||||
class GetForumTopicIconStickers(TelegramMethod[list[Sticker]]):
|
||||
"""
|
||||
Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#getforumtopiciconstickers
|
||||
"""
|
||||
|
||||
__returning__ = List[Sticker]
|
||||
__returning__ = list[Sticker]
|
||||
__api_method__ = "getForumTopicIconStickers"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from ..types import GameHighScore
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class GetGameHighScores(TelegramMethod[List[GameHighScore]]):
|
||||
class GetGameHighScores(TelegramMethod[list[GameHighScore]]):
|
||||
"""
|
||||
Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects.
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]):
|
|||
Source: https://core.telegram.org/bots/api#getgamehighscores
|
||||
"""
|
||||
|
||||
__returning__ = List[GameHighScore]
|
||||
__returning__ = list[GameHighScore]
|
||||
__api_method__ = "getGameHighScores"
|
||||
|
||||
user_id: int
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from ..types import (
|
||||
BotCommand,
|
||||
|
|
@ -15,14 +15,14 @@ from ..types import (
|
|||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class GetMyCommands(TelegramMethod[List[BotCommand]]):
|
||||
class GetMyCommands(TelegramMethod[list[BotCommand]]):
|
||||
"""
|
||||
Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#getmycommands
|
||||
"""
|
||||
|
||||
__returning__ = List[BotCommand]
|
||||
__returning__ = list[BotCommand]
|
||||
__api_method__ = "getMyCommands"
|
||||
|
||||
scope: Optional[
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from ..types import Update
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class GetUpdates(TelegramMethod[List[Update]]):
|
||||
class GetUpdates(TelegramMethod[list[Update]]):
|
||||
"""
|
||||
Use this method to receive incoming updates using long polling (`wiki <https://en.wikipedia.org/wiki/Push_technology#Long_polling>`_). Returns an Array of :class:`aiogram.types.update.Update` objects.
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ class GetUpdates(TelegramMethod[List[Update]]):
|
|||
Source: https://core.telegram.org/bots/api#getupdates
|
||||
"""
|
||||
|
||||
__returning__ = List[Update]
|
||||
__returning__ = list[Update]
|
||||
__api_method__ = "getUpdates"
|
||||
|
||||
offset: Optional[int] = None
|
||||
|
|
@ -28,7 +28,7 @@ class GetUpdates(TelegramMethod[List[Update]]):
|
|||
"""Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100."""
|
||||
timeout: Optional[int] = None
|
||||
"""Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only."""
|
||||
allowed_updates: Optional[List[str]] = None
|
||||
allowed_updates: Optional[list[str]] = None
|
||||
"""A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used."""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -41,7 +41,7 @@ class GetUpdates(TelegramMethod[List[Update]]):
|
|||
offset: Optional[int] = None,
|
||||
limit: Optional[int] = None,
|
||||
timeout: Optional[int] = None,
|
||||
allowed_updates: Optional[List[str]] = None,
|
||||
allowed_updates: Optional[list[str]] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
"""Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""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
|
||||
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"""
|
||||
|
|
@ -58,6 +58,8 @@ class SendAnimation(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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -96,13 +98,14 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
thumbnail: Optional[InputFile] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
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"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -132,6 +135,7 @@ class SendAnimation(TelegramMethod[Message]):
|
|||
has_spoiler=has_spoiler,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ class SendAudio(TelegramMethod[Message]):
|
|||
"""Audio caption, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
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*"""
|
||||
duration: Optional[int] = None
|
||||
"""Duration of the audio in seconds"""
|
||||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -89,13 +91,14 @@ class SendAudio(TelegramMethod[Message]):
|
|||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
caption_entities: Optional[list[MessageEntity]] = None,
|
||||
duration: Optional[int] = None,
|
||||
performer: Optional[str] = None,
|
||||
title: Optional[str] = None,
|
||||
thumbnail: Optional[InputFile] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -123,6 +126,7 @@ class SendAudio(TelegramMethod[Message]):
|
|||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -81,6 +83,7 @@ class SendContact(TelegramMethod[Message]):
|
|||
vcard: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -104,6 +107,7 @@ class SendContact(TelegramMethod[Message]):
|
|||
vcard=vcard,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -72,6 +74,7 @@ class SendDice(TelegramMethod[Message]):
|
|||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -92,6 +95,7 @@ class SendDice(TelegramMethod[Message]):
|
|||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ class SendDocument(TelegramMethod[Message]):
|
|||
"""Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""Mode for parsing entities in the document caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
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*"""
|
||||
disable_content_type_detection: Optional[bool] = None
|
||||
"""Disables automatic server-side content type detection for files uploaded using multipart/form-data"""
|
||||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -85,10 +87,11 @@ class SendDocument(TelegramMethod[Message]):
|
|||
thumbnail: Optional[InputFile] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
caption_entities: Optional[list[MessageEntity]] = None,
|
||||
disable_content_type_detection: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -114,6 +117,7 @@ class SendDocument(TelegramMethod[Message]):
|
|||
disable_content_type_detection=disable_content_type_detection,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -63,6 +65,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"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
|
|
@ -81,6 +84,7 @@ class SendGame(TelegramMethod[Message]):
|
|||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
"""Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes."""
|
||||
currency: str
|
||||
"""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]
|
||||
prices: list[LabeledPrice]
|
||||
"""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"""
|
||||
|
|
@ -37,7 +37,7 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
"""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. Not supported for payments in `Telegram Stars <https://t.me/BotNews/90>`_."""
|
||||
suggested_tip_amounts: Optional[List[int]] = None
|
||||
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
|
||||
"""Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter"""
|
||||
|
|
@ -69,6 +69,8 @@ class SendInvoice(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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -100,11 +102,11 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
description: str,
|
||||
payload: str,
|
||||
currency: str,
|
||||
prices: List[LabeledPrice],
|
||||
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,
|
||||
suggested_tip_amounts: Optional[list[int]] = None,
|
||||
start_parameter: Optional[str] = None,
|
||||
provider_data: Optional[str] = None,
|
||||
photo_url: Optional[str] = None,
|
||||
|
|
@ -120,6 +122,7 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
is_flexible: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
|
|
@ -157,6 +160,7 @@ class SendInvoice(TelegramMethod[Message]):
|
|||
is_flexible=is_flexible,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -87,6 +89,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"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -112,6 +115,7 @@ class SendLocation(TelegramMethod[Message]):
|
|||
proximity_alert_radius=proximity_alert_radius,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,38 +1,34 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from ..client.default import Default
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputMediaAudio,
|
||||
InputMediaDocument,
|
||||
InputMediaPhoto,
|
||||
InputMediaVideo,
|
||||
Message,
|
||||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
ReplyParameters,
|
||||
)
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
||||
class SendMediaGroup(TelegramMethod[List[Message]]):
|
||||
class SendMediaGroup(TelegramMethod[list[Message]]):
|
||||
"""
|
||||
Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages <https://core.telegram.org/bots/api#message>`_ that were sent is returned.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#sendmediagroup
|
||||
"""
|
||||
|
||||
__returning__ = List[Message]
|
||||
__returning__ = list[Message]
|
||||
__api_method__ = "sendMediaGroup"
|
||||
|
||||
chat_id: Union[int, str]
|
||||
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
|
||||
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]]
|
||||
media: list[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]]
|
||||
"""A JSON-serialized array describing messages to be sent, must include 2-10 items"""
|
||||
business_connection_id: Optional[str] = None
|
||||
"""Unique identifier of the business connection on behalf of which the message will be sent"""
|
||||
|
|
@ -42,6 +38,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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -67,13 +65,14 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
|
|||
__pydantic__self__,
|
||||
*,
|
||||
chat_id: Union[int, str],
|
||||
media: List[
|
||||
media: list[
|
||||
Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]
|
||||
],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
|
|
@ -91,6 +90,7 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
|
|||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ class SendMessage(TelegramMethod[Message]):
|
|||
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
entities: Optional[List[MessageEntity]] = None
|
||||
entities: Optional[list[MessageEntity]] = None
|
||||
"""A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*"""
|
||||
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default("link_preview")
|
||||
"""Link preview generation options for the message"""
|
||||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -86,12 +88,13 @@ class SendMessage(TelegramMethod[Message]):
|
|||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
entities: Optional[List[MessageEntity]] = None,
|
||||
entities: Optional[list[MessageEntity]] = None,
|
||||
link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default(
|
||||
"link_preview"
|
||||
),
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -118,6 +121,7 @@ class SendMessage(TelegramMethod[Message]):
|
|||
link_preview_options=link_preview_options,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from ..types import (
|
||||
ForceReply,
|
||||
|
|
@ -30,7 +30,7 @@ class SendPaidMedia(TelegramMethod[Message]):
|
|||
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance."""
|
||||
star_count: int
|
||||
"""The number of Telegram Stars that must be paid to buy access to the media; 1-2500"""
|
||||
media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]]
|
||||
media: list[Union[InputPaidMediaPhoto, InputPaidMediaVideo]]
|
||||
"""A JSON-serialized array describing the media to be sent; up to 10 items"""
|
||||
business_connection_id: Optional[str] = None
|
||||
"""Unique identifier of the business connection on behalf of which the message will be sent"""
|
||||
|
|
@ -40,7 +40,7 @@ class SendPaidMedia(TelegramMethod[Message]):
|
|||
"""Media caption, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[str] = None
|
||||
"""Mode for parsing entities in the media caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
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[bool] = None
|
||||
"""Pass :code:`True`, if the caption must be shown above the message media"""
|
||||
|
|
@ -48,6 +48,8 @@ class SendPaidMedia(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[bool] = None
|
||||
"""Protects the contents of the sent message from forwarding and saving"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
reply_parameters: Optional[ReplyParameters] = None
|
||||
"""Description of the message to reply to"""
|
||||
reply_markup: Optional[
|
||||
|
|
@ -64,15 +66,16 @@ class SendPaidMedia(TelegramMethod[Message]):
|
|||
*,
|
||||
chat_id: Union[int, str],
|
||||
star_count: int,
|
||||
media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]],
|
||||
media: list[Union[InputPaidMediaPhoto, InputPaidMediaVideo]],
|
||||
business_connection_id: Optional[str] = None,
|
||||
payload: Optional[str] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = None,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
caption_entities: Optional[list[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
|
|
@ -95,6 +98,7 @@ class SendPaidMedia(TelegramMethod[Message]):
|
|||
show_caption_above_media=show_caption_above_media,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
**__pydantic_kwargs,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
"""Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""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
|
||||
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"""
|
||||
|
|
@ -50,6 +50,8 @@ class SendPhoto(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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -84,13 +86,14 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
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"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -116,6 +119,7 @@ class SendPhoto(TelegramMethod[Message]):
|
|||
has_spoiler=has_spoiler,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ 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[Union[InputPollOption, str]]
|
||||
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"""
|
||||
|
|
@ -41,7 +41,7 @@ class SendPoll(TelegramMethod[Message]):
|
|||
"""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
|
||||
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`"""
|
||||
|
|
@ -55,7 +55,7 @@ class SendPoll(TelegramMethod[Message]):
|
|||
"""Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing"""
|
||||
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
|
||||
explanation_entities: Optional[list[MessageEntity]] = None
|
||||
"""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*."""
|
||||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -97,23 +99,24 @@ class SendPoll(TelegramMethod[Message]):
|
|||
*,
|
||||
chat_id: Union[int, str],
|
||||
question: str,
|
||||
options: List[Union[InputPollOption, 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,
|
||||
question_entities: Optional[list[MessageEntity]] = None,
|
||||
is_anonymous: Optional[bool] = None,
|
||||
type: Optional[str] = None,
|
||||
allows_multiple_answers: Optional[bool] = None,
|
||||
correct_option_id: Optional[int] = None,
|
||||
explanation: Optional[str] = None,
|
||||
explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
explanation_entities: Optional[List[MessageEntity]] = None,
|
||||
explanation_entities: Optional[list[MessageEntity]] = None,
|
||||
open_period: Optional[int] = None,
|
||||
close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
|
||||
is_closed: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -147,6 +150,7 @@ class SendPoll(TelegramMethod[Message]):
|
|||
is_closed=is_closed,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -76,6 +78,7 @@ class SendSticker(TelegramMethod[Message]):
|
|||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -97,6 +100,7 @@ class SendSticker(TelegramMethod[Message]):
|
|||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -93,6 +95,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"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -120,6 +123,7 @@ class SendVenue(TelegramMethod[Message]):
|
|||
google_place_type=google_place_type,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ class SendVideo(TelegramMethod[Message]):
|
|||
"""Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""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
|
||||
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"""
|
||||
|
|
@ -60,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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -98,7 +100,7 @@ class SendVideo(TelegramMethod[Message]):
|
|||
thumbnail: Optional[InputFile] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
caption_entities: Optional[list[MessageEntity]] = None,
|
||||
show_caption_above_media: Optional[Union[bool, Default]] = Default(
|
||||
"show_caption_above_media"
|
||||
),
|
||||
|
|
@ -106,6 +108,7 @@ class SendVideo(TelegramMethod[Message]):
|
|||
supports_streaming: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -136,6 +139,7 @@ class SendVideo(TelegramMethod[Message]):
|
|||
supports_streaming=supports_streaming,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -82,6 +84,7 @@ class SendVideoNote(TelegramMethod[Message]):
|
|||
thumbnail: Optional[InputFile] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -105,6 +108,7 @@ class SendVideoNote(TelegramMethod[Message]):
|
|||
thumbnail=thumbnail,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ class SendVoice(TelegramMethod[Message]):
|
|||
"""Voice message caption, 0-1024 characters after entities parsing"""
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
"""Mode for parsing entities in the voice message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details."""
|
||||
caption_entities: Optional[List[MessageEntity]] = None
|
||||
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*"""
|
||||
duration: Optional[int] = None
|
||||
"""Duration of the voice message in seconds"""
|
||||
|
|
@ -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"""
|
||||
allow_paid_broadcast: Optional[bool] = None
|
||||
"""Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance"""
|
||||
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
|
||||
|
|
@ -82,10 +84,11 @@ class SendVoice(TelegramMethod[Message]):
|
|||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
caption_entities: Optional[list[MessageEntity]] = None,
|
||||
duration: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
|
||||
allow_paid_broadcast: Optional[bool] = None,
|
||||
message_effect_id: Optional[str] = None,
|
||||
reply_parameters: Optional[ReplyParameters] = None,
|
||||
reply_markup: Optional[
|
||||
|
|
@ -110,6 +113,7 @@ class SendVoice(TelegramMethod[Message]):
|
|||
duration=duration,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
allow_paid_broadcast=allow_paid_broadcast,
|
||||
message_effect_id=message_effect_id,
|
||||
reply_parameters=reply_parameters,
|
||||
reply_markup=reply_markup,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from ..types import ReactionTypeCustomEmoji, ReactionTypeEmoji, ReactionTypePaid
|
||||
from .base import TelegramMethod
|
||||
|
|
@ -19,7 +19,7 @@ class SetMessageReaction(TelegramMethod[bool]):
|
|||
message_id: int
|
||||
"""Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead."""
|
||||
reaction: Optional[
|
||||
List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]]
|
||||
list[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]]
|
||||
] = None
|
||||
"""A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots."""
|
||||
is_big: Optional[bool] = None
|
||||
|
|
@ -35,7 +35,7 @@ class SetMessageReaction(TelegramMethod[bool]):
|
|||
chat_id: Union[int, str],
|
||||
message_id: int,
|
||||
reaction: Optional[
|
||||
List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]]
|
||||
list[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]]
|
||||
] = None,
|
||||
is_big: Optional[bool] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
from ..types import (
|
||||
BotCommand,
|
||||
|
|
@ -25,7 +25,7 @@ class SetMyCommands(TelegramMethod[bool]):
|
|||
__returning__ = bool
|
||||
__api_method__ = "setMyCommands"
|
||||
|
||||
commands: List[BotCommand]
|
||||
commands: list[BotCommand]
|
||||
"""A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified."""
|
||||
scope: Optional[
|
||||
Union[
|
||||
|
|
@ -49,7 +49,7 @@ class SetMyCommands(TelegramMethod[bool]):
|
|||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
commands: List[BotCommand],
|
||||
commands: list[BotCommand],
|
||||
scope: Optional[
|
||||
Union[
|
||||
BotCommandScopeDefault,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Union
|
||||
from typing import TYPE_CHECKING, Any, Union
|
||||
|
||||
from ..types import (
|
||||
PassportElementErrorDataField,
|
||||
|
|
@ -29,7 +29,7 @@ class SetPassportDataErrors(TelegramMethod[bool]):
|
|||
|
||||
user_id: int
|
||||
"""User identifier"""
|
||||
errors: List[
|
||||
errors: list[
|
||||
Union[
|
||||
PassportElementErrorDataField,
|
||||
PassportElementErrorFrontSide,
|
||||
|
|
@ -52,7 +52,7 @@ class SetPassportDataErrors(TelegramMethod[bool]):
|
|||
__pydantic__self__,
|
||||
*,
|
||||
user_id: int,
|
||||
errors: List[
|
||||
errors: list[
|
||||
Union[
|
||||
PassportElementErrorDataField,
|
||||
PassportElementErrorFrontSide,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ class SetStickerEmojiList(TelegramMethod[bool]):
|
|||
|
||||
sticker: str
|
||||
"""File identifier of the sticker"""
|
||||
emoji_list: List[str]
|
||||
emoji_list: list[str]
|
||||
"""A JSON-serialized list of 1-20 emoji associated with the sticker"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -25,7 +25,7 @@ class SetStickerEmojiList(TelegramMethod[bool]):
|
|||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__, *, sticker: str, emoji_list: List[str], **__pydantic_kwargs: Any
|
||||
__pydantic__self__, *, sticker: str, emoji_list: list[str], **__pydantic_kwargs: Any
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This method was auto-generated via `butcher`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from .base import TelegramMethod
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ class SetStickerKeywords(TelegramMethod[bool]):
|
|||
|
||||
sticker: str
|
||||
"""File identifier of the sticker"""
|
||||
keywords: Optional[List[str]] = None
|
||||
keywords: Optional[list[str]] = None
|
||||
"""A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -28,7 +28,7 @@ class SetStickerKeywords(TelegramMethod[bool]):
|
|||
__pydantic__self__,
|
||||
*,
|
||||
sticker: str,
|
||||
keywords: Optional[List[str]] = None,
|
||||
keywords: Optional[list[str]] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from ..types import InputFile
|
||||
from .base import TelegramMethod
|
||||
|
|
@ -34,7 +34,7 @@ class SetWebhook(TelegramMethod[bool]):
|
|||
"""The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS"""
|
||||
max_connections: Optional[int] = None
|
||||
"""The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput."""
|
||||
allowed_updates: Optional[List[str]] = None
|
||||
allowed_updates: Optional[list[str]] = None
|
||||
"""A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used."""
|
||||
drop_pending_updates: Optional[bool] = None
|
||||
"""Pass :code:`True` to drop all pending updates"""
|
||||
|
|
@ -52,7 +52,7 @@ class SetWebhook(TelegramMethod[bool]):
|
|||
certificate: Optional[InputFile] = None,
|
||||
ip_address: Optional[str] = None,
|
||||
max_connections: Optional[int] = None,
|
||||
allowed_updates: Optional[List[str]] = None,
|
||||
allowed_updates: Optional[list[str]] = None,
|
||||
drop_pending_updates: Optional[bool] = None,
|
||||
secret_token: Optional[str] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue