ChatJoinRequest¶
- class aiogram.types.chat_join_request.ChatJoinRequest(*, chat: Chat, from_user: User, user_chat_id: int, date: _datetime_serializer, return_type=int, when_used=unless - none)], bio: str | None = None, invite_link: ChatInviteLink | None = None, **extra_data: Any)[source]¶
Represents a join request sent to a chat.
Source: https://core.telegram.org/bots/api#chatjoinrequest
- user_chat_id: int¶
Identifier of a private chat with the user who sent the join request. 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 can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.
- date: DateTime¶
Date the request was sent in Unix time
- bio: str | None¶
Optional. Bio of the user.
- invite_link: ChatInviteLink | None¶
Optional. Chat invite link that was used by the user to send the join request
- approve(**kwargs: Any) ApproveChatJoinRequest [source]¶
Shortcut for method
aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest
will automatically fill method attributes:chat_id
user_id
Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns
True
on success.Source: https://core.telegram.org/bots/api#approvechatjoinrequest
- Returns:
instance of method
aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest
- decline(**kwargs: Any) DeclineChatJoinRequest [source]¶
Shortcut for method
aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest
will automatically fill method attributes:chat_id
user_id
Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns
True
on success.Source: https://core.telegram.org/bots/api#declinechatjoinrequest
- Returns:
instance of method
aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest
- answer(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, link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = <Default('link_preview')>, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, disable_web_page_preview: Optional[Union[bool, Default]] = <Default('link_preview_is_disabled')>, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendMessage [source]¶
Shortcut for method
aiogram.methods.send_message.SendMessage
will automatically fill method attributes:chat_id
Use this method to send text messages. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendmessage
- Parameters:
text – Text of the message to be sent, 1-4096 characters after entities parsing
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
parse_mode – Mode for parsing entities in the message text. See formatting options for more details.
entities – A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
link_preview_options – Link preview generation options for the message
disable_notification – Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast – Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup – Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not founddisable_web_page_preview – Disables link previews for links in this message
reply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_message.SendMessage
- answer_pm(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, link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = <Default('link_preview')>, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, disable_web_page_preview: Optional[Union[bool, Default]] = <Default('link_preview_is_disabled')>, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendMessage [source]¶
Shortcut for method
aiogram.methods.send_message.SendMessage
will automatically fill method attributes:chat_id
Use this method to send text messages. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendmessage
- Parameters:
text – Text of the message to be sent, 1-4096 characters after entities parsing
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
parse_mode –
Mode for parsing entities in the message text. See formatting options for more details.
entities – A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
link_preview_options – Link preview generation options for the message
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not founddisable_web_page_preview – Disables link previews for links in this message
reply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_message.SendMessage
- answer_animation(animation: Union[InputFile, str], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, caption_entities: Optional[list[MessageEntity]] = None, show_caption_above_media: Optional[Union[bool, Default]] = <Default('show_caption_above_media')>, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendAnimation [source]¶
Shortcut for method
aiogram.methods.send_animation.SendAnimation
will automatically fill method attributes:chat_id
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent
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.Source: https://core.telegram.org/bots/api#sendanimation
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
duration – Duration of sent animation in seconds
width – Animation width
height – Animation height
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>. More information on Sending Files »
caption – Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the animation caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
show_caption_above_media – Pass
True
, if the caption must be shown above the message mediahas_spoiler – Pass
True
if the animation needs to be covered with a spoiler animationdisable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_animation.SendAnimation
- answer_animation_pm(animation: Union[InputFile, str], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, caption_entities: Optional[list[MessageEntity]] = None, show_caption_above_media: Optional[Union[bool, Default]] = <Default('show_caption_above_media')>, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendAnimation [source]¶
Shortcut for method
aiogram.methods.send_animation.SendAnimation
will automatically fill method attributes:chat_id
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent
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.Source: https://core.telegram.org/bots/api#sendanimation
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
duration – Duration of sent animation in seconds
width – Animation width
height – Animation height
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>. More information on Sending Files »
caption – Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the animation caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
show_caption_above_media – Pass
True
, if the caption must be shown above the message mediahas_spoiler – Pass
True
if the animation needs to be covered with a spoiler animationdisable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_animation.SendAnimation
- answer_audio(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')>, caption_entities: Optional[list[MessageEntity]] = None, duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, thumbnail: Optional[InputFile] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendAudio [source]¶
Shortcut for method
aiogram.methods.send_audio.SendAudio
will automatically fill method attributes:chat_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
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 theaiogram.methods.send_voice.SendVoice
method instead.Source: https://core.telegram.org/bots/api#sendaudio
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
caption – Audio caption, 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the audio caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
duration – Duration of the audio in seconds
performer – Performer
title – Track name
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>. More information on Sending Files »
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_audio.SendAudio
- answer_audio_pm(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')>, caption_entities: Optional[list[MessageEntity]] = None, duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, thumbnail: Optional[InputFile] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendAudio [source]¶
Shortcut for method
aiogram.methods.send_audio.SendAudio
will automatically fill method attributes:chat_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
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 theaiogram.methods.send_voice.SendVoice
method instead.Source: https://core.telegram.org/bots/api#sendaudio
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
caption – Audio caption, 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the audio caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
duration – Duration of the audio in seconds
performer – Performer
title – Track name
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>. More information on Sending Files »
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_audio.SendAudio
- answer_contact(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, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendContact [source]¶
Shortcut for method
aiogram.methods.send_contact.SendContact
will automatically fill method attributes:chat_id
Use this method to send phone contacts. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendcontact
- Parameters:
phone_number – Contact’s phone number
first_name – Contact’s first name
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
last_name – Contact’s last name
vcard – Additional data about the contact in the form of a vCard, 0-2048 bytes
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_contact.SendContact
- answer_contact_pm(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, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendContact [source]¶
Shortcut for method
aiogram.methods.send_contact.SendContact
will automatically fill method attributes:chat_id
Use this method to send phone contacts. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendcontact
- Parameters:
phone_number – Contact’s phone number
first_name – Contact’s first name
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
last_name – Contact’s last name
vcard –
Additional data about the contact in the form of a vCard, 0-2048 bytes
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_contact.SendContact
- answer_document(document: Union[InputFile, str], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, caption_entities: Optional[list[MessageEntity]] = None, disable_content_type_detection: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendDocument [source]¶
Shortcut for method
aiogram.methods.send_document.SendDocument
will automatically fill method attributes:chat_id
Use this method to send general files. On success, the sent
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.Source: https://core.telegram.org/bots/api#senddocument
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
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>. More information on Sending Files »
caption – Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the document caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
disable_content_type_detection – Disables automatic server-side content type detection for files uploaded using multipart/form-data
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_document.SendDocument
- answer_document_pm(document: Union[InputFile, str], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, caption_entities: Optional[list[MessageEntity]] = None, disable_content_type_detection: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendDocument [source]¶
Shortcut for method
aiogram.methods.send_document.SendDocument
will automatically fill method attributes:chat_id
Use this method to send general files. On success, the sent
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.Source: https://core.telegram.org/bots/api#senddocument
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
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>. More information on Sending Files »
caption – Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the document caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
disable_content_type_detection – Disables automatic server-side content type detection for files uploaded using multipart/form-data
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_document.SendDocument
- answer_game(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')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendGame [source]¶
Shortcut for method
aiogram.methods.send_game.SendGame
will automatically fill method attributes:chat_id
Use this method to send a game. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendgame
- Parameters:
game_short_name – Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
A JSON-serialized object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown. If not empty, the first button must launch the game.
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_game.SendGame
- answer_game_pm(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')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendGame [source]¶
Shortcut for method
aiogram.methods.send_game.SendGame
will automatically fill method attributes:chat_id
Use this method to send a game. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendgame
- Parameters:
game_short_name –
Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
A JSON-serialized object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown. If not empty, the first button must launch the game.
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_game.SendGame
- answer_invoice(title: str, description: str, payload: str, currency: str, prices: list[LabeledPrice], message_thread_id: Optional[int] = None, provider_token: Optional[str] = None, max_tip_amount: Optional[int] = None, suggested_tip_amounts: Optional[list[int]] = None, start_parameter: Optional[str] = None, provider_data: Optional[str] = None, photo_url: Optional[str] = None, photo_size: Optional[int] = None, photo_width: Optional[int] = None, photo_height: Optional[int] = None, need_name: Optional[bool] = None, need_phone_number: Optional[bool] = None, need_email: Optional[bool] = None, need_shipping_address: Optional[bool] = None, send_phone_number_to_provider: Optional[bool] = None, send_email_to_provider: Optional[bool] = None, is_flexible: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendInvoice [source]¶
Shortcut for method
aiogram.methods.send_invoice.SendInvoice
will automatically fill method attributes:chat_id
Use this method to send invoices. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendinvoice
- Parameters:
title – Product name, 1-32 characters
description – Product description, 1-255 characters
payload – Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
currency – Three-letter ISO 4217 currency code, see more on currencies. Pass ‘XTR’ for payments in Telegram Stars.
prices –
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
provider_token –
Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
max_tip_amount –
The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of
US$ 1.45
passmax_tip_amount = 145
. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.suggested_tip_amounts – A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
start_parameter – Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter
provider_data – JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
photo_url – URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
photo_size – Photo size in bytes
photo_width – Photo width
photo_height – Photo height
need_name –
Pass
True
if you require the user’s full name to complete the order. Ignored for payments in Telegram Stars.need_phone_number –
Pass
True
if you require the user’s phone number to complete the order. Ignored for payments in Telegram Stars.need_email –
Pass
True
if you require the user’s email address to complete the order. Ignored for payments in Telegram Stars.need_shipping_address –
Pass
True
if you require the user’s shipping address to complete the order. Ignored for payments in Telegram Stars.send_phone_number_to_provider –
Pass
True
if the user’s phone number should be sent to the provider. Ignored for payments in Telegram Stars.send_email_to_provider –
Pass
True
if the user’s email address should be sent to the provider. Ignored for payments in Telegram Stars.is_flexible –
Pass
True
if the final price depends on the shipping method. Ignored for payments in Telegram Stars.disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
A JSON-serialized object for an inline keyboard. If empty, one ‘Pay
total price
’ button will be shown. If not empty, the first button must be a Pay button.allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_invoice.SendInvoice
- answer_invoice_pm(title: str, description: str, payload: str, currency: str, prices: list[LabeledPrice], message_thread_id: Optional[int] = None, provider_token: Optional[str] = None, max_tip_amount: Optional[int] = None, suggested_tip_amounts: Optional[list[int]] = None, start_parameter: Optional[str] = None, provider_data: Optional[str] = None, photo_url: Optional[str] = None, photo_size: Optional[int] = None, photo_width: Optional[int] = None, photo_height: Optional[int] = None, need_name: Optional[bool] = None, need_phone_number: Optional[bool] = None, need_email: Optional[bool] = None, need_shipping_address: Optional[bool] = None, send_phone_number_to_provider: Optional[bool] = None, send_email_to_provider: Optional[bool] = None, is_flexible: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendInvoice [source]¶
Shortcut for method
aiogram.methods.send_invoice.SendInvoice
will automatically fill method attributes:chat_id
Use this method to send invoices. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendinvoice
- Parameters:
title – Product name, 1-32 characters
description – Product description, 1-255 characters
payload – Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
currency –
Three-letter ISO 4217 currency code, see more on currencies. Pass ‘XTR’ for payments in Telegram Stars.
prices –
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
provider_token –
Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
max_tip_amount –
The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of
US$ 1.45
passmax_tip_amount = 145
. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.suggested_tip_amounts – A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
start_parameter – Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter
provider_data – JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
photo_url – URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
photo_size – Photo size in bytes
photo_width – Photo width
photo_height – Photo height
need_name –
Pass
True
if you require the user’s full name to complete the order. Ignored for payments in Telegram Stars.need_phone_number –
Pass
True
if you require the user’s phone number to complete the order. Ignored for payments in Telegram Stars.need_email –
Pass
True
if you require the user’s email address to complete the order. Ignored for payments in Telegram Stars.need_shipping_address –
Pass
True
if you require the user’s shipping address to complete the order. Ignored for payments in Telegram Stars.send_phone_number_to_provider –
Pass
True
if the user’s phone number should be sent to the provider. Ignored for payments in Telegram Stars.send_email_to_provider –
Pass
True
if the user’s email address should be sent to the provider. Ignored for payments in Telegram Stars.is_flexible –
Pass
True
if the final price depends on the shipping method. Ignored for payments in Telegram Stars.disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
A JSON-serialized object for an inline keyboard. If empty, one ‘Pay
total price
’ button will be shown. If not empty, the first button must be a Pay button.allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_invoice.SendInvoice
- answer_location(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, heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendLocation [source]¶
Shortcut for method
aiogram.methods.send_location.SendLocation
will automatically fill method attributes:chat_id
Use this method to send point on the map. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendlocation
- Parameters:
latitude – Latitude of the location
longitude – Longitude of the location
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
horizontal_accuracy – The radius of uncertainty for the location, measured in meters; 0-1500
live_period – Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
heading – For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
proximity_alert_radius – For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_location.SendLocation
- answer_location_pm(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, heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendLocation [source]¶
Shortcut for method
aiogram.methods.send_location.SendLocation
will automatically fill method attributes:chat_id
Use this method to send point on the map. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendlocation
- Parameters:
latitude – Latitude of the location
longitude – Longitude of the location
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
horizontal_accuracy – The radius of uncertainty for the location, measured in meters; 0-1500
live_period –
Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
heading – For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
proximity_alert_radius – For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_location.SendLocation
- answer_media_group(media: list[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendMediaGroup [source]¶
Shortcut for method
aiogram.methods.send_media_group.SendMediaGroup
will automatically fill method attributes:chat_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 that were sent is returned.
Source: https://core.telegram.org/bots/api#sendmediagroup
- Parameters:
media – A JSON-serialized array describing messages to be sent, must include 2-10 items
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
disable_notification –
Sends messages silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent messages from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the messages are a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_media_group.SendMediaGroup
- answer_media_group_pm(media: list[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendMediaGroup [source]¶
Shortcut for method
aiogram.methods.send_media_group.SendMediaGroup
will automatically fill method attributes:chat_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 that were sent is returned.
Source: https://core.telegram.org/bots/api#sendmediagroup
- Parameters:
media – A JSON-serialized array describing messages to be sent, must include 2-10 items
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
disable_notification –
Sends messages silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent messages from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the messages are a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_media_group.SendMediaGroup
- answer_photo(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')>, caption_entities: Optional[list[MessageEntity]] = None, show_caption_above_media: Optional[Union[bool, Default]] = <Default('show_caption_above_media')>, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendPhoto [source]¶
Shortcut for method
aiogram.methods.send_photo.SendPhoto
will automatically fill method attributes:chat_id
Use this method to send photos. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendphoto
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
caption – Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the photo caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
show_caption_above_media – Pass
True
, if the caption must be shown above the message mediahas_spoiler – Pass
True
if the photo needs to be covered with a spoiler animationdisable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_photo.SendPhoto
- answer_photo_pm(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')>, caption_entities: Optional[list[MessageEntity]] = None, show_caption_above_media: Optional[Union[bool, Default]] = <Default('show_caption_above_media')>, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendPhoto [source]¶
Shortcut for method
aiogram.methods.send_photo.SendPhoto
will automatically fill method attributes:chat_id
Use this method to send photos. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendphoto
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
caption – Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the photo caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
show_caption_above_media – Pass
True
, if the caption must be shown above the message mediahas_spoiler – Pass
True
if the photo needs to be covered with a spoiler animationdisable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_photo.SendPhoto
- answer_poll(question: str, options: list[Union[InputPollOption, str]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, question_parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, question_entities: Optional[list[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, correct_option_id: Optional[int] = None, explanation: Optional[str] = None, explanation_parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, explanation_entities: Optional[list[MessageEntity]] = None, open_period: Optional[int] = None, close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, is_closed: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendPoll [source]¶
Shortcut for method
aiogram.methods.send_poll.SendPoll
will automatically fill method attributes:chat_id
Use this method to send a native poll. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendpoll
- Parameters:
question – Poll question, 1-300 characters
options – A JSON-serialized list of 2-10 answer options
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
question_parse_mode –
Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed
question_entities – A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode
is_anonymous –
True
, if the poll needs to be anonymous, defaults toTrue
type – Poll type, ‘quiz’ or ‘regular’, defaults to ‘regular’
allows_multiple_answers –
True
, if the poll allows multiple answers, ignored for polls in quiz mode, defaults toFalse
correct_option_id – 0-based identifier of the correct answer option, required for polls in quiz mode
explanation – Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
explanation_parse_mode –
Mode for parsing entities in the explanation. See formatting options for more details.
explanation_entities – A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode
open_period – Amount of time in seconds the poll will be active after creation, 5-600. Can’t be used together with close_date.
close_date – Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can’t be used together with open_period.
is_closed – Pass
True
if the poll needs to be immediately closed. This can be useful for poll preview.disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_poll.SendPoll
- answer_poll_pm(question: str, options: list[Union[InputPollOption, str]], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, question_parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, question_entities: Optional[list[MessageEntity]] = None, is_anonymous: Optional[bool] = None, type: Optional[str] = None, allows_multiple_answers: Optional[bool] = None, correct_option_id: Optional[int] = None, explanation: Optional[str] = None, explanation_parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, explanation_entities: Optional[list[MessageEntity]] = None, open_period: Optional[int] = None, close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, is_closed: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendPoll [source]¶
Shortcut for method
aiogram.methods.send_poll.SendPoll
will automatically fill method attributes:chat_id
Use this method to send a native poll. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendpoll
- Parameters:
question – Poll question, 1-300 characters
options – A JSON-serialized list of 2-10 answer options
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
question_parse_mode –
Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed
question_entities – A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode
is_anonymous –
True
, if the poll needs to be anonymous, defaults toTrue
type – Poll type, ‘quiz’ or ‘regular’, defaults to ‘regular’
allows_multiple_answers –
True
, if the poll allows multiple answers, ignored for polls in quiz mode, defaults toFalse
correct_option_id – 0-based identifier of the correct answer option, required for polls in quiz mode
explanation – Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
explanation_parse_mode –
Mode for parsing entities in the explanation. See formatting options for more details.
explanation_entities – A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode
open_period – Amount of time in seconds the poll will be active after creation, 5-600. Can’t be used together with close_date.
close_date – Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can’t be used together with open_period.
is_closed – Pass
True
if the poll needs to be immediately closed. This can be useful for poll preview.disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_poll.SendPoll
- answer_dice(business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, emoji: Optional[str] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendDice [source]¶
Shortcut for method
aiogram.methods.send_dice.SendDice
will automatically fill method attributes:chat_id
Use this method to send an animated emoji that will display a random value. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#senddice
- Parameters:
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
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 ‘🎲’
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_dice.SendDice
- answer_dice_pm(business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, emoji: Optional[str] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendDice [source]¶
Shortcut for method
aiogram.methods.send_dice.SendDice
will automatically fill method attributes:chat_id
Use this method to send an animated emoji that will display a random value. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#senddice
- Parameters:
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
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 ‘🎲’
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_dice.SendDice
- answer_sticker(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, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendSticker [source]¶
Shortcut for method
aiogram.methods.send_sticker.SendSticker
will automatically fill method attributes:chat_id
Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendsticker
- Parameters:
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. More information on Sending Files ». Video and animated stickers can’t be sent via an HTTP URL.
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
emoji – Emoji associated with the sticker; only for just uploaded stickers
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_sticker.SendSticker
- answer_sticker_pm(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, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendSticker [source]¶
Shortcut for method
aiogram.methods.send_sticker.SendSticker
will automatically fill method attributes:chat_id
Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendsticker
- Parameters:
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. More information on Sending Files ». Video and animated stickers can’t be sent via an HTTP URL.
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
emoji – Emoji associated with the sticker; only for just uploaded stickers
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_sticker.SendSticker
- answer_venue(latitude: float, 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, google_place_id: Optional[str] = None, google_place_type: Optional[str] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVenue [source]¶
Shortcut for method
aiogram.methods.send_venue.SendVenue
will automatically fill method attributes:chat_id
Use this method to send information about a venue. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendvenue
- Parameters:
latitude – Latitude of the venue
longitude – Longitude of the venue
title – Name of the venue
address – Address of the venue
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
foursquare_id – Foursquare identifier of the venue
foursquare_type – Foursquare type of the venue, if known. (For example, ‘arts_entertainment/default’, ‘arts_entertainment/aquarium’ or ‘food/icecream’.)
google_place_id – Google Places identifier of the venue
google_place_type – Google Places type of the venue. (See supported types.)
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_venue.SendVenue
- answer_venue_pm(latitude: float, 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, google_place_id: Optional[str] = None, google_place_type: Optional[str] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVenue [source]¶
Shortcut for method
aiogram.methods.send_venue.SendVenue
will automatically fill method attributes:chat_id
Use this method to send information about a venue. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendvenue
- Parameters:
latitude – Latitude of the venue
longitude – Longitude of the venue
title – Name of the venue
address – Address of the venue
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
foursquare_id – Foursquare identifier of the venue
foursquare_type – Foursquare type of the venue, if known. (For example, ‘arts_entertainment/default’, ‘arts_entertainment/aquarium’ or ‘food/icecream’.)
google_place_id – Google Places identifier of the venue
google_place_type –
Google Places type of the venue. (See supported types.)
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_venue.SendVenue
- answer_video(video: Union[InputFile, str], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, caption_entities: Optional[list[MessageEntity]] = None, show_caption_above_media: Optional[Union[bool, Default]] = <Default('show_caption_above_media')>, has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVideo [source]¶
Shortcut for method
aiogram.methods.send_video.SendVideo
will automatically fill method attributes:chat_id
Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as
aiogram.types.document.Document
). On success, the sentaiogram.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.Source: https://core.telegram.org/bots/api#sendvideo
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
duration – Duration of sent video in seconds
width – Video width
height – Video height
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>. More information on Sending Files »
caption – Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the video caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
show_caption_above_media – Pass
True
, if the caption must be shown above the message mediahas_spoiler – Pass
True
if the video needs to be covered with a spoiler animationsupports_streaming – Pass
True
if the uploaded video is suitable for streamingdisable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_video.SendVideo
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- answer_video_pm(video: Union[InputFile, str], business_connection_id: Optional[str] = None, message_thread_id: Optional[int] = None, duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, thumbnail: Optional[InputFile] = None, caption: Optional[str] = None, parse_mode: Optional[Union[str, Default]] = <Default('parse_mode')>, caption_entities: Optional[list[MessageEntity]] = None, show_caption_above_media: Optional[Union[bool, Default]] = <Default('show_caption_above_media')>, has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVideo [source]¶
Shortcut for method
aiogram.methods.send_video.SendVideo
will automatically fill method attributes:chat_id
Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as
aiogram.types.document.Document
). On success, the sentaiogram.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.Source: https://core.telegram.org/bots/api#sendvideo
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
duration – Duration of sent video in seconds
width – Video width
height – Video height
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>. More information on Sending Files »
caption – Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the video caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
show_caption_above_media – Pass
True
, if the caption must be shown above the message mediahas_spoiler – Pass
True
if the video needs to be covered with a spoiler animationsupports_streaming – Pass
True
if the uploaded video is suitable for streamingdisable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_video.SendVideo
- answer_video_note(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, thumbnail: Optional[InputFile] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVideoNote [source]¶
Shortcut for method
aiogram.methods.send_video_note.SendVideoNote
will automatically fill method attributes:chat_id
As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendvideonote
- Parameters:
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. More information on Sending Files ». Sending video notes by a URL is currently unsupported
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
duration – Duration of sent video in seconds
length – Video width and height, i.e. diameter of the video message
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>. More information on Sending Files »
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_video_note.SendVideoNote
- answer_video_note_pm(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, thumbnail: Optional[InputFile] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVideoNote [source]¶
Shortcut for method
aiogram.methods.send_video_note.SendVideoNote
will automatically fill method attributes:chat_id
As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent
aiogram.types.message.Message
is returned.Source: https://core.telegram.org/bots/api#sendvideonote
- Parameters:
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. More information on Sending Files ». Sending video notes by a URL is currently unsupported
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
duration – Duration of sent video in seconds
length – Video width and height, i.e. diameter of the video message
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>. More information on Sending Files »
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_video_note.SendVideoNote
- answer_voice(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')>, caption_entities: Optional[list[MessageEntity]] = None, duration: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVoice [source]¶
Shortcut for method
aiogram.methods.send_voice.SendVoice
will automatically fill method attributes:chat_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, or in .MP3 format, or in .M4A format (other formats may be sent as
aiogram.types.audio.Audio
oraiogram.types.document.Document
). On success, the sentaiogram.types.message.Message
is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.Source: https://core.telegram.org/bots/api#sendvoice
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
caption – Voice message caption, 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the voice message caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
duration – Duration of the voice message in seconds
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_voice.SendVoice
- answer_voice_pm(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')>, caption_entities: Optional[list[MessageEntity]] = None, duration: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[Union[bool, Default]] = <Default('protect_content')>, allow_paid_broadcast: Optional[bool] = None, message_effect_id: Optional[str] = None, reply_parameters: Optional[ReplyParameters] = None, reply_markup: Optional[Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]] = None, allow_sending_without_reply: Optional[bool] = None, reply_to_message_id: Optional[int] = None, **kwargs: Any) SendVoice [source]¶
Shortcut for method
aiogram.methods.send_voice.SendVoice
will automatically fill method attributes:chat_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, or in .MP3 format, or in .M4A format (other formats may be sent as
aiogram.types.audio.Audio
oraiogram.types.document.Document
). On success, the sentaiogram.types.message.Message
is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.Source: https://core.telegram.org/bots/api#sendvoice
- Parameters:
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. More information on Sending Files »
business_connection_id – Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id – Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
caption – Voice message caption, 0-1024 characters after entities parsing
parse_mode –
Mode for parsing entities in the voice message caption. See formatting options for more details.
caption_entities – A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
duration – Duration of the voice message in seconds
disable_notification –
Sends the message silently. Users will receive a notification with no sound.
protect_content – Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast –
Pass
True
to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balancemessage_effect_id – Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters – Description of the message to reply to
reply_markup –
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
allow_sending_without_reply – Pass
True
if the message should be sent even if the specified replied-to message is not foundreply_to_message_id – If the message is a reply, ID of the original message
- Returns:
instance of method
aiogram.methods.send_voice.SendVoice