diff --git a/aiogram/api/client/base.py b/aiogram/api/client/base.py index 156125e7..4d8b7453 100644 --- a/aiogram/api/client/base.py +++ b/aiogram/api/client/base.py @@ -38,7 +38,7 @@ class BaseBot(ContextInstanceMixin, DataMixin): """ return extract_bot_id(self.__token) - async def emit(self, method: TelegramMethod[T]) -> T: + async def __call__(self, method: TelegramMethod[T]) -> T: """ Call API method diff --git a/aiogram/api/client/bot.py b/aiogram/api/client/bot.py index 644573e6..95dab879 100644 --- a/aiogram/api/client/bot.py +++ b/aiogram/api/client/bot.py @@ -155,7 +155,7 @@ class Bot(BaseBot): call = GetUpdates( offset=offset, limit=limit, timeout=timeout, allowed_updates=allowed_updates ) - return await self.emit(call) + return await self(call) async def set_webhook( self, @@ -205,7 +205,7 @@ class Bot(BaseBot): max_connections=max_connections, allowed_updates=allowed_updates, ) - return await self.emit(call) + return await self(call) async def delete_webhook(self,) -> bool: """ @@ -217,7 +217,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = DeleteWebhook() - return await self.emit(call) + return await self(call) async def get_webhook_info(self,) -> WebhookInfo: """ @@ -231,7 +231,7 @@ class Bot(BaseBot): return an object with the url field empty. """ call = GetWebhookInfo() - return await self.emit(call) + return await self(call) # ============================================================================================= # Group: Available methods @@ -248,7 +248,7 @@ class Bot(BaseBot): :return: Returns basic information about the bot in form of a User object. """ call = GetMe() - return await self.emit(call) + return await self(call) async def send_message( self, @@ -290,7 +290,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def forward_message( self, @@ -319,7 +319,7 @@ class Bot(BaseBot): message_id=message_id, disable_notification=disable_notification, ) - return await self.emit(call) + return await self(call) async def send_photo( self, @@ -365,7 +365,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_audio( self, @@ -432,7 +432,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_document( self, @@ -489,7 +489,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_video( self, @@ -558,7 +558,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_animation( self, @@ -624,7 +624,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_voice( self, @@ -676,7 +676,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_video_note( self, @@ -730,7 +730,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_media_group( self, @@ -760,7 +760,7 @@ class Bot(BaseBot): disable_notification=disable_notification, reply_to_message_id=reply_to_message_id, ) - return await self.emit(call) + return await self(call) async def send_location( self, @@ -802,7 +802,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def edit_message_live_location( self, @@ -842,7 +842,7 @@ class Bot(BaseBot): inline_message_id=inline_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def stop_message_live_location( self, @@ -875,7 +875,7 @@ class Bot(BaseBot): inline_message_id=inline_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_venue( self, @@ -928,7 +928,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_contact( self, @@ -972,7 +972,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_poll( self, @@ -1012,7 +1012,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def send_chat_action(self, chat_id: Union[int, str], action: str) -> bool: """ @@ -1038,7 +1038,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = SendChatAction(chat_id=chat_id, action=action) - return await self.emit(call) + return await self(call) async def get_user_profile_photos( self, user_id: int, offset: Optional[int] = None, limit: Optional[int] = None @@ -1057,7 +1057,7 @@ class Bot(BaseBot): :return: Returns a UserProfilePhotos object. """ call = GetUserProfilePhotos(user_id=user_id, offset=offset, limit=limit) - return await self.emit(call) + return await self(call) async def get_file(self, file_id: str) -> File: """ @@ -1076,7 +1076,7 @@ class Bot(BaseBot): :return: On success, a File object is returned. """ call = GetFile(file_id=file_id) - return await self.emit(call) + return await self(call) async def kick_chat_member( self, @@ -1102,7 +1102,7 @@ class Bot(BaseBot): the group on their own using invite links, etc. Returns True on success. """ call = KickChatMember(chat_id=chat_id, user_id=user_id, until_date=until_date) - return await self.emit(call) + return await self(call) async def unban_chat_member(self, chat_id: Union[int, str], user_id: int) -> bool: """ @@ -1119,7 +1119,7 @@ class Bot(BaseBot): to join via link, etc. Returns True on success. """ call = UnbanChatMember(chat_id=chat_id, user_id=user_id) - return await self.emit(call) + return await self(call) async def restrict_chat_member( self, @@ -1147,7 +1147,7 @@ class Bot(BaseBot): call = RestrictChatMember( chat_id=chat_id, user_id=user_id, permissions=permissions, until_date=until_date ) - return await self.emit(call) + return await self(call) async def promote_chat_member( self, @@ -1203,7 +1203,7 @@ class Bot(BaseBot): can_pin_messages=can_pin_messages, can_promote_members=can_promote_members, ) - return await self.emit(call) + return await self(call) async def set_chat_administrator_custom_title( self, chat_id: Union[int, str], user_id: int, custom_title: str @@ -1224,7 +1224,7 @@ class Bot(BaseBot): call = SetChatAdministratorCustomTitle( chat_id=chat_id, user_id=user_id, custom_title=custom_title ) - return await self.emit(call) + return await self(call) async def set_chat_permissions( self, chat_id: Union[int, str], permissions: ChatPermissions @@ -1242,7 +1242,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = SetChatPermissions(chat_id=chat_id, permissions=permissions) - return await self.emit(call) + return await self(call) async def export_chat_invite_link(self, chat_id: Union[int, str]) -> str: """ @@ -1262,7 +1262,7 @@ class Bot(BaseBot): :return: Returns the new invite link as String on success. """ call = ExportChatInviteLink(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def set_chat_photo(self, chat_id: Union[int, str], photo: InputFile) -> bool: """ @@ -1278,7 +1278,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = SetChatPhoto(chat_id=chat_id, photo=photo) - return await self.emit(call) + return await self(call) async def delete_chat_photo(self, chat_id: Union[int, str]) -> bool: """ @@ -1293,7 +1293,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = DeleteChatPhoto(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def set_chat_title(self, chat_id: Union[int, str], title: str) -> bool: """ @@ -1309,7 +1309,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = SetChatTitle(chat_id=chat_id, title=title) - return await self.emit(call) + return await self(call) async def set_chat_description( self, chat_id: Union[int, str], description: Optional[str] = None @@ -1327,7 +1327,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = SetChatDescription(chat_id=chat_id, description=description) - return await self.emit(call) + return await self(call) async def pin_chat_message( self, @@ -1354,7 +1354,7 @@ class Bot(BaseBot): call = PinChatMessage( chat_id=chat_id, message_id=message_id, disable_notification=disable_notification ) - return await self.emit(call) + return await self(call) async def unpin_chat_message(self, chat_id: Union[int, str]) -> bool: """ @@ -1370,7 +1370,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = UnpinChatMessage(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def leave_chat(self, chat_id: Union[int, str]) -> bool: """ @@ -1384,7 +1384,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = LeaveChat(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def get_chat(self, chat_id: Union[int, str]) -> Chat: """ @@ -1399,7 +1399,7 @@ class Bot(BaseBot): :return: Returns a Chat object on success. """ call = GetChat(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def get_chat_administrators(self, chat_id: Union[int, str]) -> List[ChatMember]: """ @@ -1418,7 +1418,7 @@ class Bot(BaseBot): returned. """ call = GetChatAdministrators(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def get_chat_members_count(self, chat_id: Union[int, str]) -> int: """ @@ -1431,7 +1431,7 @@ class Bot(BaseBot): :return: Returns Int on success. """ call = GetChatMembersCount(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def get_chat_member(self, chat_id: Union[int, str], user_id: int) -> ChatMember: """ @@ -1446,7 +1446,7 @@ class Bot(BaseBot): :return: Returns a ChatMember object on success. """ call = GetChatMember(chat_id=chat_id, user_id=user_id) - return await self.emit(call) + return await self(call) async def set_chat_sticker_set(self, chat_id: Union[int, str], sticker_set_name: str) -> bool: """ @@ -1464,7 +1464,7 @@ class Bot(BaseBot): check if the bot can use this method. Returns True on success. """ call = SetChatStickerSet(chat_id=chat_id, sticker_set_name=sticker_set_name) - return await self.emit(call) + return await self(call) async def delete_chat_sticker_set(self, chat_id: Union[int, str]) -> bool: """ @@ -1481,7 +1481,7 @@ class Bot(BaseBot): check if the bot can use this method. Returns True on success. """ call = DeleteChatStickerSet(chat_id=chat_id) - return await self.emit(call) + return await self(call) async def answer_callback_query( self, @@ -1522,7 +1522,7 @@ class Bot(BaseBot): url=url, cache_time=cache_time, ) - return await self.emit(call) + return await self(call) # ============================================================================================= # Group: Updating messages @@ -1569,7 +1569,7 @@ class Bot(BaseBot): disable_web_page_preview=disable_web_page_preview, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def edit_message_caption( self, @@ -1608,7 +1608,7 @@ class Bot(BaseBot): parse_mode=parse_mode, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def edit_message_media( self, @@ -1647,7 +1647,7 @@ class Bot(BaseBot): inline_message_id=inline_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def edit_message_reply_markup( self, @@ -1679,7 +1679,7 @@ class Bot(BaseBot): inline_message_id=inline_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def stop_poll( self, @@ -1700,7 +1700,7 @@ class Bot(BaseBot): :return: On success, the stopped Poll with the final results is returned. """ call = StopPoll(chat_id=chat_id, message_id=message_id, reply_markup=reply_markup) - return await self.emit(call) + return await self(call) async def delete_message(self, chat_id: Union[int, str], message_id: int) -> bool: """ @@ -1723,7 +1723,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = DeleteMessage(chat_id=chat_id, message_id=message_id) - return await self.emit(call) + return await self(call) # ============================================================================================= # Group: Stickers @@ -1767,7 +1767,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def get_sticker_set(self, name: str) -> StickerSet: """ @@ -1779,7 +1779,7 @@ class Bot(BaseBot): :return: On success, a StickerSet object is returned. """ call = GetStickerSet(name=name) - return await self.emit(call) + return await self(call) async def upload_sticker_file(self, user_id: int, png_sticker: InputFile) -> File: """ @@ -1796,7 +1796,7 @@ class Bot(BaseBot): :return: Returns the uploaded File on success. """ call = UploadStickerFile(user_id=user_id, png_sticker=png_sticker) - return await self.emit(call) + return await self(call) async def create_new_sticker_set( self, @@ -1841,7 +1841,7 @@ class Bot(BaseBot): contains_masks=contains_masks, mask_position=mask_position, ) - return await self.emit(call) + return await self(call) async def add_sticker_to_set( self, @@ -1876,7 +1876,7 @@ class Bot(BaseBot): emojis=emojis, mask_position=mask_position, ) - return await self.emit(call) + return await self(call) async def set_sticker_position_in_set(self, sticker: str, position: int) -> bool: """ @@ -1890,7 +1890,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = SetStickerPositionInSet(sticker=sticker, position=position) - return await self.emit(call) + return await self(call) async def delete_sticker_from_set(self, sticker: str) -> bool: """ @@ -1903,7 +1903,7 @@ class Bot(BaseBot): :return: Returns True on success. """ call = DeleteStickerFromSet(sticker=sticker) - return await self.emit(call) + return await self(call) # ============================================================================================= # Group: Inline mode @@ -1954,7 +1954,7 @@ class Bot(BaseBot): switch_pm_text=switch_pm_text, switch_pm_parameter=switch_pm_parameter, ) - return await self.emit(call) + return await self(call) # ============================================================================================= # Group: Payments @@ -2057,7 +2057,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def answer_shipping_query( self, @@ -2091,7 +2091,7 @@ class Bot(BaseBot): shipping_options=shipping_options, error_message=error_message, ) - return await self.emit(call) + return await self(call) async def answer_pre_checkout_query( self, pre_checkout_query_id: str, ok: bool, error_message: Optional[str] = None @@ -2118,7 +2118,7 @@ class Bot(BaseBot): call = AnswerPreCheckoutQuery( pre_checkout_query_id=pre_checkout_query_id, ok=ok, error_message=error_message ) - return await self.emit(call) + return await self(call) # ============================================================================================= # Group: Telegram Passport @@ -2147,7 +2147,7 @@ class Bot(BaseBot): Returns True on success. """ call = SetPassportDataErrors(user_id=user_id, errors=errors) - return await self.emit(call) + return await self(call) # ============================================================================================= # Group: Games @@ -2185,7 +2185,7 @@ class Bot(BaseBot): reply_to_message_id=reply_to_message_id, reply_markup=reply_markup, ) - return await self.emit(call) + return await self(call) async def set_game_score( self, @@ -2230,7 +2230,7 @@ class Bot(BaseBot): message_id=message_id, inline_message_id=inline_message_id, ) - return await self.emit(call) + return await self(call) async def get_game_high_scores( self, @@ -2268,4 +2268,4 @@ class Bot(BaseBot): message_id=message_id, inline_message_id=inline_message_id, ) - return await self.emit(call) + return await self(call) diff --git a/aiogram/api/methods/base.py b/aiogram/api/methods/base.py index ec4fc9f1..d1a7078e 100644 --- a/aiogram/api/methods/base.py +++ b/aiogram/api/methods/base.py @@ -54,7 +54,7 @@ class TelegramMethod(abc.ABC, BaseModel, Generic[T]): return Response[self.__returning__](**data) # type: ignore async def emit(self, bot: Bot) -> T: - return await bot.emit(self) + return await bot(self) def __await__(self): from aiogram.api.client.bot import Bot diff --git a/docs/api/methods/add_sticker_to_set.md b/docs/api/methods/add_sticker_to_set.md index 26fd5817..b98b85d5 100644 --- a/docs/api/methods/add_sticker_to_set.md +++ b/docs/api/methods/add_sticker_to_set.md @@ -41,24 +41,25 @@ Imports: - `from aiogram.api.methods import AddStickerToSet` - `from aiogram.api.methods.add_sticker_to_set import AddStickerToSet` -#### As reply into Webhook -```python3 -return AddStickerToSet(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(AddStickerToSet(...)) -``` - #### In handlers with current bot ```python3 result: bool = await AddStickerToSet(...) ``` +#### With specific bot +```python3 +result: bool = await bot(AddStickerToSet(...)) +``` +#### As reply into Webhook in handler +```python3 +return AddStickerToSet(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#addstickertoset) -- [aiogram.types.MaskPosition](../types/mask_position.md) - [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.MaskPosition](../types/mask_position.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/answer_callback_query.md b/docs/api/methods/answer_callback_query.md index b9c49ef7..14fe48ff 100644 --- a/docs/api/methods/answer_callback_query.md +++ b/docs/api/methods/answer_callback_query.md @@ -43,21 +43,21 @@ Imports: - `from aiogram.api.methods import AnswerCallbackQuery` - `from aiogram.api.methods.answer_callback_query import AnswerCallbackQuery` -#### As reply into Webhook -```python3 -return AnswerCallbackQuery(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(AnswerCallbackQuery(...)) -``` - #### In handlers with current bot ```python3 result: bool = await AnswerCallbackQuery(...) ``` +#### With specific bot +```python3 +result: bool = await bot(AnswerCallbackQuery(...)) +``` +#### As reply into Webhook in handler +```python3 +return AnswerCallbackQuery(...) +``` + + ## Related pages: diff --git a/docs/api/methods/answer_inline_query.md b/docs/api/methods/answer_inline_query.md index e84bdcb2..819544b1 100644 --- a/docs/api/methods/answer_inline_query.md +++ b/docs/api/methods/answer_inline_query.md @@ -45,21 +45,21 @@ Imports: - `from aiogram.api.methods import AnswerInlineQuery` - `from aiogram.api.methods.answer_inline_query import AnswerInlineQuery` -#### As reply into Webhook -```python3 -return AnswerInlineQuery(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(AnswerInlineQuery(...)) -``` - #### In handlers with current bot ```python3 result: bool = await AnswerInlineQuery(...) ``` +#### With specific bot +```python3 +result: bool = await bot(AnswerInlineQuery(...)) +``` +#### As reply into Webhook in handler +```python3 +return AnswerInlineQuery(...) +``` + + ## Related pages: diff --git a/docs/api/methods/answer_pre_checkout_query.md b/docs/api/methods/answer_pre_checkout_query.md index 7833030f..cbc8cbcd 100644 --- a/docs/api/methods/answer_pre_checkout_query.md +++ b/docs/api/methods/answer_pre_checkout_query.md @@ -39,21 +39,21 @@ Imports: - `from aiogram.api.methods import AnswerPreCheckoutQuery` - `from aiogram.api.methods.answer_pre_checkout_query import AnswerPreCheckoutQuery` -#### As reply into Webhook -```python3 -return AnswerPreCheckoutQuery(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(AnswerPreCheckoutQuery(...)) -``` - #### In handlers with current bot ```python3 result: bool = await AnswerPreCheckoutQuery(...) ``` +#### With specific bot +```python3 +result: bool = await bot(AnswerPreCheckoutQuery(...)) +``` +#### As reply into Webhook in handler +```python3 +return AnswerPreCheckoutQuery(...) +``` + + ## Related pages: diff --git a/docs/api/methods/answer_shipping_query.md b/docs/api/methods/answer_shipping_query.md index d1197cc7..ddf25f0f 100644 --- a/docs/api/methods/answer_shipping_query.md +++ b/docs/api/methods/answer_shipping_query.md @@ -40,21 +40,21 @@ Imports: - `from aiogram.api.methods import AnswerShippingQuery` - `from aiogram.api.methods.answer_shipping_query import AnswerShippingQuery` -#### As reply into Webhook -```python3 -return AnswerShippingQuery(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(AnswerShippingQuery(...)) -``` - #### In handlers with current bot ```python3 result: bool = await AnswerShippingQuery(...) ``` +#### With specific bot +```python3 +result: bool = await bot(AnswerShippingQuery(...)) +``` +#### As reply into Webhook in handler +```python3 +return AnswerShippingQuery(...) +``` + + ## Related pages: diff --git a/docs/api/methods/create_new_sticker_set.md b/docs/api/methods/create_new_sticker_set.md index 11c43d94..8e9ada88 100644 --- a/docs/api/methods/create_new_sticker_set.md +++ b/docs/api/methods/create_new_sticker_set.md @@ -43,24 +43,25 @@ Imports: - `from aiogram.api.methods import CreateNewStickerSet` - `from aiogram.api.methods.create_new_sticker_set import CreateNewStickerSet` -#### As reply into Webhook -```python3 -return CreateNewStickerSet(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(CreateNewStickerSet(...)) -``` - #### In handlers with current bot ```python3 result: bool = await CreateNewStickerSet(...) ``` +#### With specific bot +```python3 +result: bool = await bot(CreateNewStickerSet(...)) +``` +#### As reply into Webhook in handler +```python3 +return CreateNewStickerSet(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#createnewstickerset) -- [aiogram.types.MaskPosition](../types/mask_position.md) - [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.MaskPosition](../types/mask_position.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/delete_chat_photo.md b/docs/api/methods/delete_chat_photo.md index 0eedbe36..cfe0b7d4 100644 --- a/docs/api/methods/delete_chat_photo.md +++ b/docs/api/methods/delete_chat_photo.md @@ -37,21 +37,21 @@ Imports: - `from aiogram.api.methods import DeleteChatPhoto` - `from aiogram.api.methods.delete_chat_photo import DeleteChatPhoto` -#### As reply into Webhook -```python3 -return DeleteChatPhoto(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(DeleteChatPhoto(...)) -``` - #### In handlers with current bot ```python3 result: bool = await DeleteChatPhoto(...) ``` +#### With specific bot +```python3 +result: bool = await bot(DeleteChatPhoto(...)) +``` +#### As reply into Webhook in handler +```python3 +return DeleteChatPhoto(...) +``` + + ## Related pages: diff --git a/docs/api/methods/delete_chat_sticker_set.md b/docs/api/methods/delete_chat_sticker_set.md index 266a53b7..083f4bdd 100644 --- a/docs/api/methods/delete_chat_sticker_set.md +++ b/docs/api/methods/delete_chat_sticker_set.md @@ -37,21 +37,21 @@ Imports: - `from aiogram.api.methods import DeleteChatStickerSet` - `from aiogram.api.methods.delete_chat_sticker_set import DeleteChatStickerSet` -#### As reply into Webhook -```python3 -return DeleteChatStickerSet(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(DeleteChatStickerSet(...)) -``` - #### In handlers with current bot ```python3 result: bool = await DeleteChatStickerSet(...) ``` +#### With specific bot +```python3 +result: bool = await bot(DeleteChatStickerSet(...)) +``` +#### As reply into Webhook in handler +```python3 +return DeleteChatStickerSet(...) +``` + + ## Related pages: diff --git a/docs/api/methods/delete_message.md b/docs/api/methods/delete_message.md index 273c07de..fc50f66e 100644 --- a/docs/api/methods/delete_message.md +++ b/docs/api/methods/delete_message.md @@ -52,21 +52,21 @@ Imports: - `from aiogram.api.methods import DeleteMessage` - `from aiogram.api.methods.delete_message import DeleteMessage` -#### As reply into Webhook -```python3 -return DeleteMessage(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(DeleteMessage(...)) -``` - #### In handlers with current bot ```python3 result: bool = await DeleteMessage(...) ``` +#### With specific bot +```python3 +result: bool = await bot(DeleteMessage(...)) +``` +#### As reply into Webhook in handler +```python3 +return DeleteMessage(...) +``` + + ## Related pages: diff --git a/docs/api/methods/delete_sticker_from_set.md b/docs/api/methods/delete_sticker_from_set.md index 40f99276..4b6dcfd3 100644 --- a/docs/api/methods/delete_sticker_from_set.md +++ b/docs/api/methods/delete_sticker_from_set.md @@ -37,21 +37,21 @@ Imports: - `from aiogram.api.methods import DeleteStickerFromSet` - `from aiogram.api.methods.delete_sticker_from_set import DeleteStickerFromSet` -#### As reply into Webhook -```python3 -return DeleteStickerFromSet(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(DeleteStickerFromSet(...)) -``` - #### In handlers with current bot ```python3 result: bool = await DeleteStickerFromSet(...) ``` +#### With specific bot +```python3 +result: bool = await bot(DeleteStickerFromSet(...)) +``` +#### As reply into Webhook in handler +```python3 +return DeleteStickerFromSet(...) +``` + + ## Related pages: diff --git a/docs/api/methods/delete_webhook.md b/docs/api/methods/delete_webhook.md index cfc78ac2..e4584685 100644 --- a/docs/api/methods/delete_webhook.md +++ b/docs/api/methods/delete_webhook.md @@ -33,18 +33,18 @@ Imports: #### As reply into Webhook ```python3 -return DeleteWebhook(...) +result: bool = await DeleteWebhook(...) ``` #### With specific bot ```python3 -result: bool = await bot.emit(DeleteWebhook(...)) +result: bool = await bot(DeleteWebhook(...)) +``` +#### As reply into Webhook in handler +```python3 +return DeleteWebhook(...) ``` -#### In handlers with current bot -```python3 -result: bool = await DeleteWebhook(...) -``` ## Related pages: diff --git a/docs/api/methods/edit_message_caption.md b/docs/api/methods/edit_message_caption.md index 06f1f31e..cdaecdae 100644 --- a/docs/api/methods/edit_message_caption.md +++ b/docs/api/methods/edit_message_caption.md @@ -42,21 +42,21 @@ Imports: - `from aiogram.api.methods import EditMessageCaption` - `from aiogram.api.methods.edit_message_caption import EditMessageCaption` -#### As reply into Webhook -```python3 -return EditMessageCaption(...) -``` - -#### With specific bot -```python3 -result: Union[Message, bool] = await bot.emit(EditMessageCaption(...)) -``` - #### In handlers with current bot ```python3 result: Union[Message, bool] = await EditMessageCaption(...) ``` +#### With specific bot +```python3 +result: Union[Message, bool] = await bot(EditMessageCaption(...)) +``` +#### As reply into Webhook in handler +```python3 +return EditMessageCaption(...) +``` + + ## Related pages: diff --git a/docs/api/methods/edit_message_live_location.md b/docs/api/methods/edit_message_live_location.md index 2ffaab42..e3a9ff39 100644 --- a/docs/api/methods/edit_message_live_location.md +++ b/docs/api/methods/edit_message_live_location.md @@ -42,21 +42,21 @@ Imports: - `from aiogram.api.methods import EditMessageLiveLocation` - `from aiogram.api.methods.edit_message_live_location import EditMessageLiveLocation` -#### As reply into Webhook -```python3 -return EditMessageLiveLocation(...) -``` - -#### With specific bot -```python3 -result: Union[Message, bool] = await bot.emit(EditMessageLiveLocation(...)) -``` - #### In handlers with current bot ```python3 result: Union[Message, bool] = await EditMessageLiveLocation(...) ``` +#### With specific bot +```python3 +result: Union[Message, bool] = await bot(EditMessageLiveLocation(...)) +``` +#### As reply into Webhook in handler +```python3 +return EditMessageLiveLocation(...) +``` + + ## Related pages: diff --git a/docs/api/methods/edit_message_media.md b/docs/api/methods/edit_message_media.md index 60b255db..5d25baa5 100644 --- a/docs/api/methods/edit_message_media.md +++ b/docs/api/methods/edit_message_media.md @@ -41,21 +41,21 @@ Imports: - `from aiogram.api.methods import EditMessageMedia` - `from aiogram.api.methods.edit_message_media import EditMessageMedia` -#### As reply into Webhook -```python3 -return EditMessageMedia(...) -``` - -#### With specific bot -```python3 -result: Union[Message, bool] = await bot.emit(EditMessageMedia(...)) -``` - #### In handlers with current bot ```python3 result: Union[Message, bool] = await EditMessageMedia(...) ``` +#### With specific bot +```python3 +result: Union[Message, bool] = await bot(EditMessageMedia(...)) +``` +#### As reply into Webhook in handler +```python3 +return EditMessageMedia(...) +``` + + ## Related pages: diff --git a/docs/api/methods/edit_message_reply_markup.md b/docs/api/methods/edit_message_reply_markup.md index 16cb8b37..efbda5aa 100644 --- a/docs/api/methods/edit_message_reply_markup.md +++ b/docs/api/methods/edit_message_reply_markup.md @@ -40,21 +40,21 @@ Imports: - `from aiogram.api.methods import EditMessageReplyMarkup` - `from aiogram.api.methods.edit_message_reply_markup import EditMessageReplyMarkup` -#### As reply into Webhook -```python3 -return EditMessageReplyMarkup(...) -``` - -#### With specific bot -```python3 -result: Union[Message, bool] = await bot.emit(EditMessageReplyMarkup(...)) -``` - #### In handlers with current bot ```python3 result: Union[Message, bool] = await EditMessageReplyMarkup(...) ``` +#### With specific bot +```python3 +result: Union[Message, bool] = await bot(EditMessageReplyMarkup(...)) +``` +#### As reply into Webhook in handler +```python3 +return EditMessageReplyMarkup(...) +``` + + ## Related pages: diff --git a/docs/api/methods/edit_message_text.md b/docs/api/methods/edit_message_text.md index 7d65e8c5..6fa574c9 100644 --- a/docs/api/methods/edit_message_text.md +++ b/docs/api/methods/edit_message_text.md @@ -43,21 +43,21 @@ Imports: - `from aiogram.api.methods import EditMessageText` - `from aiogram.api.methods.edit_message_text import EditMessageText` -#### As reply into Webhook -```python3 -return EditMessageText(...) -``` - -#### With specific bot -```python3 -result: Union[Message, bool] = await bot.emit(EditMessageText(...)) -``` - #### In handlers with current bot ```python3 result: Union[Message, bool] = await EditMessageText(...) ``` +#### With specific bot +```python3 +result: Union[Message, bool] = await bot(EditMessageText(...)) +``` +#### As reply into Webhook in handler +```python3 +return EditMessageText(...) +``` + + ## Related pages: diff --git a/docs/api/methods/export_chat_invite_link.md b/docs/api/methods/export_chat_invite_link.md index 4c696a28..8fc0d888 100644 --- a/docs/api/methods/export_chat_invite_link.md +++ b/docs/api/methods/export_chat_invite_link.md @@ -39,21 +39,21 @@ Imports: - `from aiogram.api.methods import ExportChatInviteLink` - `from aiogram.api.methods.export_chat_invite_link import ExportChatInviteLink` -#### As reply into Webhook -```python3 -return ExportChatInviteLink(...) -``` - -#### With specific bot -```python3 -result: str = await bot.emit(ExportChatInviteLink(...)) -``` - #### In handlers with current bot ```python3 result: str = await ExportChatInviteLink(...) ``` +#### With specific bot +```python3 +result: str = await bot(ExportChatInviteLink(...)) +``` +#### As reply into Webhook in handler +```python3 +return ExportChatInviteLink(...) +``` + + ## Related pages: diff --git a/docs/api/methods/forward_message.md b/docs/api/methods/forward_message.md index 60e5bf20..755d4b43 100644 --- a/docs/api/methods/forward_message.md +++ b/docs/api/methods/forward_message.md @@ -40,21 +40,21 @@ Imports: - `from aiogram.api.methods import ForwardMessage` - `from aiogram.api.methods.forward_message import ForwardMessage` -#### As reply into Webhook -```python3 -return ForwardMessage(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(ForwardMessage(...)) -``` - #### In handlers with current bot ```python3 result: Message = await ForwardMessage(...) ``` +#### With specific bot +```python3 +result: Message = await bot(ForwardMessage(...)) +``` +#### As reply into Webhook in handler +```python3 +return ForwardMessage(...) +``` + + ## Related pages: diff --git a/docs/api/methods/get_chat.md b/docs/api/methods/get_chat.md index fa55a5f5..c216afa2 100644 --- a/docs/api/methods/get_chat.md +++ b/docs/api/methods/get_chat.md @@ -37,17 +37,17 @@ Imports: - `from aiogram.api.methods import GetChat` - `from aiogram.api.methods.get_chat import GetChat` - -#### With specific bot -```python3 -result: Chat = await bot.emit(GetChat(...)) -``` - #### In handlers with current bot ```python3 result: Chat = await GetChat(...) ``` +#### With specific bot +```python3 +result: Chat = await bot(GetChat(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_chat_administrators.md b/docs/api/methods/get_chat_administrators.md index 37481883..d7047f7e 100644 --- a/docs/api/methods/get_chat_administrators.md +++ b/docs/api/methods/get_chat_administrators.md @@ -37,17 +37,17 @@ Imports: - `from aiogram.api.methods import GetChatAdministrators` - `from aiogram.api.methods.get_chat_administrators import GetChatAdministrators` - -#### With specific bot -```python3 -result: List[ChatMember] = await bot.emit(GetChatAdministrators(...)) -``` - #### In handlers with current bot ```python3 result: List[ChatMember] = await GetChatAdministrators(...) ``` +#### With specific bot +```python3 +result: List[ChatMember] = await bot(GetChatAdministrators(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_chat_member.md b/docs/api/methods/get_chat_member.md index 761c253b..2198e1fe 100644 --- a/docs/api/methods/get_chat_member.md +++ b/docs/api/methods/get_chat_member.md @@ -38,17 +38,17 @@ Imports: - `from aiogram.api.methods import GetChatMember` - `from aiogram.api.methods.get_chat_member import GetChatMember` - -#### With specific bot -```python3 -result: ChatMember = await bot.emit(GetChatMember(...)) -``` - #### In handlers with current bot ```python3 result: ChatMember = await GetChatMember(...) ``` +#### With specific bot +```python3 +result: ChatMember = await bot(GetChatMember(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_chat_members_count.md b/docs/api/methods/get_chat_members_count.md index 6c85e74d..e1cb3312 100644 --- a/docs/api/methods/get_chat_members_count.md +++ b/docs/api/methods/get_chat_members_count.md @@ -37,17 +37,17 @@ Imports: - `from aiogram.api.methods import GetChatMembersCount` - `from aiogram.api.methods.get_chat_members_count import GetChatMembersCount` - -#### With specific bot -```python3 -result: int = await bot.emit(GetChatMembersCount(...)) -``` - #### In handlers with current bot ```python3 result: int = await GetChatMembersCount(...) ``` +#### With specific bot +```python3 +result: int = await bot(GetChatMembersCount(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_file.md b/docs/api/methods/get_file.md index b89910d9..c449135b 100644 --- a/docs/api/methods/get_file.md +++ b/docs/api/methods/get_file.md @@ -39,17 +39,17 @@ Imports: - `from aiogram.api.methods import GetFile` - `from aiogram.api.methods.get_file import GetFile` - -#### With specific bot -```python3 -result: File = await bot.emit(GetFile(...)) -``` - #### In handlers with current bot ```python3 result: File = await GetFile(...) ``` +#### With specific bot +```python3 +result: File = await bot(GetFile(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_game_high_scores.md b/docs/api/methods/get_game_high_scores.md index 1055d672..b97514c6 100644 --- a/docs/api/methods/get_game_high_scores.md +++ b/docs/api/methods/get_game_high_scores.md @@ -42,17 +42,17 @@ Imports: - `from aiogram.api.methods import GetGameHighScores` - `from aiogram.api.methods.get_game_high_scores import GetGameHighScores` - -#### With specific bot -```python3 -result: List[GameHighScore] = await bot.emit(GetGameHighScores(...)) -``` - #### In handlers with current bot ```python3 result: List[GameHighScore] = await GetGameHighScores(...) ``` +#### With specific bot +```python3 +result: List[GameHighScore] = await bot(GetGameHighScores(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_me.md b/docs/api/methods/get_me.md index d57ccf11..b2994f25 100644 --- a/docs/api/methods/get_me.md +++ b/docs/api/methods/get_me.md @@ -31,17 +31,17 @@ Imports: - `from aiogram.api.methods import GetMe` - `from aiogram.api.methods.get_me import GetMe` - -#### With specific bot -```python3 -result: User = await bot.emit(GetMe(...)) -``` - #### In handlers with current bot ```python3 result: User = await GetMe(...) ``` +#### With specific bot +```python3 +result: User = await bot(GetMe(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_sticker_set.md b/docs/api/methods/get_sticker_set.md index 7c4fed19..983f1331 100644 --- a/docs/api/methods/get_sticker_set.md +++ b/docs/api/methods/get_sticker_set.md @@ -37,17 +37,17 @@ Imports: - `from aiogram.api.methods import GetStickerSet` - `from aiogram.api.methods.get_sticker_set import GetStickerSet` - -#### With specific bot -```python3 -result: StickerSet = await bot.emit(GetStickerSet(...)) -``` - #### In handlers with current bot ```python3 result: StickerSet = await GetStickerSet(...) ``` +#### With specific bot +```python3 +result: StickerSet = await bot(GetStickerSet(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_updates.md b/docs/api/methods/get_updates.md index 3ca4ac18..ed5481b7 100644 --- a/docs/api/methods/get_updates.md +++ b/docs/api/methods/get_updates.md @@ -46,17 +46,17 @@ Imports: - `from aiogram.api.methods import GetUpdates` - `from aiogram.api.methods.get_updates import GetUpdates` - -#### With specific bot -```python3 -result: List[Update] = await bot.emit(GetUpdates(...)) -``` - #### In handlers with current bot ```python3 result: List[Update] = await GetUpdates(...) ``` +#### With specific bot +```python3 +result: List[Update] = await bot(GetUpdates(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_user_profile_photos.md b/docs/api/methods/get_user_profile_photos.md index 082cb73c..0b69b59d 100644 --- a/docs/api/methods/get_user_profile_photos.md +++ b/docs/api/methods/get_user_profile_photos.md @@ -39,17 +39,17 @@ Imports: - `from aiogram.api.methods import GetUserProfilePhotos` - `from aiogram.api.methods.get_user_profile_photos import GetUserProfilePhotos` - -#### With specific bot -```python3 -result: UserProfilePhotos = await bot.emit(GetUserProfilePhotos(...)) -``` - #### In handlers with current bot ```python3 result: UserProfilePhotos = await GetUserProfilePhotos(...) ``` +#### With specific bot +```python3 +result: UserProfilePhotos = await bot(GetUserProfilePhotos(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/get_webhook_info.md b/docs/api/methods/get_webhook_info.md index c6868a40..2428a6af 100644 --- a/docs/api/methods/get_webhook_info.md +++ b/docs/api/methods/get_webhook_info.md @@ -31,17 +31,17 @@ Imports: - `from aiogram.api.methods import GetWebhookInfo` - `from aiogram.api.methods.get_webhook_info import GetWebhookInfo` - -#### With specific bot -```python3 -result: WebhookInfo = await bot.emit(GetWebhookInfo(...)) -``` - #### In handlers with current bot ```python3 result: WebhookInfo = await GetWebhookInfo(...) ``` +#### With specific bot +```python3 +result: WebhookInfo = await bot(GetWebhookInfo(...)) +``` + + ## Related pages: diff --git a/docs/api/methods/kick_chat_member.md b/docs/api/methods/kick_chat_member.md index c8d0b811..0a475e03 100644 --- a/docs/api/methods/kick_chat_member.md +++ b/docs/api/methods/kick_chat_member.md @@ -39,21 +39,21 @@ Imports: - `from aiogram.api.methods import KickChatMember` - `from aiogram.api.methods.kick_chat_member import KickChatMember` -#### As reply into Webhook -```python3 -return KickChatMember(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(KickChatMember(...)) -``` - #### In handlers with current bot ```python3 result: bool = await KickChatMember(...) ``` +#### With specific bot +```python3 +result: bool = await bot(KickChatMember(...)) +``` +#### As reply into Webhook in handler +```python3 +return KickChatMember(...) +``` + + ## Related pages: diff --git a/docs/api/methods/leave_chat.md b/docs/api/methods/leave_chat.md index b8f980f3..284c72f1 100644 --- a/docs/api/methods/leave_chat.md +++ b/docs/api/methods/leave_chat.md @@ -37,21 +37,21 @@ Imports: - `from aiogram.api.methods import LeaveChat` - `from aiogram.api.methods.leave_chat import LeaveChat` -#### As reply into Webhook -```python3 -return LeaveChat(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(LeaveChat(...)) -``` - #### In handlers with current bot ```python3 result: bool = await LeaveChat(...) ``` +#### With specific bot +```python3 +result: bool = await bot(LeaveChat(...)) +``` +#### As reply into Webhook in handler +```python3 +return LeaveChat(...) +``` + + ## Related pages: diff --git a/docs/api/methods/pin_chat_message.md b/docs/api/methods/pin_chat_message.md index b94f86ed..1d9fd53e 100644 --- a/docs/api/methods/pin_chat_message.md +++ b/docs/api/methods/pin_chat_message.md @@ -39,21 +39,21 @@ Imports: - `from aiogram.api.methods import PinChatMessage` - `from aiogram.api.methods.pin_chat_message import PinChatMessage` -#### As reply into Webhook -```python3 -return PinChatMessage(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(PinChatMessage(...)) -``` - #### In handlers with current bot ```python3 result: bool = await PinChatMessage(...) ``` +#### With specific bot +```python3 +result: bool = await bot(PinChatMessage(...)) +``` +#### As reply into Webhook in handler +```python3 +return PinChatMessage(...) +``` + + ## Related pages: diff --git a/docs/api/methods/promote_chat_member.md b/docs/api/methods/promote_chat_member.md index 8b031cec..e2fd6202 100644 --- a/docs/api/methods/promote_chat_member.md +++ b/docs/api/methods/promote_chat_member.md @@ -46,21 +46,21 @@ Imports: - `from aiogram.api.methods import PromoteChatMember` - `from aiogram.api.methods.promote_chat_member import PromoteChatMember` -#### As reply into Webhook -```python3 -return PromoteChatMember(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(PromoteChatMember(...)) -``` - #### In handlers with current bot ```python3 result: bool = await PromoteChatMember(...) ``` +#### With specific bot +```python3 +result: bool = await bot(PromoteChatMember(...)) +``` +#### As reply into Webhook in handler +```python3 +return PromoteChatMember(...) +``` + + ## Related pages: diff --git a/docs/api/methods/restrict_chat_member.md b/docs/api/methods/restrict_chat_member.md index a03725cc..fa438eb9 100644 --- a/docs/api/methods/restrict_chat_member.md +++ b/docs/api/methods/restrict_chat_member.md @@ -40,21 +40,21 @@ Imports: - `from aiogram.api.methods import RestrictChatMember` - `from aiogram.api.methods.restrict_chat_member import RestrictChatMember` -#### As reply into Webhook -```python3 -return RestrictChatMember(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(RestrictChatMember(...)) -``` - #### In handlers with current bot ```python3 result: bool = await RestrictChatMember(...) ``` +#### With specific bot +```python3 +result: bool = await bot(RestrictChatMember(...)) +``` +#### As reply into Webhook in handler +```python3 +return RestrictChatMember(...) +``` + + ## Related pages: diff --git a/docs/api/methods/send_animation.md b/docs/api/methods/send_animation.md index fac7d9c3..3ea76968 100644 --- a/docs/api/methods/send_animation.md +++ b/docs/api/methods/send_animation.md @@ -47,28 +47,29 @@ Imports: - `from aiogram.api.methods import SendAnimation` - `from aiogram.api.methods.send_animation import SendAnimation` -#### As reply into Webhook -```python3 -return SendAnimation(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendAnimation(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendAnimation(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendAnimation(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendAnimation(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendanimation) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/send_audio.md b/docs/api/methods/send_audio.md index fdeb29f1..1aadc59d 100644 --- a/docs/api/methods/send_audio.md +++ b/docs/api/methods/send_audio.md @@ -49,28 +49,29 @@ Imports: - `from aiogram.api.methods import SendAudio` - `from aiogram.api.methods.send_audio import SendAudio` -#### As reply into Webhook -```python3 -return SendAudio(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendAudio(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendAudio(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendAudio(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendAudio(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendaudio) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/send_chat_action.md b/docs/api/methods/send_chat_action.md index 1dfab03b..59e23a75 100644 --- a/docs/api/methods/send_chat_action.md +++ b/docs/api/methods/send_chat_action.md @@ -42,21 +42,21 @@ Imports: - `from aiogram.api.methods import SendChatAction` - `from aiogram.api.methods.send_chat_action import SendChatAction` -#### As reply into Webhook -```python3 -return SendChatAction(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SendChatAction(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SendChatAction(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SendChatAction(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendChatAction(...) +``` + + ## Related pages: diff --git a/docs/api/methods/send_contact.md b/docs/api/methods/send_contact.md index 3f67e608..b9de4bcf 100644 --- a/docs/api/methods/send_contact.md +++ b/docs/api/methods/send_contact.md @@ -44,27 +44,27 @@ Imports: - `from aiogram.api.methods import SendContact` - `from aiogram.api.methods.send_contact import SendContact` -#### As reply into Webhook -```python3 -return SendContact(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendContact(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendContact(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendContact(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendContact(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendcontact) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) diff --git a/docs/api/methods/send_document.md b/docs/api/methods/send_document.md index 9fd71e38..9b0134b8 100644 --- a/docs/api/methods/send_document.md +++ b/docs/api/methods/send_document.md @@ -44,28 +44,29 @@ Imports: - `from aiogram.api.methods import SendDocument` - `from aiogram.api.methods.send_document import SendDocument` -#### As reply into Webhook -```python3 -return SendDocument(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendDocument(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendDocument(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendDocument(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendDocument(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#senddocument) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/send_game.md b/docs/api/methods/send_game.md index 85901bff..47b66405 100644 --- a/docs/api/methods/send_game.md +++ b/docs/api/methods/send_game.md @@ -41,21 +41,21 @@ Imports: - `from aiogram.api.methods import SendGame` - `from aiogram.api.methods.send_game import SendGame` -#### As reply into Webhook -```python3 -return SendGame(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendGame(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendGame(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendGame(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendGame(...) +``` + + ## Related pages: diff --git a/docs/api/methods/send_invoice.md b/docs/api/methods/send_invoice.md index f9cc8023..ce8d6346 100644 --- a/docs/api/methods/send_invoice.md +++ b/docs/api/methods/send_invoice.md @@ -59,25 +59,25 @@ Imports: - `from aiogram.api.methods import SendInvoice` - `from aiogram.api.methods.send_invoice import SendInvoice` -#### As reply into Webhook -```python3 -return SendInvoice(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendInvoice(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendInvoice(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendInvoice(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendInvoice(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendinvoice) -- [aiogram.types.LabeledPrice](../types/labeled_price.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.LabeledPrice](../types/labeled_price.md) - [aiogram.types.Message](../types/message.md) diff --git a/docs/api/methods/send_location.md b/docs/api/methods/send_location.md index eaa88ed7..26b6d72b 100644 --- a/docs/api/methods/send_location.md +++ b/docs/api/methods/send_location.md @@ -43,27 +43,27 @@ Imports: - `from aiogram.api.methods import SendLocation` - `from aiogram.api.methods.send_location import SendLocation` -#### As reply into Webhook -```python3 -return SendLocation(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendLocation(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendLocation(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendLocation(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendLocation(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendlocation) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) diff --git a/docs/api/methods/send_media_group.md b/docs/api/methods/send_media_group.md index a291d489..522a849b 100644 --- a/docs/api/methods/send_media_group.md +++ b/docs/api/methods/send_media_group.md @@ -40,21 +40,21 @@ Imports: - `from aiogram.api.methods import SendMediaGroup` - `from aiogram.api.methods.send_media_group import SendMediaGroup` -#### As reply into Webhook -```python3 -return SendMediaGroup(...) -``` - -#### With specific bot -```python3 -result: List[Message] = await bot.emit(SendMediaGroup(...)) -``` - #### In handlers with current bot ```python3 result: List[Message] = await SendMediaGroup(...) ``` +#### With specific bot +```python3 +result: List[Message] = await bot(SendMediaGroup(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendMediaGroup(...) +``` + + ## Related pages: diff --git a/docs/api/methods/send_message.md b/docs/api/methods/send_message.md index c3a8bfbc..bb1137df 100644 --- a/docs/api/methods/send_message.md +++ b/docs/api/methods/send_message.md @@ -43,27 +43,27 @@ Imports: - `from aiogram.api.methods import SendMessage` - `from aiogram.api.methods.send_message import SendMessage` -#### As reply into Webhook -```python3 -return SendMessage(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendMessage(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendMessage(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendMessage(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendMessage(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendmessage) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) diff --git a/docs/api/methods/send_photo.md b/docs/api/methods/send_photo.md index 275c4b8b..e52f8bf8 100644 --- a/docs/api/methods/send_photo.md +++ b/docs/api/methods/send_photo.md @@ -43,28 +43,29 @@ Imports: - `from aiogram.api.methods import SendPhoto` - `from aiogram.api.methods.send_photo import SendPhoto` -#### As reply into Webhook -```python3 -return SendPhoto(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendPhoto(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendPhoto(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendPhoto(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendPhoto(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendphoto) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/send_poll.md b/docs/api/methods/send_poll.md index cc3c4f58..7583603b 100644 --- a/docs/api/methods/send_poll.md +++ b/docs/api/methods/send_poll.md @@ -42,27 +42,27 @@ Imports: - `from aiogram.api.methods import SendPoll` - `from aiogram.api.methods.send_poll import SendPoll` -#### As reply into Webhook -```python3 -return SendPoll(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendPoll(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendPoll(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendPoll(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendPoll(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendpoll) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) diff --git a/docs/api/methods/send_sticker.md b/docs/api/methods/send_sticker.md index ccbb5638..2195256d 100644 --- a/docs/api/methods/send_sticker.md +++ b/docs/api/methods/send_sticker.md @@ -41,28 +41,29 @@ Imports: - `from aiogram.api.methods import SendSticker` - `from aiogram.api.methods.send_sticker import SendSticker` -#### As reply into Webhook -```python3 -return SendSticker(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendSticker(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendSticker(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendSticker(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendSticker(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendsticker) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/send_venue.md b/docs/api/methods/send_venue.md index a83ba2db..95509b55 100644 --- a/docs/api/methods/send_venue.md +++ b/docs/api/methods/send_venue.md @@ -46,27 +46,27 @@ Imports: - `from aiogram.api.methods import SendVenue` - `from aiogram.api.methods.send_venue import SendVenue` -#### As reply into Webhook -```python3 -return SendVenue(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendVenue(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendVenue(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendVenue(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendVenue(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendvenue) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) diff --git a/docs/api/methods/send_video.md b/docs/api/methods/send_video.md index 76582afb..1cd459f8 100644 --- a/docs/api/methods/send_video.md +++ b/docs/api/methods/send_video.md @@ -48,28 +48,29 @@ Imports: - `from aiogram.api.methods import SendVideo` - `from aiogram.api.methods.send_video import SendVideo` -#### As reply into Webhook -```python3 -return SendVideo(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendVideo(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendVideo(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendVideo(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendVideo(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendvideo) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/send_video_note.md b/docs/api/methods/send_video_note.md index 04fb05c3..d2e60ff9 100644 --- a/docs/api/methods/send_video_note.md +++ b/docs/api/methods/send_video_note.md @@ -44,28 +44,29 @@ Imports: - `from aiogram.api.methods import SendVideoNote` - `from aiogram.api.methods.send_video_note import SendVideoNote` -#### As reply into Webhook -```python3 -return SendVideoNote(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendVideoNote(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendVideoNote(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendVideoNote(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendVideoNote(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendvideonote) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/send_voice.md b/docs/api/methods/send_voice.md index f99655b0..f71790fd 100644 --- a/docs/api/methods/send_voice.md +++ b/docs/api/methods/send_voice.md @@ -44,28 +44,29 @@ Imports: - `from aiogram.api.methods import SendVoice` - `from aiogram.api.methods.send_voice import SendVoice` -#### As reply into Webhook -```python3 -return SendVoice(...) -``` - -#### With specific bot -```python3 -result: Message = await bot.emit(SendVoice(...)) -``` - #### In handlers with current bot ```python3 result: Message = await SendVoice(...) ``` +#### With specific bot +```python3 +result: Message = await bot(SendVoice(...)) +``` +#### As reply into Webhook in handler +```python3 +return SendVoice(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#sendvoice) - [aiogram.types.ForceReply](../types/force_reply.md) -- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) -- [aiogram.types.Message](../types/message.md) -- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [aiogram.types.Message](../types/message.md) +- [aiogram.types.ReplyKeyboardMarkup](../types/reply_keyboard_markup.md) +- [aiogram.types.ReplyKeyboardRemove](../types/reply_keyboard_remove.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/set_chat_administrator_custom_title.md b/docs/api/methods/set_chat_administrator_custom_title.md new file mode 100644 index 00000000..dd301d2f --- /dev/null +++ b/docs/api/methods/set_chat_administrator_custom_title.md @@ -0,0 +1,60 @@ +# setChatAdministratorCustomTitle + +## Description + +Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. + + +## Arguments + +| Name | Type | Description | +| - | - | - | +| `chat_id` | `#!python3 Union[int, str]` | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) | +| `user_id` | `#!python3 int` | Unique identifier of the target user | +| `custom_title` | `#!python3 str` | New custom title for the administrator; 0-16 characters, emoji are not allowed | + + + +## Response + +Type: `#!python3 bool` + +Description: Returns True on success. + + +## Usage + + +### As bot method bot + +```python3 +result: bool = await bot.set_chat_administrator_custom_title(...) +``` + +### Method as object + +Imports: + +- `from aiogram.methods import SetChatAdministratorCustomTitle` +- `from aiogram.api.methods import SetChatAdministratorCustomTitle` +- `from aiogram.api.methods.set_chat_administrator_custom_title import SetChatAdministratorCustomTitle` + +#### In handlers with current bot +```python3 +result: bool = await SetChatAdministratorCustomTitle(...) +``` + +#### With specific bot +```python3 +result: bool = await bot(SetChatAdministratorCustomTitle(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetChatAdministratorCustomTitle(...) +``` + + + +## Related pages: + +- [Official documentation](https://core.telegram.org/bots/api#setchatadministratorcustomtitle) diff --git a/docs/api/methods/set_chat_description.md b/docs/api/methods/set_chat_description.md index 837a100b..ce555f3f 100644 --- a/docs/api/methods/set_chat_description.md +++ b/docs/api/methods/set_chat_description.md @@ -38,21 +38,21 @@ Imports: - `from aiogram.api.methods import SetChatDescription` - `from aiogram.api.methods.set_chat_description import SetChatDescription` -#### As reply into Webhook -```python3 -return SetChatDescription(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetChatDescription(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetChatDescription(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetChatDescription(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetChatDescription(...) +``` + + ## Related pages: diff --git a/docs/api/methods/set_chat_permissions.md b/docs/api/methods/set_chat_permissions.md index d97c23ad..3f975e51 100644 --- a/docs/api/methods/set_chat_permissions.md +++ b/docs/api/methods/set_chat_permissions.md @@ -38,21 +38,21 @@ Imports: - `from aiogram.api.methods import SetChatPermissions` - `from aiogram.api.methods.set_chat_permissions import SetChatPermissions` -#### As reply into Webhook -```python3 -return SetChatPermissions(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetChatPermissions(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetChatPermissions(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetChatPermissions(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetChatPermissions(...) +``` + + ## Related pages: diff --git a/docs/api/methods/set_chat_photo.md b/docs/api/methods/set_chat_photo.md index 5c9c8167..8d17dc21 100644 --- a/docs/api/methods/set_chat_photo.md +++ b/docs/api/methods/set_chat_photo.md @@ -38,19 +38,20 @@ Imports: - `from aiogram.api.methods import SetChatPhoto` - `from aiogram.api.methods.set_chat_photo import SetChatPhoto` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetChatPhoto(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetChatPhoto(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetChatPhoto(...)) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#setchatphoto) - [aiogram.types.InputFile](../types/input_file.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/set_chat_sticker_set.md b/docs/api/methods/set_chat_sticker_set.md index 375742f2..dda34637 100644 --- a/docs/api/methods/set_chat_sticker_set.md +++ b/docs/api/methods/set_chat_sticker_set.md @@ -38,21 +38,21 @@ Imports: - `from aiogram.api.methods import SetChatStickerSet` - `from aiogram.api.methods.set_chat_sticker_set import SetChatStickerSet` -#### As reply into Webhook -```python3 -return SetChatStickerSet(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetChatStickerSet(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetChatStickerSet(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetChatStickerSet(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetChatStickerSet(...) +``` + + ## Related pages: diff --git a/docs/api/methods/set_chat_title.md b/docs/api/methods/set_chat_title.md index 7ac44236..d4162ce5 100644 --- a/docs/api/methods/set_chat_title.md +++ b/docs/api/methods/set_chat_title.md @@ -38,21 +38,21 @@ Imports: - `from aiogram.api.methods import SetChatTitle` - `from aiogram.api.methods.set_chat_title import SetChatTitle` -#### As reply into Webhook -```python3 -return SetChatTitle(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetChatTitle(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetChatTitle(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetChatTitle(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetChatTitle(...) +``` + + ## Related pages: diff --git a/docs/api/methods/set_game_score.md b/docs/api/methods/set_game_score.md index a56a5ac3..ff09795c 100644 --- a/docs/api/methods/set_game_score.md +++ b/docs/api/methods/set_game_score.md @@ -43,21 +43,21 @@ Imports: - `from aiogram.api.methods import SetGameScore` - `from aiogram.api.methods.set_game_score import SetGameScore` -#### As reply into Webhook -```python3 -return SetGameScore(...) -``` - -#### With specific bot -```python3 -result: Union[Message, bool] = await bot.emit(SetGameScore(...)) -``` - #### In handlers with current bot ```python3 result: Union[Message, bool] = await SetGameScore(...) ``` +#### With specific bot +```python3 +result: Union[Message, bool] = await bot(SetGameScore(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetGameScore(...) +``` + + ## Related pages: diff --git a/docs/api/methods/set_passport_data_errors.md b/docs/api/methods/set_passport_data_errors.md index 6924dc90..e00d2e89 100644 --- a/docs/api/methods/set_passport_data_errors.md +++ b/docs/api/methods/set_passport_data_errors.md @@ -40,21 +40,21 @@ Imports: - `from aiogram.api.methods import SetPassportDataErrors` - `from aiogram.api.methods.set_passport_data_errors import SetPassportDataErrors` -#### As reply into Webhook -```python3 -return SetPassportDataErrors(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetPassportDataErrors(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetPassportDataErrors(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetPassportDataErrors(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetPassportDataErrors(...) +``` + + ## Related pages: diff --git a/docs/api/methods/set_sticker_position_in_set.md b/docs/api/methods/set_sticker_position_in_set.md index 32c59daa..7a67dab9 100644 --- a/docs/api/methods/set_sticker_position_in_set.md +++ b/docs/api/methods/set_sticker_position_in_set.md @@ -38,21 +38,21 @@ Imports: - `from aiogram.api.methods import SetStickerPositionInSet` - `from aiogram.api.methods.set_sticker_position_in_set import SetStickerPositionInSet` -#### As reply into Webhook -```python3 -return SetStickerPositionInSet(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetStickerPositionInSet(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetStickerPositionInSet(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetStickerPositionInSet(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetStickerPositionInSet(...) +``` + + ## Related pages: diff --git a/docs/api/methods/set_webhook.md b/docs/api/methods/set_webhook.md index 5271cf3f..2db3433a 100644 --- a/docs/api/methods/set_webhook.md +++ b/docs/api/methods/set_webhook.md @@ -52,23 +52,24 @@ Imports: - `from aiogram.api.methods import SetWebhook` - `from aiogram.api.methods.set_webhook import SetWebhook` -#### As reply into Webhook -```python3 -return SetWebhook(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(SetWebhook(...)) -``` - #### In handlers with current bot ```python3 result: bool = await SetWebhook(...) ``` +#### With specific bot +```python3 +result: bool = await bot(SetWebhook(...)) +``` +#### As reply into Webhook in handler +```python3 +return SetWebhook(...) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#setwebhook) - [aiogram.types.InputFile](../types/input_file.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/methods/stop_message_live_location.md b/docs/api/methods/stop_message_live_location.md index 4a9fbc18..32dbaa19 100644 --- a/docs/api/methods/stop_message_live_location.md +++ b/docs/api/methods/stop_message_live_location.md @@ -40,21 +40,21 @@ Imports: - `from aiogram.api.methods import StopMessageLiveLocation` - `from aiogram.api.methods.stop_message_live_location import StopMessageLiveLocation` -#### As reply into Webhook -```python3 -return StopMessageLiveLocation(...) -``` - -#### With specific bot -```python3 -result: Union[Message, bool] = await bot.emit(StopMessageLiveLocation(...)) -``` - #### In handlers with current bot ```python3 result: Union[Message, bool] = await StopMessageLiveLocation(...) ``` +#### With specific bot +```python3 +result: Union[Message, bool] = await bot(StopMessageLiveLocation(...)) +``` +#### As reply into Webhook in handler +```python3 +return StopMessageLiveLocation(...) +``` + + ## Related pages: diff --git a/docs/api/methods/stop_poll.md b/docs/api/methods/stop_poll.md index 826fc114..797da7ec 100644 --- a/docs/api/methods/stop_poll.md +++ b/docs/api/methods/stop_poll.md @@ -39,21 +39,21 @@ Imports: - `from aiogram.api.methods import StopPoll` - `from aiogram.api.methods.stop_poll import StopPoll` -#### As reply into Webhook -```python3 -return StopPoll(...) -``` - -#### With specific bot -```python3 -result: Poll = await bot.emit(StopPoll(...)) -``` - #### In handlers with current bot ```python3 result: Poll = await StopPoll(...) ``` +#### With specific bot +```python3 +result: Poll = await bot(StopPoll(...)) +``` +#### As reply into Webhook in handler +```python3 +return StopPoll(...) +``` + + ## Related pages: diff --git a/docs/api/methods/unban_chat_member.md b/docs/api/methods/unban_chat_member.md index b054cbac..2c18ed5e 100644 --- a/docs/api/methods/unban_chat_member.md +++ b/docs/api/methods/unban_chat_member.md @@ -38,21 +38,21 @@ Imports: - `from aiogram.api.methods import UnbanChatMember` - `from aiogram.api.methods.unban_chat_member import UnbanChatMember` -#### As reply into Webhook -```python3 -return UnbanChatMember(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(UnbanChatMember(...)) -``` - #### In handlers with current bot ```python3 result: bool = await UnbanChatMember(...) ``` +#### With specific bot +```python3 +result: bool = await bot(UnbanChatMember(...)) +``` +#### As reply into Webhook in handler +```python3 +return UnbanChatMember(...) +``` + + ## Related pages: diff --git a/docs/api/methods/unpin_chat_message.md b/docs/api/methods/unpin_chat_message.md index 4b76b651..b49bf991 100644 --- a/docs/api/methods/unpin_chat_message.md +++ b/docs/api/methods/unpin_chat_message.md @@ -37,21 +37,21 @@ Imports: - `from aiogram.api.methods import UnpinChatMessage` - `from aiogram.api.methods.unpin_chat_message import UnpinChatMessage` -#### As reply into Webhook -```python3 -return UnpinChatMessage(...) -``` - -#### With specific bot -```python3 -result: bool = await bot.emit(UnpinChatMessage(...)) -``` - #### In handlers with current bot ```python3 result: bool = await UnpinChatMessage(...) ``` +#### With specific bot +```python3 +result: bool = await bot(UnpinChatMessage(...)) +``` +#### As reply into Webhook in handler +```python3 +return UnpinChatMessage(...) +``` + + ## Related pages: diff --git a/docs/api/methods/upload_sticker_file.md b/docs/api/methods/upload_sticker_file.md index 7a4ff16e..b14b250e 100644 --- a/docs/api/methods/upload_sticker_file.md +++ b/docs/api/methods/upload_sticker_file.md @@ -38,20 +38,21 @@ Imports: - `from aiogram.api.methods import UploadStickerFile` - `from aiogram.api.methods.upload_sticker_file import UploadStickerFile` - -#### With specific bot -```python3 -result: File = await bot.emit(UploadStickerFile(...)) -``` - #### In handlers with current bot ```python3 result: File = await UploadStickerFile(...) ``` +#### With specific bot +```python3 +result: File = await bot(UploadStickerFile(...)) +``` + + ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#uploadstickerfile) -- [aiogram.types.InputFile](../types/input_file.md) - [aiogram.types.File](../types/file.md) +- [aiogram.types.InputFile](../types/input_file.md) +- [How to upload file?](../sending_files.md) diff --git a/docs/api/types/game.md b/docs/api/types/game.md index 95f02332..52e5af79 100644 --- a/docs/api/types/game.md +++ b/docs/api/types/game.md @@ -27,6 +27,6 @@ This object represents a game. Use BotFather to create and edit games, their sho ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#game) -- [aiogram.types.MessageEntity](../types/message_entity.md) - [aiogram.types.Animation](../types/animation.md) +- [aiogram.types.MessageEntity](../types/message_entity.md) - [aiogram.types.PhotoSize](../types/photo_size.md) diff --git a/docs/api/types/inline_keyboard_button.md b/docs/api/types/inline_keyboard_button.md index 38de8c65..173ddb4e 100644 --- a/docs/api/types/inline_keyboard_button.md +++ b/docs/api/types/inline_keyboard_button.md @@ -29,5 +29,5 @@ This object represents one button of an inline keyboard. You must use exactly on ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinekeyboardbutton) -- [aiogram.types.LoginUrl](../types/login_url.md) - [aiogram.types.CallbackGame](../types/callback_game.md) +- [aiogram.types.LoginUrl](../types/login_url.md) diff --git a/docs/api/types/inline_query_result_article.md b/docs/api/types/inline_query_result_article.md index 3b0e6f06..e8829c4e 100644 --- a/docs/api/types/inline_query_result_article.md +++ b/docs/api/types/inline_query_result_article.md @@ -32,5 +32,5 @@ Represents a link to an article or web page. ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultarticle) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_audio.md b/docs/api/types/inline_query_result_audio.md index 93ded16e..38d1bb91 100644 --- a/docs/api/types/inline_query_result_audio.md +++ b/docs/api/types/inline_query_result_audio.md @@ -33,5 +33,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultaudio) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_audio.md b/docs/api/types/inline_query_result_cached_audio.md index cfc938d9..c1110f8e 100644 --- a/docs/api/types/inline_query_result_cached_audio.md +++ b/docs/api/types/inline_query_result_cached_audio.md @@ -30,5 +30,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedaudio) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_document.md b/docs/api/types/inline_query_result_cached_document.md index 3b7898c7..7401235f 100644 --- a/docs/api/types/inline_query_result_cached_document.md +++ b/docs/api/types/inline_query_result_cached_document.md @@ -32,5 +32,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcacheddocument) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_gif.md b/docs/api/types/inline_query_result_cached_gif.md index 93c18449..44c4820d 100644 --- a/docs/api/types/inline_query_result_cached_gif.md +++ b/docs/api/types/inline_query_result_cached_gif.md @@ -29,5 +29,5 @@ Represents a link to an animated GIF file stored on the Telegram servers. By def ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedgif) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_mpeg4_gif.md b/docs/api/types/inline_query_result_cached_mpeg4_gif.md index bef9c476..0ae5bbf6 100644 --- a/docs/api/types/inline_query_result_cached_mpeg4_gif.md +++ b/docs/api/types/inline_query_result_cached_mpeg4_gif.md @@ -29,5 +29,5 @@ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) st ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_photo.md b/docs/api/types/inline_query_result_cached_photo.md index ed7a9331..1ce40aa8 100644 --- a/docs/api/types/inline_query_result_cached_photo.md +++ b/docs/api/types/inline_query_result_cached_photo.md @@ -30,5 +30,5 @@ Represents a link to a photo stored on the Telegram servers. By default, this ph ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedphoto) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_sticker.md b/docs/api/types/inline_query_result_cached_sticker.md index 6231bfc5..39c66b0a 100644 --- a/docs/api/types/inline_query_result_cached_sticker.md +++ b/docs/api/types/inline_query_result_cached_sticker.md @@ -28,5 +28,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016 for ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedsticker) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_video.md b/docs/api/types/inline_query_result_cached_video.md index 395a3736..6e12fbbc 100644 --- a/docs/api/types/inline_query_result_cached_video.md +++ b/docs/api/types/inline_query_result_cached_video.md @@ -30,5 +30,5 @@ Represents a link to a video file stored on the Telegram servers. By default, th ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedvideo) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_cached_voice.md b/docs/api/types/inline_query_result_cached_voice.md index e809f3a6..aadcbd0e 100644 --- a/docs/api/types/inline_query_result_cached_voice.md +++ b/docs/api/types/inline_query_result_cached_voice.md @@ -31,5 +31,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcachedvoice) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_contact.md b/docs/api/types/inline_query_result_contact.md index 71f9a972..65088d5f 100644 --- a/docs/api/types/inline_query_result_contact.md +++ b/docs/api/types/inline_query_result_contact.md @@ -34,5 +34,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultcontact) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_document.md b/docs/api/types/inline_query_result_document.md index f71b317f..05c783d7 100644 --- a/docs/api/types/inline_query_result_document.md +++ b/docs/api/types/inline_query_result_document.md @@ -36,5 +36,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultdocument) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_gif.md b/docs/api/types/inline_query_result_gif.md index 17af669c..4365c243 100644 --- a/docs/api/types/inline_query_result_gif.md +++ b/docs/api/types/inline_query_result_gif.md @@ -33,5 +33,5 @@ Represents a link to an animated GIF file. By default, this animated GIF file wi ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultgif) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_location.md b/docs/api/types/inline_query_result_location.md index 334365c1..e4c35ef8 100644 --- a/docs/api/types/inline_query_result_location.md +++ b/docs/api/types/inline_query_result_location.md @@ -34,5 +34,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultlocation) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_mpeg4_gif.md b/docs/api/types/inline_query_result_mpeg4_gif.md index 52ee96d0..934611ab 100644 --- a/docs/api/types/inline_query_result_mpeg4_gif.md +++ b/docs/api/types/inline_query_result_mpeg4_gif.md @@ -33,5 +33,5 @@ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). B ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_photo.md b/docs/api/types/inline_query_result_photo.md index 77b2dddc..96d71636 100644 --- a/docs/api/types/inline_query_result_photo.md +++ b/docs/api/types/inline_query_result_photo.md @@ -33,5 +33,5 @@ Represents a link to a photo. By default, this photo will be sent by the user wi ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultphoto) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_venue.md b/docs/api/types/inline_query_result_venue.md index 539e163a..a2e545a1 100644 --- a/docs/api/types/inline_query_result_venue.md +++ b/docs/api/types/inline_query_result_venue.md @@ -36,5 +36,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultvenue) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_video.md b/docs/api/types/inline_query_result_video.md index e4f50f97..b212f03a 100644 --- a/docs/api/types/inline_query_result_video.md +++ b/docs/api/types/inline_query_result_video.md @@ -37,5 +37,5 @@ If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultvideo) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/inline_query_result_voice.md b/docs/api/types/inline_query_result_voice.md index f13a2bd8..f7725c5a 100644 --- a/docs/api/types/inline_query_result_voice.md +++ b/docs/api/types/inline_query_result_voice.md @@ -32,5 +32,5 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#inlinequeryresultvoice) -- [aiogram.types.InputMessageContent](../types/input_message_content.md) - [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.InputMessageContent](../types/input_message_content.md) diff --git a/docs/api/types/input_file.md b/docs/api/types/input_file.md index ca034c7f..d062e1d7 100644 --- a/docs/api/types/input_file.md +++ b/docs/api/types/input_file.md @@ -14,5 +14,6 @@ This object represents the contents of a file to be uploaded. Must be posted usi - `from aiogram.api.types.input_file import InputFile` ## Related pages: + - [Official documentation](https://core.telegram.org/bots/api#inputfile) - [How to upload file?](../sending_files.md) diff --git a/docs/api/types/message.md b/docs/api/types/message.md index c12879c9..976b54e1 100644 --- a/docs/api/types/message.md +++ b/docs/api/types/message.md @@ -68,23 +68,23 @@ This object represents a message. ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#message) -- [aiogram.types.Poll](../types/poll.md) -- [aiogram.types.PassportData](../types/passport_data.md) -- [aiogram.types.Video](../types/video.md) -- [aiogram.types.MessageEntity](../types/message_entity.md) -- [aiogram.types.PhotoSize](../types/photo_size.md) +- [aiogram.types.Animation](../types/animation.md) +- [aiogram.types.Audio](../types/audio.md) +- [aiogram.types.Chat](../types/chat.md) - [aiogram.types.Contact](../types/contact.md) - [aiogram.types.Document](../types/document.md) -- [aiogram.types.Animation](../types/animation.md) -- [aiogram.types.SuccessfulPayment](../types/successful_payment.md) -- [aiogram.types.Chat](../types/chat.md) -- [aiogram.types.Audio](../types/audio.md) - [aiogram.types.Game](../types/game.md) -- [aiogram.types.Voice](../types/voice.md) -- [aiogram.types.VideoNote](../types/video_note.md) +- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) - [aiogram.types.Invoice](../types/invoice.md) - [aiogram.types.Location](../types/location.md) +- [aiogram.types.MessageEntity](../types/message_entity.md) +- [aiogram.types.PassportData](../types/passport_data.md) +- [aiogram.types.PhotoSize](../types/photo_size.md) +- [aiogram.types.Poll](../types/poll.md) - [aiogram.types.Sticker](../types/sticker.md) -- [aiogram.types.InlineKeyboardMarkup](../types/inline_keyboard_markup.md) +- [aiogram.types.SuccessfulPayment](../types/successful_payment.md) - [aiogram.types.User](../types/user.md) - [aiogram.types.Venue](../types/venue.md) +- [aiogram.types.Video](../types/video.md) +- [aiogram.types.VideoNote](../types/video_note.md) +- [aiogram.types.Voice](../types/voice.md) diff --git a/docs/api/types/passport_data.md b/docs/api/types/passport_data.md index 5cf9694f..ac165be0 100644 --- a/docs/api/types/passport_data.md +++ b/docs/api/types/passport_data.md @@ -23,5 +23,5 @@ Contains information about Telegram Passport data shared with the bot by the use ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#passportdata) -- [aiogram.types.EncryptedPassportElement](../types/encrypted_passport_element.md) - [aiogram.types.EncryptedCredentials](../types/encrypted_credentials.md) +- [aiogram.types.EncryptedPassportElement](../types/encrypted_passport_element.md) diff --git a/docs/api/types/update.md b/docs/api/types/update.md index b1f95eba..78a8d241 100644 --- a/docs/api/types/update.md +++ b/docs/api/types/update.md @@ -34,10 +34,10 @@ At most one of the optional parameters can be present in any given update. ## Related pages: - [Official documentation](https://core.telegram.org/bots/api#update) -- [aiogram.types.Poll](../types/poll.md) - [aiogram.types.CallbackQuery](../types/callback_query.md) -- [aiogram.types.InlineQuery](../types/inline_query.md) - [aiogram.types.ChosenInlineResult](../types/chosen_inline_result.md) +- [aiogram.types.InlineQuery](../types/inline_query.md) - [aiogram.types.Message](../types/message.md) -- [aiogram.types.ShippingQuery](../types/shipping_query.md) +- [aiogram.types.Poll](../types/poll.md) - [aiogram.types.PreCheckoutQuery](../types/pre_checkout_query.md) +- [aiogram.types.ShippingQuery](../types/shipping_query.md) diff --git a/tests/test_api/test_client/test_base_bot.py b/tests/test_api/test_client/test_base_bot.py index dd7e2a72..652f0918 100644 --- a/tests/test_api/test_client/test_base_bot.py +++ b/tests/test_api/test_client/test_base_bot.py @@ -35,7 +35,7 @@ class TestBaseBot: "aiogram.api.client.session.aiohttp.AiohttpSession.make_request", new_callable=CoroutineMock, ) as mocked_make_request: - await base_bot.emit(method) + await base_bot(method) mocked_make_request.assert_awaited_with("42:TEST", method) @pytest.mark.asyncio