Refactor dispatcher. Update docs. Fix tests.

This commit is contained in:
Alex Root Junior 2020-11-18 02:05:52 +02:00
parent 9539c4e2fd
commit d3b488e16d
290 changed files with 2153 additions and 1780 deletions

View file

@ -3,13 +3,13 @@ Bot
###
Bot instance can be created from :code:`aiogram.Bot` (:code:`from aiogram import Bot`) and
you can't use API methods without instance of bot with configured token.
you can't use methods without instance of bot with configured token.
This class has aliases for all API methods and named in :code:`lower_camel_case`.
This class has aliases for all methods and named in :code:`lower_camel_case`.
For example :code:`sendMessage` named :code:`send_message` and has the same specification with all class-based methods.
.. autoclass:: aiogram.api.client.bot.Bot
.. autoclass:: aiogram.client.bot.Bot
:members:
:show-inheritance:
:member-order: bysource

View file

@ -11,6 +11,7 @@ Information about files sent to the bot is contained in `Message <types/message.
For example, download the document that came to the bot.
.. code-block::
file_id = message.document.file_id
Then use the `getFile <methods/get_file.html>`__ method to get `file_path`.
@ -30,7 +31,7 @@ Download file by `file_path` to destination.
If you want to automatically create destination (:obj:`io.BytesIO`) use default
value of destination and handle result of this method.
.. autoclass:: aiogram.api.client.bot.Bot
.. autoclass:: aiogram.client.bot.Bot
:members: download_file
:exclude-members: __init__
@ -80,7 +81,7 @@ Download file by `file_id` or `Downloadable` object to destination.
If you want to automatically create destination (:obj:`io.BytesIO`) use default
value of destination and handle result of this method.
.. autoclass:: aiogram.api.client.bot.Bot
.. autoclass:: aiogram.client.bot.Bot
:members: download
:exclude-members: __init__

View file

@ -4,7 +4,7 @@ Bot API
**aiogram** now is fully support of `Telegram Bot API <https://core.telegram.org/bots/api>`_
All API methods and types is fully autogenerated from Telegram Bot API docs by parser with code-generator.
All methods and types is fully autogenerated from Telegram Bot API docs by parser with code-generator.
.. toctree::
bot

View file

@ -6,7 +6,7 @@ Use this method to add a new sticker to a set created by the bot. You must use e
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.add_sticker_to_set
.. automodule:: aiogram.methods.add_sticker_to_set
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import AddStickerToSet`
- :code:`from aiogram.api.methods import AddStickerToSet`
- :code:`from aiogram.api.methods.add_sticker_to_set import AddStickerToSet`
- :code:`from aiogram.methods import AddStickerToSet`
- :code:`from aiogram.methods.add_sticker_to_set import AddStickerToSet`
In handlers with current bot
----------------------------

View file

@ -8,7 +8,7 @@ Alternatively, the user can be redirected to the specified Game URL. For this op
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.answer_callback_query
.. automodule:: aiogram.methods.answer_callback_query
:members:
:member-order: bysource
:special-members: __init__
@ -32,8 +32,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import AnswerCallbackQuery`
- :code:`from aiogram.api.methods import AnswerCallbackQuery`
- :code:`from aiogram.api.methods.answer_callback_query import AnswerCallbackQuery`
- :code:`from aiogram.methods import AnswerCallbackQuery`
- :code:`from aiogram.methods.answer_callback_query import AnswerCallbackQuery`
In handlers with current bot
----------------------------

View file

@ -8,7 +8,7 @@ No more than 50 results per query are allowed.
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.answer_inline_query
.. automodule:: aiogram.methods.answer_inline_query
:members:
:member-order: bysource
:special-members: __init__
@ -32,8 +32,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import AnswerInlineQuery`
- :code:`from aiogram.api.methods import AnswerInlineQuery`
- :code:`from aiogram.api.methods.answer_inline_query import AnswerInlineQuery`
- :code:`from aiogram.methods import AnswerInlineQuery`
- :code:`from aiogram.methods.answer_inline_query import AnswerInlineQuery`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Once the user has confirmed their payment and shipping details, the Bot API send
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.answer_pre_checkout_query
.. automodule:: aiogram.methods.answer_pre_checkout_query
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import AnswerPreCheckoutQuery`
- :code:`from aiogram.api.methods import AnswerPreCheckoutQuery`
- :code:`from aiogram.api.methods.answer_pre_checkout_query import AnswerPreCheckoutQuery`
- :code:`from aiogram.methods import AnswerPreCheckoutQuery`
- :code:`from aiogram.methods.answer_pre_checkout_query import AnswerPreCheckoutQuery`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ If you sent an invoice requesting a shipping address and the parameter is_flexib
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.answer_shipping_query
.. automodule:: aiogram.methods.answer_shipping_query
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import AnswerShippingQuery`
- :code:`from aiogram.api.methods import AnswerShippingQuery`
- :code:`from aiogram.api.methods.answer_shipping_query import AnswerShippingQuery`
- :code:`from aiogram.methods import AnswerShippingQuery`
- :code:`from aiogram.methods.answer_shipping_query import AnswerShippingQuery`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to create a new sticker set owned by a user. The bot will be abl
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.create_new_sticker_set
.. automodule:: aiogram.methods.create_new_sticker_set
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import CreateNewStickerSet`
- :code:`from aiogram.api.methods import CreateNewStickerSet`
- :code:`from aiogram.api.methods.create_new_sticker_set import CreateNewStickerSet`
- :code:`from aiogram.methods import CreateNewStickerSet`
- :code:`from aiogram.methods.create_new_sticker_set import CreateNewStickerSet`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to delete a chat photo. Photos can't be changed for private chat
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.delete_chat_photo
.. automodule:: aiogram.methods.delete_chat_photo
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import DeleteChatPhoto`
- :code:`from aiogram.api.methods import DeleteChatPhoto`
- :code:`from aiogram.api.methods.delete_chat_photo import DeleteChatPhoto`
- :code:`from aiogram.methods import DeleteChatPhoto`
- :code:`from aiogram.methods.delete_chat_photo import DeleteChatPhoto`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to delete a group sticker set from a supergroup. The bot must be
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.delete_chat_sticker_set
.. automodule:: aiogram.methods.delete_chat_sticker_set
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import DeleteChatStickerSet`
- :code:`from aiogram.api.methods import DeleteChatStickerSet`
- :code:`from aiogram.api.methods.delete_chat_sticker_set import DeleteChatStickerSet`
- :code:`from aiogram.methods import DeleteChatStickerSet`
- :code:`from aiogram.methods.delete_chat_sticker_set import DeleteChatStickerSet`
In handlers with current bot
----------------------------

View file

@ -22,7 +22,7 @@ Returns True on success.
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.delete_message
.. automodule:: aiogram.methods.delete_message
:members:
:member-order: bysource
:special-members: __init__
@ -46,8 +46,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import DeleteMessage`
- :code:`from aiogram.api.methods import DeleteMessage`
- :code:`from aiogram.api.methods.delete_message import DeleteMessage`
- :code:`from aiogram.methods import DeleteMessage`
- :code:`from aiogram.methods.delete_message import DeleteMessage`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to delete a sticker from a set created by the bot. Returns True
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.delete_sticker_from_set
.. automodule:: aiogram.methods.delete_sticker_from_set
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import DeleteStickerFromSet`
- :code:`from aiogram.api.methods import DeleteStickerFromSet`
- :code:`from aiogram.api.methods.delete_sticker_from_set import DeleteStickerFromSet`
- :code:`from aiogram.methods import DeleteStickerFromSet`
- :code:`from aiogram.methods.delete_sticker_from_set import DeleteStickerFromSet`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to remove webhook integration if you decide to switch back to ge
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.delete_webhook
.. automodule:: aiogram.methods.delete_webhook
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import DeleteWebhook`
- :code:`from aiogram.api.methods import DeleteWebhook`
- :code:`from aiogram.api.methods.delete_webhook import DeleteWebhook`
- :code:`from aiogram.methods import DeleteWebhook`
- :code:`from aiogram.methods.delete_webhook import DeleteWebhook`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to edit captions of messages. On success, if edited message is s
Returns: :obj:`Union[Message, bool]`
.. automodule:: aiogram.api.methods.edit_message_caption
.. automodule:: aiogram.methods.edit_message_caption
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import EditMessageCaption`
- :code:`from aiogram.api.methods import EditMessageCaption`
- :code:`from aiogram.api.methods.edit_message_caption import EditMessageCaption`
- :code:`from aiogram.methods import EditMessageCaption`
- :code:`from aiogram.methods.edit_message_caption import EditMessageCaption`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to edit live location messages. A location can be edited until i
Returns: :obj:`Union[Message, bool]`
.. automodule:: aiogram.api.methods.edit_message_live_location
.. automodule:: aiogram.methods.edit_message_live_location
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import EditMessageLiveLocation`
- :code:`from aiogram.api.methods import EditMessageLiveLocation`
- :code:`from aiogram.api.methods.edit_message_live_location import EditMessageLiveLocation`
- :code:`from aiogram.methods import EditMessageLiveLocation`
- :code:`from aiogram.methods.edit_message_live_location import EditMessageLiveLocation`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to edit animation, audio, document, photo, or video messages. If
Returns: :obj:`Union[Message, bool]`
.. automodule:: aiogram.api.methods.edit_message_media
.. automodule:: aiogram.methods.edit_message_media
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import EditMessageMedia`
- :code:`from aiogram.api.methods import EditMessageMedia`
- :code:`from aiogram.api.methods.edit_message_media import EditMessageMedia`
- :code:`from aiogram.methods import EditMessageMedia`
- :code:`from aiogram.methods.edit_message_media import EditMessageMedia`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to edit only the reply markup of messages. On success, if edited
Returns: :obj:`Union[Message, bool]`
.. automodule:: aiogram.api.methods.edit_message_reply_markup
.. automodule:: aiogram.methods.edit_message_reply_markup
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import EditMessageReplyMarkup`
- :code:`from aiogram.api.methods import EditMessageReplyMarkup`
- :code:`from aiogram.api.methods.edit_message_reply_markup import EditMessageReplyMarkup`
- :code:`from aiogram.methods import EditMessageReplyMarkup`
- :code:`from aiogram.methods.edit_message_reply_markup import EditMessageReplyMarkup`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to edit text and game messages. On success, if edited message is
Returns: :obj:`Union[Message, bool]`
.. automodule:: aiogram.api.methods.edit_message_text
.. automodule:: aiogram.methods.edit_message_text
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import EditMessageText`
- :code:`from aiogram.api.methods import EditMessageText`
- :code:`from aiogram.api.methods.edit_message_text import EditMessageText`
- :code:`from aiogram.methods import EditMessageText`
- :code:`from aiogram.methods.edit_message_text import EditMessageText`
In handlers with current bot
----------------------------

View file

@ -8,7 +8,7 @@ Note: Each administrator in a chat generates their own invite links. Bots can't
Returns: :obj:`str`
.. automodule:: aiogram.api.methods.export_chat_invite_link
.. automodule:: aiogram.methods.export_chat_invite_link
:members:
:member-order: bysource
:special-members: __init__
@ -32,8 +32,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import ExportChatInviteLink`
- :code:`from aiogram.api.methods import ExportChatInviteLink`
- :code:`from aiogram.api.methods.export_chat_invite_link import ExportChatInviteLink`
- :code:`from aiogram.methods import ExportChatInviteLink`
- :code:`from aiogram.methods.export_chat_invite_link import ExportChatInviteLink`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to forward messages of any kind. On success, the sent Message is
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.forward_message
.. automodule:: aiogram.methods.forward_message
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import ForwardMessage`
- :code:`from aiogram.api.methods import ForwardMessage`
- :code:`from aiogram.api.methods.forward_message import ForwardMessage`
- :code:`from aiogram.methods import ForwardMessage`
- :code:`from aiogram.methods.forward_message import ForwardMessage`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get up to date information about the chat (current name of th
Returns: :obj:`Chat`
.. automodule:: aiogram.api.methods.get_chat
.. automodule:: aiogram.methods.get_chat
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetChat`
- :code:`from aiogram.api.methods import GetChat`
- :code:`from aiogram.api.methods.get_chat import GetChat`
- :code:`from aiogram.methods import GetChat`
- :code:`from aiogram.methods.get_chat import GetChat`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get a list of administrators in a chat. On success, returns a
Returns: :obj:`List[ChatMember]`
.. automodule:: aiogram.api.methods.get_chat_administrators
.. automodule:: aiogram.methods.get_chat_administrators
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetChatAdministrators`
- :code:`from aiogram.api.methods import GetChatAdministrators`
- :code:`from aiogram.api.methods.get_chat_administrators import GetChatAdministrators`
- :code:`from aiogram.methods import GetChatAdministrators`
- :code:`from aiogram.methods.get_chat_administrators import GetChatAdministrators`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get information about a member of a chat. Returns a ChatMembe
Returns: :obj:`ChatMember`
.. automodule:: aiogram.api.methods.get_chat_member
.. automodule:: aiogram.methods.get_chat_member
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetChatMember`
- :code:`from aiogram.api.methods import GetChatMember`
- :code:`from aiogram.api.methods.get_chat_member import GetChatMember`
- :code:`from aiogram.methods import GetChatMember`
- :code:`from aiogram.methods.get_chat_member import GetChatMember`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get the number of members in a chat. Returns Int on success.
Returns: :obj:`int`
.. automodule:: aiogram.api.methods.get_chat_members_count
.. automodule:: aiogram.methods.get_chat_members_count
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetChatMembersCount`
- :code:`from aiogram.api.methods import GetChatMembersCount`
- :code:`from aiogram.api.methods.get_chat_members_count import GetChatMembersCount`
- :code:`from aiogram.methods import GetChatMembersCount`
- :code:`from aiogram.methods.get_chat_members_count import GetChatMembersCount`
In handlers with current bot
----------------------------

View file

@ -8,7 +8,7 @@ Note: This function may not preserve the original file name and MIME type. You s
Returns: :obj:`File`
.. automodule:: aiogram.api.methods.get_file
.. automodule:: aiogram.methods.get_file
:members:
:member-order: bysource
:special-members: __init__
@ -32,8 +32,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetFile`
- :code:`from aiogram.api.methods import GetFile`
- :code:`from aiogram.api.methods.get_file import GetFile`
- :code:`from aiogram.methods import GetFile`
- :code:`from aiogram.methods.get_file import GetFile`
In handlers with current bot
----------------------------

View file

@ -8,7 +8,7 @@ This method will currently return scores for the target user, plus two of their
Returns: :obj:`List[GameHighScore]`
.. automodule:: aiogram.api.methods.get_game_high_scores
.. automodule:: aiogram.methods.get_game_high_scores
:members:
:member-order: bysource
:special-members: __init__
@ -32,8 +32,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetGameHighScores`
- :code:`from aiogram.api.methods import GetGameHighScores`
- :code:`from aiogram.api.methods.get_game_high_scores import GetGameHighScores`
- :code:`from aiogram.methods import GetGameHighScores`
- :code:`from aiogram.methods.get_game_high_scores import GetGameHighScores`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ A simple method for testing your bot's auth token. Requires no parameters. Retur
Returns: :obj:`User`
.. automodule:: aiogram.api.methods.get_me
.. automodule:: aiogram.methods.get_me
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetMe`
- :code:`from aiogram.api.methods import GetMe`
- :code:`from aiogram.api.methods.get_me import GetMe`
- :code:`from aiogram.methods import GetMe`
- :code:`from aiogram.methods.get_me import GetMe`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get the current list of the bot's commands. Requires no param
Returns: :obj:`List[BotCommand]`
.. automodule:: aiogram.api.methods.get_my_commands
.. automodule:: aiogram.methods.get_my_commands
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetMyCommands`
- :code:`from aiogram.api.methods import GetMyCommands`
- :code:`from aiogram.api.methods.get_my_commands import GetMyCommands`
- :code:`from aiogram.methods import GetMyCommands`
- :code:`from aiogram.methods.get_my_commands import GetMyCommands`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get a sticker set. On success, a StickerSet object is returne
Returns: :obj:`StickerSet`
.. automodule:: aiogram.api.methods.get_sticker_set
.. automodule:: aiogram.methods.get_sticker_set
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetStickerSet`
- :code:`from aiogram.api.methods import GetStickerSet`
- :code:`from aiogram.api.methods.get_sticker_set import GetStickerSet`
- :code:`from aiogram.methods import GetStickerSet`
- :code:`from aiogram.methods.get_sticker_set import GetStickerSet`
In handlers with current bot
----------------------------

View file

@ -12,7 +12,7 @@ Notes
Returns: :obj:`List[Update]`
.. automodule:: aiogram.api.methods.get_updates
.. automodule:: aiogram.methods.get_updates
:members:
:member-order: bysource
:special-members: __init__
@ -36,8 +36,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetUpdates`
- :code:`from aiogram.api.methods import GetUpdates`
- :code:`from aiogram.api.methods.get_updates import GetUpdates`
- :code:`from aiogram.methods import GetUpdates`
- :code:`from aiogram.methods.get_updates import GetUpdates`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get a list of profile pictures for a user. Returns a UserProf
Returns: :obj:`UserProfilePhotos`
.. automodule:: aiogram.api.methods.get_user_profile_photos
.. automodule:: aiogram.methods.get_user_profile_photos
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetUserProfilePhotos`
- :code:`from aiogram.api.methods import GetUserProfilePhotos`
- :code:`from aiogram.api.methods.get_user_profile_photos import GetUserProfilePhotos`
- :code:`from aiogram.methods import GetUserProfilePhotos`
- :code:`from aiogram.methods.get_user_profile_photos import GetUserProfilePhotos`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to get current webhook status. Requires no parameters. On succes
Returns: :obj:`WebhookInfo`
.. automodule:: aiogram.api.methods.get_webhook_info
.. automodule:: aiogram.methods.get_webhook_info
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import GetWebhookInfo`
- :code:`from aiogram.api.methods import GetWebhookInfo`
- :code:`from aiogram.api.methods.get_webhook_info import GetWebhookInfo`
- :code:`from aiogram.methods import GetWebhookInfo`
- :code:`from aiogram.methods.get_webhook_info import GetWebhookInfo`
In handlers with current bot
----------------------------

View file

@ -2,8 +2,8 @@
Methods
#######
All API methods is wrapped as `pydantic <https://pydantic-docs.helpmanual.io/>`_ models
and placed in :mod:`aiogram.api.methods` package so that's mean all values which you pass
All methods is wrapped as `pydantic <https://pydantic-docs.helpmanual.io/>`_ models
and placed in :mod:`aiogram.methods` package so that's mean all values which you pass
as arguments to the methods will be validated.
Here is all methods is classes and in due to Python standards all classes named in

View file

@ -6,7 +6,7 @@ Use this method to kick a user from a group, a supergroup or a channel. In the c
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.kick_chat_member
.. automodule:: aiogram.methods.kick_chat_member
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import KickChatMember`
- :code:`from aiogram.api.methods import KickChatMember`
- :code:`from aiogram.api.methods.kick_chat_member import KickChatMember`
- :code:`from aiogram.methods import KickChatMember`
- :code:`from aiogram.methods.kick_chat_member import KickChatMember`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method for your bot to leave a group, supergroup or channel. Returns Tr
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.leave_chat
.. automodule:: aiogram.methods.leave_chat
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import LeaveChat`
- :code:`from aiogram.api.methods import LeaveChat`
- :code:`from aiogram.api.methods.leave_chat import LeaveChat`
- :code:`from aiogram.methods import LeaveChat`
- :code:`from aiogram.methods.leave_chat import LeaveChat`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to pin a message in a group, a supergroup, or a channel. The bot
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.pin_chat_message
.. automodule:: aiogram.methods.pin_chat_message
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import PinChatMessage`
- :code:`from aiogram.api.methods import PinChatMessage`
- :code:`from aiogram.api.methods.pin_chat_message import PinChatMessage`
- :code:`from aiogram.methods import PinChatMessage`
- :code:`from aiogram.methods.pin_chat_message import PinChatMessage`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to promote or demote a user in a supergroup or a channel. The bo
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.promote_chat_member
.. automodule:: aiogram.methods.promote_chat_member
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import PromoteChatMember`
- :code:`from aiogram.api.methods import PromoteChatMember`
- :code:`from aiogram.api.methods.promote_chat_member import PromoteChatMember`
- :code:`from aiogram.methods import PromoteChatMember`
- :code:`from aiogram.methods.promote_chat_member import PromoteChatMember`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to restrict a user in a supergroup. The bot must be an administr
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.restrict_chat_member
.. automodule:: aiogram.methods.restrict_chat_member
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import RestrictChatMember`
- :code:`from aiogram.api.methods import RestrictChatMember`
- :code:`from aiogram.api.methods.restrict_chat_member import RestrictChatMember`
- :code:`from aiogram.methods import RestrictChatMember`
- :code:`from aiogram.methods.restrict_chat_member import RestrictChatMember`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without s
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_animation
.. automodule:: aiogram.methods.send_animation
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendAnimation`
- :code:`from aiogram.api.methods import SendAnimation`
- :code:`from aiogram.api.methods.send_animation import SendAnimation`
- :code:`from aiogram.methods import SendAnimation`
- :code:`from aiogram.methods.send_animation import SendAnimation`
In handlers with current bot
----------------------------

View file

@ -8,7 +8,7 @@ For sending voice messages, use the sendVoice method instead.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_audio
.. automodule:: aiogram.methods.send_audio
:members:
:member-order: bysource
:special-members: __init__
@ -32,8 +32,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendAudio`
- :code:`from aiogram.api.methods import SendAudio`
- :code:`from aiogram.api.methods.send_audio import SendAudio`
- :code:`from aiogram.methods import SendAudio`
- :code:`from aiogram.methods.send_audio import SendAudio`
In handlers with current bot
----------------------------

View file

@ -10,7 +10,7 @@ We only recommend using this method when a response from the bot will take a not
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.send_chat_action
.. automodule:: aiogram.methods.send_chat_action
:members:
:member-order: bysource
:special-members: __init__
@ -34,8 +34,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendChatAction`
- :code:`from aiogram.api.methods import SendChatAction`
- :code:`from aiogram.api.methods.send_chat_action import SendChatAction`
- :code:`from aiogram.methods import SendChatAction`
- :code:`from aiogram.methods.send_chat_action import SendChatAction`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send phone contacts. On success, the sent Message is returned
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_contact
.. automodule:: aiogram.methods.send_contact
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendContact`
- :code:`from aiogram.api.methods import SendContact`
- :code:`from aiogram.api.methods.send_contact import SendContact`
- :code:`from aiogram.methods import SendContact`
- :code:`from aiogram.methods.send_contact import SendContact`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send an animated emoji that will display a random value. On s
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_dice
.. automodule:: aiogram.methods.send_dice
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendDice`
- :code:`from aiogram.api.methods import SendDice`
- :code:`from aiogram.api.methods.send_dice import SendDice`
- :code:`from aiogram.methods import SendDice`
- :code:`from aiogram.methods.send_dice import SendDice`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send general files. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_document
.. automodule:: aiogram.methods.send_document
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendDocument`
- :code:`from aiogram.api.methods import SendDocument`
- :code:`from aiogram.api.methods.send_document import SendDocument`
- :code:`from aiogram.methods import SendDocument`
- :code:`from aiogram.methods.send_document import SendDocument`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send a game. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_game
.. automodule:: aiogram.methods.send_game
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendGame`
- :code:`from aiogram.api.methods import SendGame`
- :code:`from aiogram.api.methods.send_game import SendGame`
- :code:`from aiogram.methods import SendGame`
- :code:`from aiogram.methods.send_game import SendGame`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send invoices. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_invoice
.. automodule:: aiogram.methods.send_invoice
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendInvoice`
- :code:`from aiogram.api.methods import SendInvoice`
- :code:`from aiogram.api.methods.send_invoice import SendInvoice`
- :code:`from aiogram.methods import SendInvoice`
- :code:`from aiogram.methods.send_invoice import SendInvoice`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send point on the map. On success, the sent Message is return
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_location
.. automodule:: aiogram.methods.send_location
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendLocation`
- :code:`from aiogram.api.methods import SendLocation`
- :code:`from aiogram.api.methods.send_location import SendLocation`
- :code:`from aiogram.methods import SendLocation`
- :code:`from aiogram.methods.send_location import SendLocation`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send a group of photos or videos as an album. On success, an
Returns: :obj:`List[Message]`
.. automodule:: aiogram.api.methods.send_media_group
.. automodule:: aiogram.methods.send_media_group
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendMediaGroup`
- :code:`from aiogram.api.methods import SendMediaGroup`
- :code:`from aiogram.api.methods.send_media_group import SendMediaGroup`
- :code:`from aiogram.methods import SendMediaGroup`
- :code:`from aiogram.methods.send_media_group import SendMediaGroup`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send text messages. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_message
.. automodule:: aiogram.methods.send_message
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendMessage`
- :code:`from aiogram.api.methods import SendMessage`
- :code:`from aiogram.api.methods.send_message import SendMessage`
- :code:`from aiogram.methods import SendMessage`
- :code:`from aiogram.methods.send_message import SendMessage`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send photos. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_photo
.. automodule:: aiogram.methods.send_photo
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendPhoto`
- :code:`from aiogram.api.methods import SendPhoto`
- :code:`from aiogram.api.methods.send_photo import SendPhoto`
- :code:`from aiogram.methods import SendPhoto`
- :code:`from aiogram.methods.send_photo import SendPhoto`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send a native poll. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_poll
.. automodule:: aiogram.methods.send_poll
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendPoll`
- :code:`from aiogram.api.methods import SendPoll`
- :code:`from aiogram.api.methods.send_poll import SendPoll`
- :code:`from aiogram.methods import SendPoll`
- :code:`from aiogram.methods.send_poll import SendPoll`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send static .WEBP or animated .TGS stickers. On success, the
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_sticker
.. automodule:: aiogram.methods.send_sticker
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendSticker`
- :code:`from aiogram.api.methods import SendSticker`
- :code:`from aiogram.api.methods.send_sticker import SendSticker`
- :code:`from aiogram.methods import SendSticker`
- :code:`from aiogram.methods.send_sticker import SendSticker`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send information about a venue. On success, the sent Message
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_venue
.. automodule:: aiogram.methods.send_venue
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendVenue`
- :code:`from aiogram.api.methods import SendVenue`
- :code:`from aiogram.api.methods.send_venue import SendVenue`
- :code:`from aiogram.methods import SendVenue`
- :code:`from aiogram.methods.send_venue import SendVenue`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send video files, Telegram clients support mp4 videos (other
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_video
.. automodule:: aiogram.methods.send_video
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendVideo`
- :code:`from aiogram.api.methods import SendVideo`
- :code:`from aiogram.api.methods.send_video import SendVideo`
- :code:`from aiogram.methods import SendVideo`
- :code:`from aiogram.methods.send_video import SendVideo`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minut
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_video_note
.. automodule:: aiogram.methods.send_video_note
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendVideoNote`
- :code:`from aiogram.api.methods import SendVideoNote`
- :code:`from aiogram.api.methods.send_video_note import SendVideoNote`
- :code:`from aiogram.methods import SendVideoNote`
- :code:`from aiogram.methods.send_video_note import SendVideoNote`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to send audio files, if you want Telegram clients to display the
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_voice
.. automodule:: aiogram.methods.send_voice
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SendVoice`
- :code:`from aiogram.api.methods import SendVoice`
- :code:`from aiogram.api.methods.send_voice import SendVoice`
- :code:`from aiogram.methods import SendVoice`
- :code:`from aiogram.methods.send_voice import SendVoice`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to set a custom title for an administrator in a supergroup promo
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_chat_administrator_custom_title
.. automodule:: aiogram.methods.set_chat_administrator_custom_title
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetChatAdministratorCustomTitle`
- :code:`from aiogram.api.methods import SetChatAdministratorCustomTitle`
- :code:`from aiogram.api.methods.set_chat_administrator_custom_title import SetChatAdministratorCustomTitle`
- :code:`from aiogram.methods import SetChatAdministratorCustomTitle`
- :code:`from aiogram.methods.set_chat_administrator_custom_title import SetChatAdministratorCustomTitle`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to change the description of a group, a supergroup or a channel.
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_chat_description
.. automodule:: aiogram.methods.set_chat_description
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetChatDescription`
- :code:`from aiogram.api.methods import SetChatDescription`
- :code:`from aiogram.api.methods.set_chat_description import SetChatDescription`
- :code:`from aiogram.methods import SetChatDescription`
- :code:`from aiogram.methods.set_chat_description import SetChatDescription`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to set default chat permissions for all members. The bot must be
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_chat_permissions
.. automodule:: aiogram.methods.set_chat_permissions
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetChatPermissions`
- :code:`from aiogram.api.methods import SetChatPermissions`
- :code:`from aiogram.api.methods.set_chat_permissions import SetChatPermissions`
- :code:`from aiogram.methods import SetChatPermissions`
- :code:`from aiogram.methods.set_chat_permissions import SetChatPermissions`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to set a new profile photo for the chat. Photos can't be changed
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_chat_photo
.. automodule:: aiogram.methods.set_chat_photo
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetChatPhoto`
- :code:`from aiogram.api.methods import SetChatPhoto`
- :code:`from aiogram.api.methods.set_chat_photo import SetChatPhoto`
- :code:`from aiogram.methods import SetChatPhoto`
- :code:`from aiogram.methods.set_chat_photo import SetChatPhoto`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to set a new group sticker set for a supergroup. The bot must be
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_chat_sticker_set
.. automodule:: aiogram.methods.set_chat_sticker_set
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetChatStickerSet`
- :code:`from aiogram.api.methods import SetChatStickerSet`
- :code:`from aiogram.api.methods.set_chat_sticker_set import SetChatStickerSet`
- :code:`from aiogram.methods import SetChatStickerSet`
- :code:`from aiogram.methods.set_chat_sticker_set import SetChatStickerSet`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to change the title of a chat. Titles can't be changed for priva
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_chat_title
.. automodule:: aiogram.methods.set_chat_title
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetChatTitle`
- :code:`from aiogram.api.methods import SetChatTitle`
- :code:`from aiogram.api.methods.set_chat_title import SetChatTitle`
- :code:`from aiogram.methods import SetChatTitle`
- :code:`from aiogram.methods.set_chat_title import SetChatTitle`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to set the score of the specified user in a game. On success, if
Returns: :obj:`Union[Message, bool]`
.. automodule:: aiogram.api.methods.set_game_score
.. automodule:: aiogram.methods.set_game_score
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetGameScore`
- :code:`from aiogram.api.methods import SetGameScore`
- :code:`from aiogram.api.methods.set_game_score import SetGameScore`
- :code:`from aiogram.methods import SetGameScore`
- :code:`from aiogram.methods.set_game_score import SetGameScore`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to change the list of the bot's commands. Returns True on succes
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_my_commands
.. automodule:: aiogram.methods.set_my_commands
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetMyCommands`
- :code:`from aiogram.api.methods import SetMyCommands`
- :code:`from aiogram.api.methods.set_my_commands import SetMyCommands`
- :code:`from aiogram.methods import SetMyCommands`
- :code:`from aiogram.methods.set_my_commands import SetMyCommands`
In handlers with current bot
----------------------------

View file

@ -8,7 +8,7 @@ Use this if the data submitted by the user doesn't satisfy the standards your se
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_passport_data_errors
.. automodule:: aiogram.methods.set_passport_data_errors
:members:
:member-order: bysource
:special-members: __init__
@ -32,8 +32,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetPassportDataErrors`
- :code:`from aiogram.api.methods import SetPassportDataErrors`
- :code:`from aiogram.api.methods.set_passport_data_errors import SetPassportDataErrors`
- :code:`from aiogram.methods import SetPassportDataErrors`
- :code:`from aiogram.methods.set_passport_data_errors import SetPassportDataErrors`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to move a sticker in a set created by the bot to a specific posi
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_sticker_position_in_set
.. automodule:: aiogram.methods.set_sticker_position_in_set
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetStickerPositionInSet`
- :code:`from aiogram.api.methods import SetStickerPositionInSet`
- :code:`from aiogram.api.methods.set_sticker_position_in_set import SetStickerPositionInSet`
- :code:`from aiogram.methods import SetStickerPositionInSet`
- :code:`from aiogram.methods.set_sticker_position_in_set import SetStickerPositionInSet`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to set the thumbnail of a sticker set. Animated thumbnails can b
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_sticker_set_thumb
.. automodule:: aiogram.methods.set_sticker_set_thumb
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetStickerSetThumb`
- :code:`from aiogram.api.methods import SetStickerSetThumb`
- :code:`from aiogram.api.methods.set_sticker_set_thumb import SetStickerSetThumb`
- :code:`from aiogram.methods import SetStickerSetThumb`
- :code:`from aiogram.methods.set_sticker_set_thumb import SetStickerSetThumb`
In handlers with current bot
----------------------------

View file

@ -18,7 +18,7 @@ NEW! If you're having any trouble setting up webhooks, please check out this ama
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.set_webhook
.. automodule:: aiogram.methods.set_webhook
:members:
:member-order: bysource
:special-members: __init__
@ -42,8 +42,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import SetWebhook`
- :code:`from aiogram.api.methods import SetWebhook`
- :code:`from aiogram.api.methods.set_webhook import SetWebhook`
- :code:`from aiogram.methods import SetWebhook`
- :code:`from aiogram.methods.set_webhook import SetWebhook`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to stop updating a live location message before live_period expi
Returns: :obj:`Union[Message, bool]`
.. automodule:: aiogram.api.methods.stop_message_live_location
.. automodule:: aiogram.methods.stop_message_live_location
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import StopMessageLiveLocation`
- :code:`from aiogram.api.methods import StopMessageLiveLocation`
- :code:`from aiogram.api.methods.stop_message_live_location import StopMessageLiveLocation`
- :code:`from aiogram.methods import StopMessageLiveLocation`
- :code:`from aiogram.methods.stop_message_live_location import StopMessageLiveLocation`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to stop a poll which was sent by the bot. On success, the stoppe
Returns: :obj:`Poll`
.. automodule:: aiogram.api.methods.stop_poll
.. automodule:: aiogram.methods.stop_poll
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import StopPoll`
- :code:`from aiogram.api.methods import StopPoll`
- :code:`from aiogram.api.methods.stop_poll import StopPoll`
- :code:`from aiogram.methods import StopPoll`
- :code:`from aiogram.methods.stop_poll import StopPoll`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to unban a previously kicked user in a supergroup or channel. Th
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.unban_chat_member
.. automodule:: aiogram.methods.unban_chat_member
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import UnbanChatMember`
- :code:`from aiogram.api.methods import UnbanChatMember`
- :code:`from aiogram.api.methods.unban_chat_member import UnbanChatMember`
- :code:`from aiogram.methods import UnbanChatMember`
- :code:`from aiogram.methods.unban_chat_member import UnbanChatMember`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to unpin a message in a group, a supergroup, or a channel. The b
Returns: :obj:`bool`
.. automodule:: aiogram.api.methods.unpin_chat_message
.. automodule:: aiogram.methods.unpin_chat_message
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import UnpinChatMessage`
- :code:`from aiogram.api.methods import UnpinChatMessage`
- :code:`from aiogram.api.methods.unpin_chat_message import UnpinChatMessage`
- :code:`from aiogram.methods import UnpinChatMessage`
- :code:`from aiogram.methods.unpin_chat_message import UnpinChatMessage`
In handlers with current bot
----------------------------

View file

@ -6,7 +6,7 @@ Use this method to upload a .PNG file with a sticker for later use in createNewS
Returns: :obj:`File`
.. automodule:: aiogram.api.methods.upload_sticker_file
.. automodule:: aiogram.methods.upload_sticker_file
:members:
:member-order: bysource
:special-members: __init__
@ -30,8 +30,8 @@ Method as object
Imports:
- :code:`from aiogram.methods import UploadStickerFile`
- :code:`from aiogram.api.methods import UploadStickerFile`
- :code:`from aiogram.api.methods.upload_sticker_file import UploadStickerFile`
- :code:`from aiogram.methods import UploadStickerFile`
- :code:`from aiogram.methods.upload_sticker_file import UploadStickerFile`
In handlers with current bot
----------------------------

View file

@ -12,7 +12,7 @@ Usage example
.. code-block::
from aiogram import Bot
from aiogram.api.client.session.aiohttp import AiohttpSession
from aiogram.session.aiohttp import AiohttpSession
session = AiohttpSession()
Bot('42:token', session=session)
@ -26,8 +26,9 @@ In order to use AiohttpSession with proxy connector you have to install `aiohttp
Binding session to bot:
.. code-block::
from aiogram import Bot
from aiogram.api.client.session.aiohttp import AiohttpSession
from aiogram.client.session.aiohttp import AiohttpSession
session = AiohttpSession(proxy="protocol://host:port/")
Bot(token="bot token", session=session)
@ -50,7 +51,7 @@ Consider examples:
.. code-block::
from aiohttp import BasicAuth
from aiogram.api.client.session.aiohttp import AiohttpSession
from aiogram.client.session.aiohttp import AiohttpSession
auth = BasicAuth(login="user", password="password")
session = AiohttpSession(proxy=("protocol://host:port", auth))
@ -80,7 +81,7 @@ Example of chain proxies:
.. code-block::
from aiohttp import BasicAuth
from aiogram.api.client.session.aiohttp import AiohttpSession
from aiogram.client.session.aiohttp import AiohttpSession
auth = BasicAuth(login="user", password="password")
session = AiohttpSession(

View file

@ -4,5 +4,5 @@ Base
Abstract session for all client sessions
.. autoclass:: aiogram.api.client.session.base.BaseSession
.. autoclass:: aiogram.client.session.base.BaseSession
:members:

View file

@ -4,7 +4,7 @@ Animation
This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
.. automodule:: aiogram.api.types.animation
.. automodule:: aiogram.types.animation
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ Audio
This object represents an audio file to be treated as music by the Telegram clients.
.. automodule:: aiogram.api.types.audio
.. automodule:: aiogram.types.audio
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ BotCommand
This object represents a bot command.
.. automodule:: aiogram.api.types.bot_command
.. automodule:: aiogram.types.bot_command
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ CallbackGame
A placeholder, currently holds no information. Use BotFather to set up your game.
.. automodule:: aiogram.api.types.callback_game
.. automodule:: aiogram.types.callback_game
:members:
:member-order: bysource
:special-members: __init__

View file

@ -6,7 +6,7 @@ This object represents an incoming callback query from a callback button in an i
NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).
.. automodule:: aiogram.api.types.callback_query
.. automodule:: aiogram.types.callback_query
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ Chat
This object represents a chat.
.. automodule:: aiogram.api.types.chat
.. automodule:: aiogram.types.chat
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ ChatMember
This object contains information about one member of a chat.
.. automodule:: aiogram.api.types.chat_member
.. automodule:: aiogram.types.chat_member
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ ChatPermissions
Describes actions that a non-administrator user is allowed to take in a chat.
.. automodule:: aiogram.api.types.chat_permissions
.. automodule:: aiogram.types.chat_permissions
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ ChatPhoto
This object represents a chat photo.
.. automodule:: aiogram.api.types.chat_photo
.. automodule:: aiogram.types.chat_photo
:members:
:member-order: bysource
:special-members: __init__

View file

@ -6,7 +6,7 @@ Represents a result of an inline query that was chosen by the user and sent to t
Note: It is necessary to enable inline feedback via @Botfather in order to receive these objects in updates.
.. automodule:: aiogram.api.types.chosen_inline_result
.. automodule:: aiogram.types.chosen_inline_result
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ Contact
This object represents a phone contact.
.. automodule:: aiogram.api.types.contact
.. automodule:: aiogram.types.contact
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ Dice
This object represents an animated emoji that displays a random value.
.. automodule:: aiogram.api.types.dice
.. automodule:: aiogram.types.dice
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ Document
This object represents a general file (as opposed to photos, voice messages and audio files).
.. automodule:: aiogram.api.types.document
.. automodule:: aiogram.types.document
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ EncryptedCredentials
Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
.. automodule:: aiogram.api.types.encrypted_credentials
.. automodule:: aiogram.types.encrypted_credentials
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ EncryptedPassportElement
Contains information about documents or other Telegram Passport elements shared with the bot by the user.
.. automodule:: aiogram.api.types.encrypted_passport_element
.. automodule:: aiogram.types.encrypted_passport_element
:members:
:member-order: bysource
:special-members: __init__

View file

@ -6,7 +6,7 @@ This object represents a file ready to be downloaded. The file can be downloaded
Maximum file size to download is 20 MB
.. automodule:: aiogram.api.types.file
.. automodule:: aiogram.types.file
:members:
:member-order: bysource
:special-members: __init__

View file

@ -14,7 +14,7 @@ Guide the user through a step-by-step process. 'Please send me your question', '
The last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions — without any extra work for the user.
.. automodule:: aiogram.api.types.force_reply
.. automodule:: aiogram.types.force_reply
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ Game
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
.. automodule:: aiogram.api.types.game
.. automodule:: aiogram.types.game
:members:
:member-order: bysource
:special-members: __init__

View file

@ -8,7 +8,7 @@ And that's about all we've got for now.
If you've got any questions, please check out our Bot FAQ
.. automodule:: aiogram.api.types.game_high_score
.. automodule:: aiogram.types.game_high_score
:members:
:member-order: bysource
:special-members: __init__

View file

@ -2,7 +2,7 @@
Types
#####
All types is also wrapped with `pydantic <https://pydantic-docs.helpmanual.io/>`_ and placed in `aiogram.api.types` package.
All types is also wrapped with `pydantic <https://pydantic-docs.helpmanual.io/>`_ and placed in `aiogram.types` package.
In this place makes some more differences with official documentations:
- name :attr:`from` was renamed to :attr:`from_user` in due to :attr:`from` is an `keyword in python <https://docs.python.org/3/reference/lexical_analysis.html#keywords>`_

View file

@ -4,7 +4,7 @@ InlineKeyboardButton
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
.. automodule:: aiogram.api.types.inline_keyboard_button
.. automodule:: aiogram.types.inline_keyboard_button
:members:
:member-order: bysource
:special-members: __init__

View file

@ -6,7 +6,7 @@ This object represents an inline keyboard that appears right next to the message
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
.. automodule:: aiogram.api.types.inline_keyboard_markup
.. automodule:: aiogram.types.inline_keyboard_markup
:members:
:member-order: bysource
:special-members: __init__

View file

@ -4,7 +4,7 @@ InlineQuery
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
.. automodule:: aiogram.api.types.inline_query
.. automodule:: aiogram.types.inline_query
:members:
:member-order: bysource
:special-members: __init__

View file

@ -44,7 +44,7 @@ This object represents one result of an inline query. Telegram clients currently
- InlineQueryResultVoice
.. automodule:: aiogram.api.types.inline_query_result
.. automodule:: aiogram.types.inline_query_result
:members:
:member-order: bysource
:special-members: __init__

Some files were not shown because too many files have changed in this diff Show more