mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support of Bot API 7.2 (#1444)
* Added base support of Bot API 7.2 * Added base support of Bot API 7.2 * Fixing tests and content types for Telegram Bot API 7.2 update (#1453) * Fixing tests and content types for Telegram Bot API 7.2 * Adding changelog for 1453 PR * Fixes + coverage * Replace `BusinessConnection.date` type * Reformat code * Refactor UserContextMiddleware to use EventContext class This update significantly refactors UserContextMiddleware to leverage a new class, EventContext. Instead of resolving event context as a tuple, it now produces an instance of EventContext. Additional adjustments include supporting a business connection ID for event context identification and facilitating backwards compatibility. Tests and other files were also updated accordingly for these changes. * Cover FSM key builder (business_connection_id * Added changelog --------- Co-authored-by: RoLOQ <roman.fedunn@gmail.com>
This commit is contained in:
parent
5f157beb26
commit
057478621b
147 changed files with 3509 additions and 651 deletions
|
|
@ -3,6 +3,7 @@ from typing import List, Literal, Optional, Union
|
|||
from .animation import Animation
|
||||
from .audio import Audio
|
||||
from .base import UNSET_PARSE_MODE, TelegramObject
|
||||
from .birthdate import Birthdate
|
||||
from .bot_command import BotCommand
|
||||
from .bot_command_scope import BotCommandScope
|
||||
from .bot_command_scope_all_chat_administrators import (
|
||||
|
|
@ -17,6 +18,12 @@ from .bot_command_scope_default import BotCommandScopeDefault
|
|||
from .bot_description import BotDescription
|
||||
from .bot_name import BotName
|
||||
from .bot_short_description import BotShortDescription
|
||||
from .business_connection import BusinessConnection
|
||||
from .business_intro import BusinessIntro
|
||||
from .business_location import BusinessLocation
|
||||
from .business_messages_deleted import BusinessMessagesDeleted
|
||||
from .business_opening_hours import BusinessOpeningHours
|
||||
from .business_opening_hours_interval import BusinessOpeningHoursInterval
|
||||
from .callback_game import CallbackGame
|
||||
from .callback_query import CallbackQuery
|
||||
from .chat import Chat
|
||||
|
|
@ -165,6 +172,7 @@ from .reply_keyboard_remove import ReplyKeyboardRemove
|
|||
from .reply_parameters import ReplyParameters
|
||||
from .response_parameters import ResponseParameters
|
||||
from .sent_web_app_message import SentWebAppMessage
|
||||
from .shared_user import SharedUser
|
||||
from .shipping_address import ShippingAddress
|
||||
from .shipping_option import ShippingOption
|
||||
from .shipping_query import ShippingQuery
|
||||
|
|
@ -196,6 +204,7 @@ from .write_access_allowed import WriteAccessAllowed
|
|||
__all__ = (
|
||||
"Animation",
|
||||
"Audio",
|
||||
"Birthdate",
|
||||
"BotCommand",
|
||||
"BotCommandScope",
|
||||
"BotCommandScopeAllChatAdministrators",
|
||||
|
|
@ -209,6 +218,12 @@ __all__ = (
|
|||
"BotName",
|
||||
"BotShortDescription",
|
||||
"BufferedInputFile",
|
||||
"BusinessConnection",
|
||||
"BusinessIntro",
|
||||
"BusinessLocation",
|
||||
"BusinessMessagesDeleted",
|
||||
"BusinessOpeningHours",
|
||||
"BusinessOpeningHoursInterval",
|
||||
"CallbackGame",
|
||||
"CallbackQuery",
|
||||
"Chat",
|
||||
|
|
@ -357,6 +372,7 @@ __all__ = (
|
|||
"ReplyParameters",
|
||||
"ResponseParameters",
|
||||
"SentWebAppMessage",
|
||||
"SharedUser",
|
||||
"ShippingAddress",
|
||||
"ShippingOption",
|
||||
"ShippingQuery",
|
||||
|
|
|
|||
38
aiogram/types/birthdate.py
Normal file
38
aiogram/types/birthdate.py
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
|
||||
class Birthdate(TelegramObject):
|
||||
"""
|
||||
|
||||
|
||||
Source: https://core.telegram.org/bots/api#birthdate
|
||||
"""
|
||||
|
||||
day: int
|
||||
"""Day of the user's birth; 1-31"""
|
||||
month: int
|
||||
"""Month of the user's birth; 1-12"""
|
||||
year: Optional[int] = None
|
||||
"""*Optional*. Year of the user's birth"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
day: int,
|
||||
month: int,
|
||||
year: Optional[int] = None,
|
||||
**__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__(day=day, month=month, year=year, **__pydantic_kwargs)
|
||||
59
aiogram/types/business_connection.py
Normal file
59
aiogram/types/business_connection.py
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from .base import TelegramObject
|
||||
from .custom import DateTime
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .user import User
|
||||
|
||||
|
||||
class BusinessConnection(TelegramObject):
|
||||
"""
|
||||
Describes the connection of the bot with a business account.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#businessconnection
|
||||
"""
|
||||
|
||||
id: str
|
||||
"""Unique identifier of the business connection"""
|
||||
user: User
|
||||
"""Business account user that created the business connection"""
|
||||
user_chat_id: int
|
||||
"""Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."""
|
||||
date: DateTime
|
||||
"""Date the connection was established in Unix time"""
|
||||
can_reply: bool
|
||||
"""True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours"""
|
||||
is_enabled: bool
|
||||
"""True, if the connection is active"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
id: str,
|
||||
user: User,
|
||||
user_chat_id: int,
|
||||
date: DateTime,
|
||||
can_reply: bool,
|
||||
is_enabled: bool,
|
||||
**__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__(
|
||||
id=id,
|
||||
user=user,
|
||||
user_chat_id=user_chat_id,
|
||||
date=date,
|
||||
can_reply=can_reply,
|
||||
is_enabled=is_enabled,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
41
aiogram/types/business_intro.py
Normal file
41
aiogram/types/business_intro.py
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .sticker import Sticker
|
||||
|
||||
|
||||
class BusinessIntro(TelegramObject):
|
||||
"""
|
||||
|
||||
|
||||
Source: https://core.telegram.org/bots/api#businessintro
|
||||
"""
|
||||
|
||||
title: Optional[str] = None
|
||||
"""*Optional*. Title text of the business intro"""
|
||||
message: Optional[str] = None
|
||||
"""*Optional*. Message text of the business intro"""
|
||||
sticker: Optional[Sticker] = None
|
||||
"""*Optional*. Sticker of the business intro"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
title: Optional[str] = None,
|
||||
message: Optional[str] = None,
|
||||
sticker: Optional[Sticker] = None,
|
||||
**__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__(title=title, message=message, sticker=sticker, **__pydantic_kwargs)
|
||||
38
aiogram/types/business_location.py
Normal file
38
aiogram/types/business_location.py
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .location import Location
|
||||
|
||||
|
||||
class BusinessLocation(TelegramObject):
|
||||
"""
|
||||
|
||||
|
||||
Source: https://core.telegram.org/bots/api#businesslocation
|
||||
"""
|
||||
|
||||
address: str
|
||||
"""Address of the business"""
|
||||
location: Optional[Location] = None
|
||||
"""*Optional*. Location of the business"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
address: str,
|
||||
location: Optional[Location] = None,
|
||||
**__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__(address=address, location=location, **__pydantic_kwargs)
|
||||
46
aiogram/types/business_messages_deleted.py
Normal file
46
aiogram/types/business_messages_deleted.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .chat import Chat
|
||||
|
||||
|
||||
class BusinessMessagesDeleted(TelegramObject):
|
||||
"""
|
||||
This object is received when messages are deleted from a connected business account.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#businessmessagesdeleted
|
||||
"""
|
||||
|
||||
business_connection_id: str
|
||||
"""Unique identifier of the business connection"""
|
||||
chat: Chat
|
||||
"""Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."""
|
||||
message_ids: List[int]
|
||||
"""A JSON-serialized list of identifiers of deleted messages in the chat of the business account"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
business_connection_id: str,
|
||||
chat: Chat,
|
||||
message_ids: List[int],
|
||||
**__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__(
|
||||
business_connection_id=business_connection_id,
|
||||
chat=chat,
|
||||
message_ids=message_ids,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
40
aiogram/types/business_opening_hours.py
Normal file
40
aiogram/types/business_opening_hours.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .business_opening_hours_interval import BusinessOpeningHoursInterval
|
||||
|
||||
|
||||
class BusinessOpeningHours(TelegramObject):
|
||||
"""
|
||||
|
||||
|
||||
Source: https://core.telegram.org/bots/api#businessopeninghours
|
||||
"""
|
||||
|
||||
time_zone_name: str
|
||||
"""Unique name of the time zone for which the opening hours are defined"""
|
||||
opening_hours: List[BusinessOpeningHoursInterval]
|
||||
"""List of time intervals describing business opening hours"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
time_zone_name: str,
|
||||
opening_hours: List[BusinessOpeningHoursInterval],
|
||||
**__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__(
|
||||
time_zone_name=time_zone_name, opening_hours=opening_hours, **__pydantic_kwargs
|
||||
)
|
||||
37
aiogram/types/business_opening_hours_interval.py
Normal file
37
aiogram/types/business_opening_hours_interval.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
|
||||
class BusinessOpeningHoursInterval(TelegramObject):
|
||||
"""
|
||||
|
||||
|
||||
Source: https://core.telegram.org/bots/api#businessopeninghoursinterval
|
||||
"""
|
||||
|
||||
opening_minute: int
|
||||
"""The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"""
|
||||
closing_minute: int
|
||||
"""The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
opening_minute: int,
|
||||
closing_minute: int,
|
||||
**__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__(
|
||||
opening_minute=opening_minute, closing_minute=closing_minute, **__pydantic_kwargs
|
||||
)
|
||||
|
|
@ -37,6 +37,10 @@ if TYPE_CHECKING:
|
|||
UnpinAllGeneralForumTopicMessages,
|
||||
UnpinChatMessage,
|
||||
)
|
||||
from .birthdate import Birthdate
|
||||
from .business_intro import BusinessIntro
|
||||
from .business_location import BusinessLocation
|
||||
from .business_opening_hours import BusinessOpeningHours
|
||||
from .chat_location import ChatLocation
|
||||
from .chat_permissions import ChatPermissions
|
||||
from .chat_photo import ChatPhoto
|
||||
|
|
@ -71,6 +75,16 @@ class Chat(TelegramObject):
|
|||
"""*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
active_usernames: Optional[List[str]] = None
|
||||
"""*Optional*. If non-empty, the list of all `active chat usernames <https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames>`_; for private chats, supergroups and channels. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
birthdate: Optional[Birthdate] = None
|
||||
"""*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
business_intro: Optional[BusinessIntro] = None
|
||||
"""*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
business_location: Optional[BusinessLocation] = None
|
||||
"""*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
business_opening_hours: Optional[BusinessOpeningHours] = None
|
||||
"""*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
personal_chat: Optional[Chat] = None
|
||||
"""*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
available_reactions: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None
|
||||
"""*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions <https://core.telegram.org/bots/api#reactiontypeemoji>`_ are allowed. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
|
||||
accent_color_id: Optional[int] = None
|
||||
|
|
@ -144,6 +158,11 @@ class Chat(TelegramObject):
|
|||
is_forum: Optional[bool] = None,
|
||||
photo: Optional[ChatPhoto] = None,
|
||||
active_usernames: Optional[List[str]] = None,
|
||||
birthdate: Optional[Birthdate] = None,
|
||||
business_intro: Optional[BusinessIntro] = None,
|
||||
business_location: Optional[BusinessLocation] = None,
|
||||
business_opening_hours: Optional[BusinessOpeningHours] = None,
|
||||
personal_chat: Optional[Chat] = None,
|
||||
available_reactions: Optional[
|
||||
List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]
|
||||
] = None,
|
||||
|
|
@ -190,6 +209,11 @@ class Chat(TelegramObject):
|
|||
is_forum=is_forum,
|
||||
photo=photo,
|
||||
active_usernames=active_usernames,
|
||||
birthdate=birthdate,
|
||||
business_intro=business_intro,
|
||||
business_location=business_location,
|
||||
business_opening_hours=business_opening_hours,
|
||||
personal_chat=personal_chat,
|
||||
available_reactions=available_reactions,
|
||||
accent_color_id=accent_color_id,
|
||||
background_custom_emoji_id=background_custom_emoji_id,
|
||||
|
|
@ -522,6 +546,7 @@ class Chat(TelegramObject):
|
|||
def do(
|
||||
self,
|
||||
action: str,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendChatAction:
|
||||
|
|
@ -540,7 +565,8 @@ class Chat(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendchataction
|
||||
|
||||
:param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_.
|
||||
:param message_thread_id: Unique identifier for the target message thread; supergroups only
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread; for supergroups only
|
||||
:return: instance of method :class:`aiogram.methods.send_chat_action.SendChatAction`
|
||||
"""
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -551,6 +577,7 @@ class Chat(TelegramObject):
|
|||
return SendChatAction(
|
||||
chat_id=self.id,
|
||||
action=action,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
**kwargs,
|
||||
).as_(self._bot)
|
||||
|
|
@ -884,10 +911,10 @@ class Chat(TelegramObject):
|
|||
:param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat
|
||||
:param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users
|
||||
:param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users
|
||||
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; channels only
|
||||
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; channels only
|
||||
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only
|
||||
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only
|
||||
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only
|
||||
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only
|
||||
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only
|
||||
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
|
||||
:return: instance of method :class:`aiogram.methods.promote_chat_member.PromoteChatMember`
|
||||
"""
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ class ChatAdministratorRights(TelegramObject):
|
|||
can_delete_stories: bool
|
||||
""":code:`True`, if the administrator can delete stories posted by other users"""
|
||||
can_post_messages: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only"""
|
||||
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only"""
|
||||
can_edit_messages: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
|
||||
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only"""
|
||||
can_pin_messages: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
|
||||
"""*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only"""
|
||||
can_manage_topics: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
|
||||
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer(
|
||||
self,
|
||||
text: str,
|
||||
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,
|
||||
|
|
@ -187,6 +188,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendmessage
|
||||
|
||||
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param parse_mode: Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
|
||||
|
|
@ -194,7 +196,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param disable_web_page_preview: Disables link previews for links in this message
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
@ -208,6 +210,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendMessage(
|
||||
chat_id=self.chat.id,
|
||||
text=text,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
parse_mode=parse_mode,
|
||||
entities=entities,
|
||||
|
|
@ -225,6 +228,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_pm(
|
||||
self,
|
||||
text: str,
|
||||
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,
|
||||
|
|
@ -255,6 +259,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendmessage
|
||||
|
||||
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param parse_mode: Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
|
||||
|
|
@ -262,7 +267,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param disable_web_page_preview: Disables link previews for links in this message
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
@ -276,6 +281,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendMessage(
|
||||
chat_id=self.user_chat_id,
|
||||
text=text,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
parse_mode=parse_mode,
|
||||
entities=entities,
|
||||
|
|
@ -293,6 +299,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_animation(
|
||||
self,
|
||||
animation: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
|
|
@ -323,6 +330,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendanimation
|
||||
|
||||
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent animation in seconds
|
||||
:param width: Animation width
|
||||
|
|
@ -335,7 +343,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
|
||||
|
|
@ -348,6 +356,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendAnimation(
|
||||
chat_id=self.chat.id,
|
||||
animation=animation,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -369,6 +378,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_animation_pm(
|
||||
self,
|
||||
animation: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
|
|
@ -399,6 +409,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendanimation
|
||||
|
||||
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent animation in seconds
|
||||
:param width: Animation width
|
||||
|
|
@ -411,7 +422,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
|
||||
|
|
@ -424,6 +435,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendAnimation(
|
||||
chat_id=self.user_chat_id,
|
||||
animation=animation,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -445,6 +457,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_audio(
|
||||
self,
|
||||
audio: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -475,6 +488,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendaudio
|
||||
|
||||
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Audio caption, 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
|
|
@ -486,7 +500,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
|
||||
|
|
@ -499,6 +513,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendAudio(
|
||||
chat_id=self.chat.id,
|
||||
audio=audio,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -519,6 +534,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_audio_pm(
|
||||
self,
|
||||
audio: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -549,6 +565,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendaudio
|
||||
|
||||
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Audio caption, 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
|
|
@ -560,7 +577,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
|
||||
|
|
@ -573,6 +590,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendAudio(
|
||||
chat_id=self.user_chat_id,
|
||||
audio=audio,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -594,6 +612,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
self,
|
||||
phone_number: str,
|
||||
first_name: str,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
last_name: Optional[str] = None,
|
||||
vcard: Optional[str] = None,
|
||||
|
|
@ -619,13 +638,14 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
:param phone_number: Contact's phone number
|
||||
:param first_name: Contact's first name
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param last_name: Contact's last name
|
||||
:param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
|
||||
|
|
@ -639,6 +659,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
phone_number=phone_number,
|
||||
first_name=first_name,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
last_name=last_name,
|
||||
vcard=vcard,
|
||||
|
|
@ -655,6 +676,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
self,
|
||||
phone_number: str,
|
||||
first_name: str,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
last_name: Optional[str] = None,
|
||||
vcard: Optional[str] = None,
|
||||
|
|
@ -680,13 +702,14 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
:param phone_number: Contact's phone number
|
||||
:param first_name: Contact's first name
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param last_name: Contact's last name
|
||||
:param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
|
||||
|
|
@ -700,6 +723,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
chat_id=self.user_chat_id,
|
||||
phone_number=phone_number,
|
||||
first_name=first_name,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
last_name=last_name,
|
||||
vcard=vcard,
|
||||
|
|
@ -715,6 +739,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_document(
|
||||
self,
|
||||
document: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
thumbnail: Optional[InputFile] = None,
|
||||
caption: Optional[str] = None,
|
||||
|
|
@ -742,6 +767,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#senddocument
|
||||
|
||||
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
|
||||
|
|
@ -751,7 +777,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
|
||||
|
|
@ -764,6 +790,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendDocument(
|
||||
chat_id=self.chat.id,
|
||||
document=document,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
|
|
@ -782,6 +809,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_document_pm(
|
||||
self,
|
||||
document: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
thumbnail: Optional[InputFile] = None,
|
||||
caption: Optional[str] = None,
|
||||
|
|
@ -809,6 +837,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#senddocument
|
||||
|
||||
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
|
||||
|
|
@ -818,7 +847,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
|
||||
|
|
@ -831,6 +860,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendDocument(
|
||||
chat_id=self.user_chat_id,
|
||||
document=document,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
|
|
@ -849,6 +879,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_game(
|
||||
self,
|
||||
game_short_name: str,
|
||||
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"),
|
||||
|
|
@ -869,11 +900,12 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendgame
|
||||
|
||||
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_.
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
|
||||
|
|
@ -886,6 +918,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendGame(
|
||||
chat_id=self.chat.id,
|
||||
game_short_name=game_short_name,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -899,6 +932,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_game_pm(
|
||||
self,
|
||||
game_short_name: str,
|
||||
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"),
|
||||
|
|
@ -919,11 +953,12 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendgame
|
||||
|
||||
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_.
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
|
||||
|
|
@ -936,6 +971,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendGame(
|
||||
chat_id=self.user_chat_id,
|
||||
game_short_name=game_short_name,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -1170,6 +1206,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
self,
|
||||
latitude: float,
|
||||
longitude: float,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
horizontal_accuracy: Optional[float] = None,
|
||||
live_period: Optional[int] = None,
|
||||
|
|
@ -1197,6 +1234,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
:param latitude: Latitude of the location
|
||||
:param longitude: Longitude of the location
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
|
||||
:param live_period: Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400.
|
||||
|
|
@ -1205,7 +1243,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
|
||||
|
|
@ -1219,6 +1257,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
horizontal_accuracy=horizontal_accuracy,
|
||||
live_period=live_period,
|
||||
|
|
@ -1237,6 +1276,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
self,
|
||||
latitude: float,
|
||||
longitude: float,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
horizontal_accuracy: Optional[float] = None,
|
||||
live_period: Optional[int] = None,
|
||||
|
|
@ -1264,6 +1304,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
:param latitude: Latitude of the location
|
||||
:param longitude: Longitude of the location
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
|
||||
:param live_period: Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400.
|
||||
|
|
@ -1272,7 +1313,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
|
||||
|
|
@ -1286,6 +1327,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
chat_id=self.user_chat_id,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
horizontal_accuracy=horizontal_accuracy,
|
||||
live_period=live_period,
|
||||
|
|
@ -1303,6 +1345,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_media_group(
|
||||
self,
|
||||
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"),
|
||||
|
|
@ -1322,6 +1365,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendmediagroup
|
||||
|
||||
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param disable_notification: Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent messages from forwarding and saving
|
||||
|
|
@ -1338,6 +1382,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendMediaGroup(
|
||||
chat_id=self.chat.id,
|
||||
media=media,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -1350,6 +1395,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_media_group_pm(
|
||||
self,
|
||||
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"),
|
||||
|
|
@ -1369,6 +1415,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendmediagroup
|
||||
|
||||
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param disable_notification: Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent messages from forwarding and saving
|
||||
|
|
@ -1385,6 +1432,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendMediaGroup(
|
||||
chat_id=self.user_chat_id,
|
||||
media=media,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -1397,6 +1445,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_photo(
|
||||
self,
|
||||
photo: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -1423,6 +1472,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendphoto
|
||||
|
||||
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
|
|
@ -1431,7 +1481,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
|
||||
|
|
@ -1444,6 +1494,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendPhoto(
|
||||
chat_id=self.chat.id,
|
||||
photo=photo,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -1461,6 +1512,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_photo_pm(
|
||||
self,
|
||||
photo: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -1487,6 +1539,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendphoto
|
||||
|
||||
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
|
|
@ -1495,7 +1548,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
|
||||
|
|
@ -1508,6 +1561,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendPhoto(
|
||||
chat_id=self.user_chat_id,
|
||||
photo=photo,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -1526,6 +1580,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
self,
|
||||
question: str,
|
||||
options: List[str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
is_anonymous: Optional[bool] = None,
|
||||
type: Optional[str] = None,
|
||||
|
|
@ -1559,6 +1614,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
:param question: Poll question, 1-300 characters
|
||||
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
|
||||
:param type: Poll type, 'quiz' or 'regular', defaults to 'regular'
|
||||
|
|
@ -1573,7 +1629,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
|
||||
|
|
@ -1587,6 +1643,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
question=question,
|
||||
options=options,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
is_anonymous=is_anonymous,
|
||||
type=type,
|
||||
|
|
@ -1611,6 +1668,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
self,
|
||||
question: str,
|
||||
options: List[str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
is_anonymous: Optional[bool] = None,
|
||||
type: Optional[str] = None,
|
||||
|
|
@ -1644,6 +1702,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
:param question: Poll question, 1-300 characters
|
||||
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
|
||||
:param type: Poll type, 'quiz' or 'regular', defaults to 'regular'
|
||||
|
|
@ -1658,7 +1717,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
|
||||
|
|
@ -1672,6 +1731,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
chat_id=self.user_chat_id,
|
||||
question=question,
|
||||
options=options,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
is_anonymous=is_anonymous,
|
||||
type=type,
|
||||
|
|
@ -1694,6 +1754,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
def answer_dice(
|
||||
self,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
|
|
@ -1716,12 +1777,13 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#senddice
|
||||
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
|
||||
|
|
@ -1733,6 +1795,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
return SendDice(
|
||||
chat_id=self.chat.id,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -1746,6 +1809,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
def answer_dice_pm(
|
||||
self,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
|
|
@ -1768,12 +1832,13 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#senddice
|
||||
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
|
||||
|
|
@ -1785,6 +1850,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
return SendDice(
|
||||
chat_id=self.user_chat_id,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -1799,6 +1865,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_sticker(
|
||||
self,
|
||||
sticker: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
|
|
@ -1821,13 +1888,14 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#sendsticker
|
||||
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
|
||||
|
|
@ -1840,6 +1908,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendSticker(
|
||||
chat_id=self.chat.id,
|
||||
sticker=sticker,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -1854,6 +1923,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_sticker_pm(
|
||||
self,
|
||||
sticker: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
|
|
@ -1876,13 +1946,14 @@ class ChatJoinRequest(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#sendsticker
|
||||
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
|
||||
|
|
@ -1895,6 +1966,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendSticker(
|
||||
chat_id=self.user_chat_id,
|
||||
sticker=sticker,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -1912,6 +1984,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
longitude: float,
|
||||
title: str,
|
||||
address: str,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
foursquare_id: Optional[str] = None,
|
||||
foursquare_type: Optional[str] = None,
|
||||
|
|
@ -1941,6 +2014,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param longitude: Longitude of the venue
|
||||
:param title: Name of the venue
|
||||
:param address: Address of the venue
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param foursquare_id: Foursquare identifier of the venue
|
||||
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
|
||||
|
|
@ -1949,7 +2023,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
|
||||
|
|
@ -1965,6 +2039,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
longitude=longitude,
|
||||
title=title,
|
||||
address=address,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
foursquare_id=foursquare_id,
|
||||
foursquare_type=foursquare_type,
|
||||
|
|
@ -1985,6 +2060,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
longitude: float,
|
||||
title: str,
|
||||
address: str,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
foursquare_id: Optional[str] = None,
|
||||
foursquare_type: Optional[str] = None,
|
||||
|
|
@ -2014,6 +2090,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param longitude: Longitude of the venue
|
||||
:param title: Name of the venue
|
||||
:param address: Address of the venue
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param foursquare_id: Foursquare identifier of the venue
|
||||
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
|
||||
|
|
@ -2022,7 +2099,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
|
||||
|
|
@ -2038,6 +2115,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
longitude=longitude,
|
||||
title=title,
|
||||
address=address,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
foursquare_id=foursquare_id,
|
||||
foursquare_type=foursquare_type,
|
||||
|
|
@ -2055,6 +2133,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_video(
|
||||
self,
|
||||
video: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
|
|
@ -2086,6 +2165,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvideo
|
||||
|
||||
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param width: Video width
|
||||
|
|
@ -2099,7 +2179,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
|
||||
|
|
@ -2112,6 +2192,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendVideo(
|
||||
chat_id=self.chat.id,
|
||||
video=video,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -2134,6 +2215,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_video_pm(
|
||||
self,
|
||||
video: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
|
|
@ -2165,6 +2247,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvideo
|
||||
|
||||
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param width: Video width
|
||||
|
|
@ -2178,7 +2261,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
|
||||
|
|
@ -2191,6 +2274,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendVideo(
|
||||
chat_id=self.user_chat_id,
|
||||
video=video,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -2213,6 +2297,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_video_note(
|
||||
self,
|
||||
video_note: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
length: Optional[int] = None,
|
||||
|
|
@ -2238,6 +2323,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvideonote
|
||||
|
||||
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param length: Video width and height, i.e. diameter of the video message
|
||||
|
|
@ -2245,7 +2331,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
|
||||
|
|
@ -2258,6 +2344,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendVideoNote(
|
||||
chat_id=self.chat.id,
|
||||
video_note=video_note,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
length=length,
|
||||
|
|
@ -2274,6 +2361,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_video_note_pm(
|
||||
self,
|
||||
video_note: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
length: Optional[int] = None,
|
||||
|
|
@ -2299,6 +2387,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvideonote
|
||||
|
||||
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param length: Video width and height, i.e. diameter of the video message
|
||||
|
|
@ -2306,7 +2395,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
|
||||
|
|
@ -2319,6 +2408,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendVideoNote(
|
||||
chat_id=self.user_chat_id,
|
||||
video_note=video_note,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
length=length,
|
||||
|
|
@ -2335,6 +2425,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_voice(
|
||||
self,
|
||||
voice: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -2361,6 +2452,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvoice
|
||||
|
||||
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Voice message caption, 0-1024 characters after entities parsing
|
||||
:param 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.
|
||||
|
|
@ -2369,7 +2461,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
|
||||
|
|
@ -2382,6 +2474,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendVoice(
|
||||
chat_id=self.chat.id,
|
||||
voice=voice,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -2399,6 +2492,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
def answer_voice_pm(
|
||||
self,
|
||||
voice: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -2425,6 +2519,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvoice
|
||||
|
||||
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Voice message caption, 0-1024 characters after entities parsing
|
||||
:param 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.
|
||||
|
|
@ -2433,7 +2528,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
|
||||
|
|
@ -2446,6 +2541,7 @@ class ChatJoinRequest(TelegramObject):
|
|||
return SendVoice(
|
||||
chat_id=self.user_chat_id,
|
||||
voice=voice,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
|
|||
|
|
@ -45,13 +45,13 @@ class ChatMemberAdministrator(ChatMember):
|
|||
can_delete_stories: bool
|
||||
""":code:`True`, if the administrator can delete stories posted by other users"""
|
||||
can_post_messages: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only"""
|
||||
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only"""
|
||||
can_edit_messages: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
|
||||
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only"""
|
||||
can_pin_messages: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
|
||||
"""*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only"""
|
||||
can_manage_topics: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
|
||||
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"""
|
||||
custom_title: Optional[str] = None
|
||||
"""*Optional*. Custom title for this user"""
|
||||
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer(
|
||||
self,
|
||||
text: str,
|
||||
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,
|
||||
|
|
@ -167,6 +168,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendmessage
|
||||
|
||||
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param parse_mode: Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
|
||||
|
|
@ -174,7 +176,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param disable_web_page_preview: Disables link previews for links in this message
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
@ -188,6 +190,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendMessage(
|
||||
chat_id=self.chat.id,
|
||||
text=text,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
parse_mode=parse_mode,
|
||||
entities=entities,
|
||||
|
|
@ -205,6 +208,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_animation(
|
||||
self,
|
||||
animation: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
|
|
@ -235,6 +239,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendanimation
|
||||
|
||||
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent animation in seconds
|
||||
:param width: Animation width
|
||||
|
|
@ -247,7 +252,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
|
||||
|
|
@ -260,6 +265,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendAnimation(
|
||||
chat_id=self.chat.id,
|
||||
animation=animation,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -281,6 +287,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_audio(
|
||||
self,
|
||||
audio: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -311,6 +318,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendaudio
|
||||
|
||||
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Audio caption, 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
|
|
@ -322,7 +330,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
|
||||
|
|
@ -335,6 +343,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendAudio(
|
||||
chat_id=self.chat.id,
|
||||
audio=audio,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -356,6 +365,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
self,
|
||||
phone_number: str,
|
||||
first_name: str,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
last_name: Optional[str] = None,
|
||||
vcard: Optional[str] = None,
|
||||
|
|
@ -381,13 +391,14 @@ class ChatMemberUpdated(TelegramObject):
|
|||
|
||||
:param phone_number: Contact's phone number
|
||||
:param first_name: Contact's first name
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param last_name: Contact's last name
|
||||
:param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
|
||||
|
|
@ -401,6 +412,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
phone_number=phone_number,
|
||||
first_name=first_name,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
last_name=last_name,
|
||||
vcard=vcard,
|
||||
|
|
@ -416,6 +428,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_document(
|
||||
self,
|
||||
document: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
thumbnail: Optional[InputFile] = None,
|
||||
caption: Optional[str] = None,
|
||||
|
|
@ -443,6 +456,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#senddocument
|
||||
|
||||
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
|
||||
|
|
@ -452,7 +466,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
|
||||
|
|
@ -465,6 +479,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendDocument(
|
||||
chat_id=self.chat.id,
|
||||
document=document,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
|
|
@ -483,6 +498,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_game(
|
||||
self,
|
||||
game_short_name: str,
|
||||
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"),
|
||||
|
|
@ -503,11 +519,12 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendgame
|
||||
|
||||
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_.
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
|
||||
|
|
@ -520,6 +537,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendGame(
|
||||
chat_id=self.chat.id,
|
||||
game_short_name=game_short_name,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -644,6 +662,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
self,
|
||||
latitude: float,
|
||||
longitude: float,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
horizontal_accuracy: Optional[float] = None,
|
||||
live_period: Optional[int] = None,
|
||||
|
|
@ -671,6 +690,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
|
||||
:param latitude: Latitude of the location
|
||||
:param longitude: Longitude of the location
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
|
||||
:param live_period: Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400.
|
||||
|
|
@ -679,7 +699,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
|
||||
|
|
@ -693,6 +713,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
horizontal_accuracy=horizontal_accuracy,
|
||||
live_period=live_period,
|
||||
|
|
@ -710,6 +731,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_media_group(
|
||||
self,
|
||||
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"),
|
||||
|
|
@ -729,6 +751,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendmediagroup
|
||||
|
||||
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param disable_notification: Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent messages from forwarding and saving
|
||||
|
|
@ -745,6 +768,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendMediaGroup(
|
||||
chat_id=self.chat.id,
|
||||
media=media,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -757,6 +781,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_photo(
|
||||
self,
|
||||
photo: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -783,6 +808,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendphoto
|
||||
|
||||
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
|
||||
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
|
||||
|
|
@ -791,7 +817,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
|
||||
|
|
@ -804,6 +830,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendPhoto(
|
||||
chat_id=self.chat.id,
|
||||
photo=photo,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -822,6 +849,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
self,
|
||||
question: str,
|
||||
options: List[str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
is_anonymous: Optional[bool] = None,
|
||||
type: Optional[str] = None,
|
||||
|
|
@ -855,6 +883,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
|
||||
:param question: Poll question, 1-300 characters
|
||||
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
|
||||
:param type: Poll type, 'quiz' or 'regular', defaults to 'regular'
|
||||
|
|
@ -869,7 +898,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
|
||||
|
|
@ -883,6 +912,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
question=question,
|
||||
options=options,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
is_anonymous=is_anonymous,
|
||||
type=type,
|
||||
|
|
@ -905,6 +935,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
|
||||
def answer_dice(
|
||||
self,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
|
|
@ -927,12 +958,13 @@ class ChatMemberUpdated(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#senddice
|
||||
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
|
||||
|
|
@ -944,6 +976,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
|
||||
return SendDice(
|
||||
chat_id=self.chat.id,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -958,6 +991,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_sticker(
|
||||
self,
|
||||
sticker: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
|
|
@ -980,13 +1014,14 @@ class ChatMemberUpdated(TelegramObject):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#sendsticker
|
||||
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
|
||||
|
|
@ -999,6 +1034,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendSticker(
|
||||
chat_id=self.chat.id,
|
||||
sticker=sticker,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -1016,6 +1052,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
longitude: float,
|
||||
title: str,
|
||||
address: str,
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
foursquare_id: Optional[str] = None,
|
||||
foursquare_type: Optional[str] = None,
|
||||
|
|
@ -1045,6 +1082,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param longitude: Longitude of the venue
|
||||
:param title: Name of the venue
|
||||
:param address: Address of the venue
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param foursquare_id: Foursquare identifier of the venue
|
||||
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
|
||||
|
|
@ -1053,7 +1091,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
|
||||
|
|
@ -1069,6 +1107,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
longitude=longitude,
|
||||
title=title,
|
||||
address=address,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
foursquare_id=foursquare_id,
|
||||
foursquare_type=foursquare_type,
|
||||
|
|
@ -1086,6 +1125,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_video(
|
||||
self,
|
||||
video: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
width: Optional[int] = None,
|
||||
|
|
@ -1117,6 +1157,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvideo
|
||||
|
||||
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param width: Video width
|
||||
|
|
@ -1130,7 +1171,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
|
||||
|
|
@ -1143,6 +1184,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendVideo(
|
||||
chat_id=self.chat.id,
|
||||
video=video,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -1165,6 +1207,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_video_note(
|
||||
self,
|
||||
video_note: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
duration: Optional[int] = None,
|
||||
length: Optional[int] = None,
|
||||
|
|
@ -1190,6 +1233,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvideonote
|
||||
|
||||
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param duration: Duration of sent video in seconds
|
||||
:param length: Video width and height, i.e. diameter of the video message
|
||||
|
|
@ -1197,7 +1241,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
|
||||
|
|
@ -1210,6 +1254,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendVideoNote(
|
||||
chat_id=self.chat.id,
|
||||
video_note=video_note,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
duration=duration,
|
||||
length=length,
|
||||
|
|
@ -1226,6 +1271,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
def answer_voice(
|
||||
self,
|
||||
voice: Union[InputFile, str],
|
||||
business_connection_id: Optional[str] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
|
||||
|
|
@ -1252,6 +1298,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#sendvoice
|
||||
|
||||
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
|
||||
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
|
||||
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
:param caption: Voice message caption, 0-1024 characters after entities parsing
|
||||
:param 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.
|
||||
|
|
@ -1260,7 +1307,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
|
||||
|
|
@ -1273,6 +1320,7 @@ class ChatMemberUpdated(TelegramObject):
|
|||
return SendVoice(
|
||||
chat_id=self.chat.id,
|
||||
voice=voice,
|
||||
business_connection_id=business_connection_id,
|
||||
message_thread_id=message_thread_id,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
from typing import TYPE_CHECKING, Any
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
|
||||
from aiogram.types import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .photo_size import PhotoSize
|
||||
|
||||
|
||||
class ChatShared(TelegramObject):
|
||||
"""
|
||||
This object contains information about the chat whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.
|
||||
This object contains information about a chat that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#chatshared
|
||||
"""
|
||||
|
|
@ -14,16 +19,36 @@ class ChatShared(TelegramObject):
|
|||
"""Identifier of the request"""
|
||||
chat_id: int
|
||||
"""Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."""
|
||||
title: Optional[str] = None
|
||||
"""*Optional*. Title of the chat, if the title was requested by the bot."""
|
||||
username: Optional[str] = None
|
||||
"""*Optional*. Username of the chat, if the username was requested by the bot and available."""
|
||||
photo: Optional[List[PhotoSize]] = None
|
||||
"""*Optional*. Available sizes of the chat photo, if the photo was requested by the bot"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__, *, request_id: int, chat_id: int, **__pydantic_kwargs: Any
|
||||
__pydantic__self__,
|
||||
*,
|
||||
request_id: int,
|
||||
chat_id: int,
|
||||
title: Optional[str] = None,
|
||||
username: Optional[str] = None,
|
||||
photo: Optional[List[PhotoSize]] = None,
|
||||
**__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__(request_id=request_id, chat_id=chat_id, **__pydantic_kwargs)
|
||||
super().__init__(
|
||||
request_id=request_id,
|
||||
chat_id=chat_id,
|
||||
title=title,
|
||||
username=username,
|
||||
photo=photo,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,21 +20,21 @@ class EncryptedPassportElement(TelegramObject):
|
|||
hash: str
|
||||
"""Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`"""
|
||||
data: Optional[str] = None
|
||||
"""*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
"""*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
phone_number: Optional[str] = None
|
||||
"""*Optional*. User's verified phone number, available only for 'phone_number' type"""
|
||||
"""*Optional*. User's verified phone number; available only for 'phone_number' type"""
|
||||
email: Optional[str] = None
|
||||
"""*Optional*. User's verified email address, available only for 'email' type"""
|
||||
"""*Optional*. User's verified email address; available only for 'email' type"""
|
||||
files: Optional[List[PassportFile]] = None
|
||||
"""*Optional*. Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
"""*Optional*. Array of encrypted files with documents provided by the user; available only for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
front_side: Optional[PassportFile] = None
|
||||
"""*Optional*. Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
"""*Optional*. Encrypted file with the front side of the document, provided by the user; available only for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
reverse_side: Optional[PassportFile] = None
|
||||
"""*Optional*. Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
"""*Optional*. Encrypted file with the reverse side of the document, provided by the user; available only for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
selfie: Optional[PassportFile] = None
|
||||
"""*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
"""*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
translation: Optional[List[PassportFile]] = None
|
||||
"""*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
"""*Optional*. Array of encrypted files with translated versions of documents provided by the user; available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ if TYPE_CHECKING:
|
|||
|
||||
class InlineQueryResultVoice(InlineQueryResult):
|
||||
"""
|
||||
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the voice message.
|
||||
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the the voice message.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#inlinequeryresultvoice
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ class InputSticker(TelegramObject):
|
|||
|
||||
sticker: Union[InputFile, str]
|
||||
"""The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » <sending-files>`"""
|
||||
format: str
|
||||
"""Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **WEBM** video"""
|
||||
emoji_list: List[str]
|
||||
"""List of 1-20 emoji associated with the sticker"""
|
||||
mask_position: Optional[MaskPosition] = None
|
||||
|
|
@ -33,6 +35,7 @@ class InputSticker(TelegramObject):
|
|||
__pydantic__self__,
|
||||
*,
|
||||
sticker: Union[InputFile, str],
|
||||
format: str,
|
||||
emoji_list: List[str],
|
||||
mask_position: Optional[MaskPosition] = None,
|
||||
keywords: Optional[List[str]] = None,
|
||||
|
|
@ -44,6 +47,7 @@ class InputSticker(TelegramObject):
|
|||
|
||||
super().__init__(
|
||||
sticker=sticker,
|
||||
format=format,
|
||||
emoji_list=emoji_list,
|
||||
mask_position=mask_position,
|
||||
keywords=keywords,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ if TYPE_CHECKING:
|
|||
|
||||
class KeyboardButtonRequestChat(TelegramObject):
|
||||
"""
|
||||
This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. `More about requesting chats » <https://core.telegram.org/bots/features#chat-and-user-selection>`_
|
||||
This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the сhat if appropriate `More about requesting chats » <https://core.telegram.org/bots/features#chat-and-user-selection>`_
|
||||
|
||||
Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat
|
||||
"""
|
||||
|
|
@ -31,6 +31,12 @@ class KeyboardButtonRequestChat(TelegramObject):
|
|||
"""*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied."""
|
||||
bot_is_member: Optional[bool] = None
|
||||
"""*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."""
|
||||
request_title: Optional[bool] = None
|
||||
"""*Optional*. Pass :code:`True` to request the chat's title"""
|
||||
request_username: Optional[bool] = None
|
||||
"""*Optional*. Pass :code:`True` to request the chat's username"""
|
||||
request_photo: Optional[bool] = None
|
||||
"""*Optional*. Pass :code:`True` to request the chat's photo"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -47,6 +53,9 @@ class KeyboardButtonRequestChat(TelegramObject):
|
|||
user_administrator_rights: Optional[ChatAdministratorRights] = None,
|
||||
bot_administrator_rights: Optional[ChatAdministratorRights] = None,
|
||||
bot_is_member: Optional[bool] = None,
|
||||
request_title: Optional[bool] = None,
|
||||
request_username: Optional[bool] = None,
|
||||
request_photo: Optional[bool] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -62,5 +71,8 @@ class KeyboardButtonRequestChat(TelegramObject):
|
|||
user_administrator_rights=user_administrator_rights,
|
||||
bot_administrator_rights=bot_administrator_rights,
|
||||
bot_is_member=bot_is_member,
|
||||
request_title=request_title,
|
||||
request_username=request_username,
|
||||
request_photo=request_photo,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from aiogram.types import TelegramObject
|
|||
|
||||
class KeyboardButtonRequestUsers(TelegramObject):
|
||||
"""
|
||||
This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. `More about requesting users » <https://core.telegram.org/bots/features#chat-and-user-selection>`_
|
||||
This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. `More about requesting users » <https://core.telegram.org/bots/features#chat-and-user-selection>`_
|
||||
|
||||
Source: https://core.telegram.org/bots/api#keyboardbuttonrequestusers
|
||||
"""
|
||||
|
|
@ -18,6 +18,12 @@ class KeyboardButtonRequestUsers(TelegramObject):
|
|||
"""*Optional*. Pass :code:`True` to request premium users, pass :code:`False` to request non-premium users. If not specified, no additional restrictions are applied."""
|
||||
max_quantity: Optional[int] = None
|
||||
"""*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1."""
|
||||
request_name: Optional[bool] = None
|
||||
"""*Optional*. Pass :code:`True` to request the users' first and last name"""
|
||||
request_username: Optional[bool] = None
|
||||
"""*Optional*. Pass :code:`True` to request the users' username"""
|
||||
request_photo: Optional[bool] = None
|
||||
"""*Optional*. Pass :code:`True` to request the users' photo"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -30,6 +36,9 @@ class KeyboardButtonRequestUsers(TelegramObject):
|
|||
user_is_bot: Optional[bool] = None,
|
||||
user_is_premium: Optional[bool] = None,
|
||||
max_quantity: Optional[int] = None,
|
||||
request_name: Optional[bool] = None,
|
||||
request_username: Optional[bool] = None,
|
||||
request_photo: Optional[bool] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -41,5 +50,8 @@ class KeyboardButtonRequestUsers(TelegramObject):
|
|||
user_is_bot=user_is_bot,
|
||||
user_is_premium=user_is_premium,
|
||||
max_quantity=max_quantity,
|
||||
request_name=request_name,
|
||||
request_username=request_username,
|
||||
request_photo=request_photo,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ class Location(TelegramObject):
|
|||
Source: https://core.telegram.org/bots/api#location
|
||||
"""
|
||||
|
||||
longitude: float
|
||||
"""Longitude as defined by sender"""
|
||||
latitude: float
|
||||
"""Latitude as defined by sender"""
|
||||
longitude: float
|
||||
"""Longitude as defined by sender"""
|
||||
horizontal_accuracy: Optional[float] = None
|
||||
"""*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500"""
|
||||
live_period: Optional[int] = None
|
||||
|
|
@ -32,8 +32,8 @@ class Location(TelegramObject):
|
|||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
longitude: float,
|
||||
latitude: float,
|
||||
longitude: float,
|
||||
horizontal_accuracy: Optional[float] = None,
|
||||
live_period: Optional[int] = None,
|
||||
heading: Optional[int] = None,
|
||||
|
|
@ -45,8 +45,8 @@ class Location(TelegramObject):
|
|||
# Is needed only for type checking and IDE support without any additional plugins
|
||||
|
||||
super().__init__(
|
||||
longitude=longitude,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
horizontal_accuracy=horizontal_accuracy,
|
||||
live_period=live_period,
|
||||
heading=heading,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
import datetime
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
from pydantic import Field, computed_field
|
||||
|
||||
from aiogram.utils.text_decorations import (
|
||||
TextDecoration,
|
||||
|
|
@ -96,6 +96,7 @@ if TYPE_CHECKING:
|
|||
from .reply_keyboard_markup import ReplyKeyboardMarkup
|
||||
from .reply_keyboard_remove import ReplyKeyboardRemove
|
||||
from .reply_parameters import ReplyParameters
|
||||
from .shared_user import SharedUser
|
||||
from .sticker import Sticker
|
||||
from .story import Story
|
||||
from .successful_payment import SuccessfulPayment
|
||||
|
|
@ -136,6 +137,10 @@ class Message(MaybeInaccessibleMessage):
|
|||
"""*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat."""
|
||||
sender_boost_count: Optional[int] = None
|
||||
"""*Optional*. If the sender of the message boosted the chat, the number of boosts added by the user"""
|
||||
sender_business_bot: Optional[User] = None
|
||||
"""*Optional*. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account."""
|
||||
business_connection_id: Optional[str] = None
|
||||
"""*Optional*. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier."""
|
||||
forward_origin: Optional[
|
||||
Union[MessageOriginUser, MessageOriginHiddenUser, MessageOriginChat, MessageOriginChannel]
|
||||
] = None
|
||||
|
|
@ -158,6 +163,8 @@ class Message(MaybeInaccessibleMessage):
|
|||
"""*Optional*. Date the message was last edited in Unix time"""
|
||||
has_protected_content: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the message can't be forwarded"""
|
||||
is_from_offline: Optional[bool] = None
|
||||
"""*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message"""
|
||||
media_group_id: Optional[str] = None
|
||||
"""*Optional*. The unique identifier of a media message group this message belongs to"""
|
||||
author_signature: Optional[str] = None
|
||||
|
|
@ -328,6 +335,8 @@ class Message(MaybeInaccessibleMessage):
|
|||
from_user: Optional[User] = None,
|
||||
sender_chat: Optional[Chat] = None,
|
||||
sender_boost_count: Optional[int] = None,
|
||||
sender_business_bot: Optional[User] = None,
|
||||
business_connection_id: Optional[str] = None,
|
||||
forward_origin: Optional[
|
||||
Union[
|
||||
MessageOriginUser,
|
||||
|
|
@ -345,6 +354,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
via_bot: Optional[User] = None,
|
||||
edit_date: Optional[int] = None,
|
||||
has_protected_content: Optional[bool] = None,
|
||||
is_from_offline: Optional[bool] = None,
|
||||
media_group_id: Optional[str] = None,
|
||||
author_signature: Optional[str] = None,
|
||||
text: Optional[str] = None,
|
||||
|
|
@ -426,6 +436,8 @@ class Message(MaybeInaccessibleMessage):
|
|||
from_user=from_user,
|
||||
sender_chat=sender_chat,
|
||||
sender_boost_count=sender_boost_count,
|
||||
sender_business_bot=sender_business_bot,
|
||||
business_connection_id=business_connection_id,
|
||||
forward_origin=forward_origin,
|
||||
is_topic_message=is_topic_message,
|
||||
is_automatic_forward=is_automatic_forward,
|
||||
|
|
@ -436,6 +448,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
via_bot=via_bot,
|
||||
edit_date=edit_date,
|
||||
has_protected_content=has_protected_content,
|
||||
is_from_offline=is_from_offline,
|
||||
media_group_id=media_group_id,
|
||||
author_signature=author_signature,
|
||||
text=text,
|
||||
|
|
@ -610,8 +623,6 @@ class Message(MaybeInaccessibleMessage):
|
|||
return ContentType.CHAT_SHARED
|
||||
if self.story:
|
||||
return ContentType.STORY
|
||||
if self.has_media_spoiler:
|
||||
return ContentType.HAS_MEDIA_SPOILER
|
||||
if self.write_access_allowed:
|
||||
return ContentType.WRITE_ACCESS_ALLOWED
|
||||
if self.boost_added:
|
||||
|
|
@ -658,6 +669,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
|
@ -676,7 +688,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
|
||||
"""
|
||||
|
|
@ -692,6 +704,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendAnimation(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
animation=animation,
|
||||
duration=duration,
|
||||
|
|
@ -737,6 +750,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
||||
|
|
@ -754,7 +768,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
|
||||
|
|
@ -771,6 +785,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendAnimation(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
animation=animation,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -814,6 +829,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
|
@ -832,7 +848,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
|
||||
"""
|
||||
|
|
@ -848,6 +864,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendAudio(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
audio=audio,
|
||||
caption=caption,
|
||||
|
|
@ -891,6 +908,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
|
||||
For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead.
|
||||
|
|
@ -908,7 +926,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
|
||||
|
|
@ -925,6 +943,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendAudio(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
audio=audio,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -963,6 +982,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -976,7 +996,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
|
||||
"""
|
||||
|
|
@ -992,6 +1012,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendContact(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
phone_number=phone_number,
|
||||
first_name=first_name,
|
||||
|
|
@ -1027,6 +1048,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -1039,7 +1061,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
|
||||
|
|
@ -1056,6 +1078,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendContact(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
phone_number=phone_number,
|
||||
first_name=first_name,
|
||||
last_name=last_name,
|
||||
|
|
@ -1092,6 +1115,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
|
@ -1107,7 +1131,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
|
||||
"""
|
||||
|
|
@ -1123,6 +1147,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendDocument(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
document=document,
|
||||
thumbnail=thumbnail,
|
||||
|
|
@ -1162,6 +1187,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
||||
|
|
@ -1176,7 +1202,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
|
||||
|
|
@ -1193,6 +1219,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendDocument(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
document=document,
|
||||
thumbnail=thumbnail,
|
||||
caption=caption,
|
||||
|
|
@ -1224,6 +1251,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -1234,7 +1262,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
|
||||
"""
|
||||
|
|
@ -1250,6 +1278,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendGame(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
game_short_name=game_short_name,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -1277,6 +1306,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -1286,7 +1316,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
|
||||
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
|
||||
|
|
@ -1303,6 +1333,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendGame(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
game_short_name=game_short_name,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -1349,6 +1380,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -1395,6 +1427,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendInvoice(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
title=title,
|
||||
description=description,
|
||||
|
|
@ -1462,6 +1495,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -1508,6 +1542,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendInvoice(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
title=title,
|
||||
description=description,
|
||||
payload=payload,
|
||||
|
|
@ -1561,6 +1596,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -1576,7 +1612,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
|
||||
"""
|
||||
|
|
@ -1592,6 +1628,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendLocation(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
|
|
@ -1631,6 +1668,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -1645,7 +1683,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
|
||||
|
|
@ -1662,6 +1700,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendLocation(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
horizontal_accuracy=horizontal_accuracy,
|
||||
|
|
@ -1692,6 +1731,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
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.
|
||||
|
|
@ -1717,6 +1757,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendMediaGroup(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
media=media,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -1742,6 +1783,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -1767,6 +1809,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendMediaGroup(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
media=media,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -1802,6 +1845,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -1815,7 +1859,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param disable_web_page_preview: Disables link previews for links in this message
|
||||
:return: instance of method :class:`aiogram.methods.send_message.SendMessage`
|
||||
|
|
@ -1832,6 +1876,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendMessage(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
text=text,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -1873,6 +1918,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -1885,7 +1931,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param disable_web_page_preview: Disables link previews for links in this message
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
@ -1903,6 +1949,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendMessage(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
text=text,
|
||||
parse_mode=parse_mode,
|
||||
entities=entities,
|
||||
|
|
@ -1939,6 +1986,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -1953,7 +2001,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
|
||||
"""
|
||||
|
|
@ -1969,6 +2017,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendPhoto(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
photo=photo,
|
||||
caption=caption,
|
||||
|
|
@ -2006,6 +2055,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -2019,7 +2069,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
|
||||
|
|
@ -2036,6 +2086,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendPhoto(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
photo=photo,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -2079,6 +2130,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -2100,7 +2152,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
|
||||
"""
|
||||
|
|
@ -2116,6 +2168,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendPoll(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
question=question,
|
||||
options=options,
|
||||
|
|
@ -2167,6 +2220,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -2187,7 +2241,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
|
||||
|
|
@ -2204,6 +2258,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendPoll(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
question=question,
|
||||
options=options,
|
||||
is_anonymous=is_anonymous,
|
||||
|
|
@ -2243,6 +2298,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -2253,7 +2309,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
|
||||
"""
|
||||
|
|
@ -2269,6 +2325,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendDice(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -2298,6 +2355,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -2307,7 +2365,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
|
||||
|
|
@ -2324,6 +2382,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendDice(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
|
|
@ -2353,18 +2412,19 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send static .WEBP, `animated <https://telegram.org/blog/animated-stickers>`_ .TGS, or `video <https://telegram.org/blog/video-stickers-better-reactions>`_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#sendsticker
|
||||
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
|
||||
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
|
||||
"""
|
||||
|
|
@ -2380,6 +2440,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendSticker(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
sticker=sticker,
|
||||
emoji=emoji,
|
||||
|
|
@ -2411,17 +2472,18 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send static .WEBP, `animated <https://telegram.org/blog/animated-stickers>`_ .TGS, or `video <https://telegram.org/blog/video-stickers-better-reactions>`_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#sendsticker
|
||||
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
|
||||
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
|
||||
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
|
||||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
|
||||
|
|
@ -2438,6 +2500,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendSticker(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
sticker=sticker,
|
||||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
|
|
@ -2474,6 +2537,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -2491,7 +2555,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
|
||||
"""
|
||||
|
|
@ -2507,6 +2571,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVenue(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
|
|
@ -2550,6 +2615,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -2566,7 +2632,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
|
||||
|
|
@ -2583,6 +2649,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVenue(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
title=title,
|
||||
|
|
@ -2627,6 +2694,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
|
@ -2646,7 +2714,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
|
||||
"""
|
||||
|
|
@ -2662,6 +2730,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVideo(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
video=video,
|
||||
duration=duration,
|
||||
|
|
@ -2709,6 +2778,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
||||
|
|
@ -2727,7 +2797,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
|
||||
|
|
@ -2744,6 +2814,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVideo(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
video=video,
|
||||
duration=duration,
|
||||
width=width,
|
||||
|
|
@ -2784,6 +2855,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
As of `v.4.0 <https://telegram.org/blog/video-messages-and-telescope>`_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
|
@ -2797,7 +2869,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
|
||||
"""
|
||||
|
|
@ -2813,6 +2885,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVideoNote(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
video_note=video_note,
|
||||
duration=duration,
|
||||
|
|
@ -2848,6 +2921,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
As of `v.4.0 <https://telegram.org/blog/video-messages-and-telescope>`_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned.
|
||||
|
||||
|
|
@ -2860,7 +2934,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
|
||||
|
|
@ -2877,6 +2951,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVideoNote(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
video_note=video_note,
|
||||
duration=duration,
|
||||
length=length,
|
||||
|
|
@ -2912,6 +2987,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
- :code:`reply_to_message_id`
|
||||
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
|
@ -2926,7 +3002,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
|
||||
"""
|
||||
|
|
@ -2942,6 +3018,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVoice(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
reply_to_message_id=self.message_id,
|
||||
voice=voice,
|
||||
caption=caption,
|
||||
|
|
@ -2979,6 +3056,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
- :code:`chat_id`
|
||||
- :code:`message_thread_id`
|
||||
- :code:`business_connection_id`
|
||||
|
||||
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
|
||||
|
||||
|
|
@ -2992,7 +3070,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
|
||||
:param protect_content: Protects the contents of the sent message from forwarding and saving
|
||||
:param reply_parameters: Description of the message to reply to
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
|
||||
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
|
||||
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
|
||||
|
|
@ -3009,6 +3087,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
return SendVoice(
|
||||
chat_id=self.chat.id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
business_connection_id=self.business_connection_id,
|
||||
voice=voice,
|
||||
caption=caption,
|
||||
parse_mode=parse_mode,
|
||||
|
|
@ -3032,6 +3111,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
reply_markup: Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, None] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
business_connection_id: Optional[str] = None,
|
||||
parse_mode: Optional[str] = None,
|
||||
) -> Union[
|
||||
ForwardMessage,
|
||||
|
|
@ -3096,6 +3176,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
"reply_to_message_id": reply_to_message_id,
|
||||
"reply_parameters": reply_parameters,
|
||||
"message_thread_id": message_thread_id,
|
||||
"business_connection_id": business_connection_id,
|
||||
"allow_sending_without_reply": allow_sending_without_reply,
|
||||
# when sending a copy, we don't need any parse mode
|
||||
# because all entities are already prepared
|
||||
|
|
@ -3784,7 +3865,7 @@ class Message(MaybeInaccessibleMessage):
|
|||
|
||||
Source: https://core.telegram.org/bots/api#setmessagereaction
|
||||
|
||||
:param reaction: New 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.
|
||||
:param reaction: 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.
|
||||
:param is_big: Pass :code:`True` to set the reaction with a big animation
|
||||
:return: instance of method :class:`aiogram.methods.set_message_reaction.SetMessageReaction`
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ class ReplyParameters(TelegramObject):
|
|||
message_id: int
|
||||
"""Identifier of the message that will be replied to in the current chat, or in the chat *chat_id* if it is specified"""
|
||||
chat_id: Optional[Union[int, str]] = None
|
||||
"""*Optional*. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format :code:`@channelusername`)"""
|
||||
"""*Optional*. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format :code:`@channelusername`). Not supported for messages sent on behalf of a business account."""
|
||||
allow_sending_without_reply: Optional[Union[bool, Default]] = Default(
|
||||
"allow_sending_without_reply"
|
||||
)
|
||||
"""*Optional*. Pass :code:`True` if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic."""
|
||||
"""*Optional*. Pass :code:`True` if the message should be sent even if the specified message to be replied to is not found. Always :code:`False` for replies in another chat or forum topic. Always :code:`True` for messages sent on behalf of a business account."""
|
||||
quote: Optional[str] = None
|
||||
"""*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities. The message will fail to send if the quote isn't found in the original message."""
|
||||
quote_parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
|
||||
|
|
|
|||
54
aiogram/types/shared_user.py
Normal file
54
aiogram/types/shared_user.py
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .photo_size import PhotoSize
|
||||
|
||||
|
||||
class SharedUser(TelegramObject):
|
||||
"""
|
||||
This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#shareduser
|
||||
"""
|
||||
|
||||
user_id: int
|
||||
"""Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means."""
|
||||
first_name: Optional[str] = None
|
||||
"""*Optional*. First name of the user, if the name was requested by the bot"""
|
||||
last_name: Optional[str] = None
|
||||
"""*Optional*. Last name of the user, if the name was requested by the bot"""
|
||||
username: Optional[str] = None
|
||||
"""*Optional*. Username of the user, if the username was requested by the bot"""
|
||||
photo: Optional[List[PhotoSize]] = None
|
||||
"""*Optional*. Available sizes of the chat photo, if the photo was requested by the bot"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__,
|
||||
*,
|
||||
user_id: int,
|
||||
first_name: Optional[str] = None,
|
||||
last_name: Optional[str] = None,
|
||||
username: Optional[str] = None,
|
||||
photo: Optional[List[PhotoSize]] = None,
|
||||
**__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,
|
||||
first_name=first_name,
|
||||
last_name=last_name,
|
||||
username=username,
|
||||
photo=photo,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
|
@ -2,6 +2,8 @@ from __future__ import annotations
|
|||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -22,14 +24,20 @@ class StickerSet(TelegramObject):
|
|||
"""Sticker set title"""
|
||||
sticker_type: str
|
||||
"""Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'"""
|
||||
is_animated: bool
|
||||
""":code:`True`, if the sticker set contains `animated stickers <https://telegram.org/blog/animated-stickers>`_"""
|
||||
is_video: bool
|
||||
""":code:`True`, if the sticker set contains `video stickers <https://telegram.org/blog/video-stickers-better-reactions>`_"""
|
||||
stickers: List[Sticker]
|
||||
"""List of all set stickers"""
|
||||
thumbnail: Optional[PhotoSize] = None
|
||||
"""*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"""
|
||||
is_animated: Optional[bool] = Field(None, json_schema_extra={"deprecated": True})
|
||||
""":code:`True`, if the sticker set contains `animated stickers <https://telegram.org/blog/animated-stickers>`_
|
||||
|
||||
.. deprecated:: API:7.2
|
||||
https://core.telegram.org/bots/api-changelog#march-31-2024"""
|
||||
is_video: Optional[bool] = Field(None, json_schema_extra={"deprecated": True})
|
||||
""":code:`True`, if the sticker set contains `video stickers <https://telegram.org/blog/video-stickers-better-reactions>`_
|
||||
|
||||
.. deprecated:: API:7.2
|
||||
https://core.telegram.org/bots/api-changelog#march-31-2024"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -41,10 +49,10 @@ class StickerSet(TelegramObject):
|
|||
name: str,
|
||||
title: str,
|
||||
sticker_type: str,
|
||||
is_animated: bool,
|
||||
is_video: bool,
|
||||
stickers: List[Sticker],
|
||||
thumbnail: Optional[PhotoSize] = None,
|
||||
is_animated: Optional[bool] = None,
|
||||
is_video: Optional[bool] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -55,9 +63,9 @@ class StickerSet(TelegramObject):
|
|||
name=name,
|
||||
title=title,
|
||||
sticker_type=sticker_type,
|
||||
is_animated=is_animated,
|
||||
is_video=is_video,
|
||||
stickers=stickers,
|
||||
thumbnail=thumbnail,
|
||||
is_animated=is_animated,
|
||||
is_video=is_video,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ from ..utils.mypy_hacks import lru_cache
|
|||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .business_connection import BusinessConnection
|
||||
from .business_messages_deleted import BusinessMessagesDeleted
|
||||
from .callback_query import CallbackQuery
|
||||
from .chat_boost_removed import ChatBoostRemoved
|
||||
from .chat_boost_updated import ChatBoostUpdated
|
||||
|
|
@ -41,6 +43,14 @@ class Update(TelegramObject):
|
|||
"""*Optional*. New incoming channel post of any kind - text, photo, sticker, etc."""
|
||||
edited_channel_post: Optional[Message] = None
|
||||
"""*Optional*. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot."""
|
||||
business_connection: Optional[BusinessConnection] = None
|
||||
"""*Optional*. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot"""
|
||||
business_message: Optional[Message] = None
|
||||
"""*Optional*. New non-service message from a connected business account"""
|
||||
edited_business_message: Optional[Message] = None
|
||||
"""*Optional*. New version of a message from a connected business account"""
|
||||
deleted_business_messages: Optional[BusinessMessagesDeleted] = None
|
||||
"""*Optional*. Messages were deleted from a connected business account"""
|
||||
message_reaction: Optional[MessageReactionUpdated] = None
|
||||
"""*Optional*. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify :code:`"message_reaction"` in the list of *allowed_updates* to receive these updates. The update isn't received for reactions set by bots."""
|
||||
message_reaction_count: Optional[MessageReactionCountUpdated] = None
|
||||
|
|
@ -82,6 +92,10 @@ class Update(TelegramObject):
|
|||
edited_message: Optional[Message] = None,
|
||||
channel_post: Optional[Message] = None,
|
||||
edited_channel_post: Optional[Message] = None,
|
||||
business_connection: Optional[BusinessConnection] = None,
|
||||
business_message: Optional[Message] = None,
|
||||
edited_business_message: Optional[Message] = None,
|
||||
deleted_business_messages: Optional[BusinessMessagesDeleted] = None,
|
||||
message_reaction: Optional[MessageReactionUpdated] = None,
|
||||
message_reaction_count: Optional[MessageReactionCountUpdated] = None,
|
||||
inline_query: Optional[InlineQuery] = None,
|
||||
|
|
@ -108,6 +122,10 @@ class Update(TelegramObject):
|
|||
edited_message=edited_message,
|
||||
channel_post=channel_post,
|
||||
edited_channel_post=edited_channel_post,
|
||||
business_connection=business_connection,
|
||||
business_message=business_message,
|
||||
edited_business_message=edited_business_message,
|
||||
deleted_business_messages=deleted_business_messages,
|
||||
message_reaction=message_reaction,
|
||||
message_reaction_count=message_reaction_count,
|
||||
inline_query=inline_query,
|
||||
|
|
@ -173,6 +191,14 @@ class Update(TelegramObject):
|
|||
return "chat_boost"
|
||||
if self.removed_chat_boost:
|
||||
return "removed_chat_boost"
|
||||
if self.deleted_business_messages:
|
||||
return "deleted_business_messages"
|
||||
if self.business_connection:
|
||||
return "business_connection"
|
||||
if self.edited_business_message:
|
||||
return "edited_business_message"
|
||||
if self.business_message:
|
||||
return "business_message"
|
||||
|
||||
raise UpdateTypeLookupError("Update does not contain any known event type.")
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ class User(TelegramObject):
|
|||
"""*Optional*. :code:`True`, if `privacy mode <https://core.telegram.org/bots/features#privacy-mode>`_ is disabled for the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`."""
|
||||
supports_inline_queries: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`."""
|
||||
can_connect_to_business: Optional[bool] = None
|
||||
"""*Optional*. :code:`True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in :class:`aiogram.methods.get_me.GetMe`."""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -58,6 +60,7 @@ class User(TelegramObject):
|
|||
can_join_groups: Optional[bool] = None,
|
||||
can_read_all_group_messages: Optional[bool] = None,
|
||||
supports_inline_queries: Optional[bool] = None,
|
||||
can_connect_to_business: Optional[bool] = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
@ -76,6 +79,7 @@ class User(TelegramObject):
|
|||
can_join_groups=can_join_groups,
|
||||
can_read_all_group_messages=can_read_all_group_messages,
|
||||
supports_inline_queries=supports_inline_queries,
|
||||
can_connect_to_business=can_connect_to_business,
|
||||
**__pydantic_kwargs,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
from typing import TYPE_CHECKING, Any, List
|
||||
from __future__ import annotations
|
||||
|
||||
from aiogram.types import TelegramObject
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from .base import TelegramObject
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .shared_user import SharedUser
|
||||
|
||||
|
||||
class UsersShared(TelegramObject):
|
||||
|
|
@ -12,18 +19,30 @@ class UsersShared(TelegramObject):
|
|||
|
||||
request_id: int
|
||||
"""Identifier of the request"""
|
||||
user_ids: List[int]
|
||||
"""Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means."""
|
||||
users: List[SharedUser]
|
||||
"""Information about users shared with the bot."""
|
||||
user_ids: Optional[List[int]] = Field(None, json_schema_extra={"deprecated": True})
|
||||
"""Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.
|
||||
|
||||
.. deprecated:: API:7.2
|
||||
https://core.telegram.org/bots/api-changelog#march-31-2024"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
# This section was auto-generated via `butcher`
|
||||
|
||||
def __init__(
|
||||
__pydantic__self__, *, request_id: int, user_ids: List[int], **__pydantic_kwargs: Any
|
||||
__pydantic__self__,
|
||||
*,
|
||||
request_id: int,
|
||||
users: List[SharedUser],
|
||||
user_ids: Optional[List[int]] = None,
|
||||
**__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__(request_id=request_id, user_ids=user_ids, **__pydantic_kwargs)
|
||||
super().__init__(
|
||||
request_id=request_id, users=users, user_ids=user_ids, **__pydantic_kwargs
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue