From d034c1ba9f0f5ed1449eac8b84d1581cafb5d66e Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Mon, 21 Nov 2022 01:06:55 +0200 Subject: [PATCH] Adding new code-generator (Butcher) (#1069) * Re-generate types * Re-generate methods (only attributes) * Added enums * Base init generator * Added butcher configs * Fixed tests, bump butcher * Added changelog * Added enum docs * Added templates for docs index * Re-generate bot class, remove deprecated methods --- .butcher/enums/chat_type.yml | 6 + .butcher/enums/content_type.yml | 32 + .butcher/enums/dice.yml | 9 + .butcher/enums/topic_icon_color.yml | 13 + .butcher/enums/update_type.yml | 6 + .butcher/methods/addStickerToSet/entity.json | 75 + .../methods/answerCallbackQuery/entity.json | 59 + .../methods/answerInlineQuery/entity.json | 75 + .../answerPreCheckoutQuery/entity.json | 43 + .../methods/answerShippingQuery/entity.json | 51 + .../methods/answerWebAppQuery/entity.json | 35 + .../approveChatJoinRequest/entity.json | 35 + .butcher/methods/banChatMember/entity.json | 51 + .butcher/methods/banChatMember/replace.yml | 11 + .../methods/banChatSenderChat/entity.json | 35 + .butcher/methods/close/entity.json | 18 + .butcher/methods/closeForumTopic/entity.json | 35 + .butcher/methods/copyMessage/entity.json | 115 + .butcher/methods/copyMessage/replace.yml | 3 + .../methods/createChatInviteLink/entity.json | 59 + .../methods/createChatInviteLink/replace.yml | 11 + .butcher/methods/createForumTopic/entity.json | 51 + .../methods/createInvoiceLink/entity.json | 179 + .../methods/createNewStickerSet/entity.json | 91 + .../declineChatJoinRequest/entity.json | 35 + .butcher/methods/deleteChatPhoto/entity.json | 27 + .../methods/deleteChatStickerSet/entity.json | 27 + .butcher/methods/deleteForumTopic/entity.json | 35 + .butcher/methods/deleteMessage/entity.json | 35 + .butcher/methods/deleteMyCommands/entity.json | 35 + .../methods/deleteStickerFromSet/entity.json | 27 + .butcher/methods/deleteWebhook/entity.json | 27 + .../methods/editChatInviteLink/entity.json | 67 + .../methods/editChatInviteLink/replace.yml | 11 + .butcher/methods/editForumTopic/entity.json | 51 + .../methods/editMessageCaption/entity.json | 75 + .../methods/editMessageCaption/replace.yml | 3 + .../editMessageLiveLocation/entity.json | 91 + .butcher/methods/editMessageMedia/entity.json | 59 + .../editMessageReplyMarkup/entity.json | 51 + .butcher/methods/editMessageText/entity.json | 83 + .butcher/methods/editMessageText/replace.yml | 3 + .../methods/exportChatInviteLink/entity.json | 27 + .butcher/methods/forwardMessage/entity.json | 67 + .butcher/methods/getChat/entity.json | 27 + .../methods/getChatAdministrators/entity.json | 27 + .../methods/getChatAdministrators/replace.yml | 30 + .butcher/methods/getChatMember/entity.json | 35 + .butcher/methods/getChatMember/replace.yml | 28 + .../methods/getChatMemberCount/entity.json | 27 + .../methods/getChatMenuButton/entity.json | 27 + .../methods/getChatMenuButton/replace.yml | 16 + .../getCustomEmojiStickers/entity.json | 27 + .butcher/methods/getFile/entity.json | 27 + .../getForumTopicIconStickers/entity.json | 18 + .../methods/getGameHighScores/entity.json | 51 + .butcher/methods/getMe/entity.json | 18 + .butcher/methods/getMyCommands/entity.json | 35 + .../entity.json | 27 + .butcher/methods/getStickerSet/entity.json | 27 + .butcher/methods/getUpdates/entity.json | 51 + .../methods/getUserProfilePhotos/entity.json | 43 + .butcher/methods/getWebhookInfo/entity.json | 18 + .butcher/methods/leaveChat/entity.json | 27 + .butcher/methods/logOut/entity.json | 18 + .butcher/methods/pinChatMessage/entity.json | 43 + .../methods/promoteChatMember/entity.json | 131 + .butcher/methods/reopenForumTopic/entity.json | 35 + .../methods/restrictChatMember/entity.json | 51 + .../methods/restrictChatMember/replace.yml | 11 + .../methods/revokeChatInviteLink/entity.json | 35 + .butcher/methods/sendAnimation/entity.json | 139 + .butcher/methods/sendAnimation/replace.yml | 3 + .butcher/methods/sendAudio/entity.json | 139 + .butcher/methods/sendAudio/replace.yml | 3 + .butcher/methods/sendChatAction/entity.json | 35 + .butcher/methods/sendContact/entity.json | 107 + .butcher/methods/sendDice/entity.json | 83 + .butcher/methods/sendDocument/entity.json | 123 + .butcher/methods/sendDocument/replace.yml | 3 + .butcher/methods/sendGame/entity.json | 83 + .butcher/methods/sendInvoice/entity.json | 243 + .butcher/methods/sendLocation/entity.json | 123 + .butcher/methods/sendMediaGroup/entity.json | 75 + .butcher/methods/sendMessage/entity.json | 107 + .butcher/methods/sendMessage/replace.yml | 3 + .butcher/methods/sendPhoto/entity.json | 107 + .butcher/methods/sendPhoto/replace.yml | 3 + .butcher/methods/sendPoll/entity.json | 171 + .butcher/methods/sendPoll/replace.yml | 13 + .butcher/methods/sendSticker/entity.json | 83 + .butcher/methods/sendVenue/entity.json | 139 + .butcher/methods/sendVideo/entity.json | 147 + .butcher/methods/sendVideo/replace.yml | 3 + .butcher/methods/sendVideoNote/entity.json | 107 + .butcher/methods/sendVoice/entity.json | 115 + .butcher/methods/sendVoice/replace.yml | 3 + .../entity.json | 43 + .../methods/setChatDescription/entity.json | 35 + .../methods/setChatMenuButton/entity.json | 35 + .../methods/setChatMenuButton/replace.yml | 17 + .../methods/setChatPermissions/entity.json | 35 + .butcher/methods/setChatPhoto/entity.json | 35 + .../methods/setChatStickerSet/entity.json | 35 + .butcher/methods/setChatTitle/entity.json | 35 + .butcher/methods/setGameScore/entity.json | 75 + .butcher/methods/setMyCommands/entity.json | 43 + .../entity.json | 35 + .../methods/setPassportDataErrors/entity.json | 35 + .../setStickerPositionInSet/entity.json | 35 + .../methods/setStickerSetThumb/entity.json | 43 + .butcher/methods/setWebhook/entity.json | 75 + .../stopMessageLiveLocation/entity.json | 51 + .butcher/methods/stopPoll/entity.json | 43 + .butcher/methods/unbanChatMember/entity.json | 43 + .../methods/unbanChatSenderChat/entity.json | 35 + .../methods/unpinAllChatMessages/entity.json | 27 + .../unpinAllForumTopicMessages/entity.json | 35 + .butcher/methods/unpinChatMessage/entity.json | 35 + .../methods/uploadStickerFile/entity.json | 35 + .butcher/schema/schema.json | 12840 ++++++++++++++++ .butcher/templates/enums/entity.rst.jinja2 | 13 + .butcher/templates/enums/index.rst.jinja2 | 13 + .butcher/templates/methods/entity.rst.jinja2 | 54 + .butcher/templates/methods/index.rst.jinja2 | 16 + .butcher/templates/types/entity.rst.jinja2 | 9 + .butcher/templates/types/index.rst.jinja2 | 16 + .butcher/types/Animation/entity.json | 91 + .butcher/types/Audio/entity.json | 91 + .butcher/types/BotCommand/entity.json | 35 + .butcher/types/BotCommand/replace.yml | 2 + .butcher/types/BotCommandScope/entity.json | 18 + .../entity.json | 27 + .../replace.yml | 2 + .../BotCommandScopeAllGroupChats/entity.json | 27 + .../BotCommandScopeAllGroupChats/replace.yml | 2 + .../entity.json | 27 + .../replace.yml | 2 + .../types/BotCommandScopeChat/entity.json | 35 + .../types/BotCommandScopeChat/replace.yml | 2 + .../entity.json | 35 + .../replace.yml | 2 + .../BotCommandScopeChatMember/entity.json | 43 + .../BotCommandScopeChatMember/replace.yml | 2 + .../types/BotCommandScopeDefault/entity.json | 27 + .../types/BotCommandScopeDefault/replace.yml | 2 + .butcher/types/CallbackGame/entity.json | 18 + .butcher/types/CallbackQuery/entity.json | 75 + .butcher/types/Chat/aliases.yml | 108 + .butcher/types/Chat/entity.json | 227 + .../types/ChatAdministratorRights/entity.json | 115 + .butcher/types/ChatInviteLink/entity.json | 91 + .butcher/types/ChatInviteLink/replace.yml | 5 + .butcher/types/ChatJoinRequest/entity.json | 59 + .butcher/types/ChatJoinRequest/replace.yml | 5 + .butcher/types/ChatLocation/entity.json | 35 + .butcher/types/ChatMember/entity.json | 18 + .butcher/types/ChatMember/extend.yml | 27 + .butcher/types/ChatMember/replace.yml | 5 + .../types/ChatMemberAdministrator/entity.json | 147 + .../types/ChatMemberAdministrator/replace.yml | 2 + .butcher/types/ChatMemberBanned/entity.json | 43 + .butcher/types/ChatMemberBanned/replace.yml | 7 + .butcher/types/ChatMemberLeft/entity.json | 35 + .butcher/types/ChatMemberLeft/replace.yml | 2 + .butcher/types/ChatMemberMember/entity.json | 35 + .butcher/types/ChatMemberMember/replace.yml | 2 + .butcher/types/ChatMemberOwner/entity.json | 51 + .butcher/types/ChatMemberOwner/replace.yml | 2 + .../types/ChatMemberRestricted/entity.json | 123 + .../types/ChatMemberRestricted/replace.yml | 7 + .butcher/types/ChatMemberUpdated/entity.json | 67 + .butcher/types/ChatMemberUpdated/replace.yml | 34 + .butcher/types/ChatPermissions/entity.json | 91 + .butcher/types/ChatPermissions/replace.yml | 2 + .butcher/types/ChatPhoto/entity.json | 51 + .butcher/types/ChosenInlineResult/entity.json | 59 + .butcher/types/Contact/entity.json | 59 + .butcher/types/Dice/entity.json | 35 + .butcher/types/Document/entity.json | 67 + .../types/EncryptedCredentials/entity.json | 43 + .../EncryptedPassportElement/entity.json | 99 + .butcher/types/File/entity.json | 51 + .butcher/types/ForceReply/entity.json | 43 + .butcher/types/ForceReply/replace.yml | 5 + .butcher/types/ForumTopic/entity.json | 51 + .butcher/types/ForumTopicClosed/entity.json | 18 + .butcher/types/ForumTopicCreated/entity.json | 43 + .butcher/types/ForumTopicReopened/entity.json | 18 + .butcher/types/Game/entity.json | 67 + .butcher/types/GameHighScore/entity.json | 43 + .../types/InlineKeyboardButton/entity.json | 91 + .../types/InlineKeyboardButton/replace.yml | 2 + .../types/InlineKeyboardMarkup/entity.json | 27 + .../types/InlineKeyboardMarkup/replace.yml | 2 + .butcher/types/InlineQuery/entity.json | 67 + .butcher/types/InlineQueryResult/entity.json | 18 + .butcher/types/InlineQueryResult/replace.yml | 2 + .../InlineQueryResultArticle/entity.json | 107 + .../InlineQueryResultArticle/replace.yml | 2 + .../types/InlineQueryResultAudio/entity.json | 107 + .../types/InlineQueryResultAudio/replace.yml | 6 + .../InlineQueryResultCachedAudio/entity.json | 83 + .../InlineQueryResultCachedAudio/replace.yml | 6 + .../entity.json | 99 + .../replace.yml | 6 + .../InlineQueryResultCachedGif/entity.json | 91 + .../InlineQueryResultCachedGif/replace.yml | 6 + .../entity.json | 91 + .../replace.yml | 6 + .../InlineQueryResultCachedPhoto/entity.json | 99 + .../InlineQueryResultCachedPhoto/replace.yml | 6 + .../entity.json | 59 + .../replace.yml | 2 + .../InlineQueryResultCachedVideo/entity.json | 99 + .../InlineQueryResultCachedVideo/replace.yml | 6 + .../InlineQueryResultCachedVoice/entity.json | 91 + .../InlineQueryResultCachedVoice/replace.yml | 6 + .../InlineQueryResultContact/entity.json | 107 + .../InlineQueryResultContact/replace.yml | 2 + .../InlineQueryResultDocument/entity.json | 131 + .../InlineQueryResultDocument/replace.yml | 6 + .../types/InlineQueryResultGame/entity.json | 51 + .../types/InlineQueryResultGame/replace.yml | 2 + .../types/InlineQueryResultGif/entity.json | 131 + .../types/InlineQueryResultGif/replace.yml | 6 + .../InlineQueryResultLocation/entity.json | 131 + .../InlineQueryResultLocation/replace.yml | 2 + .../InlineQueryResultMpeg4Gif/entity.json | 131 + .../InlineQueryResultMpeg4Gif/replace.yml | 6 + .../types/InlineQueryResultPhoto/entity.json | 123 + .../types/InlineQueryResultPhoto/replace.yml | 6 + .../types/InlineQueryResultVenue/entity.json | 139 + .../types/InlineQueryResultVenue/replace.yml | 2 + .../types/InlineQueryResultVideo/entity.json | 139 + .../types/InlineQueryResultVideo/replace.yml | 6 + .../types/InlineQueryResultVoice/entity.json | 99 + .../types/InlineQueryResultVoice/replace.yml | 5 + .../InputContactMessageContent/entity.json | 51 + .../InputContactMessageContent/replace.yml | 2 + .butcher/types/InputFile/entity.json | 18 + .butcher/types/InputFile/replace.yml | 2 + .../InputInvoiceMessageContent/entity.json | 179 + .../InputInvoiceMessageContent/replace.yml | 2 + .../InputLocationMessageContent/entity.json | 67 + .../InputLocationMessageContent/replace.yml | 2 + .butcher/types/InputMedia/entity.json | 18 + .butcher/types/InputMedia/replace.yml | 2 + .../types/InputMediaAnimation/entity.json | 91 + .../types/InputMediaAnimation/replace.yml | 15 + .butcher/types/InputMediaAudio/entity.json | 91 + .butcher/types/InputMediaAudio/replace.yml | 15 + .butcher/types/InputMediaDocument/entity.json | 75 + .butcher/types/InputMediaDocument/replace.yml | 15 + .butcher/types/InputMediaPhoto/entity.json | 59 + .butcher/types/InputMediaPhoto/replace.yml | 15 + .butcher/types/InputMediaVideo/entity.json | 99 + .butcher/types/InputMediaVideo/replace.yml | 15 + .../types/InputMessageContent/entity.json | 18 + .../types/InputMessageContent/replace.yml | 2 + .../types/InputTextMessageContent/entity.json | 51 + .../types/InputTextMessageContent/replace.yml | 6 + .../InputVenueMessageContent/entity.json | 83 + .../InputVenueMessageContent/replace.yml | 2 + .butcher/types/Invoice/entity.json | 59 + .butcher/types/KeyboardButton/entity.json | 59 + .butcher/types/KeyboardButton/replace.yml | 2 + .../types/KeyboardButtonPollType/entity.json | 27 + .../types/KeyboardButtonPollType/replace.yml | 2 + .butcher/types/LabeledPrice/entity.json | 35 + .butcher/types/LabeledPrice/replace.yml | 2 + .butcher/types/Location/entity.json | 67 + .butcher/types/LoginUrl/entity.json | 51 + .butcher/types/MaskPosition/entity.json | 51 + .butcher/types/MenuButton/entity.json | 18 + .butcher/types/MenuButton/extend.yml | 18 + .butcher/types/MenuButton/replace.yml | 2 + .butcher/types/MenuButtonCommands/entity.json | 27 + .butcher/types/MenuButtonCommands/replace.yml | 2 + .butcher/types/MenuButtonDefault/entity.json | 27 + .butcher/types/MenuButtonDefault/replace.yml | 2 + .butcher/types/MenuButtonWebApp/entity.json | 43 + .butcher/types/MenuButtonWebApp/replace.yml | 2 + .butcher/types/Message/aliases.yml | 139 + .butcher/types/Message/entity.json | 531 + .butcher/types/Message/replace.yml | 5 + .../MessageAutoDeleteTimerChanged/entity.json | 27 + .butcher/types/MessageEntity/entity.json | 75 + .butcher/types/MessageEntity/replace.yml | 2 + .butcher/types/MessageId/entity.json | 27 + .butcher/types/OrderInfo/entity.json | 51 + .butcher/types/PassportData/entity.json | 35 + .../types/PassportElementError/entity.json | 18 + .../types/PassportElementError/replace.yml | 2 + .../PassportElementErrorDataField/entity.json | 59 + .../PassportElementErrorDataField/replace.yml | 2 + .../PassportElementErrorFile/entity.json | 51 + .../PassportElementErrorFile/replace.yml | 2 + .../PassportElementErrorFiles/entity.json | 51 + .../PassportElementErrorFiles/replace.yml | 2 + .../PassportElementErrorFrontSide/entity.json | 51 + .../PassportElementErrorFrontSide/replace.yml | 2 + .../entity.json | 51 + .../replace.yml | 2 + .../PassportElementErrorSelfie/entity.json | 51 + .../PassportElementErrorSelfie/replace.yml | 2 + .../entity.json | 51 + .../replace.yml | 2 + .../entity.json | 51 + .../replace.yml | 2 + .../entity.json | 51 + .../replace.yml | 2 + .butcher/types/PassportFile/entity.json | 51 + .butcher/types/PhotoSize/entity.json | 59 + .butcher/types/Poll/entity.json | 123 + .butcher/types/Poll/replace.yml | 5 + .butcher/types/PollAnswer/entity.json | 43 + .butcher/types/PollOption/entity.json | 35 + .butcher/types/PreCheckoutQuery/entity.json | 75 + .../types/ProximityAlertTriggered/entity.json | 43 + .../types/ReplyKeyboardMarkup/entity.json | 59 + .../types/ReplyKeyboardMarkup/replace.yml | 2 + .../types/ReplyKeyboardRemove/entity.json | 35 + .../types/ReplyKeyboardRemove/replace.yml | 5 + .butcher/types/ResponseParameters/entity.json | 35 + .butcher/types/SentWebAppMessage/entity.json | 27 + .butcher/types/ShippingAddress/entity.json | 67 + .butcher/types/ShippingOption/entity.json | 43 + .butcher/types/ShippingQuery/entity.json | 51 + .butcher/types/Sticker/entity.json | 131 + .butcher/types/StickerSet/entity.json | 75 + .butcher/types/SuccessfulPayment/entity.json | 75 + .butcher/types/Update/entity.json | 139 + .butcher/types/User/entity.json | 107 + .butcher/types/UserProfilePhotos/entity.json | 35 + .butcher/types/Venue/entity.json | 75 + .butcher/types/Video/entity.json | 91 + .butcher/types/VideoChatEnded/entity.json | 27 + .../VideoChatParticipantsInvited/entity.json | 27 + .butcher/types/VideoChatScheduled/entity.json | 27 + .butcher/types/VideoChatScheduled/replace.yml | 5 + .butcher/types/VideoChatStarted/entity.json | 18 + .butcher/types/VideoNote/entity.json | 67 + .butcher/types/Voice/entity.json | 59 + .butcher/types/WebAppData/entity.json | 35 + .butcher/types/WebAppInfo/entity.json | 27 + .butcher/types/WebhookInfo/entity.json | 91 + .butcher/types/WebhookInfo/replace.yml | 6 + .editorconfig | 2 +- .pre-commit-config.yaml | 3 +- CHANGES/1069.misc.rst | 1 + aiogram/client/bot.py | 5225 +++---- aiogram/client/session/base.py | 3 + aiogram/enums/__init__.py | 13 + aiogram/enums/chat_type.py | 12 + aiogram/enums/content_type.py | 50 + aiogram/enums/dice_emoji.py | 14 + aiogram/enums/topic_icon_color.py | 16 + aiogram/enums/update_type.py | 22 + aiogram/methods/__init__.py | 4 - aiogram/methods/create_forum_topic.py | 2 +- aiogram/methods/edit_forum_topic.py | 2 +- aiogram/methods/get_chat_members_count.py | 30 - aiogram/methods/kick_chat_member.py | 37 - aiogram/types/chat_invite_link.py | 4 +- aiogram/types/chat_member.py | 6 +- aiogram/types/chat_member_banned.py | 4 +- aiogram/types/chat_member_restricted.py | 4 +- aiogram/types/input_message_content.py | 4 +- aiogram/types/menu_button.py | 6 +- aiogram/types/message_entity.py | 4 +- aiogram/types/poll.py | 4 +- aiogram/types/reply_keyboard_markup.py | 2 +- docs/api/enums/chat_type.rst | 9 + docs/api/enums/content_type.rst | 9 + docs/api/enums/dice_emoji.rst | 9 + docs/api/enums/index.rst | 15 + docs/api/enums/topic_icon_color.rst | 9 + docs/api/enums/update_type.rst | 9 + docs/api/index.rst | 1 + docs/api/methods/index.rst | 236 +- docs/api/types/index.rst | 308 +- poetry.lock | 331 +- pyproject.toml | 2 +- .../test_session/test_base_session.py | 3 + .../test_get_chat_members_count.py | 24 - .../test_methods/test_kick_chat_member.py | 24 - 387 files changed, 32036 insertions(+), 3144 deletions(-) create mode 100644 .butcher/enums/chat_type.yml create mode 100644 .butcher/enums/content_type.yml create mode 100644 .butcher/enums/dice.yml create mode 100644 .butcher/enums/topic_icon_color.yml create mode 100644 .butcher/enums/update_type.yml create mode 100644 .butcher/methods/addStickerToSet/entity.json create mode 100644 .butcher/methods/answerCallbackQuery/entity.json create mode 100644 .butcher/methods/answerInlineQuery/entity.json create mode 100644 .butcher/methods/answerPreCheckoutQuery/entity.json create mode 100644 .butcher/methods/answerShippingQuery/entity.json create mode 100644 .butcher/methods/answerWebAppQuery/entity.json create mode 100644 .butcher/methods/approveChatJoinRequest/entity.json create mode 100644 .butcher/methods/banChatMember/entity.json create mode 100644 .butcher/methods/banChatMember/replace.yml create mode 100644 .butcher/methods/banChatSenderChat/entity.json create mode 100644 .butcher/methods/close/entity.json create mode 100644 .butcher/methods/closeForumTopic/entity.json create mode 100644 .butcher/methods/copyMessage/entity.json create mode 100644 .butcher/methods/copyMessage/replace.yml create mode 100644 .butcher/methods/createChatInviteLink/entity.json create mode 100644 .butcher/methods/createChatInviteLink/replace.yml create mode 100644 .butcher/methods/createForumTopic/entity.json create mode 100644 .butcher/methods/createInvoiceLink/entity.json create mode 100644 .butcher/methods/createNewStickerSet/entity.json create mode 100644 .butcher/methods/declineChatJoinRequest/entity.json create mode 100644 .butcher/methods/deleteChatPhoto/entity.json create mode 100644 .butcher/methods/deleteChatStickerSet/entity.json create mode 100644 .butcher/methods/deleteForumTopic/entity.json create mode 100644 .butcher/methods/deleteMessage/entity.json create mode 100644 .butcher/methods/deleteMyCommands/entity.json create mode 100644 .butcher/methods/deleteStickerFromSet/entity.json create mode 100644 .butcher/methods/deleteWebhook/entity.json create mode 100644 .butcher/methods/editChatInviteLink/entity.json create mode 100644 .butcher/methods/editChatInviteLink/replace.yml create mode 100644 .butcher/methods/editForumTopic/entity.json create mode 100644 .butcher/methods/editMessageCaption/entity.json create mode 100644 .butcher/methods/editMessageCaption/replace.yml create mode 100644 .butcher/methods/editMessageLiveLocation/entity.json create mode 100644 .butcher/methods/editMessageMedia/entity.json create mode 100644 .butcher/methods/editMessageReplyMarkup/entity.json create mode 100644 .butcher/methods/editMessageText/entity.json create mode 100644 .butcher/methods/editMessageText/replace.yml create mode 100644 .butcher/methods/exportChatInviteLink/entity.json create mode 100644 .butcher/methods/forwardMessage/entity.json create mode 100644 .butcher/methods/getChat/entity.json create mode 100644 .butcher/methods/getChatAdministrators/entity.json create mode 100644 .butcher/methods/getChatAdministrators/replace.yml create mode 100644 .butcher/methods/getChatMember/entity.json create mode 100644 .butcher/methods/getChatMember/replace.yml create mode 100644 .butcher/methods/getChatMemberCount/entity.json create mode 100644 .butcher/methods/getChatMenuButton/entity.json create mode 100644 .butcher/methods/getChatMenuButton/replace.yml create mode 100644 .butcher/methods/getCustomEmojiStickers/entity.json create mode 100644 .butcher/methods/getFile/entity.json create mode 100644 .butcher/methods/getForumTopicIconStickers/entity.json create mode 100644 .butcher/methods/getGameHighScores/entity.json create mode 100644 .butcher/methods/getMe/entity.json create mode 100644 .butcher/methods/getMyCommands/entity.json create mode 100644 .butcher/methods/getMyDefaultAdministratorRights/entity.json create mode 100644 .butcher/methods/getStickerSet/entity.json create mode 100644 .butcher/methods/getUpdates/entity.json create mode 100644 .butcher/methods/getUserProfilePhotos/entity.json create mode 100644 .butcher/methods/getWebhookInfo/entity.json create mode 100644 .butcher/methods/leaveChat/entity.json create mode 100644 .butcher/methods/logOut/entity.json create mode 100644 .butcher/methods/pinChatMessage/entity.json create mode 100644 .butcher/methods/promoteChatMember/entity.json create mode 100644 .butcher/methods/reopenForumTopic/entity.json create mode 100644 .butcher/methods/restrictChatMember/entity.json create mode 100644 .butcher/methods/restrictChatMember/replace.yml create mode 100644 .butcher/methods/revokeChatInviteLink/entity.json create mode 100644 .butcher/methods/sendAnimation/entity.json create mode 100644 .butcher/methods/sendAnimation/replace.yml create mode 100644 .butcher/methods/sendAudio/entity.json create mode 100644 .butcher/methods/sendAudio/replace.yml create mode 100644 .butcher/methods/sendChatAction/entity.json create mode 100644 .butcher/methods/sendContact/entity.json create mode 100644 .butcher/methods/sendDice/entity.json create mode 100644 .butcher/methods/sendDocument/entity.json create mode 100644 .butcher/methods/sendDocument/replace.yml create mode 100644 .butcher/methods/sendGame/entity.json create mode 100644 .butcher/methods/sendInvoice/entity.json create mode 100644 .butcher/methods/sendLocation/entity.json create mode 100644 .butcher/methods/sendMediaGroup/entity.json create mode 100644 .butcher/methods/sendMessage/entity.json create mode 100644 .butcher/methods/sendMessage/replace.yml create mode 100644 .butcher/methods/sendPhoto/entity.json create mode 100644 .butcher/methods/sendPhoto/replace.yml create mode 100644 .butcher/methods/sendPoll/entity.json create mode 100644 .butcher/methods/sendPoll/replace.yml create mode 100644 .butcher/methods/sendSticker/entity.json create mode 100644 .butcher/methods/sendVenue/entity.json create mode 100644 .butcher/methods/sendVideo/entity.json create mode 100644 .butcher/methods/sendVideo/replace.yml create mode 100644 .butcher/methods/sendVideoNote/entity.json create mode 100644 .butcher/methods/sendVoice/entity.json create mode 100644 .butcher/methods/sendVoice/replace.yml create mode 100644 .butcher/methods/setChatAdministratorCustomTitle/entity.json create mode 100644 .butcher/methods/setChatDescription/entity.json create mode 100644 .butcher/methods/setChatMenuButton/entity.json create mode 100644 .butcher/methods/setChatMenuButton/replace.yml create mode 100644 .butcher/methods/setChatPermissions/entity.json create mode 100644 .butcher/methods/setChatPhoto/entity.json create mode 100644 .butcher/methods/setChatStickerSet/entity.json create mode 100644 .butcher/methods/setChatTitle/entity.json create mode 100644 .butcher/methods/setGameScore/entity.json create mode 100644 .butcher/methods/setMyCommands/entity.json create mode 100644 .butcher/methods/setMyDefaultAdministratorRights/entity.json create mode 100644 .butcher/methods/setPassportDataErrors/entity.json create mode 100644 .butcher/methods/setStickerPositionInSet/entity.json create mode 100644 .butcher/methods/setStickerSetThumb/entity.json create mode 100644 .butcher/methods/setWebhook/entity.json create mode 100644 .butcher/methods/stopMessageLiveLocation/entity.json create mode 100644 .butcher/methods/stopPoll/entity.json create mode 100644 .butcher/methods/unbanChatMember/entity.json create mode 100644 .butcher/methods/unbanChatSenderChat/entity.json create mode 100644 .butcher/methods/unpinAllChatMessages/entity.json create mode 100644 .butcher/methods/unpinAllForumTopicMessages/entity.json create mode 100644 .butcher/methods/unpinChatMessage/entity.json create mode 100644 .butcher/methods/uploadStickerFile/entity.json create mode 100644 .butcher/schema/schema.json create mode 100644 .butcher/templates/enums/entity.rst.jinja2 create mode 100644 .butcher/templates/enums/index.rst.jinja2 create mode 100755 .butcher/templates/methods/entity.rst.jinja2 create mode 100644 .butcher/templates/methods/index.rst.jinja2 create mode 100644 .butcher/templates/types/entity.rst.jinja2 create mode 100644 .butcher/templates/types/index.rst.jinja2 create mode 100644 .butcher/types/Animation/entity.json create mode 100644 .butcher/types/Audio/entity.json create mode 100644 .butcher/types/BotCommand/entity.json create mode 100644 .butcher/types/BotCommand/replace.yml create mode 100644 .butcher/types/BotCommandScope/entity.json create mode 100644 .butcher/types/BotCommandScopeAllChatAdministrators/entity.json create mode 100644 .butcher/types/BotCommandScopeAllChatAdministrators/replace.yml create mode 100644 .butcher/types/BotCommandScopeAllGroupChats/entity.json create mode 100644 .butcher/types/BotCommandScopeAllGroupChats/replace.yml create mode 100644 .butcher/types/BotCommandScopeAllPrivateChats/entity.json create mode 100644 .butcher/types/BotCommandScopeAllPrivateChats/replace.yml create mode 100644 .butcher/types/BotCommandScopeChat/entity.json create mode 100644 .butcher/types/BotCommandScopeChat/replace.yml create mode 100644 .butcher/types/BotCommandScopeChatAdministrators/entity.json create mode 100644 .butcher/types/BotCommandScopeChatAdministrators/replace.yml create mode 100644 .butcher/types/BotCommandScopeChatMember/entity.json create mode 100644 .butcher/types/BotCommandScopeChatMember/replace.yml create mode 100644 .butcher/types/BotCommandScopeDefault/entity.json create mode 100644 .butcher/types/BotCommandScopeDefault/replace.yml create mode 100644 .butcher/types/CallbackGame/entity.json create mode 100644 .butcher/types/CallbackQuery/entity.json create mode 100644 .butcher/types/Chat/aliases.yml create mode 100644 .butcher/types/Chat/entity.json create mode 100644 .butcher/types/ChatAdministratorRights/entity.json create mode 100644 .butcher/types/ChatInviteLink/entity.json create mode 100644 .butcher/types/ChatInviteLink/replace.yml create mode 100644 .butcher/types/ChatJoinRequest/entity.json create mode 100644 .butcher/types/ChatJoinRequest/replace.yml create mode 100644 .butcher/types/ChatLocation/entity.json create mode 100644 .butcher/types/ChatMember/entity.json create mode 100644 .butcher/types/ChatMember/extend.yml create mode 100644 .butcher/types/ChatMember/replace.yml create mode 100644 .butcher/types/ChatMemberAdministrator/entity.json create mode 100644 .butcher/types/ChatMemberAdministrator/replace.yml create mode 100644 .butcher/types/ChatMemberBanned/entity.json create mode 100644 .butcher/types/ChatMemberBanned/replace.yml create mode 100644 .butcher/types/ChatMemberLeft/entity.json create mode 100644 .butcher/types/ChatMemberLeft/replace.yml create mode 100644 .butcher/types/ChatMemberMember/entity.json create mode 100644 .butcher/types/ChatMemberMember/replace.yml create mode 100644 .butcher/types/ChatMemberOwner/entity.json create mode 100644 .butcher/types/ChatMemberOwner/replace.yml create mode 100644 .butcher/types/ChatMemberRestricted/entity.json create mode 100644 .butcher/types/ChatMemberRestricted/replace.yml create mode 100644 .butcher/types/ChatMemberUpdated/entity.json create mode 100644 .butcher/types/ChatMemberUpdated/replace.yml create mode 100644 .butcher/types/ChatPermissions/entity.json create mode 100644 .butcher/types/ChatPermissions/replace.yml create mode 100644 .butcher/types/ChatPhoto/entity.json create mode 100644 .butcher/types/ChosenInlineResult/entity.json create mode 100644 .butcher/types/Contact/entity.json create mode 100644 .butcher/types/Dice/entity.json create mode 100644 .butcher/types/Document/entity.json create mode 100644 .butcher/types/EncryptedCredentials/entity.json create mode 100644 .butcher/types/EncryptedPassportElement/entity.json create mode 100644 .butcher/types/File/entity.json create mode 100644 .butcher/types/ForceReply/entity.json create mode 100644 .butcher/types/ForceReply/replace.yml create mode 100644 .butcher/types/ForumTopic/entity.json create mode 100644 .butcher/types/ForumTopicClosed/entity.json create mode 100644 .butcher/types/ForumTopicCreated/entity.json create mode 100644 .butcher/types/ForumTopicReopened/entity.json create mode 100644 .butcher/types/Game/entity.json create mode 100644 .butcher/types/GameHighScore/entity.json create mode 100644 .butcher/types/InlineKeyboardButton/entity.json create mode 100644 .butcher/types/InlineKeyboardButton/replace.yml create mode 100644 .butcher/types/InlineKeyboardMarkup/entity.json create mode 100644 .butcher/types/InlineKeyboardMarkup/replace.yml create mode 100644 .butcher/types/InlineQuery/entity.json create mode 100644 .butcher/types/InlineQueryResult/entity.json create mode 100644 .butcher/types/InlineQueryResult/replace.yml create mode 100644 .butcher/types/InlineQueryResultArticle/entity.json create mode 100644 .butcher/types/InlineQueryResultArticle/replace.yml create mode 100644 .butcher/types/InlineQueryResultAudio/entity.json create mode 100644 .butcher/types/InlineQueryResultAudio/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedAudio/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedAudio/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedDocument/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedDocument/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedGif/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedGif/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedPhoto/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedPhoto/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedSticker/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedSticker/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedVideo/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedVideo/replace.yml create mode 100644 .butcher/types/InlineQueryResultCachedVoice/entity.json create mode 100644 .butcher/types/InlineQueryResultCachedVoice/replace.yml create mode 100644 .butcher/types/InlineQueryResultContact/entity.json create mode 100644 .butcher/types/InlineQueryResultContact/replace.yml create mode 100644 .butcher/types/InlineQueryResultDocument/entity.json create mode 100644 .butcher/types/InlineQueryResultDocument/replace.yml create mode 100644 .butcher/types/InlineQueryResultGame/entity.json create mode 100644 .butcher/types/InlineQueryResultGame/replace.yml create mode 100644 .butcher/types/InlineQueryResultGif/entity.json create mode 100644 .butcher/types/InlineQueryResultGif/replace.yml create mode 100644 .butcher/types/InlineQueryResultLocation/entity.json create mode 100644 .butcher/types/InlineQueryResultLocation/replace.yml create mode 100644 .butcher/types/InlineQueryResultMpeg4Gif/entity.json create mode 100644 .butcher/types/InlineQueryResultMpeg4Gif/replace.yml create mode 100644 .butcher/types/InlineQueryResultPhoto/entity.json create mode 100644 .butcher/types/InlineQueryResultPhoto/replace.yml create mode 100644 .butcher/types/InlineQueryResultVenue/entity.json create mode 100644 .butcher/types/InlineQueryResultVenue/replace.yml create mode 100644 .butcher/types/InlineQueryResultVideo/entity.json create mode 100644 .butcher/types/InlineQueryResultVideo/replace.yml create mode 100644 .butcher/types/InlineQueryResultVoice/entity.json create mode 100644 .butcher/types/InlineQueryResultVoice/replace.yml create mode 100644 .butcher/types/InputContactMessageContent/entity.json create mode 100644 .butcher/types/InputContactMessageContent/replace.yml create mode 100644 .butcher/types/InputFile/entity.json create mode 100644 .butcher/types/InputFile/replace.yml create mode 100644 .butcher/types/InputInvoiceMessageContent/entity.json create mode 100644 .butcher/types/InputInvoiceMessageContent/replace.yml create mode 100644 .butcher/types/InputLocationMessageContent/entity.json create mode 100644 .butcher/types/InputLocationMessageContent/replace.yml create mode 100644 .butcher/types/InputMedia/entity.json create mode 100644 .butcher/types/InputMedia/replace.yml create mode 100644 .butcher/types/InputMediaAnimation/entity.json create mode 100644 .butcher/types/InputMediaAnimation/replace.yml create mode 100644 .butcher/types/InputMediaAudio/entity.json create mode 100644 .butcher/types/InputMediaAudio/replace.yml create mode 100644 .butcher/types/InputMediaDocument/entity.json create mode 100644 .butcher/types/InputMediaDocument/replace.yml create mode 100644 .butcher/types/InputMediaPhoto/entity.json create mode 100644 .butcher/types/InputMediaPhoto/replace.yml create mode 100644 .butcher/types/InputMediaVideo/entity.json create mode 100644 .butcher/types/InputMediaVideo/replace.yml create mode 100644 .butcher/types/InputMessageContent/entity.json create mode 100644 .butcher/types/InputMessageContent/replace.yml create mode 100644 .butcher/types/InputTextMessageContent/entity.json create mode 100644 .butcher/types/InputTextMessageContent/replace.yml create mode 100644 .butcher/types/InputVenueMessageContent/entity.json create mode 100644 .butcher/types/InputVenueMessageContent/replace.yml create mode 100644 .butcher/types/Invoice/entity.json create mode 100644 .butcher/types/KeyboardButton/entity.json create mode 100644 .butcher/types/KeyboardButton/replace.yml create mode 100644 .butcher/types/KeyboardButtonPollType/entity.json create mode 100644 .butcher/types/KeyboardButtonPollType/replace.yml create mode 100644 .butcher/types/LabeledPrice/entity.json create mode 100644 .butcher/types/LabeledPrice/replace.yml create mode 100644 .butcher/types/Location/entity.json create mode 100644 .butcher/types/LoginUrl/entity.json create mode 100644 .butcher/types/MaskPosition/entity.json create mode 100644 .butcher/types/MenuButton/entity.json create mode 100644 .butcher/types/MenuButton/extend.yml create mode 100644 .butcher/types/MenuButton/replace.yml create mode 100644 .butcher/types/MenuButtonCommands/entity.json create mode 100644 .butcher/types/MenuButtonCommands/replace.yml create mode 100644 .butcher/types/MenuButtonDefault/entity.json create mode 100644 .butcher/types/MenuButtonDefault/replace.yml create mode 100644 .butcher/types/MenuButtonWebApp/entity.json create mode 100644 .butcher/types/MenuButtonWebApp/replace.yml create mode 100644 .butcher/types/Message/aliases.yml create mode 100644 .butcher/types/Message/entity.json create mode 100644 .butcher/types/Message/replace.yml create mode 100644 .butcher/types/MessageAutoDeleteTimerChanged/entity.json create mode 100644 .butcher/types/MessageEntity/entity.json create mode 100644 .butcher/types/MessageEntity/replace.yml create mode 100644 .butcher/types/MessageId/entity.json create mode 100644 .butcher/types/OrderInfo/entity.json create mode 100644 .butcher/types/PassportData/entity.json create mode 100644 .butcher/types/PassportElementError/entity.json create mode 100644 .butcher/types/PassportElementError/replace.yml create mode 100644 .butcher/types/PassportElementErrorDataField/entity.json create mode 100644 .butcher/types/PassportElementErrorDataField/replace.yml create mode 100644 .butcher/types/PassportElementErrorFile/entity.json create mode 100644 .butcher/types/PassportElementErrorFile/replace.yml create mode 100644 .butcher/types/PassportElementErrorFiles/entity.json create mode 100644 .butcher/types/PassportElementErrorFiles/replace.yml create mode 100644 .butcher/types/PassportElementErrorFrontSide/entity.json create mode 100644 .butcher/types/PassportElementErrorFrontSide/replace.yml create mode 100644 .butcher/types/PassportElementErrorReverseSide/entity.json create mode 100644 .butcher/types/PassportElementErrorReverseSide/replace.yml create mode 100644 .butcher/types/PassportElementErrorSelfie/entity.json create mode 100644 .butcher/types/PassportElementErrorSelfie/replace.yml create mode 100644 .butcher/types/PassportElementErrorTranslationFile/entity.json create mode 100644 .butcher/types/PassportElementErrorTranslationFile/replace.yml create mode 100644 .butcher/types/PassportElementErrorTranslationFiles/entity.json create mode 100644 .butcher/types/PassportElementErrorTranslationFiles/replace.yml create mode 100644 .butcher/types/PassportElementErrorUnspecified/entity.json create mode 100644 .butcher/types/PassportElementErrorUnspecified/replace.yml create mode 100644 .butcher/types/PassportFile/entity.json create mode 100644 .butcher/types/PhotoSize/entity.json create mode 100644 .butcher/types/Poll/entity.json create mode 100644 .butcher/types/Poll/replace.yml create mode 100644 .butcher/types/PollAnswer/entity.json create mode 100644 .butcher/types/PollOption/entity.json create mode 100644 .butcher/types/PreCheckoutQuery/entity.json create mode 100644 .butcher/types/ProximityAlertTriggered/entity.json create mode 100644 .butcher/types/ReplyKeyboardMarkup/entity.json create mode 100644 .butcher/types/ReplyKeyboardMarkup/replace.yml create mode 100644 .butcher/types/ReplyKeyboardRemove/entity.json create mode 100644 .butcher/types/ReplyKeyboardRemove/replace.yml create mode 100644 .butcher/types/ResponseParameters/entity.json create mode 100644 .butcher/types/SentWebAppMessage/entity.json create mode 100644 .butcher/types/ShippingAddress/entity.json create mode 100644 .butcher/types/ShippingOption/entity.json create mode 100644 .butcher/types/ShippingQuery/entity.json create mode 100644 .butcher/types/Sticker/entity.json create mode 100644 .butcher/types/StickerSet/entity.json create mode 100644 .butcher/types/SuccessfulPayment/entity.json create mode 100644 .butcher/types/Update/entity.json create mode 100644 .butcher/types/User/entity.json create mode 100644 .butcher/types/UserProfilePhotos/entity.json create mode 100644 .butcher/types/Venue/entity.json create mode 100644 .butcher/types/Video/entity.json create mode 100644 .butcher/types/VideoChatEnded/entity.json create mode 100644 .butcher/types/VideoChatParticipantsInvited/entity.json create mode 100644 .butcher/types/VideoChatScheduled/entity.json create mode 100644 .butcher/types/VideoChatScheduled/replace.yml create mode 100644 .butcher/types/VideoChatStarted/entity.json create mode 100644 .butcher/types/VideoNote/entity.json create mode 100644 .butcher/types/Voice/entity.json create mode 100644 .butcher/types/WebAppData/entity.json create mode 100644 .butcher/types/WebAppInfo/entity.json create mode 100644 .butcher/types/WebhookInfo/entity.json create mode 100644 .butcher/types/WebhookInfo/replace.yml create mode 100644 CHANGES/1069.misc.rst create mode 100644 aiogram/enums/__init__.py create mode 100644 aiogram/enums/chat_type.py create mode 100644 aiogram/enums/content_type.py create mode 100644 aiogram/enums/dice_emoji.py create mode 100644 aiogram/enums/topic_icon_color.py create mode 100644 aiogram/enums/update_type.py delete mode 100644 aiogram/methods/get_chat_members_count.py delete mode 100644 aiogram/methods/kick_chat_member.py create mode 100644 docs/api/enums/chat_type.rst create mode 100644 docs/api/enums/content_type.rst create mode 100644 docs/api/enums/dice_emoji.rst create mode 100644 docs/api/enums/index.rst create mode 100644 docs/api/enums/topic_icon_color.rst create mode 100644 docs/api/enums/update_type.rst delete mode 100644 tests/test_api/test_methods/test_get_chat_members_count.py delete mode 100644 tests/test_api/test_methods/test_kick_chat_member.py diff --git a/.butcher/enums/chat_type.yml b/.butcher/enums/chat_type.yml new file mode 100644 index 00000000..2d43fc1e --- /dev/null +++ b/.butcher/enums/chat_type.yml @@ -0,0 +1,6 @@ +name: ChatType +description: "Type of chat" +parse: + entity: Chat + attribute: type + regexp: "'([a-z]+)'" diff --git a/.butcher/enums/content_type.yml b/.butcher/enums/content_type.yml new file mode 100644 index 00000000..7ee024d8 --- /dev/null +++ b/.butcher/enums/content_type.yml @@ -0,0 +1,32 @@ +name: ContentType +description: "Message content type" +static: + UNKNOWN: unknown + ANY: any +extract: + entity: Message + exclude: + - message_id + - message_thread_id + - from + - sender_chat + - date + - chat + - forward_from + - forward_from_chat + - forward_from_message_id + - forward_signature + - forward_sender_name + - forward_date + - is_topic_message + - is_automatic_forward + - via_bot + - edit_date + - has_protected_content + - media_group_id + - author_signature + - reply_markup + - entities + - caption + - caption_entities + - reply_to_message diff --git a/.butcher/enums/dice.yml b/.butcher/enums/dice.yml new file mode 100644 index 00000000..593cdad1 --- /dev/null +++ b/.butcher/enums/dice.yml @@ -0,0 +1,9 @@ +name: DiceEmoji +description: "Emoji on which the dice throw animation is based" +static: + DICE: ๐ŸŽฒ + DART: ๐ŸŽฏ + BASKETBALL: ๐Ÿ€ + FOOTBALL: โšฝ + SLOT_MACHINE: ๐ŸŽฐ + BOWLING: ๐ŸŽณ diff --git a/.butcher/enums/topic_icon_color.yml b/.butcher/enums/topic_icon_color.yml new file mode 100644 index 00000000..a60e73c6 --- /dev/null +++ b/.butcher/enums/topic_icon_color.yml @@ -0,0 +1,13 @@ +name: TopicIconColor +description: | + Color of the topic icon in RGB format. + + Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56 +type: int +static: + BLUE: "0x6FB9F0" + YELLOW: "0xFFD67E" + VIOLET: "0xCB86DB" + GREEN: "0x8EEE98" + ROSE: "0xFF93B2" + RED: "0xFB6F5F" diff --git a/.butcher/enums/update_type.yml b/.butcher/enums/update_type.yml new file mode 100644 index 00000000..28b6e3e8 --- /dev/null +++ b/.butcher/enums/update_type.yml @@ -0,0 +1,6 @@ +name: UpdateType +description: Known update types +extract: + entity: Update + exclude: + - update_id diff --git a/.butcher/methods/addStickerToSet/entity.json b/.butcher/methods/addStickerToSet/entity.json new file mode 100644 index 00000000..99217457 --- /dev/null +++ b/.butcher/methods/addStickerToSet/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "addstickertoset", + "name": "addStickerToSet", + "description": "Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.", + "html_description": "

Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.

", + "rst_description": "Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker set owner", + "html_description": "User identifier of sticker set owner", + "rst_description": "User identifier of sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "InputFile or String", + "required": false, + "description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "png_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "html_description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "rst_description": "**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements\n", + "name": "tgs_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "html_description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "rst_description": "**WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements\n", + "name": "webm_sticker" + }, + { + "type": "String", + "required": true, + "description": "One or more emoji corresponding to the sticker", + "html_description": "One or more emoji corresponding to the sticker", + "rst_description": "One or more emoji corresponding to the sticker\n", + "name": "emojis" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object for position where the mask should be placed on faces", + "html_description": "A JSON-serialized object for position where the mask should be placed on faces", + "rst_description": "A JSON-serialized object for position where the mask should be placed on faces\n", + "name": "mask_position" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerCallbackQuery/entity.json b/.butcher/methods/answerCallbackQuery/entity.json new file mode 100644 index 00000000..7d3cf16a --- /dev/null +++ b/.butcher/methods/answerCallbackQuery/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "answercallbackquery", + "name": "answerCallbackQuery", + "description": "Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.\nAlternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "

Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.

\n

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

\n
", + "rst_description": "Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned.\n\n Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "callback_query_id" + }, + { + "type": "String", + "required": false, + "description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "html_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "rst_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters\n", + "name": "text" + }, + { + "type": "Boolean", + "required": false, + "description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "html_description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "rst_description": "If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.\n", + "name": "show_alert" + }, + { + "type": "String", + "required": false, + "description": "URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.\n\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.
\n
\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "rst_description": "URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button.\n\n\n\nOtherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.\n", + "name": "url" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.", + "html_description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.", + "rst_description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.\n", + "name": "cache_time" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerInlineQuery/entity.json b/.butcher/methods/answerInlineQuery/entity.json new file mode 100644 index 00000000..fe5efa5e --- /dev/null +++ b/.butcher/methods/answerInlineQuery/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "answerinlinequery", + "name": "answerInlineQuery", + "description": "Use this method to send answers to an inline query. On success, True is returned.\nNo more than 50 results per query are allowed.", + "html_description": "

Use this method to send answers to an inline query. On success, True is returned.
\nNo more than 50 results per query are allowed.

", + "rst_description": "Use this method to send answers to an inline query. On success, :code:`True` is returned.\n\nNo more than **50** results per query are allowed.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the answered query", + "html_description": "Unique identifier for the answered query", + "rst_description": "Unique identifier for the answered query\n", + "name": "inline_query_id" + }, + { + "type": "Array of InlineQueryResult", + "required": true, + "description": "A JSON-serialized array of results for the inline query", + "html_description": "A JSON-serialized array of results for the inline query", + "rst_description": "A JSON-serialized array of results for the inline query\n", + "name": "results" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "html_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "rst_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.\n", + "name": "cache_time" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query", + "html_description": "Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query", + "rst_description": "Pass :code:`True` if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query\n", + "name": "is_personal" + }, + { + "type": "String", + "required": false, + "description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.", + "html_description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.", + "rst_description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.\n", + "name": "next_offset" + }, + { + "type": "String", + "required": false, + "description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter", + "html_description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter", + "rst_description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter*\n", + "name": "switch_pm_text" + }, + { + "type": "String", + "required": false, + "description": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.\n\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "html_description": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
\n
\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "rst_description": "`Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed.\n\n\n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a `https://core.telegram.org/bots/api#inlinekeyboardmarkup `_ *switch_inline* button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.\n", + "name": "switch_pm_parameter" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerPreCheckoutQuery/entity.json b/.butcher/methods/answerPreCheckoutQuery/entity.json new file mode 100644 index 00000000..7ab13902 --- /dev/null +++ b/.butcher/methods/answerPreCheckoutQuery/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "answerprecheckoutquery", + "name": "answerPreCheckoutQuery", + "description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.", + "html_description": "

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.

", + "rst_description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "pre_checkout_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "html_description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "rst_description": "Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems.\n", + "name": "ok" + }, + { + "type": "String", + "required": false, + "description": "Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.", + "html_description": "Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.", + "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.\n", + "name": "error_message" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerShippingQuery/entity.json b/.butcher/methods/answerShippingQuery/entity.json new file mode 100644 index 00000000..40a5d985 --- /dev/null +++ b/.butcher/methods/answerShippingQuery/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "answershippingquery", + "name": "answerShippingQuery", + "description": "If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.", + "html_description": "

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.

", + "rst_description": "If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "shipping_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "html_description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "rst_description": "Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)\n", + "name": "ok" + }, + { + "type": "Array of ShippingOption", + "required": false, + "description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "html_description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "rst_description": "Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.\n", + "name": "shipping_options" + }, + { + "type": "String", + "required": false, + "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", + "html_description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", + "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", + "name": "error_message" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/answerWebAppQuery/entity.json b/.butcher/methods/answerWebAppQuery/entity.json new file mode 100644 index 00000000..ad6d1ac4 --- /dev/null +++ b/.butcher/methods/answerWebAppQuery/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "answerwebappquery", + "name": "answerWebAppQuery", + "description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.", + "html_description": "

Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.

", + "rst_description": "Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "web_app_query_id" + }, + { + "type": "InlineQueryResult", + "required": true, + "description": "A JSON-serialized object describing the message to be sent", + "html_description": "A JSON-serialized object describing the message to be sent", + "rst_description": "A JSON-serialized object describing the message to be sent\n", + "name": "result" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/approveChatJoinRequest/entity.json b/.butcher/methods/approveChatJoinRequest/entity.json new file mode 100644 index 00000000..67275af0 --- /dev/null +++ b/.butcher/methods/approveChatJoinRequest/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "approvechatjoinrequest", + "name": "approveChatJoinRequest", + "description": "Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.", + "html_description": "

Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

", + "rst_description": "Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/banChatMember/entity.json b/.butcher/methods/banChatMember/entity.json new file mode 100644 index 00000000..4e2d7345 --- /dev/null +++ b/.butcher/methods/banChatMember/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "banchatmember", + "name": "banChatMember", + "description": "Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.", + "html_description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.", + "rst_description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.\n", + "name": "until_date" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "html_description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "rst_description": "Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.\n", + "name": "revoke_messages" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/banChatMember/replace.yml b/.butcher/methods/banChatMember/replace.yml new file mode 100644 index 00000000..04eda49f --- /dev/null +++ b/.butcher/methods/banChatMember/replace.yml @@ -0,0 +1,11 @@ +annotations: + until_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/banChatSenderChat/entity.json b/.butcher/methods/banChatSenderChat/entity.json new file mode 100644 index 00000000..f53b422d --- /dev/null +++ b/.butcher/methods/banChatSenderChat/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "banchatsenderchat", + "name": "banChatSenderChat", + "description": "Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/close/entity.json b/.butcher/methods/close/entity.json new file mode 100644 index 00000000..e7c4de18 --- /dev/null +++ b/.butcher/methods/close/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "close", + "name": "close", + "description": "Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.", + "html_description": "

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.

", + "rst_description": "Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/closeForumTopic/entity.json b/.butcher/methods/closeForumTopic/entity.json new file mode 100644 index 00000000..bed8f984 --- /dev/null +++ b/.butcher/methods/closeForumTopic/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "closeforumtopic", + "name": "closeForumTopic", + "description": "Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/copyMessage/entity.json b/.butcher/methods/copyMessage/entity.json new file mode 100644 index 00000000..20060294 --- /dev/null +++ b/.butcher/methods/copyMessage/entity.json @@ -0,0 +1,115 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "copymessage", + "name": "copyMessage", + "description": "Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.", + "html_description": "

Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.

", + "rst_description": "Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "html_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "rst_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the new caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/copyMessage/replace.yml b/.butcher/methods/copyMessage/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/copyMessage/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/createChatInviteLink/entity.json b/.butcher/methods/createChatInviteLink/entity.json new file mode 100644 index 00000000..5f495b74 --- /dev/null +++ b/.butcher/methods/createChatInviteLink/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "createchatinvitelink", + "name": "createChatInviteLink", + "description": "Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.", + "html_description": "

Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.

", + "rst_description": "Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified\n", + "name": "creates_join_request" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createChatInviteLink/replace.yml b/.butcher/methods/createChatInviteLink/replace.yml new file mode 100644 index 00000000..d5817af7 --- /dev/null +++ b/.butcher/methods/createChatInviteLink/replace.yml @@ -0,0 +1,11 @@ +annotations: + expire_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/createForumTopic/entity.json b/.butcher/methods/createForumTopic/entity.json new file mode 100644 index 00000000..6babdc43 --- /dev/null +++ b/.butcher/methods/createForumTopic/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "createforumtopic", + "name": "createForumTopic", + "description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.", + "html_description": "

Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.

", + "rst_description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Topic name, 1-128 characters", + "html_description": "Topic name, 1-128 characters", + "rst_description": "Topic name, 1-128 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)", + "html_description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)", + "rst_description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)\n", + "name": "icon_color" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "html_description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "rst_description": "Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createInvoiceLink/entity.json b/.butcher/methods/createInvoiceLink/entity.json new file mode 100644 index 00000000..e5880197 --- /dev/null +++ b/.butcher/methods/createInvoiceLink/entity.json @@ -0,0 +1,179 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "createinvoicelink", + "name": "createInvoiceLink", + "description": "Use this method to create a link for an invoice. Returns the created invoice link as String on success.", + "html_description": "

Use this method to create a link for an invoice. Returns the created invoice link as String on success.

", + "rst_description": "Use this method to create a link for an invoice. Returns the created invoice link as *String* on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "name": "payload" + }, + { + "type": "String", + "required": true, + "description": "Payment provider token, obtained via BotFather", + "html_description": "Payment provider token, obtained via BotFather", + "rst_description": "Payment provider token, obtained via `BotFather `_\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "html_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n", + "name": "prices" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "html_description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "rst_description": "A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "html_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "rst_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order", + "html_description": "Pass True if you require the user's full name to complete the order", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order", + "html_description": "Pass True if you require the user's phone number to complete the order", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order", + "html_description": "Pass True if you require the user's email address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order", + "html_description": "Pass True if you require the user's shipping address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to the provider", + "html_description": "Pass True if the user's phone number should be sent to the provider", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to the provider", + "html_description": "Pass True if the user's email address should be sent to the provider", + "rst_description": "Pass :code:`True` if the user's email address should be sent to the provider\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method", + "html_description": "Pass True if the final price depends on the shipping method", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method\n", + "name": "is_flexible" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/createNewStickerSet/entity.json b/.butcher/methods/createNewStickerSet/entity.json new file mode 100644 index 00000000..8589f80d --- /dev/null +++ b/.butcher/methods/createNewStickerSet/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "createnewstickerset", + "name": "createNewStickerSet", + "description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success.", + "html_description": "

Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success.

", + "rst_description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of created sticker set owner", + "html_description": "User identifier of created sticker set owner", + "rst_description": "User identifier of created sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in \"_by_\". is case insensitive. 1-64 characters.", + "html_description": "Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in \"_by_<bot_username>\". <bot_username> is case insensitive. 1-64 characters.", + "rst_description": "Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`\"_by_\"`. :code:`` is case insensitive. 1-64 characters.\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "Sticker set title, 1-64 characters", + "html_description": "Sticker set title, 1-64 characters", + "rst_description": "Sticker set title, 1-64 characters\n", + "name": "title" + }, + { + "type": "InputFile or String", + "required": false, + "description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "png_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "html_description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "rst_description": "**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements\n", + "name": "tgs_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "html_description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "rst_description": "**WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements\n", + "name": "webm_sticker" + }, + { + "type": "String", + "required": false, + "description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.", + "html_description": "Type of stickers in the set, pass “regular” or “mask”. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.", + "rst_description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.\n", + "name": "sticker_type" + }, + { + "type": "String", + "required": true, + "description": "One or more emoji corresponding to the sticker", + "html_description": "One or more emoji corresponding to the sticker", + "rst_description": "One or more emoji corresponding to the sticker\n", + "name": "emojis" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object for position where the mask should be placed on faces", + "html_description": "A JSON-serialized object for position where the mask should be placed on faces", + "rst_description": "A JSON-serialized object for position where the mask should be placed on faces\n", + "name": "mask_position" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/declineChatJoinRequest/entity.json b/.butcher/methods/declineChatJoinRequest/entity.json new file mode 100644 index 00000000..88134d68 --- /dev/null +++ b/.butcher/methods/declineChatJoinRequest/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "declinechatjoinrequest", + "name": "declineChatJoinRequest", + "description": "Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.", + "html_description": "

Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

", + "rst_description": "Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteChatPhoto/entity.json b/.butcher/methods/deleteChatPhoto/entity.json new file mode 100644 index 00000000..2037a932 --- /dev/null +++ b/.butcher/methods/deleteChatPhoto/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletechatphoto", + "name": "deleteChatPhoto", + "description": "Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteChatStickerSet/entity.json b/.butcher/methods/deleteChatStickerSet/entity.json new file mode 100644 index 00000000..85091a8e --- /dev/null +++ b/.butcher/methods/deleteChatStickerSet/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletechatstickerset", + "name": "deleteChatStickerSet", + "description": "Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteForumTopic/entity.json b/.butcher/methods/deleteForumTopic/entity.json new file mode 100644 index 00000000..3fbc6b8e --- /dev/null +++ b/.butcher/methods/deleteForumTopic/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deleteforumtopic", + "name": "deleteForumTopic", + "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.", + "html_description": "

Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

", + "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteMessage/entity.json b/.butcher/methods/deleteMessage/entity.json new file mode 100644 index 00000000..101cac70 --- /dev/null +++ b/.butcher/methods/deleteMessage/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "deletemessage", + "name": "deleteMessage", + "description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n- Bots can delete incoming messages in private chats.\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.\nReturns True on success.", + "html_description": "

Use this method to delete a message, including service messages, with the following limitations:
\n- A message can only be deleted if it was sent less than 48 hours ago.
\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.
\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
\n- Bots can delete outgoing messages in private chats, groups, and supergroups.
\n- Bots can delete incoming messages in private chats.
\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.
\n- If the bot is an administrator of a group, it can delete any message there.
\n- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
\nReturns True on success.

", + "rst_description": "Use this method to delete a message, including service messages, with the following limitations:\n\n- A message can only be deleted if it was sent less than 48 hours ago.\n\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n\n- Bots can delete incoming messages in private chats.\n\n- Bots granted *can_post_messages* permissions can delete outgoing messages in channels.\n\n- If the bot is an administrator of a group, it can delete any message there.\n\n- If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there.\n\nReturns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the message to delete", + "html_description": "Identifier of the message to delete", + "rst_description": "Identifier of the message to delete\n", + "name": "message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteMyCommands/entity.json b/.butcher/methods/deleteMyCommands/entity.json new file mode 100644 index 00000000..1387029c --- /dev/null +++ b/.butcher/methods/deleteMyCommands/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "deletemycommands", + "name": "deleteMyCommands", + "description": "Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.", + "html_description": "

Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.

", + "rst_description": "Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands `_ will be shown to affected users. Returns :code:`True` on success.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "html_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "rst_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteStickerFromSet/entity.json b/.butcher/methods/deleteStickerFromSet/entity.json new file mode 100644 index 00000000..db88dbd7 --- /dev/null +++ b/.butcher/methods/deleteStickerFromSet/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "deletestickerfromset", + "name": "deleteStickerFromSet", + "description": "Use this method to delete a sticker from a set created by the bot. Returns True on success.", + "html_description": "

Use this method to delete a sticker from a set created by the bot. Returns True on success.

", + "rst_description": "Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/deleteWebhook/entity.json b/.butcher/methods/deleteWebhook/entity.json new file mode 100644 index 00000000..36b6210a --- /dev/null +++ b/.butcher/methods/deleteWebhook/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "deletewebhook", + "name": "deleteWebhook", + "description": "Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.", + "html_description": "

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

", + "rst_description": "Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editChatInviteLink/entity.json b/.butcher/methods/editChatInviteLink/entity.json new file mode 100644 index 00000000..de98d31b --- /dev/null +++ b/.butcher/methods/editChatInviteLink/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editchatinvitelink", + "name": "editChatInviteLink", + "description": "Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.", + "html_description": "

Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.

", + "rst_description": "Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "The invite link to edit", + "html_description": "The invite link to edit", + "rst_description": "The invite link to edit\n", + "name": "invite_link" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified\n", + "name": "creates_join_request" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editChatInviteLink/replace.yml b/.butcher/methods/editChatInviteLink/replace.yml new file mode 100644 index 00000000..d5817af7 --- /dev/null +++ b/.butcher/methods/editChatInviteLink/replace.yml @@ -0,0 +1,11 @@ +annotations: + expire_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/editForumTopic/entity.json b/.butcher/methods/editForumTopic/entity.json new file mode 100644 index 00000000..8afac424 --- /dev/null +++ b/.butcher/methods/editForumTopic/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editforumtopic", + "name": "editForumTopic", + "description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "New topic name, 1-128 characters", + "html_description": "New topic name, 1-128 characters", + "rst_description": "New topic name, 1-128 characters\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "rst_description": "New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageCaption/entity.json b/.butcher/methods/editMessageCaption/entity.json new file mode 100644 index 00000000..3c54c21a --- /dev/null +++ b/.butcher/methods/editMessageCaption/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagecaption", + "name": "editMessageCaption", + "description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": false, + "description": "New caption of the message, 0-1024 characters after entities parsing", + "html_description": "New caption of the message, 0-1024 characters after entities parsing", + "rst_description": "New caption of the message, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageCaption/replace.yml b/.butcher/methods/editMessageCaption/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/editMessageCaption/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/editMessageLiveLocation/entity.json b/.butcher/methods/editMessageLiveLocation/entity.json new file mode 100644 index 00000000..7605f142 --- /dev/null +++ b/.butcher/methods/editMessageLiveLocation/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editmessagelivelocation", + "name": "editMessageLiveLocation", + "description": "Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "Float number", + "required": true, + "description": "Latitude of new location", + "html_description": "Latitude of new location", + "rst_description": "Latitude of new location\n", + "name": "latitude" + }, + { + "type": "Float number", + "required": true, + "description": "Longitude of new location", + "html_description": "Longitude of new location", + "rst_description": "Longitude of new location\n", + "name": "longitude" + }, + { + "type": "Float number", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageMedia/entity.json b/.butcher/methods/editMessageMedia/entity.json new file mode 100644 index 00000000..f1b1064f --- /dev/null +++ b/.butcher/methods/editMessageMedia/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagemedia", + "name": "editMessageMedia", + "description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InputMedia", + "required": true, + "description": "A JSON-serialized object for a new media content of the message", + "html_description": "A JSON-serialized object for a new media content of the message", + "rst_description": "A JSON-serialized object for a new media content of the message\n", + "name": "media" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageReplyMarkup/entity.json b/.butcher/methods/editMessageReplyMarkup/entity.json new file mode 100644 index 00000000..f10af9c4 --- /dev/null +++ b/.butcher/methods/editMessageReplyMarkup/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagereplymarkup", + "name": "editMessageReplyMarkup", + "description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageText/entity.json b/.butcher/methods/editMessageText/entity.json new file mode 100644 index 00000000..e0ffb699 --- /dev/null +++ b/.butcher/methods/editMessageText/entity.json @@ -0,0 +1,83 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "editmessagetext", + "name": "editMessageText", + "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": true, + "description": "New text of the message, 1-4096 characters after entities parsing", + "html_description": "New text of the message, 1-4096 characters after entities parsing", + "rst_description": "New text of the message, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables link previews for links in this message", + "html_description": "Disables link previews for links in this message", + "rst_description": "Disables link previews for links in this message\n", + "name": "disable_web_page_preview" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageText/replace.yml b/.butcher/methods/editMessageText/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/editMessageText/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/exportChatInviteLink/entity.json b/.butcher/methods/exportChatInviteLink/entity.json new file mode 100644 index 00000000..38475f80 --- /dev/null +++ b/.butcher/methods/exportChatInviteLink/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "exportchatinvitelink", + "name": "exportChatInviteLink", + "description": "Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.\nNote: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.", + "html_description": "

Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.

\n

Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.

\n
", + "rst_description": "Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success.\n\n Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/forwardMessage/entity.json b/.butcher/methods/forwardMessage/entity.json new file mode 100644 index 00000000..e6a696b0 --- /dev/null +++ b/.butcher/methods/forwardMessage/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "forwardmessage", + "name": "forwardMessage", + "description": "Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.", + "html_description": "

Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.

", + "rst_description": "Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the forwarded message from forwarding and saving", + "html_description": "Protects the contents of the forwarded message from forwarding and saving", + "rst_description": "Protects the contents of the forwarded message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": true, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", + "name": "message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChat/entity.json b/.butcher/methods/getChat/entity.json new file mode 100644 index 00000000..1cb2f382 --- /dev/null +++ b/.butcher/methods/getChat/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchat", + "name": "getChat", + "description": "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.", + "html_description": "

Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.

", + "rst_description": "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a :class:`aiogram.types.chat.Chat` object on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatAdministrators/entity.json b/.butcher/methods/getChatAdministrators/entity.json new file mode 100644 index 00000000..d06b8923 --- /dev/null +++ b/.butcher/methods/getChatAdministrators/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatadministrators", + "name": "getChatAdministrators", + "description": "Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.", + "html_description": "

Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.

", + "rst_description": "Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatAdministrators/replace.yml b/.butcher/methods/getChatAdministrators/replace.yml new file mode 100644 index 00000000..5b17d2f6 --- /dev/null +++ b/.butcher/methods/getChatAdministrators/replace.yml @@ -0,0 +1,30 @@ +returning: + parsed_type: + type: array + items: + type: union + items: + - type: entity + references: + category: types + name: ChatMemberOwner + - type: entity + references: + category: types + name: ChatMemberAdministrator + - type: entity + references: + category: types + name: ChatMemberMember + - type: entity + references: + category: types + name: ChatMemberRestricted + - type: entity + references: + category: types + name: ChatMemberLeft + - type: entity + references: + category: types + name: ChatMemberBanned diff --git a/.butcher/methods/getChatMember/entity.json b/.butcher/methods/getChatMember/entity.json new file mode 100644 index 00000000..4888f3b3 --- /dev/null +++ b/.butcher/methods/getChatMember/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatmember", + "name": "getChatMember", + "description": "Use this method to get information about a member of a chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMember/replace.yml b/.butcher/methods/getChatMember/replace.yml new file mode 100644 index 00000000..3af68560 --- /dev/null +++ b/.butcher/methods/getChatMember/replace.yml @@ -0,0 +1,28 @@ +returning: + parsed_type: + type: union + items: + - type: entity + references: + category: types + name: ChatMemberOwner + - type: entity + references: + category: types + name: ChatMemberAdministrator + - type: entity + references: + category: types + name: ChatMemberMember + - type: entity + references: + category: types + name: ChatMemberRestricted + - type: entity + references: + category: types + name: ChatMemberLeft + - type: entity + references: + category: types + name: ChatMemberBanned diff --git a/.butcher/methods/getChatMemberCount/entity.json b/.butcher/methods/getChatMemberCount/entity.json new file mode 100644 index 00000000..893eee1a --- /dev/null +++ b/.butcher/methods/getChatMemberCount/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatmembercount", + "name": "getChatMemberCount", + "description": "Use this method to get the number of members in a chat. Returns Int on success.", + "html_description": "

Use this method to get the number of members in a chat. Returns Int on success.

", + "rst_description": "Use this method to get the number of members in a chat. Returns *Int* on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMenuButton/entity.json b/.butcher/methods/getChatMenuButton/entity.json new file mode 100644 index 00000000..95563eaa --- /dev/null +++ b/.butcher/methods/getChatMenuButton/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getchatmenubutton", + "name": "getChatMenuButton", + "description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.", + "html_description": "

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.

", + "rst_description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMenuButton/replace.yml b/.butcher/methods/getChatMenuButton/replace.yml new file mode 100644 index 00000000..66c6d5b6 --- /dev/null +++ b/.butcher/methods/getChatMenuButton/replace.yml @@ -0,0 +1,16 @@ +returning: + parsed_type: + type: union + items: + - type: entity + references: + category: types + name: MenuButtonDefault + - type: entity + references: + category: types + name: MenuButtonWebApp + - type: entity + references: + category: types + name: MenuButtonCommands diff --git a/.butcher/methods/getCustomEmojiStickers/entity.json b/.butcher/methods/getCustomEmojiStickers/entity.json new file mode 100644 index 00000000..99968ab5 --- /dev/null +++ b/.butcher/methods/getCustomEmojiStickers/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "getcustomemojistickers", + "name": "getCustomEmojiStickers", + "description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.", + "html_description": "

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.

", + "rst_description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.", + "annotations": [ + { + "type": "Array of String", + "required": true, + "description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "html_description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "rst_description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.\n", + "name": "custom_emoji_ids" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getFile/entity.json b/.butcher/methods/getFile/entity.json new file mode 100644 index 00000000..1b3195aa --- /dev/null +++ b/.butcher/methods/getFile/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getfile", + "name": "getFile", + "description": "Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.\nNote: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "html_description": "

Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.

Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.

", + "rst_description": "Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again.\n**Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier to get information about", + "html_description": "File identifier to get information about", + "rst_description": "File identifier to get information about\n", + "name": "file_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getForumTopicIconStickers/entity.json b/.butcher/methods/getForumTopicIconStickers/entity.json new file mode 100644 index 00000000..2aa5c6e8 --- /dev/null +++ b/.butcher/methods/getForumTopicIconStickers/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getforumtopiciconstickers", + "name": "getForumTopicIconStickers", + "description": "Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.", + "html_description": "

Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.

", + "rst_description": "Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/getGameHighScores/entity.json b/.butcher/methods/getGameHighScores/entity.json new file mode 100644 index 00000000..d6839809 --- /dev/null +++ b/.butcher/methods/getGameHighScores/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "getgamehighscores", + "name": "getGameHighScores", + "description": "Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.\nThis method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "html_description": "

Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.

\n

This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.

\n
", + "rst_description": "Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects.\n\n This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Target user id", + "html_description": "Target user id", + "rst_description": "Target user id\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getMe/entity.json b/.butcher/methods/getMe/entity.json new file mode 100644 index 00000000..74e6b471 --- /dev/null +++ b/.butcher/methods/getMe/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getme", + "name": "getMe", + "description": "A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.", + "html_description": "

A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.

", + "rst_description": "A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyCommands/entity.json b/.butcher/methods/getMyCommands/entity.json new file mode 100644 index 00000000..02dd72a5 --- /dev/null +++ b/.butcher/methods/getMyCommands/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmycommands", + "name": "getMyCommands", + "description": "Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.", + "html_description": "

Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.

", + "rst_description": "Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getMyDefaultAdministratorRights/entity.json b/.butcher/methods/getMyDefaultAdministratorRights/entity.json new file mode 100644 index 00000000..1d1c920f --- /dev/null +++ b/.butcher/methods/getMyDefaultAdministratorRights/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmydefaultadministratorrights", + "name": "getMyDefaultAdministratorRights", + "description": "Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.", + "html_description": "

Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.

", + "rst_description": "Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.", + "html_description": "Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.", + "rst_description": "Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.\n", + "name": "for_channels" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getStickerSet/entity.json b/.butcher/methods/getStickerSet/entity.json new file mode 100644 index 00000000..e0f24e22 --- /dev/null +++ b/.butcher/methods/getStickerSet/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "getstickerset", + "name": "getStickerSet", + "description": "Use this method to get a sticker set. On success, a StickerSet object is returned.", + "html_description": "

Use this method to get a sticker set. On success, a StickerSet object is returned.

", + "rst_description": "Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Name of the sticker set", + "html_description": "Name of the sticker set", + "rst_description": "Name of the sticker set\n", + "name": "name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getUpdates/entity.json b/.butcher/methods/getUpdates/entity.json new file mode 100644 index 00000000..f448940a --- /dev/null +++ b/.butcher/methods/getUpdates/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "getupdates", + "name": "getUpdates", + "description": "Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.\nNotes\n1. This method will not work if an outgoing webhook is set up.\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.", + "html_description": "

Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.

\n

Notes
\n1. This method will not work if an outgoing webhook is set up.
\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.

\n
", + "rst_description": "Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects.\n\n **Notes**\n \n **1.** This method will not work if an outgoing webhook is set up.\n \n **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.", + "html_description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.", + "rst_description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + }, + { + "type": "Integer", + "required": false, + "description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.", + "html_description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.", + "rst_description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.\n", + "name": "timeout" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", + "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
\n
\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", + "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used.\n\n\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.\n", + "name": "allowed_updates" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getUserProfilePhotos/entity.json b/.butcher/methods/getUserProfilePhotos/entity.json new file mode 100644 index 00000000..5535a1aa --- /dev/null +++ b/.butcher/methods/getUserProfilePhotos/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getuserprofilephotos", + "name": "getUserProfilePhotos", + "description": "Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.", + "html_description": "

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

", + "rst_description": "Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Sequential number of the first photo to be returned. By default, all photos are returned.", + "html_description": "Sequential number of the first photo to be returned. By default, all photos are returned.", + "rst_description": "Sequential number of the first photo to be returned. By default, all photos are returned.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getWebhookInfo/entity.json b/.butcher/methods/getWebhookInfo/entity.json new file mode 100644 index 00000000..5eb412f3 --- /dev/null +++ b/.butcher/methods/getWebhookInfo/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "getwebhookinfo", + "name": "getWebhookInfo", + "description": "Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.", + "html_description": "

Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.

", + "rst_description": "Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/leaveChat/entity.json b/.butcher/methods/leaveChat/entity.json new file mode 100644 index 00000000..54c4d7a2 --- /dev/null +++ b/.butcher/methods/leaveChat/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "leavechat", + "name": "leaveChat", + "description": "Use this method for your bot to leave a group, supergroup or channel. Returns True on success.", + "html_description": "

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

", + "rst_description": "Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/logOut/entity.json b/.butcher/methods/logOut/entity.json new file mode 100644 index 00000000..5b53b8c3 --- /dev/null +++ b/.butcher/methods/logOut/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "logout", + "name": "logOut", + "description": "Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.", + "html_description": "

Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.

", + "rst_description": "Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters.", + "annotations": [], + "category": "methods" + } +} diff --git a/.butcher/methods/pinChatMessage/entity.json b/.butcher/methods/pinChatMessage/entity.json new file mode 100644 index 00000000..1b43e7ed --- /dev/null +++ b/.butcher/methods/pinChatMessage/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "pinchatmessage", + "name": "pinChatMessage", + "description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", + "html_description": "

Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", + "rst_description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of a message to pin", + "html_description": "Identifier of a message to pin", + "rst_description": "Identifier of a message to pin\n", + "name": "message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.", + "html_description": "Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.", + "rst_description": "Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.\n", + "name": "disable_notification" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json new file mode 100644 index 00000000..4b3aa338 --- /dev/null +++ b/.butcher/methods/promoteChatMember/entity.json @@ -0,0 +1,131 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "promotechatmember", + "name": "promoteChatMember", + "description": "Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.", + "html_description": "

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.

", + "rst_description": "Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator's presence in the chat is hidden", + "html_description": "Pass True if the administrator's presence in the chat is hidden", + "rst_description": "Pass :code:`True` if the administrator's presence in the chat is hidden\n", + "name": "is_anonymous" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "html_description": "Pass True if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "rst_description": "Pass :code:`True` if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n", + "name": "can_manage_chat" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can create channel posts, channels only", + "html_description": "Pass True if the administrator can create channel posts, channels only", + "rst_description": "Pass :code:`True` if the administrator can create channel posts, channels only\n", + "name": "can_post_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can edit messages of other users and can pin messages, channels only", + "html_description": "Pass True if the administrator can edit messages of other users and can pin messages, channels only", + "rst_description": "Pass :code:`True` if the administrator can edit messages of other users and can pin messages, channels only\n", + "name": "can_edit_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can delete messages of other users", + "html_description": "Pass True if the administrator can delete messages of other users", + "rst_description": "Pass :code:`True` if the administrator can delete messages of other users\n", + "name": "can_delete_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can manage video chats", + "html_description": "Pass True if the administrator can manage video chats", + "rst_description": "Pass :code:`True` if the administrator can manage video chats\n", + "name": "can_manage_video_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can restrict, ban or unban chat members", + "html_description": "Pass True if the administrator can restrict, ban or unban chat members", + "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members\n", + "name": "can_restrict_members" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)", + "html_description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)", + "rst_description": "Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)\n", + "name": "can_promote_members" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can change chat title, photo and other settings", + "html_description": "Pass True if the administrator can change chat title, photo and other settings", + "rst_description": "Pass :code:`True` if the administrator can change chat title, photo and other settings\n", + "name": "can_change_info" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can invite new users to the chat", + "html_description": "Pass True if the administrator can invite new users to the chat", + "rst_description": "Pass :code:`True` if the administrator can invite new users to the chat\n", + "name": "can_invite_users" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can pin messages, supergroups only", + "html_description": "Pass True if the administrator can pin messages, supergroups only", + "rst_description": "Pass :code:`True` if the administrator can pin messages, supergroups only\n", + "name": "can_pin_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only", + "html_description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only", + "rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only\n", + "name": "can_manage_topics" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/reopenForumTopic/entity.json b/.butcher/methods/reopenForumTopic/entity.json new file mode 100644 index 00000000..6d0c5512 --- /dev/null +++ b/.butcher/methods/reopenForumTopic/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "reopenforumtopic", + "name": "reopenForumTopic", + "description": "Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/restrictChatMember/entity.json b/.butcher/methods/restrictChatMember/entity.json new file mode 100644 index 00000000..063d8b43 --- /dev/null +++ b/.butcher/methods/restrictChatMember/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "restrictchatmember", + "name": "restrictChatMember", + "description": "Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.", + "html_description": "

Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.

", + "rst_description": "Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new user permissions", + "html_description": "A JSON-serialized object for new user permissions", + "rst_description": "A JSON-serialized object for new user permissions\n", + "name": "permissions" + }, + { + "type": "Integer", + "required": false, + "description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever", + "html_description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever", + "rst_description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever\n", + "name": "until_date" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/restrictChatMember/replace.yml b/.butcher/methods/restrictChatMember/replace.yml new file mode 100644 index 00000000..04eda49f --- /dev/null +++ b/.butcher/methods/restrictChatMember/replace.yml @@ -0,0 +1,11 @@ +annotations: + until_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/revokeChatInviteLink/entity.json b/.butcher/methods/revokeChatInviteLink/entity.json new file mode 100644 index 00000000..093db6a7 --- /dev/null +++ b/.butcher/methods/revokeChatInviteLink/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "revokechatinvitelink", + "name": "revokeChatInviteLink", + "description": "Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.", + "html_description": "

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.

", + "rst_description": "Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "The invite link to revoke", + "html_description": "The invite link to revoke", + "rst_description": "The invite link to revoke\n", + "name": "invite_link" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json new file mode 100644 index 00000000..aea0f674 --- /dev/null +++ b/.butcher/methods/sendAnimation/entity.json @@ -0,0 +1,139 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendanimation", + "name": "sendAnimation", + "description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. More information on Sending Files", + "html_description": "Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. More information on Sending Files »", + "rst_description": "Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "animation" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent animation in seconds", + "html_description": "Duration of sent animation in seconds", + "rst_description": "Duration of sent animation in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Animation width", + "html_description": "Animation width", + "rst_description": "Animation width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Animation height", + "html_description": "Animation height", + "rst_description": "Animation height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "String", + "required": false, + "description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "html_description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "rst_description": "Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the animation caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendAnimation/replace.yml b/.butcher/methods/sendAnimation/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/sendAnimation/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/sendAudio/entity.json b/.butcher/methods/sendAudio/entity.json new file mode 100644 index 00000000..a2a3ff84 --- /dev/null +++ b/.butcher/methods/sendAudio/entity.json @@ -0,0 +1,139 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendaudio", + "name": "sendAudio", + "description": "Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the sendVoice method instead.", + "html_description": "

Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

For sending voice messages, use the sendVoice method instead.

", + "rst_description": "Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "audio" + }, + { + "type": "String", + "required": false, + "description": "Audio caption, 0-1024 characters after entities parsing", + "html_description": "Audio caption, 0-1024 characters after entities parsing", + "rst_description": "Audio caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of the audio in seconds", + "html_description": "Duration of the audio in seconds", + "rst_description": "Duration of the audio in seconds\n", + "name": "duration" + }, + { + "type": "String", + "required": false, + "description": "Performer", + "html_description": "Performer", + "rst_description": "Performer\n", + "name": "performer" + }, + { + "type": "String", + "required": false, + "description": "Track name", + "html_description": "Track name", + "rst_description": "Track name\n", + "name": "title" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendAudio/replace.yml b/.butcher/methods/sendAudio/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/sendAudio/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/sendChatAction/entity.json b/.butcher/methods/sendChatAction/entity.json new file mode 100644 index 00000000..ac43f7b8 --- /dev/null +++ b/.butcher/methods/sendChatAction/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendchataction", + "name": "sendChatAction", + "description": "Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.\nExample: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please waitโ€ฆ', the bot may use sendChatAction with action = upload_photo. The user will see a 'sending photo' status for the bot.\nWe only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.", + "html_description": "

Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.

\n

Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.

\n

We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.

", + "rst_description": "Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success.\n\n Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please waitโ€ฆ', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot.\n\nWe only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.", + "html_description": "Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.", + "rst_description": "Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.\n", + "name": "action" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendContact/entity.json b/.butcher/methods/sendContact/entity.json new file mode 100644 index 00000000..d5c72946 --- /dev/null +++ b/.butcher/methods/sendContact/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendcontact", + "name": "sendContact", + "description": "Use this method to send phone contacts. On success, the sent Message is returned.", + "html_description": "

Use this method to send phone contacts. On success, the sent Message is returned.

", + "rst_description": "Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number" + }, + { + "type": "String", + "required": true, + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name" + }, + { + "type": "String", + "required": false, + "description": "Contact's last name", + "html_description": "Contact's last name", + "rst_description": "Contact's last name\n", + "name": "last_name" + }, + { + "type": "String", + "required": false, + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendDice/entity.json b/.butcher/methods/sendDice/entity.json new file mode 100644 index 00000000..08d5dd75 --- /dev/null +++ b/.butcher/methods/sendDice/entity.json @@ -0,0 +1,83 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "senddice", + "name": "sendDice", + "description": "Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.", + "html_description": "

Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.

", + "rst_description": "Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": false, + "description": "Emoji on which the dice throw animation is based. Currently, must be one of '', '', '', '', '', or ''. Dice can have values 1-6 for '', '' and '', values 1-5 for '' and '', and values 1-64 for ''. Defaults to ''", + "html_description": "Emoji on which the dice throw animation is based. Currently, must be one of “\"🎲\"/”, “\"🎯\"/”, “\"🏀\"/”, “\"⚽\"/”, “\"🎳\"/”, or “\"🎰\"/”. Dice can have values 1-6 for “\"🎲\"/”, “\"🎯\"/” and “\"🎳\"/”, values 1-5 for “\"🏀\"/” and “\"⚽\"/”, and values 1-64 for “\"🎰\"/”. Defaults to “\"🎲\"/”", + "rst_description": "Emoji on which the dice throw animation is based. Currently, must be one of '๐ŸŽฒ', '๐ŸŽฏ', '๐Ÿ€', 'โšฝ', '๐ŸŽณ', or '๐ŸŽฐ'. Dice can have values 1-6 for '๐ŸŽฒ', '๐ŸŽฏ' and '๐ŸŽณ', values 1-5 for '๐Ÿ€' and 'โšฝ', and values 1-64 for '๐ŸŽฐ'. Defaults to '๐ŸŽฒ'\n", + "name": "emoji" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding", + "html_description": "Protects the contents of the sent message from forwarding", + "rst_description": "Protects the contents of the sent message from forwarding\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendDocument/entity.json b/.butcher/methods/sendDocument/entity.json new file mode 100644 index 00000000..e6295586 --- /dev/null +++ b/.butcher/methods/sendDocument/entity.json @@ -0,0 +1,123 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "senddocument", + "name": "sendDocument", + "description": "Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "document" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "String", + "required": false, + "description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "html_description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "rst_description": "Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "html_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "rst_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data\n", + "name": "disable_content_type_detection" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendDocument/replace.yml b/.butcher/methods/sendDocument/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/sendDocument/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/sendGame/entity.json b/.butcher/methods/sendGame/entity.json new file mode 100644 index 00000000..cc4626cf --- /dev/null +++ b/.butcher/methods/sendGame/entity.json @@ -0,0 +1,83 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "sendgame", + "name": "sendGame", + "description": "Use this method to send a game. On success, the sent Message is returned.", + "html_description": "

Use this method to send a game. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target chat", + "html_description": "Unique identifier for the target chat", + "rst_description": "Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "html_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "rst_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.\n", + "name": "game_short_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.", + "html_description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendInvoice/entity.json b/.butcher/methods/sendInvoice/entity.json new file mode 100644 index 00000000..69eaa36d --- /dev/null +++ b/.butcher/methods/sendInvoice/entity.json @@ -0,0 +1,243 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "sendinvoice", + "name": "sendInvoice", + "description": "Use this method to send invoices. On success, the sent Message is returned.", + "html_description": "

Use this method to send invoices. On success, the sent Message is returned.

", + "rst_description": "Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "name": "payload" + }, + { + "type": "String", + "required": true, + "description": "Payment provider token, obtained via @BotFather", + "html_description": "Payment provider token, obtained via @BotFather", + "rst_description": "Payment provider token, obtained via `@BotFather `_\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "html_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n", + "name": "prices" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "html_description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "rst_description": "A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter", + "html_description": "Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter", + "rst_description": "Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter\n", + "name": "start_parameter" + }, + { + "type": "String", + "required": false, + "description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "html_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "rst_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.", + "html_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.", + "rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order", + "html_description": "Pass True if you require the user's full name to complete the order", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order", + "html_description": "Pass True if you require the user's phone number to complete the order", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order", + "html_description": "Pass True if you require the user's email address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order", + "html_description": "Pass True if you require the user's shipping address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to provider", + "html_description": "Pass True if the user's phone number should be sent to provider", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to provider\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to provider", + "html_description": "Pass True if the user's email address should be sent to provider", + "rst_description": "Pass :code:`True` if the user's email address should be sent to provider\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method", + "html_description": "Pass True if the final price depends on the shipping method", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method\n", + "name": "is_flexible" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "html_description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendLocation/entity.json b/.butcher/methods/sendLocation/entity.json new file mode 100644 index 00000000..15423ca0 --- /dev/null +++ b/.butcher/methods/sendLocation/entity.json @@ -0,0 +1,123 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendlocation", + "name": "sendLocation", + "description": "Use this method to send point on the map. On success, the sent Message is returned.", + "html_description": "

Use this method to send point on the map. On success, the sent Message is returned.

", + "rst_description": "Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Float number", + "required": true, + "description": "Latitude of the location", + "html_description": "Latitude of the location", + "rst_description": "Latitude of the location\n", + "name": "latitude" + }, + { + "type": "Float number", + "required": true, + "description": "Longitude of the location", + "html_description": "Longitude of the location", + "rst_description": "Longitude of the location\n", + "name": "longitude" + }, + { + "type": "Float number", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", + "html_description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", + "rst_description": "Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400.\n", + "name": "live_period" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendMediaGroup/entity.json b/.butcher/methods/sendMediaGroup/entity.json new file mode 100644 index 00000000..0bb9bcf7 --- /dev/null +++ b/.butcher/methods/sendMediaGroup/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendmediagroup", + "name": "sendMediaGroup", + "description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.", + "html_description": "

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.

", + "rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", + "required": true, + "description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "html_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "rst_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items\n", + "name": "media" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends messages silently. Users will receive a notification with no sound.", + "html_description": "Sends messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent messages from forwarding and saving", + "html_description": "Protects the contents of the sent messages from forwarding and saving", + "rst_description": "Protects the contents of the sent messages from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the messages are a reply, ID of the original message", + "html_description": "If the messages are a reply, ID of the original message", + "rst_description": "If the messages are a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendMessage/entity.json b/.butcher/methods/sendMessage/entity.json new file mode 100644 index 00000000..9ad354eb --- /dev/null +++ b/.butcher/methods/sendMessage/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendmessage", + "name": "sendMessage", + "description": "Use this method to send text messages. On success, the sent Message is returned.", + "html_description": "

Use this method to send text messages. On success, the sent Message is returned.

", + "rst_description": "Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "html_description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "rst_description": "Text of the message to be sent, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables link previews for links in this message", + "html_description": "Disables link previews for links in this message", + "rst_description": "Disables link previews for links in this message\n", + "name": "disable_web_page_preview" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendMessage/replace.yml b/.butcher/methods/sendMessage/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/sendMessage/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json new file mode 100644 index 00000000..05dea124 --- /dev/null +++ b/.butcher/methods/sendPhoto/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendphoto", + "name": "sendPhoto", + "description": "Use this method to send photos. On success, the sent Message is returned.", + "html_description": "

Use this method to send photos. On success, the sent Message is returned.

", + "rst_description": "Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. More information on Sending Files", + "html_description": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. More information on Sending Files »", + "rst_description": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `\n", + "name": "photo" + }, + { + "type": "String", + "required": false, + "description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "html_description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendPhoto/replace.yml b/.butcher/methods/sendPhoto/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/sendPhoto/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/sendPoll/entity.json b/.butcher/methods/sendPoll/entity.json new file mode 100644 index 00000000..033f515a --- /dev/null +++ b/.butcher/methods/sendPoll/entity.json @@ -0,0 +1,171 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendpoll", + "name": "sendPoll", + "description": "Use this method to send a native poll. On success, the sent Message is returned.", + "html_description": "

Use this method to send a native poll. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question" + }, + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each", + "html_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each", + "rst_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each\n", + "name": "options" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if the poll needs to be anonymous, defaults to True", + "html_description": "True, if the poll needs to be anonymous, defaults to True", + "rst_description": ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`\n", + "name": "is_anonymous" + }, + { + "type": "String", + "required": false, + "description": "Poll type, 'quiz' or 'regular', defaults to 'regular'", + "html_description": "Poll type, “quiz” or “regular”, defaults to “regular”", + "rst_description": "Poll type, 'quiz' or 'regular', defaults to 'regular'\n", + "name": "type" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", + "html_description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", + "rst_description": ":code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False`\n", + "name": "allows_multiple_answers" + }, + { + "type": "Integer", + "required": false, + "description": "0-based identifier of the correct answer option, required for polls in quiz mode", + "html_description": "0-based identifier of the correct answer option, required for polls in quiz mode", + "rst_description": "0-based identifier of the correct answer option, required for polls in quiz mode\n", + "name": "correct_option_id" + }, + { + "type": "String", + "required": false, + "description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing", + "html_description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing", + "rst_description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing\n", + "name": "explanation" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "html_description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the explanation. See `formatting options `_ for more details.\n", + "name": "explanation_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode*\n", + "name": "explanation_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", + "html_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", + "rst_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.\n", + "name": "open_period" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", + "html_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", + "rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*.\n", + "name": "close_date" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "html_description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "rst_description": "Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.\n", + "name": "is_closed" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendPoll/replace.yml b/.butcher/methods/sendPoll/replace.yml new file mode 100644 index 00000000..92d645dd --- /dev/null +++ b/.butcher/methods/sendPoll/replace.yml @@ -0,0 +1,13 @@ +annotations: + explanation_parse_mode: + value: UNSET + close_date: + parsed_type: + type: union + items: + - type: std + name: datetime.datetime + - type: std + name: datetime.timedelta + - type: std + name: int diff --git a/.butcher/methods/sendSticker/entity.json b/.butcher/methods/sendSticker/entity.json new file mode 100644 index 00000000..eb7e35a9 --- /dev/null +++ b/.butcher/methods/sendSticker/entity.json @@ -0,0 +1,83 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "sendsticker", + "name": "sendSticker", + "description": "Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.", + "html_description": "

Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.

", + "rst_description": "Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "sticker" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVenue/entity.json b/.butcher/methods/sendVenue/entity.json new file mode 100644 index 00000000..183349cd --- /dev/null +++ b/.butcher/methods/sendVenue/entity.json @@ -0,0 +1,139 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvenue", + "name": "sendVenue", + "description": "Use this method to send information about a venue. On success, the sent Message is returned.", + "html_description": "

Use this method to send information about a venue. On success, the sent Message is returned.

", + "rst_description": "Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Float number", + "required": true, + "description": "Latitude of the venue", + "html_description": "Latitude of the venue", + "rst_description": "Latitude of the venue\n", + "name": "latitude" + }, + { + "type": "Float number", + "required": true, + "description": "Longitude of the venue", + "html_description": "Longitude of the venue", + "rst_description": "Longitude of the venue\n", + "name": "longitude" + }, + { + "type": "String", + "required": true, + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address" + }, + { + "type": "String", + "required": false, + "description": "Foursquare identifier of the venue", + "html_description": "Foursquare identifier of the venue", + "rst_description": "Foursquare identifier of the venue\n", + "name": "foursquare_id" + }, + { + "type": "String", + "required": false, + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type" + }, + { + "type": "String", + "required": false, + "description": "Google Places identifier of the venue", + "html_description": "Google Places identifier of the venue", + "rst_description": "Google Places identifier of the venue\n", + "name": "google_place_id" + }, + { + "type": "String", + "required": false, + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Google Places type of the venue. (See supported types.)", + "rst_description": "Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json new file mode 100644 index 00000000..8f25a6d9 --- /dev/null +++ b/.butcher/methods/sendVideo/entity.json @@ -0,0 +1,147 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvideo", + "name": "sendVideo", + "description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. More information on Sending Files", + "html_description": "Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. More information on Sending Files »", + "rst_description": "Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "video" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width", + "html_description": "Video width", + "rst_description": "Video width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Video height", + "html_description": "Video height", + "rst_description": "Video height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "String", + "required": false, + "description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "html_description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Pass True if the uploaded video is suitable for streaming", + "rst_description": "Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVideo/replace.yml b/.butcher/methods/sendVideo/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/sendVideo/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json new file mode 100644 index 00000000..2822e49c --- /dev/null +++ b/.butcher/methods/sendVideoNote/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvideonote", + "name": "sendVideoNote", + "description": "As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.", + "html_description": "

As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.

", + "rst_description": "As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. More information on Sending Files. Sending video notes by a URL is currently unsupported", + "html_description": "Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. More information on Sending Files ». Sending video notes by a URL is currently unsupported", + "rst_description": "Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported\n", + "name": "video_note" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width and height, i.e. diameter of the video message", + "html_description": "Video width and height, i.e. diameter of the video message", + "rst_description": "Video width and height, i.e. diameter of the video message\n", + "name": "length" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVoice/entity.json b/.butcher/methods/sendVoice/entity.json new file mode 100644 index 00000000..d2058cf0 --- /dev/null +++ b/.butcher/methods/sendVoice/entity.json @@ -0,0 +1,115 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "sendvoice", + "name": "sendVoice", + "description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "voice" + }, + { + "type": "String", + "required": false, + "description": "Voice message caption, 0-1024 characters after entities parsing", + "html_description": "Voice message caption, 0-1024 characters after entities parsing", + "rst_description": "Voice message caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of the voice message in seconds", + "html_description": "Duration of the voice message in seconds", + "rst_description": "Duration of the voice message in seconds\n", + "name": "duration" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/sendVoice/replace.yml b/.butcher/methods/sendVoice/replace.yml new file mode 100644 index 00000000..1feb5360 --- /dev/null +++ b/.butcher/methods/sendVoice/replace.yml @@ -0,0 +1,3 @@ +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/methods/setChatAdministratorCustomTitle/entity.json b/.butcher/methods/setChatAdministratorCustomTitle/entity.json new file mode 100644 index 00000000..9f35cbe3 --- /dev/null +++ b/.butcher/methods/setChatAdministratorCustomTitle/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatadministratorcustomtitle", + "name": "setChatAdministratorCustomTitle", + "description": "Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.", + "html_description": "

Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.

", + "rst_description": "Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "html_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "rst_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed\n", + "name": "custom_title" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatDescription/entity.json b/.butcher/methods/setChatDescription/entity.json new file mode 100644 index 00000000..f1fbc1e5 --- /dev/null +++ b/.butcher/methods/setChatDescription/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatdescription", + "name": "setChatDescription", + "description": "Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": false, + "description": "New chat description, 0-255 characters", + "html_description": "New chat description, 0-255 characters", + "rst_description": "New chat description, 0-255 characters\n", + "name": "description" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatMenuButton/entity.json b/.butcher/methods/setChatMenuButton/entity.json new file mode 100644 index 00000000..5ef29941 --- /dev/null +++ b/.butcher/methods/setChatMenuButton/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatmenubutton", + "name": "setChatMenuButton", + "description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.", + "html_description": "

Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.

", + "rst_description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed\n", + "name": "chat_id" + }, + { + "type": "MenuButton", + "required": false, + "description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "html_description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "rst_description": "A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n", + "name": "menu_button" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatMenuButton/replace.yml b/.butcher/methods/setChatMenuButton/replace.yml new file mode 100644 index 00000000..680cdab7 --- /dev/null +++ b/.butcher/methods/setChatMenuButton/replace.yml @@ -0,0 +1,17 @@ +annotations: + menu_button: + parsed_type: + type: union + items: + - type: entity + references: + category: types + name: MenuButtonDefault + - type: entity + references: + category: types + name: MenuButtonWebApp + - type: entity + references: + category: types + name: MenuButtonCommands diff --git a/.butcher/methods/setChatPermissions/entity.json b/.butcher/methods/setChatPermissions/entity.json new file mode 100644 index 00000000..12f871d9 --- /dev/null +++ b/.butcher/methods/setChatPermissions/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatpermissions", + "name": "setChatPermissions", + "description": "Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.", + "html_description": "

Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.

", + "rst_description": "Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new default chat permissions", + "html_description": "A JSON-serialized object for new default chat permissions", + "rst_description": "A JSON-serialized object for new default chat permissions\n", + "name": "permissions" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatPhoto/entity.json b/.butcher/methods/setChatPhoto/entity.json new file mode 100644 index 00000000..fa3facd2 --- /dev/null +++ b/.butcher/methods/setChatPhoto/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatphoto", + "name": "setChatPhoto", + "description": "Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "InputFile", + "required": true, + "description": "New chat photo, uploaded using multipart/form-data", + "html_description": "New chat photo, uploaded using multipart/form-data", + "rst_description": "New chat photo, uploaded using multipart/form-data\n", + "name": "photo" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatStickerSet/entity.json b/.butcher/methods/setChatStickerSet/entity.json new file mode 100644 index 00000000..2451f9cf --- /dev/null +++ b/.butcher/methods/setChatStickerSet/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchatstickerset", + "name": "setChatStickerSet", + "description": "Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Name of the sticker set to be set as the group sticker set", + "html_description": "Name of the sticker set to be set as the group sticker set", + "rst_description": "Name of the sticker set to be set as the group sticker set\n", + "name": "sticker_set_name" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setChatTitle/entity.json b/.butcher/methods/setChatTitle/entity.json new file mode 100644 index 00000000..37a91d80 --- /dev/null +++ b/.butcher/methods/setChatTitle/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setchattitle", + "name": "setChatTitle", + "description": "Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "New chat title, 1-128 characters", + "html_description": "New chat title, 1-128 characters", + "rst_description": "New chat title, 1-128 characters\n", + "name": "title" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setGameScore/entity.json b/.butcher/methods/setGameScore/entity.json new file mode 100644 index 00000000..f76d662e --- /dev/null +++ b/.butcher/methods/setGameScore/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "setgamescore", + "name": "setGameScore", + "description": "Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.", + "html_description": "

Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

", + "rst_description": "Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": true, + "description": "New score, must be non-negative", + "html_description": "New score, must be non-negative", + "rst_description": "New score, must be non-negative\n", + "name": "score" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "html_description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "rst_description": "Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters\n", + "name": "force" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "html_description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "rst_description": "Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard\n", + "name": "disable_edit_message" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyCommands/entity.json b/.butcher/methods/setMyCommands/entity.json new file mode 100644 index 00000000..835c7f6a --- /dev/null +++ b/.butcher/methods/setMyCommands/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmycommands", + "name": "setMyCommands", + "description": "Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.", + "html_description": "

Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.

", + "rst_description": "Use this method to change the list of the bot's commands. See `this manual `_ for more details about bot commands. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Array of BotCommand", + "required": true, + "description": "A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.", + "html_description": "A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.", + "rst_description": "A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.\n", + "name": "commands" + }, + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "html_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "rst_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyDefaultAdministratorRights/entity.json b/.butcher/methods/setMyDefaultAdministratorRights/entity.json new file mode 100644 index 00000000..687b8f3d --- /dev/null +++ b/.butcher/methods/setMyDefaultAdministratorRights/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmydefaultadministratorrights", + "name": "setMyDefaultAdministratorRights", + "description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.", + "html_description": "

Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.

", + "rst_description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "ChatAdministratorRights", + "required": false, + "description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "html_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "rst_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.\n", + "name": "rights" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.", + "html_description": "Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.", + "rst_description": "Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.\n", + "name": "for_channels" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setPassportDataErrors/entity.json b/.butcher/methods/setPassportDataErrors/entity.json new file mode 100644 index 00000000..ec0e03a8 --- /dev/null +++ b/.butcher/methods/setPassportDataErrors/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "setpassportdataerrors", + "name": "setPassportDataErrors", + "description": "Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "html_description": "

Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

", + "rst_description": "Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns :code:`True` on success.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Array of PassportElementError", + "required": true, + "description": "A JSON-serialized array describing the errors", + "html_description": "A JSON-serialized array describing the errors", + "rst_description": "A JSON-serialized array describing the errors\n", + "name": "errors" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerPositionInSet/entity.json b/.butcher/methods/setStickerPositionInSet/entity.json new file mode 100644 index 00000000..e75a13c8 --- /dev/null +++ b/.butcher/methods/setStickerPositionInSet/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickerpositioninset", + "name": "setStickerPositionInSet", + "description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.", + "html_description": "

Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.

", + "rst_description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Integer", + "required": true, + "description": "New sticker position in the set, zero-based", + "html_description": "New sticker position in the set, zero-based", + "rst_description": "New sticker position in the set, zero-based\n", + "name": "position" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerSetThumb/entity.json b/.butcher/methods/setStickerSetThumb/entity.json new file mode 100644 index 00000000..cc7739b3 --- /dev/null +++ b/.butcher/methods/setStickerSetThumb/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickersetthumb", + "name": "setStickerSetThumb", + "description": "Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "Integer", + "required": true, + "description": "User identifier of the sticker set owner", + "html_description": "User identifier of the sticker set owner", + "rst_description": "User identifier of the sticker set owner\n", + "name": "user_id" + }, + { + "type": "InputFile or String", + "required": false, + "description": "A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements, or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files. Animated sticker set thumbnails can't be uploaded via HTTP URL.", + "html_description": "A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements, or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated sticker set thumbnails can't be uploaded via HTTP URL.", + "rst_description": "A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `. Animated sticker set thumbnails can't be uploaded via HTTP URL.\n", + "name": "thumb" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setWebhook/entity.json b/.butcher/methods/setWebhook/entity.json new file mode 100644 index 00000000..83befbb9 --- /dev/null +++ b/.butcher/methods/setWebhook/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "setwebhook", + "name": "setWebhook", + "description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\nNotes\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.\nIf you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.", + "html_description": "

Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.

\n

Notes
\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.

\n

If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

\n
", + "rst_description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\n\n **Notes**\n \n **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.\n \n **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.\n \n **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.\n If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "html_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "rst_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration\n", + "name": "url" + }, + { + "type": "InputFile", + "required": false, + "description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "html_description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "rst_description": "Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details.\n", + "name": "certificate" + }, + { + "type": "String", + "required": false, + "description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "html_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "rst_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS\n", + "name": "ip_address" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.", + "html_description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.", + "rst_description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.\n", + "name": "max_connections" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.", + "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.", + "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.\n", + "name": "allowed_updates" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + }, + { + "type": "String", + "required": false, + "description": "A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "html_description": "A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "rst_description": "A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you.\n", + "name": "secret_token" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/stopMessageLiveLocation/entity.json b/.butcher/methods/stopMessageLiveLocation/entity.json new file mode 100644 index 00000000..3ede9d40 --- /dev/null +++ b/.butcher/methods/stopMessageLiveLocation/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "stopmessagelivelocation", + "name": "stopMessageLiveLocation", + "description": "Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "html_description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message with live location to stop\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/stopPoll/entity.json b/.butcher/methods/stopPoll/entity.json new file mode 100644 index 00000000..0e277f16 --- /dev/null +++ b/.butcher/methods/stopPoll/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Updating messages", + "anchor": "updating-messages" + }, + "object": { + "anchor": "stoppoll", + "name": "stopPoll", + "description": "Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.", + "html_description": "

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.

", + "rst_description": "Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the original message with the poll", + "html_description": "Identifier of the original message with the poll", + "rst_description": "Identifier of the original message with the poll\n", + "name": "message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new message inline keyboard.", + "html_description": "A JSON-serialized object for a new message inline keyboard.", + "rst_description": "A JSON-serialized object for a new message `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unbanChatMember/entity.json b/.butcher/methods/unbanChatMember/entity.json new file mode 100644 index 00000000..a7dce716 --- /dev/null +++ b/.butcher/methods/unbanChatMember/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unbanchatmember", + "name": "unbanChatMember", + "description": "Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.", + "html_description": "

Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.

", + "rst_description": "Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Do nothing if the user is not banned", + "html_description": "Do nothing if the user is not banned", + "rst_description": "Do nothing if the user is not banned\n", + "name": "only_if_banned" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unbanChatSenderChat/entity.json b/.butcher/methods/unbanChatSenderChat/entity.json new file mode 100644 index 00000000..9215b65d --- /dev/null +++ b/.butcher/methods/unbanChatSenderChat/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unbanchatsenderchat", + "name": "unbanChatSenderChat", + "description": "Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unpinAllChatMessages/entity.json b/.butcher/methods/unpinAllChatMessages/entity.json new file mode 100644 index 00000000..8adb563a --- /dev/null +++ b/.butcher/methods/unpinAllChatMessages/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unpinallchatmessages", + "name": "unpinAllChatMessages", + "description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unpinAllForumTopicMessages/entity.json b/.butcher/methods/unpinAllForumTopicMessages/entity.json new file mode 100644 index 00000000..c54cd239 --- /dev/null +++ b/.butcher/methods/unpinAllForumTopicMessages/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unpinallforumtopicmessages", + "name": "unpinAllForumTopicMessages", + "description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/unpinChatMessage/entity.json b/.butcher/methods/unpinChatMessage/entity.json new file mode 100644 index 00000000..ee716958 --- /dev/null +++ b/.butcher/methods/unpinChatMessage/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unpinchatmessage", + "name": "unpinChatMessage", + "description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", + "html_description": "

Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", + "rst_description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "html_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "rst_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.\n", + "name": "message_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/uploadStickerFile/entity.json b/.butcher/methods/uploadStickerFile/entity.json new file mode 100644 index 00000000..445de997 --- /dev/null +++ b/.butcher/methods/uploadStickerFile/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "uploadstickerfile", + "name": "uploadStickerFile", + "description": "Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.", + "html_description": "

Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.

", + "rst_description": "Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker file owner", + "html_description": "User identifier of sticker file owner", + "rst_description": "User identifier of sticker file owner\n", + "name": "user_id" + }, + { + "type": "InputFile", + "required": true, + "description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More information on Sending Files", + "html_description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More information on Sending Files »", + "rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files ยป `\n", + "name": "png_sticker" + } + ], + "category": "methods" + } +} diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json new file mode 100644 index 00000000..5a184105 --- /dev/null +++ b/.butcher/schema/schema.json @@ -0,0 +1,12840 @@ +{ + "api": { + "version": "6.3", + "release_date": "2022-11-05" + }, + "items": [ + { + "title": "Getting updates", + "anchor": "getting-updates", + "children": [ + { + "anchor": "update", + "name": "Update", + "description": "This object represents an incoming update.\nAt most one of the optional parameters can be present in any given update.", + "html_description": "

This object represents an incoming update.
\nAt most one of the optional parameters can be present in any given update.

", + "rst_description": "This `object `_ represents an incoming update.\n\nAt most **one** of the optional parameters can be present in any given update.", + "annotations": [ + { + "type": "Integer", + "description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.", + "html_description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.", + "rst_description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using `webhooks `_, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.\n", + "name": "update_id", + "required": true + }, + { + "type": "Message", + "description": "New incoming message of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming message of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming message of any kind - text, photo, sticker, etc.\n", + "name": "message", + "required": false + }, + { + "type": "Message", + "description": "New version of a message that is known to the bot and was edited", + "html_description": "Optional. New version of a message that is known to the bot and was edited", + "rst_description": "*Optional*. New version of a message that is known to the bot and was edited\n", + "name": "edited_message", + "required": false + }, + { + "type": "Message", + "description": "New incoming channel post of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming channel post of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.\n", + "name": "channel_post", + "required": false + }, + { + "type": "Message", + "description": "New version of a channel post that is known to the bot and was edited", + "html_description": "Optional. New version of a channel post that is known to the bot and was edited", + "rst_description": "*Optional*. New version of a channel post that is known to the bot and was edited\n", + "name": "edited_channel_post", + "required": false + }, + { + "type": "InlineQuery", + "description": "New incoming inline query", + "html_description": "Optional. New incoming inline query", + "rst_description": "*Optional*. New incoming `inline `_ query\n", + "name": "inline_query", + "required": false + }, + { + "type": "ChosenInlineResult", + "description": "The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.", + "html_description": "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.", + "rst_description": "*Optional*. The result of an `inline `_ query that was chosen by a user and sent to their chat partner. Please see our documentation on the `feedback collecting `_ for details on how to enable these updates for your bot.\n", + "name": "chosen_inline_result", + "required": false + }, + { + "type": "CallbackQuery", + "description": "New incoming callback query", + "html_description": "Optional. New incoming callback query", + "rst_description": "*Optional*. New incoming callback query\n", + "name": "callback_query", + "required": false + }, + { + "type": "ShippingQuery", + "description": "New incoming shipping query. Only for invoices with flexible price", + "html_description": "Optional. New incoming shipping query. Only for invoices with flexible price", + "rst_description": "*Optional*. New incoming shipping query. Only for invoices with flexible price\n", + "name": "shipping_query", + "required": false + }, + { + "type": "PreCheckoutQuery", + "description": "New incoming pre-checkout query. Contains full information about checkout", + "html_description": "Optional. New incoming pre-checkout query. Contains full information about checkout", + "rst_description": "*Optional*. New incoming pre-checkout query. Contains full information about checkout\n", + "name": "pre_checkout_query", + "required": false + }, + { + "type": "Poll", + "description": "New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot", + "html_description": "Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot", + "rst_description": "*Optional*. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot\n", + "name": "poll", + "required": false + }, + { + "type": "PollAnswer", + "description": "A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.", + "html_description": "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.", + "rst_description": "*Optional*. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.\n", + "name": "poll_answer", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.", + "html_description": "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.", + "rst_description": "*Optional*. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.\n", + "name": "my_chat_member", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of allowed_updates to receive these updates.", + "html_description": "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.", + "rst_description": "*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of *allowed_updates* to receive these updates.\n", + "name": "chat_member", + "required": false + }, + { + "type": "ChatJoinRequest", + "description": "A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.", + "html_description": "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.", + "rst_description": "*Optional*. A request to join the chat has been sent. The bot must have the *can_invite_users* administrator right in the chat to receive these updates.\n", + "name": "chat_join_request", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "getupdates", + "name": "getUpdates", + "description": "Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.\nNotes\n1. This method will not work if an outgoing webhook is set up.\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.", + "html_description": "

Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.

\n

Notes
\n1. This method will not work if an outgoing webhook is set up.
\n2. In order to avoid getting duplicate updates, recalculate offset after each server response.

\n
", + "rst_description": "Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects.\n\n **Notes**\n \n **1.** This method will not work if an outgoing webhook is set up.\n \n **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.", + "html_description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.", + "rst_description": "Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + }, + { + "type": "Integer", + "required": false, + "description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.", + "html_description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.", + "rst_description": "Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.\n", + "name": "timeout" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", + "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
\n
\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", + "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used.\n\n\n\nPlease note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.\n", + "name": "allowed_updates" + } + ], + "category": "methods" + }, + { + "anchor": "setwebhook", + "name": "setWebhook", + "description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\nNotes\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.\nIf you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.", + "html_description": "

Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.

\n

Notes
\n1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
\n2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
\n3. Ports currently supported for webhooks: 443, 80, 88, 8443.

\n

If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.

\n
", + "rst_description": "Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success.\nIf you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.\n\n **Notes**\n \n **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.\n \n **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.\n \n **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.\n If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "html_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration", + "rst_description": "HTTPS URL to send updates to. Use an empty string to remove webhook integration\n", + "name": "url" + }, + { + "type": "InputFile", + "required": false, + "description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "html_description": "Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details.", + "rst_description": "Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details.\n", + "name": "certificate" + }, + { + "type": "String", + "required": false, + "description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "html_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS", + "rst_description": "The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS\n", + "name": "ip_address" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.", + "html_description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.", + "rst_description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.\n", + "name": "max_connections" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.", + "html_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.", + "rst_description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.\n", + "name": "allowed_updates" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + }, + { + "type": "String", + "required": false, + "description": "A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "html_description": "A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you.", + "rst_description": "A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you.\n", + "name": "secret_token" + } + ], + "category": "methods" + }, + { + "anchor": "deletewebhook", + "name": "deleteWebhook", + "description": "Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.", + "html_description": "

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

", + "rst_description": "Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass True to drop all pending updates", + "html_description": "Pass True to drop all pending updates", + "rst_description": "Pass :code:`True` to drop all pending updates\n", + "name": "drop_pending_updates" + } + ], + "category": "methods" + }, + { + "anchor": "getwebhookinfo", + "name": "getWebhookInfo", + "description": "Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.", + "html_description": "

Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.

", + "rst_description": "Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "webhookinfo", + "name": "WebhookInfo", + "description": "Describes the current status of a webhook.", + "html_description": "

Describes the current status of a webhook.

", + "rst_description": "Describes the current status of a webhook.", + "annotations": [ + { + "type": "String", + "description": "Webhook URL, may be empty if webhook is not set up", + "html_description": "Webhook URL, may be empty if webhook is not set up", + "rst_description": "Webhook URL, may be empty if webhook is not set up\n", + "name": "url", + "required": true + }, + { + "type": "Boolean", + "description": "True, if a custom certificate was provided for webhook certificate checks", + "html_description": "True, if a custom certificate was provided for webhook certificate checks", + "rst_description": ":code:`True`, if a custom certificate was provided for webhook certificate checks\n", + "name": "has_custom_certificate", + "required": true + }, + { + "type": "Integer", + "description": "Number of updates awaiting delivery", + "html_description": "Number of updates awaiting delivery", + "rst_description": "Number of updates awaiting delivery\n", + "name": "pending_update_count", + "required": true + }, + { + "type": "String", + "description": "Currently used webhook IP address", + "html_description": "Optional. Currently used webhook IP address", + "rst_description": "*Optional*. Currently used webhook IP address\n", + "name": "ip_address", + "required": false + }, + { + "type": "Integer", + "description": "Unix time for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_date", + "required": false + }, + { + "type": "String", + "description": "Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_message", + "required": false + }, + { + "type": "Integer", + "description": "Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "html_description": "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "rst_description": "*Optional*. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters\n", + "name": "last_synchronization_error_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "html_description": "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "rst_description": "*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery\n", + "name": "max_connections", + "required": false + }, + { + "type": "Array of String", + "description": "A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "html_description": "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "rst_description": "*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*\n", + "name": "allowed_updates", + "required": false + } + ], + "category": "types" + } + ], + "description": "There are two mutually exclusive ways of receiving updates for your bot - the getUpdates method on one hand and webhooks on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.\nRegardless of which option you choose, you will receive JSON-serialized Update objects as a result." + }, + { + "title": "Available types", + "anchor": "available-types", + "children": [ + { + "anchor": "user", + "name": "User", + "description": "This object represents a Telegram user or bot.", + "html_description": "

This object represents a Telegram user or bot.

", + "rst_description": "This object represents a Telegram user or bot.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "id", + "required": true + }, + { + "type": "Boolean", + "description": "True, if this user is a bot", + "html_description": "True, if this user is a bot", + "rst_description": ":code:`True`, if this user is a bot\n", + "name": "is_bot", + "required": true + }, + { + "type": "String", + "description": "User's or bot's first name", + "html_description": "User's or bot's first name", + "rst_description": "User's or bot's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "User's or bot's last name", + "html_description": "Optional. User's or bot's last name", + "rst_description": "*Optional*. User's or bot's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "User's or bot's username", + "html_description": "Optional. User's or bot's username", + "rst_description": "*Optional*. User's or bot's username\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "IETF language tag of the user's language", + "html_description": "Optional. IETF language tag of the user's language", + "rst_description": "*Optional*. `IETF language tag `_ of the user's language\n", + "name": "language_code", + "required": false + }, + { + "type": "True", + "description": "True, if this user is a Telegram Premium user", + "html_description": "Optional. True, if this user is a Telegram Premium user", + "rst_description": "*Optional*. :code:`True`, if this user is a Telegram Premium user\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if this user added the bot to the attachment menu", + "html_description": "Optional. True, if this user added the bot to the attachment menu", + "rst_description": "*Optional*. :code:`True`, if this user added the bot to the attachment menu\n", + "name": "added_to_attachment_menu", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot can be invited to groups. Returned only in getMe.", + "html_description": "Optional. True, if the bot can be invited to groups. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot can be invited to groups. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_join_groups", + "required": false + }, + { + "type": "Boolean", + "description": "True, if privacy mode is disabled for the bot. Returned only in getMe.", + "html_description": "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if `privacy mode `_ is disabled for the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_read_all_group_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot supports inline queries. Returned only in getMe.", + "html_description": "Optional. True, if the bot supports inline queries. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "supports_inline_queries", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chat", + "name": "Chat", + "description": "This object represents a chat.", + "html_description": "

This object represents a chat.

", + "rst_description": "This object represents a chat.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'", + "html_description": "Type of chat, can be either “private”, “group”, “supergroup” or “channel”", + "rst_description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Title, for supergroups, channels and group chats", + "html_description": "Optional. Title, for supergroups, channels and group chats", + "rst_description": "*Optional*. Title, for supergroups, channels and group chats\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username, for private chats, supergroups and channels if available", + "html_description": "Optional. Username, for private chats, supergroups and channels if available", + "rst_description": "*Optional*. Username, for private chats, supergroups and channels if available\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "First name of the other party in a private chat", + "html_description": "Optional. First name of the other party in a private chat", + "rst_description": "*Optional*. First name of the other party in a private chat\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the other party in a private chat", + "html_description": "Optional. Last name of the other party in a private chat", + "rst_description": "*Optional*. Last name of the other party in a private chat\n", + "name": "last_name", + "required": false + }, + { + "type": "True", + "description": "True, if the supergroup chat is a forum (has topics enabled)", + "html_description": "Optional. True, if the supergroup chat is a forum (has topics enabled)", + "rst_description": "*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)\n", + "name": "is_forum", + "required": false + }, + { + "type": "ChatPhoto", + "description": "Chat photo. Returned only in getChat.", + "html_description": "Optional. Chat photo. Returned only in getChat.", + "rst_description": "*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "photo", + "required": false + }, + { + "type": "Array of String", + "description": "If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.", + "html_description": "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.", + "rst_description": "*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "active_usernames", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.", + "html_description": "Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.", + "rst_description": "*Optional*. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "emoji_status_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Bio of the other party in a private chat. Returned only in getChat.", + "html_description": "Optional. Bio of the other party in a private chat. Returned only in getChat.", + "rst_description": "*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "bio", + "required": false + }, + { + "type": "True", + "description": "True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.", + "html_description": "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_private_forwards", + "required": false + }, + { + "type": "True", + "description": "True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.", + "html_description": "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_restricted_voice_and_video_messages", + "required": false + }, + { + "type": "True", + "description": "True, if users need to join the supergroup before they can send messages. Returned only in getChat.", + "html_description": "Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "join_to_send_messages", + "required": false + }, + { + "type": "True", + "description": "True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.", + "html_description": "Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "join_by_request", + "required": false + }, + { + "type": "String", + "description": "Description, for groups, supergroups and channel chats. Returned only in getChat.", + "html_description": "Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.", + "rst_description": "*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.", + "html_description": "Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.", + "rst_description": "*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "invite_link", + "required": false + }, + { + "type": "Message", + "description": "The most recent pinned message (by sending date). Returned only in getChat.", + "html_description": "Optional. The most recent pinned message (by sending date). Returned only in getChat.", + "rst_description": "*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "pinned_message", + "required": false + }, + { + "type": "ChatPermissions", + "description": "Default chat member permissions, for groups and supergroups. Returned only in getChat.", + "html_description": "Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.", + "rst_description": "*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "permissions", + "required": false + }, + { + "type": "Integer", + "description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.", + "html_description": "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "slow_mode_delay", + "required": false + }, + { + "type": "Integer", + "description": "The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.", + "html_description": "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.", + "rst_description": "*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "message_auto_delete_time", + "required": false + }, + { + "type": "True", + "description": "True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", + "html_description": "Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_protected_content", + "required": false + }, + { + "type": "String", + "description": "For supergroups, name of group sticker set. Returned only in getChat.", + "html_description": "Optional. For supergroups, name of group sticker set. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "sticker_set_name", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can change the group sticker set. Returned only in getChat.", + "html_description": "Optional. True, if the bot can change the group sticker set. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if the bot can change the group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "can_set_sticker_set", + "required": false + }, + { + "type": "Integer", + "description": "Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.", + "html_description": "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.", + "rst_description": "*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "linked_chat_id", + "required": false + }, + { + "type": "ChatLocation", + "description": "For supergroups, the location to which the supergroup is connected. Returned only in getChat.", + "html_description": "Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "location", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "message", + "name": "Message", + "description": "This object represents a message.", + "html_description": "

This object represents a message.

", + "rst_description": "This object represents a message.", + "annotations": [ + { + "type": "Integer", + "description": "Unique message identifier inside this chat", + "html_description": "Unique message identifier inside this chat", + "rst_description": "Unique message identifier inside this chat\n", + "name": "message_id", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier of a message thread to which the message belongs; for supergroups only", + "html_description": "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only", + "rst_description": "*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only\n", + "name": "message_thread_id", + "required": false + }, + { + "type": "User", + "description": "Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "html_description": "Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "rst_description": "*Optional*. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "name": "from", + "required": false + }, + { + "type": "Chat", + "description": "Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "html_description": "Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "rst_description": "*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "name": "sender_chat", + "required": false + }, + { + "type": "Integer", + "description": "Date the message was sent in Unix time", + "html_description": "Date the message was sent in Unix time", + "rst_description": "Date the message was sent in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Chat", + "description": "Conversation the message belongs to", + "html_description": "Conversation the message belongs to", + "rst_description": "Conversation the message belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "For forwarded messages, sender of the original message", + "html_description": "Optional. For forwarded messages, sender of the original message", + "rst_description": "*Optional*. For forwarded messages, sender of the original message\n", + "name": "forward_from", + "required": false + }, + { + "type": "Chat", + "description": "For messages forwarded from channels or from anonymous administrators, information about the original sender chat", + "html_description": "Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat", + "rst_description": "*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat\n", + "name": "forward_from_chat", + "required": false + }, + { + "type": "Integer", + "description": "For messages forwarded from channels, identifier of the original message in the channel", + "html_description": "Optional. For messages forwarded from channels, identifier of the original message in the channel", + "rst_description": "*Optional*. For messages forwarded from channels, identifier of the original message in the channel\n", + "name": "forward_from_message_id", + "required": false + }, + { + "type": "String", + "description": "For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present", + "html_description": "Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present", + "rst_description": "*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present\n", + "name": "forward_signature", + "required": false + }, + { + "type": "String", + "description": "Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages", + "html_description": "Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages", + "rst_description": "*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages\n", + "name": "forward_sender_name", + "required": false + }, + { + "type": "Integer", + "description": "For forwarded messages, date the original message was sent in Unix time", + "html_description": "Optional. For forwarded messages, date the original message was sent in Unix time", + "rst_description": "*Optional*. For forwarded messages, date the original message was sent in Unix time\n", + "name": "forward_date", + "required": false + }, + { + "type": "True", + "description": "True, if the message is sent to a forum topic", + "html_description": "Optional. True, if the message is sent to a forum topic", + "rst_description": "*Optional*. :code:`True`, if the message is sent to a forum topic\n", + "name": "is_topic_message", + "required": false + }, + { + "type": "True", + "description": "True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "html_description": "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "rst_description": "*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group\n", + "name": "is_automatic_forward", + "required": false + }, + { + "type": "Message", + "description": "For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", + "html_description": "Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", + "rst_description": "*Optional*. For replies, the original message. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n", + "name": "reply_to_message", + "required": false + }, + { + "type": "User", + "description": "Bot through which the message was sent", + "html_description": "Optional. Bot through which the message was sent", + "rst_description": "*Optional*. Bot through which the message was sent\n", + "name": "via_bot", + "required": false + }, + { + "type": "Integer", + "description": "Date the message was last edited in Unix time", + "html_description": "Optional. Date the message was last edited in Unix time", + "rst_description": "*Optional*. Date the message was last edited in Unix time\n", + "name": "edit_date", + "required": false + }, + { + "type": "True", + "description": "True, if the message can't be forwarded", + "html_description": "Optional. True, if the message can't be forwarded", + "rst_description": "*Optional*. :code:`True`, if the message can't be forwarded\n", + "name": "has_protected_content", + "required": false + }, + { + "type": "String", + "description": "The unique identifier of a media message group this message belongs to", + "html_description": "Optional. The unique identifier of a media message group this message belongs to", + "rst_description": "*Optional*. The unique identifier of a media message group this message belongs to\n", + "name": "media_group_id", + "required": false + }, + { + "type": "String", + "description": "Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "html_description": "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "rst_description": "*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator\n", + "name": "author_signature", + "required": false + }, + { + "type": "String", + "description": "For text messages, the actual UTF-8 text of the message", + "html_description": "Optional. For text messages, the actual UTF-8 text of the message", + "rst_description": "*Optional*. For text messages, the actual UTF-8 text of the message\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "html_description": "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "rst_description": "*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "Animation", + "description": "Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "html_description": "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "rst_description": "*Optional*. Message is an animation, information about the animation. For backward compatibility, when this field is set, the *document* field will also be set\n", + "name": "animation", + "required": false + }, + { + "type": "Audio", + "description": "Message is an audio file, information about the file", + "html_description": "Optional. Message is an audio file, information about the file", + "rst_description": "*Optional*. Message is an audio file, information about the file\n", + "name": "audio", + "required": false + }, + { + "type": "Document", + "description": "Message is a general file, information about the file", + "html_description": "Optional. Message is a general file, information about the file", + "rst_description": "*Optional*. Message is a general file, information about the file\n", + "name": "document", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Message is a photo, available sizes of the photo", + "html_description": "Optional. Message is a photo, available sizes of the photo", + "rst_description": "*Optional*. Message is a photo, available sizes of the photo\n", + "name": "photo", + "required": false + }, + { + "type": "Sticker", + "description": "Message is a sticker, information about the sticker", + "html_description": "Optional. Message is a sticker, information about the sticker", + "rst_description": "*Optional*. Message is a sticker, information about the sticker\n", + "name": "sticker", + "required": false + }, + { + "type": "Video", + "description": "Message is a video, information about the video", + "html_description": "Optional. Message is a video, information about the video", + "rst_description": "*Optional*. Message is a video, information about the video\n", + "name": "video", + "required": false + }, + { + "type": "VideoNote", + "description": "Message is a video note, information about the video message", + "html_description": "Optional. Message is a video note, information about the video message", + "rst_description": "*Optional*. Message is a `video note `_, information about the video message\n", + "name": "video_note", + "required": false + }, + { + "type": "Voice", + "description": "Message is a voice message, information about the file", + "html_description": "Optional. Message is a voice message, information about the file", + "rst_description": "*Optional*. Message is a voice message, information about the file\n", + "name": "voice", + "required": false + }, + { + "type": "String", + "description": "Caption for the animation, audio, document, photo, video or voice", + "html_description": "Optional. Caption for the animation, audio, document, photo, video or voice", + "rst_description": "*Optional*. Caption for the animation, audio, document, photo, video or voice\n", + "name": "caption", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "html_description": "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "rst_description": "*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Contact", + "description": "Message is a shared contact, information about the contact", + "html_description": "Optional. Message is a shared contact, information about the contact", + "rst_description": "*Optional*. Message is a shared contact, information about the contact\n", + "name": "contact", + "required": false + }, + { + "type": "Dice", + "description": "Message is a dice with random value", + "html_description": "Optional. Message is a dice with random value", + "rst_description": "*Optional*. Message is a dice with random value\n", + "name": "dice", + "required": false + }, + { + "type": "Game", + "description": "Message is a game, information about the game.", + "html_description": "Optional. Message is a game, information about the game. More about games »", + "rst_description": "*Optional*. Message is a game, information about the game. `More about games ยป `_\n", + "name": "game", + "required": false + }, + { + "type": "Poll", + "description": "Message is a native poll, information about the poll", + "html_description": "Optional. Message is a native poll, information about the poll", + "rst_description": "*Optional*. Message is a native poll, information about the poll\n", + "name": "poll", + "required": false + }, + { + "type": "Venue", + "description": "Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "html_description": "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "rst_description": "*Optional*. Message is a venue, information about the venue. For backward compatibility, when this field is set, the *location* field will also be set\n", + "name": "venue", + "required": false + }, + { + "type": "Location", + "description": "Message is a shared location, information about the location", + "html_description": "Optional. Message is a shared location, information about the location", + "rst_description": "*Optional*. Message is a shared location, information about the location\n", + "name": "location", + "required": false + }, + { + "type": "Array of User", + "description": "New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "html_description": "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "rst_description": "*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)\n", + "name": "new_chat_members", + "required": false + }, + { + "type": "User", + "description": "A member was removed from the group, information about them (this member may be the bot itself)", + "html_description": "Optional. A member was removed from the group, information about them (this member may be the bot itself)", + "rst_description": "*Optional*. A member was removed from the group, information about them (this member may be the bot itself)\n", + "name": "left_chat_member", + "required": false + }, + { + "type": "String", + "description": "A chat title was changed to this value", + "html_description": "Optional. A chat title was changed to this value", + "rst_description": "*Optional*. A chat title was changed to this value\n", + "name": "new_chat_title", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "A chat photo was change to this value", + "html_description": "Optional. A chat photo was change to this value", + "rst_description": "*Optional*. A chat photo was change to this value\n", + "name": "new_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the chat photo was deleted", + "html_description": "Optional. Service message: the chat photo was deleted", + "rst_description": "*Optional*. Service message: the chat photo was deleted\n", + "name": "delete_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the group has been created", + "html_description": "Optional. Service message: the group has been created", + "rst_description": "*Optional*. Service message: the group has been created\n", + "name": "group_chat_created", + "required": false + }, + { + "type": "True", + "description": "Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.", + "html_description": "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.", + "rst_description": "*Optional*. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.\n", + "name": "supergroup_chat_created", + "required": false + }, + { + "type": "True", + "description": "Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.", + "html_description": "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.", + "rst_description": "*Optional*. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.\n", + "name": "channel_chat_created", + "required": false + }, + { + "type": "MessageAutoDeleteTimerChanged", + "description": "Service message: auto-delete timer settings changed in the chat", + "html_description": "Optional. Service message: auto-delete timer settings changed in the chat", + "rst_description": "*Optional*. Service message: auto-delete timer settings changed in the chat\n", + "name": "message_auto_delete_timer_changed", + "required": false + }, + { + "type": "Integer", + "description": "The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "migrate_from_chat_id", + "required": false + }, + { + "type": "Message", + "description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.", + "html_description": "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.", + "rst_description": "*Optional*. Specified message was pinned. Note that the Message object in this field will not contain further *reply_to_message* fields even if it is itself a reply.\n", + "name": "pinned_message", + "required": false + }, + { + "type": "Invoice", + "description": "Message is an invoice for a payment, information about the invoice.", + "html_description": "Optional. Message is an invoice for a payment, information about the invoice. More about payments »", + "rst_description": "*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments ยป `_\n", + "name": "invoice", + "required": false + }, + { + "type": "SuccessfulPayment", + "description": "Message is a service message about a successful payment, information about the payment.", + "html_description": "Optional. Message is a service message about a successful payment, information about the payment. More about payments »", + "rst_description": "*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments ยป `_\n", + "name": "successful_payment", + "required": false + }, + { + "type": "String", + "description": "The domain name of the website on which the user has logged in.", + "html_description": "Optional. The domain name of the website on which the user has logged in. More about Telegram Login »", + "rst_description": "*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login ยป `_\n", + "name": "connected_website", + "required": false + }, + { + "type": "PassportData", + "description": "Telegram Passport data", + "html_description": "Optional. Telegram Passport data", + "rst_description": "*Optional*. Telegram Passport data\n", + "name": "passport_data", + "required": false + }, + { + "type": "ProximityAlertTriggered", + "description": "Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "html_description": "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "rst_description": "*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.\n", + "name": "proximity_alert_triggered", + "required": false + }, + { + "type": "ForumTopicCreated", + "description": "Service message: forum topic created", + "html_description": "Optional. Service message: forum topic created", + "rst_description": "*Optional*. Service message: forum topic created\n", + "name": "forum_topic_created", + "required": false + }, + { + "type": "ForumTopicClosed", + "description": "Service message: forum topic closed", + "html_description": "Optional. Service message: forum topic closed", + "rst_description": "*Optional*. Service message: forum topic closed\n", + "name": "forum_topic_closed", + "required": false + }, + { + "type": "ForumTopicReopened", + "description": "Service message: forum topic reopened", + "html_description": "Optional. Service message: forum topic reopened", + "rst_description": "*Optional*. Service message: forum topic reopened\n", + "name": "forum_topic_reopened", + "required": false + }, + { + "type": "VideoChatScheduled", + "description": "Service message: video chat scheduled", + "html_description": "Optional. Service message: video chat scheduled", + "rst_description": "*Optional*. Service message: video chat scheduled\n", + "name": "video_chat_scheduled", + "required": false + }, + { + "type": "VideoChatStarted", + "description": "Service message: video chat started", + "html_description": "Optional. Service message: video chat started", + "rst_description": "*Optional*. Service message: video chat started\n", + "name": "video_chat_started", + "required": false + }, + { + "type": "VideoChatEnded", + "description": "Service message: video chat ended", + "html_description": "Optional. Service message: video chat ended", + "rst_description": "*Optional*. Service message: video chat ended\n", + "name": "video_chat_ended", + "required": false + }, + { + "type": "VideoChatParticipantsInvited", + "description": "Service message: new participants invited to a video chat", + "html_description": "Optional. Service message: new participants invited to a video chat", + "rst_description": "*Optional*. Service message: new participants invited to a video chat\n", + "name": "video_chat_participants_invited", + "required": false + }, + { + "type": "WebAppData", + "description": "Service message: data sent by a Web App", + "html_description": "Optional. Service message: data sent by a Web App", + "rst_description": "*Optional*. Service message: data sent by a Web App\n", + "name": "web_app_data", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", + "html_description": "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", + "rst_description": "*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.\n", + "name": "reply_markup", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "messageid", + "name": "MessageId", + "description": "This object represents a unique message identifier.", + "html_description": "

This object represents a unique message identifier.

", + "rst_description": "This object represents a unique message identifier.", + "annotations": [ + { + "type": "Integer", + "description": "Unique message identifier", + "html_description": "Unique message identifier", + "rst_description": "Unique message identifier\n", + "name": "message_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "messageentity", + "name": "MessageEntity", + "description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "html_description": "

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

", + "rst_description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "annotations": [ + { + "type": "String", + "description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag), 'cashtag' ($USD), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers)", + "html_description": "Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)", + "rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers)\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Offset in UTF-16 code units to the start of the entity", + "html_description": "Offset in UTF-16 code units to the start of the entity", + "rst_description": "Offset in `UTF-16 code units `_ to the start of the entity\n", + "name": "offset", + "required": true + }, + { + "type": "Integer", + "description": "Length of the entity in UTF-16 code units", + "html_description": "Length of the entity in UTF-16 code units", + "rst_description": "Length of the entity in `UTF-16 code units `_\n", + "name": "length", + "required": true + }, + { + "type": "String", + "description": "For 'text_link' only, URL that will be opened after user taps on the text", + "html_description": "Optional. For “text_link” only, URL that will be opened after user taps on the text", + "rst_description": "*Optional*. For 'text_link' only, URL that will be opened after user taps on the text\n", + "name": "url", + "required": false + }, + { + "type": "User", + "description": "For 'text_mention' only, the mentioned user", + "html_description": "Optional. For “text_mention” only, the mentioned user", + "rst_description": "*Optional*. For 'text_mention' only, the mentioned user\n", + "name": "user", + "required": false + }, + { + "type": "String", + "description": "For 'pre' only, the programming language of the entity text", + "html_description": "Optional. For “pre” only, the programming language of the entity text", + "rst_description": "*Optional*. For 'pre' only, the programming language of the entity text\n", + "name": "language", + "required": false + }, + { + "type": "String", + "description": "For 'custom_emoji' only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "html_description": "Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "rst_description": "*Optional*. For 'custom_emoji' only, unique identifier of the custom emoji. Use :class:`aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers` to get full information about the sticker\n", + "name": "custom_emoji_id", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "photosize", + "name": "PhotoSize", + "description": "This object represents one size of a photo or a file / sticker thumbnail.", + "html_description": "

This object represents one size of a photo or a file / sticker thumbnail.

", + "rst_description": "This object represents one size of a photo or a `file `_ / :class:`aiogram.methods.sticker.Sticker` thumbnail.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "animation", + "name": "Animation", + "description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "html_description": "

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

", + "rst_description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width as defined by sender", + "html_description": "Video width as defined by sender", + "rst_description": "Video width as defined by sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by sender", + "html_description": "Video height as defined by sender", + "rst_description": "Video height as defined by sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by sender", + "html_description": "Duration of the video in seconds as defined by sender", + "rst_description": "Duration of the video in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Animation thumbnail as defined by sender", + "html_description": "Optional. Animation thumbnail as defined by sender", + "rst_description": "*Optional*. Animation thumbnail as defined by sender\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Original animation filename as defined by sender", + "html_description": "Optional. Original animation filename as defined by sender", + "rst_description": "*Optional*. Original animation filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "audio", + "name": "Audio", + "description": "This object represents an audio file to be treated as music by the Telegram clients.", + "html_description": "

This object represents an audio file to be treated as music by the Telegram clients.

", + "rst_description": "This object represents an audio file to be treated as music by the Telegram clients.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds as defined by sender", + "html_description": "Duration of the audio in seconds as defined by sender", + "rst_description": "Duration of the audio in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "Performer of the audio as defined by sender or by audio tags", + "html_description": "Optional. Performer of the audio as defined by sender or by audio tags", + "rst_description": "*Optional*. Performer of the audio as defined by sender or by audio tags\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio as defined by sender or by audio tags", + "html_description": "Optional. Title of the audio as defined by sender or by audio tags", + "rst_description": "*Optional*. Title of the audio as defined by sender or by audio tags\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by sender", + "html_description": "Optional. Original filename as defined by sender", + "rst_description": "*Optional*. Original filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + }, + { + "type": "PhotoSize", + "description": "Thumbnail of the album cover to which the music file belongs", + "html_description": "Optional. Thumbnail of the album cover to which the music file belongs", + "rst_description": "*Optional*. Thumbnail of the album cover to which the music file belongs\n", + "name": "thumb", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "document", + "name": "Document", + "description": "This object represents a general file (as opposed to photos, voice messages and audio files).", + "html_description": "

This object represents a general file (as opposed to photos, voice messages and audio files).

", + "rst_description": "This object represents a general file (as opposed to `photos `_, `voice messages `_ and `audio files `_).", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "PhotoSize", + "description": "Document thumbnail as defined by sender", + "html_description": "Optional. Document thumbnail as defined by sender", + "rst_description": "*Optional*. Document thumbnail as defined by sender\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by sender", + "html_description": "Optional. Original filename as defined by sender", + "rst_description": "*Optional*. Original filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "video", + "name": "Video", + "description": "This object represents a video file.", + "html_description": "

This object represents a video file.

", + "rst_description": "This object represents a video file.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width as defined by sender", + "html_description": "Video width as defined by sender", + "rst_description": "Video width as defined by sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by sender", + "html_description": "Video height as defined by sender", + "rst_description": "Video height as defined by sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by sender", + "html_description": "Duration of the video in seconds as defined by sender", + "rst_description": "Duration of the video in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by sender", + "html_description": "Optional. Original filename as defined by sender", + "rst_description": "*Optional*. Original filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "videonote", + "name": "VideoNote", + "description": "This object represents a video message (available in Telegram apps as of v.4.0).", + "html_description": "

This object represents a video message (available in Telegram apps as of v.4.0).

", + "rst_description": "This object represents a `video message `_ (available in Telegram apps as of `v.4.0 `_).", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width and height (diameter of the video message) as defined by sender", + "html_description": "Video width and height (diameter of the video message) as defined by sender", + "rst_description": "Video width and height (diameter of the video message) as defined by sender\n", + "name": "length", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by sender", + "html_description": "Duration of the video in seconds as defined by sender", + "rst_description": "Duration of the video in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "name": "thumb", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "voice", + "name": "Voice", + "description": "This object represents a voice note.", + "html_description": "

This object represents a voice note.

", + "rst_description": "This object represents a voice note.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds as defined by sender", + "html_description": "Duration of the audio in seconds as defined by sender", + "rst_description": "Duration of the audio in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "contact", + "name": "Contact", + "description": "This object represents a phone contact.", + "html_description": "

This object represents a phone contact.

", + "rst_description": "This object represents a phone contact.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "Integer", + "description": "Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "user_id", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard", + "html_description": "Optional. Additional data about the contact in the form of a vCard", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_\n", + "name": "vcard", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "dice", + "name": "Dice", + "description": "This object represents an animated emoji that displays a random value.", + "html_description": "

This object represents an animated emoji that displays a random value.

", + "rst_description": "This object represents an animated emoji that displays a random value.", + "annotations": [ + { + "type": "String", + "description": "Emoji on which the dice throw animation is based", + "html_description": "Emoji on which the dice throw animation is based", + "rst_description": "Emoji on which the dice throw animation is based\n", + "name": "emoji", + "required": true + }, + { + "type": "Integer", + "description": "Value of the dice, 1-6 for '', '' and '' base emoji, 1-5 for '' and '' base emoji, 1-64 for '' base emoji", + "html_description": "Value of the dice, 1-6 for “\"🎲\"/”, “\"🎯\"/” and “\"🎳\"/” base emoji, 1-5 for “\"🏀\"/” and “\"⚽\"/” base emoji, 1-64 for “\"🎰\"/” base emoji", + "rst_description": "Value of the dice, 1-6 for '๐ŸŽฒ', '๐ŸŽฏ' and '๐ŸŽณ' base emoji, 1-5 for '๐Ÿ€' and 'โšฝ' base emoji, 1-64 for '๐ŸŽฐ' base emoji\n", + "name": "value", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "polloption", + "name": "PollOption", + "description": "This object contains information about one answer option in a poll.", + "html_description": "

This object contains information about one answer option in a poll.

", + "rst_description": "This object contains information about one answer option in a poll.", + "annotations": [ + { + "type": "String", + "description": "Option text, 1-100 characters", + "html_description": "Option text, 1-100 characters", + "rst_description": "Option text, 1-100 characters\n", + "name": "text", + "required": true + }, + { + "type": "Integer", + "description": "Number of users that voted for this option", + "html_description": "Number of users that voted for this option", + "rst_description": "Number of users that voted for this option\n", + "name": "voter_count", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "pollanswer", + "name": "PollAnswer", + "description": "This object represents an answer of a user in a non-anonymous poll.", + "html_description": "

This object represents an answer of a user in a non-anonymous poll.

", + "rst_description": "This object represents an answer of a user in a non-anonymous poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "poll_id", + "required": true + }, + { + "type": "User", + "description": "The user, who changed the answer to the poll", + "html_description": "The user, who changed the answer to the poll", + "rst_description": "The user, who changed the answer to the poll\n", + "name": "user", + "required": true + }, + { + "type": "Array of Integer", + "description": "0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.", + "html_description": "0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.", + "rst_description": "0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.\n", + "name": "option_ids", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "poll", + "name": "Poll", + "description": "This object contains information about a poll.", + "html_description": "

This object contains information about a poll.

", + "rst_description": "This object contains information about a poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question", + "required": true + }, + { + "type": "Array of PollOption", + "description": "List of poll options", + "html_description": "List of poll options", + "rst_description": "List of poll options\n", + "name": "options", + "required": true + }, + { + "type": "Integer", + "description": "Total number of users that voted in the poll", + "html_description": "Total number of users that voted in the poll", + "rst_description": "Total number of users that voted in the poll\n", + "name": "total_voter_count", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is closed", + "html_description": "True, if the poll is closed", + "rst_description": ":code:`True`, if the poll is closed\n", + "name": "is_closed", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is anonymous", + "html_description": "True, if the poll is anonymous", + "rst_description": ":code:`True`, if the poll is anonymous\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Poll type, currently can be 'regular' or 'quiz'", + "html_description": "Poll type, currently can be “regular” or “quiz”", + "rst_description": "Poll type, currently can be 'regular' or 'quiz'\n", + "name": "type", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll allows multiple answers", + "html_description": "True, if the poll allows multiple answers", + "rst_description": ":code:`True`, if the poll allows multiple answers\n", + "name": "allows_multiple_answers", + "required": true + }, + { + "type": "Integer", + "description": "0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", + "html_description": "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", + "rst_description": "*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.\n", + "name": "correct_option_id", + "required": false + }, + { + "type": "String", + "description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters", + "html_description": "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters", + "rst_description": "*Optional*. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters\n", + "name": "explanation", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "html_description": "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "rst_description": "*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*\n", + "name": "explanation_entities", + "required": false + }, + { + "type": "Integer", + "description": "Amount of time in seconds the poll will be active after creation", + "html_description": "Optional. Amount of time in seconds the poll will be active after creation", + "rst_description": "*Optional*. Amount of time in seconds the poll will be active after creation\n", + "name": "open_period", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the poll will be automatically closed", + "html_description": "Optional. Point in time (Unix timestamp) when the poll will be automatically closed", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed\n", + "name": "close_date", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "location", + "name": "Location", + "description": "This object represents a point on the map.", + "html_description": "

This object represents a point on the map.

", + "rst_description": "This object represents a point on the map.", + "annotations": [ + { + "type": "Float", + "description": "Longitude as defined by sender", + "html_description": "Longitude as defined by sender", + "rst_description": "Longitude as defined by sender\n", + "name": "longitude", + "required": true + }, + { + "type": "Float", + "description": "Latitude as defined by sender", + "html_description": "Latitude as defined by sender", + "rst_description": "Latitude as defined by sender\n", + "name": "latitude", + "required": true + }, + { + "type": "Float number", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "html_description": "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "rst_description": "*Optional*. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "html_description": "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "rst_description": "*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "html_description": "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "rst_description": "*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.\n", + "name": "proximity_alert_radius", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "venue", + "name": "Venue", + "description": "This object represents a venue.", + "html_description": "

This object represents a venue.

", + "rst_description": "This object represents a venue.", + "annotations": [ + { + "type": "Location", + "description": "Venue location. Can't be a live location", + "html_description": "Venue location. Can't be a live location", + "rst_description": "Venue location. Can't be a live location\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue", + "html_description": "Optional. Foursquare identifier of the venue", + "rst_description": "*Optional*. Foursquare identifier of the venue\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "webappdata", + "name": "WebAppData", + "description": "Describes data sent from a Web App to the bot.", + "html_description": "

Describes data sent from a Web App to the bot.

", + "rst_description": "Describes data sent from a `Web App `_ to the bot.", + "annotations": [ + { + "type": "String", + "description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "The data. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "button_text", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "proximityalerttriggered", + "name": "ProximityAlertTriggered", + "description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "html_description": "

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.

", + "rst_description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "annotations": [ + { + "type": "User", + "description": "User that triggered the alert", + "html_description": "User that triggered the alert", + "rst_description": "User that triggered the alert\n", + "name": "traveler", + "required": true + }, + { + "type": "User", + "description": "User that set the alert", + "html_description": "User that set the alert", + "rst_description": "User that set the alert\n", + "name": "watcher", + "required": true + }, + { + "type": "Integer", + "description": "The distance between the users", + "html_description": "The distance between the users", + "rst_description": "The distance between the users\n", + "name": "distance", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "messageautodeletetimerchanged", + "name": "MessageAutoDeleteTimerChanged", + "description": "This object represents a service message about a change in auto-delete timer settings.", + "html_description": "

This object represents a service message about a change in auto-delete timer settings.

", + "rst_description": "This object represents a service message about a change in auto-delete timer settings.", + "annotations": [ + { + "type": "Integer", + "description": "New auto-delete time for messages in the chat; in seconds", + "html_description": "New auto-delete time for messages in the chat; in seconds", + "rst_description": "New auto-delete time for messages in the chat; in seconds\n", + "name": "message_auto_delete_time", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "forumtopiccreated", + "name": "ForumTopicCreated", + "description": "This object represents a service message about a new forum topic created in the chat.", + "html_description": "

This object represents a service message about a new forum topic created in the chat.

", + "rst_description": "This object represents a service message about a new forum topic created in the chat.", + "annotations": [ + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "forumtopicclosed", + "name": "ForumTopicClosed", + "description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "forumtopicreopened", + "name": "ForumTopicReopened", + "description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic reopened in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "videochatscheduled", + "name": "VideoChatScheduled", + "description": "This object represents a service message about a video chat scheduled in the chat.", + "html_description": "

This object represents a service message about a video chat scheduled in the chat.

", + "rst_description": "This object represents a service message about a video chat scheduled in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "html_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "rst_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator\n", + "name": "start_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "videochatstarted", + "name": "VideoChatStarted", + "description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a video chat started in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "videochatended", + "name": "VideoChatEnded", + "description": "This object represents a service message about a video chat ended in the chat.", + "html_description": "

This object represents a service message about a video chat ended in the chat.

", + "rst_description": "This object represents a service message about a video chat ended in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Video chat duration in seconds", + "html_description": "Video chat duration in seconds", + "rst_description": "Video chat duration in seconds\n", + "name": "duration", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "videochatparticipantsinvited", + "name": "VideoChatParticipantsInvited", + "description": "This object represents a service message about new members invited to a video chat.", + "html_description": "

This object represents a service message about new members invited to a video chat.

", + "rst_description": "This object represents a service message about new members invited to a video chat.", + "annotations": [ + { + "type": "Array of User", + "description": "New members that were invited to the video chat", + "html_description": "New members that were invited to the video chat", + "rst_description": "New members that were invited to the video chat\n", + "name": "users", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "userprofilephotos", + "name": "UserProfilePhotos", + "description": "This object represent a user's profile pictures.", + "html_description": "

This object represent a user's profile pictures.

", + "rst_description": "This object represent a user's profile pictures.", + "annotations": [ + { + "type": "Integer", + "description": "Total number of profile pictures the target user has", + "html_description": "Total number of profile pictures the target user has", + "rst_description": "Total number of profile pictures the target user has\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of Array of PhotoSize", + "description": "Requested profile pictures (in up to 4 sizes each)", + "html_description": "Requested profile pictures (in up to 4 sizes each)", + "rst_description": "Requested profile pictures (in up to 4 sizes each)\n", + "name": "photos", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "file", + "name": "File", + "description": "This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.\nThe maximum file size to download is 20 MB", + "html_description": "

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.

\n

The maximum file size to download is 20 MB

\n
", + "rst_description": "This object represents a file ready to be downloaded. The file can be downloaded via the link :code:`https://api.telegram.org/file/bot/`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile`.\n\n The maximum file size to download is 20 MB", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + }, + { + "type": "String", + "description": "File path. Use https://api.telegram.org/file/bot/ to get the file.", + "html_description": "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.", + "rst_description": "*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.\n", + "name": "file_path", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "webappinfo", + "name": "WebAppInfo", + "description": "Describes a Web App.", + "html_description": "

Describes a Web App.

", + "rst_description": "Describes a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "html_description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps `_\n", + "name": "url", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "replykeyboardmarkup", + "name": "ReplyKeyboardMarkup", + "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).", + "html_description": "

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).

", + "rst_description": "This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples).", + "annotations": [ + { + "type": "Array of Array of KeyboardButton", + "description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects\n", + "name": "keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.", + "html_description": "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.", + "rst_description": "*Optional*. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to *false*, in which case the custom keyboard is always of the same height as the app's standard keyboard.\n", + "name": "resize_keyboard", + "required": false + }, + { + "type": "Boolean", + "description": "Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false.", + "html_description": "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false.", + "rst_description": "*Optional*. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to *false*.\n", + "name": "one_time_keyboard", + "required": false + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.\n\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "html_description": "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
\n
\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "rst_description": "*Optional*. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.\n\n\n\n*Example:* A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "keyboardbutton", + "name": "KeyboardButton", + "description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.\nNote: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.", + "html_description": "

This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.

Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.
\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.

", + "rst_description": "This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *web_app*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.\n**Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.\n\n**Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*.\n\n**Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*.", + "annotations": [ + { + "type": "String", + "description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", + "html_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", + "rst_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed\n", + "name": "text", + "required": true + }, + { + "type": "Boolean", + "description": "If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", + "html_description": "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If :code:`True`, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.\n", + "name": "request_contact", + "required": false + }, + { + "type": "Boolean", + "description": "If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "html_description": "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If :code:`True`, the user's current location will be sent when the button is pressed. Available in private chats only.\n", + "name": "request_location", + "required": false + }, + { + "type": "KeyboardButtonPollType", + "description": "If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.", + "html_description": "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.\n", + "name": "request_poll", + "required": false + }, + { + "type": "WebAppInfo", + "description": "If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.", + "html_description": "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.", + "rst_description": "*Optional*. If specified, the described `Web App `_ will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.\n", + "name": "web_app", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "keyboardbuttonpolltype", + "name": "KeyboardButtonPollType", + "description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "html_description": "

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.

", + "rst_description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "annotations": [ + { + "type": "String", + "description": "If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.", + "html_description": "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.", + "rst_description": "*Optional*. If *quiz* is passed, the user will be allowed to create only polls in the quiz mode. If *regular* is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.\n", + "name": "type", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "replykeyboardremove", + "name": "ReplyKeyboardRemove", + "description": "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).", + "html_description": "

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).

", + "rst_description": "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`).", + "annotations": [ + { + "type": "True", + "description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)", + "html_description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)", + "rst_description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use *one_time_keyboard* in :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`)\n", + "name": "remove_keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.\n\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "html_description": "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
\n
\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "rst_description": "*Optional*. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.\n\n\n\n*Example:* A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinekeyboardmarkup", + "name": "InlineKeyboardMarkup", + "description": "This object represents an inline keyboard that appears right next to the message it belongs to.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.", + "html_description": "

This object represents an inline keyboard that appears right next to the message it belongs to.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.

", + "rst_description": "This object represents an `inline keyboard `_ that appears right next to the message it belongs to.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.", + "annotations": [ + { + "type": "Array of Array of InlineKeyboardButton", + "description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` objects\n", + "name": "inline_keyboard", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "inlinekeyboardbutton", + "name": "InlineKeyboardButton", + "description": "This object represents one button of an inline keyboard. You must use exactly one of the optional fields.", + "html_description": "

This object represents one button of an inline keyboard. You must use exactly one of the optional fields.

", + "rst_description": "This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields.", + "annotations": [ + { + "type": "String", + "description": "Label text on the button", + "html_description": "Label text on the button", + "rst_description": "Label text on the button\n", + "name": "text", + "required": true + }, + { + "type": "String", + "description": "HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.", + "html_description": "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.", + "rst_description": "*Optional*. HTTP or tg:// URL to be opened when the button is pressed. Links :code:`tg://user?id=` can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.\n", + "name": "url", + "required": false + }, + { + "type": "String", + "description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", + "html_description": "Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", + "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes\n", + "name": "callback_data", + "required": false + }, + { + "type": "WebAppInfo", + "description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.", + "html_description": "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.", + "rst_description": "*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Available only in private chats between a user and the bot.\n", + "name": "web_app", + "required": false + }, + { + "type": "LoginUrl", + "description": "An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "html_description": "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "rst_description": "*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.\n", + "name": "login_url", + "required": false + }, + { + "type": "String", + "description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.\n\nNote: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pmโ€ฆ actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.", + "html_description": "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.
\n
\nNote: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.", + "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.\n\n\n\n**Note:** This offers an easy way for users to start using your bot in `inline mode `_ when they are currently in a private chat with it. Especially useful when combined with `https://core.telegram.org/bots/api#answerinlinequery `_ *switch_pmโ€ฆ* actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.\n", + "name": "switch_inline_query", + "required": false + }, + { + "type": "String", + "description": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.", + "html_description": "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.
\n
\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.", + "rst_description": "*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\n\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.\n", + "name": "switch_inline_query_current_chat", + "required": false + }, + { + "type": "CallbackGame", + "description": "Description of the game that will be launched when the user presses the button.\n\nNOTE: This type of button must always be the first button in the first row.", + "html_description": "Optional. Description of the game that will be launched when the user presses the button.
\n
\nNOTE: This type of button must always be the first button in the first row.", + "rst_description": "*Optional*. Description of the game that will be launched when the user presses the button.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row.\n", + "name": "callback_game", + "required": false + }, + { + "type": "Boolean", + "description": "Specify True, to send a Pay button.\n\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "html_description": "Optional. Specify True, to send a Pay button.
\n
\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "rst_description": "*Optional*. Specify :code:`True`, to send a `Pay button `_.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row and can only be used in invoice messages.\n", + "name": "pay", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "loginurl", + "name": "LoginUrl", + "description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of version 5.7.\nSample bot: @discussbot", + "html_description": "

This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:

Telegram apps support these buttons as of version 5.7.

\n

Sample bot: @discussbot

\n
", + "rst_description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the `Telegram Login Widget `_ when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of `version 5.7 `_.\n\n Sample bot: `@discussbot `_", + "annotations": [ + { + "type": "String", + "description": "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.\n\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "html_description": "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
\n
\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "rst_description": "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in `Receiving authorization data `_.\n\n\n\n**NOTE:** You **must** always check the hash of the received data to verify the authentication and the integrity of the data as described in `Checking authorization `_.\n", + "name": "url", + "required": true + }, + { + "type": "String", + "description": "New text of the button in forwarded messages.", + "html_description": "Optional. New text of the button in forwarded messages.", + "rst_description": "*Optional*. New text of the button in forwarded messages.\n", + "name": "forward_text", + "required": false + }, + { + "type": "String", + "description": "Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.", + "html_description": "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.", + "rst_description": "*Optional*. Username of a bot, which will be used for user authorization. See `Setting up a bot `_ for more details. If not specified, the current bot's username will be assumed. The *url*'s domain must be the same as the domain linked with the bot. See `Linking your domain to the bot `_ for more details.\n", + "name": "bot_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the permission for your bot to send messages to the user.", + "html_description": "Optional. Pass True to request the permission for your bot to send messages to the user.", + "rst_description": "*Optional*. Pass :code:`True` to request the permission for your bot to send messages to the user.\n", + "name": "request_write_access", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "callbackquery", + "name": "CallbackQuery", + "description": "This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.\nNOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "html_description": "

This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.

\n

NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).

\n
", + "rst_description": "This object represents an incoming callback query from a callback button in an `inline keyboard `_. If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in `inline mode `_), the field *inline_message_id* will be present. Exactly one of the fields *data* or *game_short_name* will be present.\n\n **NOTE:** After the user presses a callback button, Telegram clients will display a progress bar until you call :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`. It is, therefore, necessary to react by calling :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "Message", + "description": "Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old", + "html_description": "Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old", + "rst_description": "*Optional*. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old\n", + "name": "message", + "required": false + }, + { + "type": "String", + "description": "Identifier of the message sent via the bot in inline mode, that originated the query.", + "html_description": "Optional. Identifier of the message sent via the bot in inline mode, that originated the query.", + "rst_description": "*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "html_description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "rst_description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in :class:`aiogram.methods.games.Games`.\n", + "name": "chat_instance", + "required": true + }, + { + "type": "String", + "description": "Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "html_description": "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "rst_description": "*Optional*. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "Short name of a Game to be returned, serves as the unique identifier for the game", + "html_description": "Optional. Short name of a Game to be returned, serves as the unique identifier for the game", + "rst_description": "*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game\n", + "name": "game_short_name", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "forcereply", + "name": "ForceReply", + "description": "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.\nExample: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n\nExplain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\nGuide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\nThe last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "html_description": "

Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.

\n

Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:

\n
    \n
  • Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.
  • \n
  • Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.
  • \n
\n

The last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.

\n
", + "rst_description": "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice `privacy mode `_.\n\n **Example:** A `poll bot `_ for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n \n - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\n - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\n \n The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "annotations": [ + { + "type": "True", + "description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "html_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "rst_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'\n", + "name": "force_reply", + "required": true + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the reply is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.", + "html_description": "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.", + "rst_description": "*Optional*. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatphoto", + "name": "ChatPhoto", + "description": "This object represents a chat photo.", + "html_description": "

This object represents a chat photo.

", + "rst_description": "This object represents a chat photo.", + "annotations": [ + { + "type": "String", + "description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "small_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "small_file_unique_id", + "required": true + }, + { + "type": "String", + "description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "big_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "big_file_unique_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatinvitelink", + "name": "ChatInviteLink", + "description": "Represents an invite link for a chat.", + "html_description": "

Represents an invite link for a chat.

", + "rst_description": "Represents an invite link for a chat.", + "annotations": [ + { + "type": "String", + "description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with 'โ€ฆ'.", + "html_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.", + "rst_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with 'โ€ฆ'.\n", + "name": "invite_link", + "required": true + }, + { + "type": "User", + "description": "Creator of the link", + "html_description": "Creator of the link", + "rst_description": "Creator of the link\n", + "name": "creator", + "required": true + }, + { + "type": "Boolean", + "description": "True, if users joining the chat via the link need to be approved by chat administrators", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators\n", + "name": "creates_join_request", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is primary", + "html_description": "True, if the link is primary", + "rst_description": ":code:`True`, if the link is primary\n", + "name": "is_primary", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is revoked", + "html_description": "True, if the link is revoked", + "rst_description": ":code:`True`, if the link is revoked\n", + "name": "is_revoked", + "required": true + }, + { + "type": "String", + "description": "Invite link name", + "html_description": "Optional. Invite link name", + "rst_description": "*Optional*. Invite link name\n", + "name": "name", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the link will expire or has been expired", + "html_description": "Optional. Point in time (Unix timestamp) when the link will expire or has been expired", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired\n", + "name": "expire_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit", + "required": false + }, + { + "type": "Integer", + "description": "Number of pending join requests created using this link", + "html_description": "Optional. Number of pending join requests created using this link", + "rst_description": "*Optional*. Number of pending join requests created using this link\n", + "name": "pending_join_request_count", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatadministratorrights", + "name": "ChatAdministratorRights", + "description": "Represents the rights of an administrator in a chat.", + "html_description": "

Represents the rights of an administrator in a chat.

", + "rst_description": "Represents the rights of an administrator in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "html_description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n", + "name": "can_manage_chat", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members", + "html_description": "True, if the administrator can restrict, ban or unban chat members", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "html_description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post in the channel; channels only", + "html_description": "Optional. True, if the administrator can post in the channel; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n", + "name": "can_post_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only\n", + "name": "can_manage_topics", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatmember", + "name": "ChatMember", + "description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n - ChatMemberOwner\n - ChatMemberAdministrator\n - ChatMemberMember\n - ChatMemberRestricted\n - ChatMemberLeft\n - ChatMemberBanned", + "html_description": "

This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:

", + "rst_description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n\n - :class:`aiogram.types.chat_member_owner.ChatMemberOwner`\n - :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`\n - :class:`aiogram.types.chat_member_member.ChatMemberMember`\n - :class:`aiogram.types.chat_member_restricted.ChatMemberRestricted`\n - :class:`aiogram.types.chat_member_left.ChatMemberLeft`\n - :class:`aiogram.types.chat_member_banned.ChatMemberBanned`", + "annotations": [], + "category": "types" + }, + { + "anchor": "chatmemberowner", + "name": "ChatMemberOwner", + "description": "Represents a chat member that owns the chat and has all administrator privileges.", + "html_description": "

Represents a chat member that owns the chat and has all administrator privileges.

", + "rst_description": "Represents a `chat member `_ that owns the chat and has all administrator privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'creator'", + "html_description": "The member's status in the chat, always “creator”", + "rst_description": "The member's status in the chat, always 'creator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatmemberadministrator", + "name": "ChatMemberAdministrator", + "description": "Represents a chat member that has some additional privileges.", + "html_description": "

Represents a chat member that has some additional privileges.

", + "rst_description": "Represents a `chat member `_ that has some additional privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'administrator'", + "html_description": "The member's status in the chat, always “administrator”", + "rst_description": "The member's status in the chat, always 'administrator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the bot is allowed to edit administrator privileges of that user", + "html_description": "True, if the bot is allowed to edit administrator privileges of that user", + "rst_description": ":code:`True`, if the bot is allowed to edit administrator privileges of that user\n", + "name": "can_be_edited", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "html_description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n", + "name": "can_manage_chat", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members", + "html_description": "True, if the administrator can restrict, ban or unban chat members", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "html_description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post in the channel; channels only", + "html_description": "Optional. True, if the administrator can post in the channel; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n", + "name": "can_post_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only\n", + "name": "can_manage_topics", + "required": false + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatmembermember", + "name": "ChatMemberMember", + "description": "Represents a chat member that has no additional privileges or restrictions.", + "html_description": "

Represents a chat member that has no additional privileges or restrictions.

", + "rst_description": "Represents a `chat member `_ that has no additional privileges or restrictions.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'member'", + "html_description": "The member's status in the chat, always “member”", + "rst_description": "The member's status in the chat, always 'member'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatmemberrestricted", + "name": "ChatMemberRestricted", + "description": "Represents a chat member that is under certain restrictions in the chat. Supergroups only.", + "html_description": "

Represents a chat member that is under certain restrictions in the chat. Supergroups only.

", + "rst_description": "Represents a `chat member `_ that is under certain restrictions in the chat. Supergroups only.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'restricted'", + "html_description": "The member's status in the chat, always “restricted”", + "rst_description": "The member's status in the chat, always 'restricted'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is a member of the chat at the moment of the request", + "html_description": "True, if the user is a member of the chat at the moment of the request", + "rst_description": ":code:`True`, if the user is a member of the chat at the moment of the request\n", + "name": "is_member", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages", + "html_description": "True, if the user is allowed to pin messages", + "rst_description": ":code:`True`, if the user is allowed to pin messages\n", + "name": "can_pin_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics", + "html_description": "True, if the user is allowed to create forum topics", + "rst_description": ":code:`True`, if the user is allowed to create forum topics\n", + "name": "can_manage_topics", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, locations and venues", + "html_description": "True, if the user is allowed to send text messages, contacts, locations and venues", + "rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n", + "name": "can_send_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes", + "html_description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes", + "rst_description": ":code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes\n", + "name": "can_send_media_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send polls", + "html_description": "True, if the user is allowed to send polls", + "rst_description": ":code:`True`, if the user is allowed to send polls\n", + "name": "can_send_polls", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n", + "name": "can_send_other_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "True, if the user is allowed to add web page previews to their messages", + "rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n", + "name": "can_add_web_page_previews", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever", + "html_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever", + "rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatmemberleft", + "name": "ChatMemberLeft", + "description": "Represents a chat member that isn't currently a member of the chat, but may join it themselves.", + "html_description": "

Represents a chat member that isn't currently a member of the chat, but may join it themselves.

", + "rst_description": "Represents a `chat member `_ that isn't currently a member of the chat, but may join it themselves.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'left'", + "html_description": "The member's status in the chat, always “left”", + "rst_description": "The member's status in the chat, always 'left'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatmemberbanned", + "name": "ChatMemberBanned", + "description": "Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.", + "html_description": "

Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.

", + "rst_description": "Represents a `chat member `_ that was banned in the chat and can't return to the chat or view chat messages.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'kicked'", + "html_description": "The member's status in the chat, always “kicked”", + "rst_description": "The member's status in the chat, always 'kicked'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever", + "html_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever", + "rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatmemberupdated", + "name": "ChatMemberUpdated", + "description": "This object represents changes in the status of a chat member.", + "html_description": "

This object represents changes in the status of a chat member.

", + "rst_description": "This object represents changes in the status of a chat member.", + "annotations": [ + { + "type": "Chat", + "description": "Chat the user belongs to", + "html_description": "Chat the user belongs to", + "rst_description": "Chat the user belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "Performer of the action, which resulted in the change", + "html_description": "Performer of the action, which resulted in the change", + "rst_description": "Performer of the action, which resulted in the change\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "Date the change was done in Unix time", + "html_description": "Date the change was done in Unix time", + "rst_description": "Date the change was done in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "ChatMember", + "description": "Previous information about the chat member", + "html_description": "Previous information about the chat member", + "rst_description": "Previous information about the chat member\n", + "name": "old_chat_member", + "required": true + }, + { + "type": "ChatMember", + "description": "New information about the chat member", + "html_description": "New information about the chat member", + "rst_description": "New information about the chat member\n", + "name": "new_chat_member", + "required": true + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "html_description": "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "rst_description": "*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.\n", + "name": "invite_link", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatjoinrequest", + "name": "ChatJoinRequest", + "description": "Represents a join request sent to a chat.", + "html_description": "

Represents a join request sent to a chat.

", + "rst_description": "Represents a join request sent to a chat.", + "annotations": [ + { + "type": "Chat", + "description": "Chat to which the request was sent", + "html_description": "Chat to which the request was sent", + "rst_description": "Chat to which the request was sent\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "User that sent the join request", + "html_description": "User that sent the join request", + "rst_description": "User that sent the join request\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "Date the request was sent in Unix time", + "html_description": "Date the request was sent in Unix time", + "rst_description": "Date the request was sent in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "Bio of the user.", + "html_description": "Optional. Bio of the user.", + "rst_description": "*Optional*. Bio of the user.\n", + "name": "bio", + "required": false + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link that was used by the user to send the join request", + "html_description": "Optional. Chat invite link that was used by the user to send the join request", + "rst_description": "*Optional*. Chat invite link that was used by the user to send the join request\n", + "name": "invite_link", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatpermissions", + "name": "ChatPermissions", + "description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "html_description": "

Describes actions that a non-administrator user is allowed to take in a chat.

", + "rst_description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, locations and venues", + "html_description": "Optional. True, if the user is allowed to send text messages, contacts, locations and venues", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n", + "name": "can_send_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages", + "html_description": "Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages\n", + "name": "can_send_media_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send polls, implies can_send_messages", + "html_description": "Optional. True, if the user is allowed to send polls, implies can_send_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls, implies can_send_messages\n", + "name": "can_send_polls", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages", + "html_description": "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages\n", + "name": "can_send_other_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages", + "html_description": "Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages, implies can_send_media_messages\n", + "name": "can_add_web_page_previews", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", + "html_description": "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups\n", + "name": "can_change_info", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "Optional. True, if the user is allowed to invite new users to the chat", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages. Ignored in public supergroups", + "html_description": "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored in public supergroups\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "html_description": "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages\n", + "name": "can_manage_topics", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "chatlocation", + "name": "ChatLocation", + "description": "Represents a location to which a chat is connected.", + "html_description": "

Represents a location to which a chat is connected.

", + "rst_description": "Represents a location to which a chat is connected.", + "annotations": [ + { + "type": "Location", + "description": "The location to which the supergroup is connected. Can't be a live location.", + "html_description": "The location to which the supergroup is connected. Can't be a live location.", + "rst_description": "The location to which the supergroup is connected. Can't be a live location.\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Location address; 1-64 characters, as defined by the chat owner", + "html_description": "Location address; 1-64 characters, as defined by the chat owner", + "rst_description": "Location address; 1-64 characters, as defined by the chat owner\n", + "name": "address", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "forumtopic", + "name": "ForumTopic", + "description": "This object represents a forum topic.", + "html_description": "

This object represents a forum topic.

", + "rst_description": "This object represents a forum topic.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the forum topic", + "html_description": "Unique identifier of the forum topic", + "rst_description": "Unique identifier of the forum topic\n", + "name": "message_thread_id", + "required": true + }, + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "botcommand", + "name": "BotCommand", + "description": "This object represents a bot command.", + "html_description": "

This object represents a bot command.

", + "rst_description": "This object represents a bot command.", + "annotations": [ + { + "type": "String", + "description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "html_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "rst_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.\n", + "name": "command", + "required": true + }, + { + "type": "String", + "description": "Description of the command; 1-256 characters.", + "html_description": "Description of the command; 1-256 characters.", + "rst_description": "Description of the command; 1-256 characters.\n", + "name": "description", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscope", + "name": "BotCommandScope", + "description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n - BotCommandScopeDefault\n - BotCommandScopeAllPrivateChats\n - BotCommandScopeAllGroupChats\n - BotCommandScopeAllChatAdministrators\n - BotCommandScopeChat\n - BotCommandScopeChatAdministrators\n - BotCommandScopeChatMember", + "html_description": "

This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:

", + "rst_description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n\n - :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`\n - :class:`aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats`\n - :class:`aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats`\n - :class:`aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat.BotCommandScopeChat`\n - :class:`aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember`", + "annotations": [], + "category": "types" + }, + { + "anchor": "botcommandscopedefault", + "name": "BotCommandScopeDefault", + "description": "Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.", + "html_description": "

Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.

", + "rst_description": "Represents the default `scope `_ of bot commands. Default commands are used if no commands with a `narrower scope `_ are specified for the user.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be default", + "html_description": "Scope type, must be default", + "rst_description": "Scope type, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopeallprivatechats", + "name": "BotCommandScopeAllPrivateChats", + "description": "Represents the scope of bot commands, covering all private chats.", + "html_description": "

Represents the scope of bot commands, covering all private chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all private chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_private_chats", + "html_description": "Scope type, must be all_private_chats", + "rst_description": "Scope type, must be *all_private_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopeallgroupchats", + "name": "BotCommandScopeAllGroupChats", + "description": "Represents the scope of bot commands, covering all group and supergroup chats.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_group_chats", + "html_description": "Scope type, must be all_group_chats", + "rst_description": "Scope type, must be *all_group_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopeallchatadministrators", + "name": "BotCommandScopeAllChatAdministrators", + "description": "Represents the scope of bot commands, covering all group and supergroup chat administrators.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chat administrators.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chat administrators.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_chat_administrators", + "html_description": "Scope type, must be all_chat_administrators", + "rst_description": "Scope type, must be *all_chat_administrators*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopechat", + "name": "BotCommandScopeChat", + "description": "Represents the scope of bot commands, covering a specific chat.", + "html_description": "

Represents the scope of bot commands, covering a specific chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat", + "html_description": "Scope type, must be chat", + "rst_description": "Scope type, must be *chat*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopechatadministrators", + "name": "BotCommandScopeChatAdministrators", + "description": "Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all administrators of a specific group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_administrators", + "html_description": "Scope type, must be chat_administrators", + "rst_description": "Scope type, must be *chat_administrators*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botcommandscopechatmember", + "name": "BotCommandScopeChatMember", + "description": "Represents the scope of bot commands, covering a specific member of a group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering a specific member of a group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific member of a group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_member", + "html_description": "Scope type, must be chat_member", + "rst_description": "Scope type, must be *chat_member*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "menubutton", + "name": "MenuButton", + "description": "This object describes the bot's menu button in a private chat. It should be one of\n - MenuButtonCommands\n - MenuButtonWebApp\n - MenuButtonDefault\nIf a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "html_description": "

This object describes the bot's menu button in a private chat. It should be one of

If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.

", + "rst_description": "This object describes the bot's menu button in a private chat. It should be one of\n\n - :class:`aiogram.types.menu_button_commands.MenuButtonCommands`\n - :class:`aiogram.types.menu_button_web_app.MenuButtonWebApp`\n - :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n\nIf a menu button other than :class:`aiogram.types.menu_button_default.MenuButtonDefault` is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "annotations": [], + "category": "types" + }, + { + "anchor": "menubuttoncommands", + "name": "MenuButtonCommands", + "description": "Represents a menu button, which opens the bot's list of commands.", + "html_description": "

Represents a menu button, which opens the bot's list of commands.

", + "rst_description": "Represents a menu button, which opens the bot's list of commands.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be commands", + "html_description": "Type of the button, must be commands", + "rst_description": "Type of the button, must be *commands*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "menubuttonwebapp", + "name": "MenuButtonWebApp", + "description": "Represents a menu button, which launches a Web App.", + "html_description": "

Represents a menu button, which launches a Web App.

", + "rst_description": "Represents a menu button, which launches a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be web_app", + "html_description": "Type of the button, must be web_app", + "rst_description": "Type of the button, must be *web_app*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Text on the button", + "html_description": "Text on the button", + "rst_description": "Text on the button\n", + "name": "text", + "required": true + }, + { + "type": "WebAppInfo", + "description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.", + "html_description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.", + "rst_description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`.\n", + "name": "web_app", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "menubuttondefault", + "name": "MenuButtonDefault", + "description": "Describes that no specific value for the menu button was set.", + "html_description": "

Describes that no specific value for the menu button was set.

", + "rst_description": "Describes that no specific value for the menu button was set.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be default", + "html_description": "Type of the button, must be default", + "rst_description": "Type of the button, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "responseparameters", + "name": "ResponseParameters", + "description": "Describes why a request was unsuccessful.", + "html_description": "

Describes why a request was unsuccessful.

", + "rst_description": "Describes why a request was unsuccessful.", + "annotations": [ + { + "type": "Integer", + "description": "The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "html_description": "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "rst_description": "*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated\n", + "name": "retry_after", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmedia", + "name": "InputMedia", + "description": "This object represents the content of a media message to be sent. It should be one of\n - InputMediaAnimation\n - InputMediaDocument\n - InputMediaAudio\n - InputMediaPhoto\n - InputMediaVideo", + "html_description": "

This object represents the content of a media message to be sent. It should be one of

", + "rst_description": "This object represents the content of a media message to be sent. It should be one of\n\n - :class:`aiogram.types.input_media_animation.InputMediaAnimation`\n - :class:`aiogram.types.input_media_document.InputMediaDocument`\n - :class:`aiogram.types.input_media_audio.InputMediaAudio`\n - :class:`aiogram.types.input_media_photo.InputMediaPhoto`\n - :class:`aiogram.types.input_media_video.InputMediaVideo`", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputmediaphoto", + "name": "InputMediaPhoto", + "description": "Represents a photo to be sent.", + "html_description": "

Represents a photo to be sent.

", + "rst_description": "Represents a photo to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediavideo", + "name": "InputMediaVideo", + "description": "Represents a video to be sent.", + "html_description": "

Represents a video to be sent.

", + "rst_description": "Represents a video to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Optional. Pass True if the uploaded video is suitable for streaming", + "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediaanimation", + "name": "InputMediaAnimation", + "description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "html_description": "

Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

", + "rst_description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be animation", + "html_description": "Type of the result, must be animation", + "rst_description": "Type of the result, must be *animation*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the animation to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the animation caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Animation width", + "html_description": "Optional. Animation width", + "rst_description": "*Optional*. Animation width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Animation height", + "html_description": "Optional. Animation height", + "rst_description": "*Optional*. Animation height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Animation duration in seconds", + "html_description": "Optional. Animation duration in seconds", + "rst_description": "*Optional*. Animation duration in seconds\n", + "name": "duration", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediaaudio", + "name": "InputMediaAudio", + "description": "Represents an audio file to be treated as music to be sent.", + "html_description": "

Represents an audio file to be treated as music to be sent.

", + "rst_description": "Represents an audio file to be treated as music to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the audio to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds", + "html_description": "Optional. Duration of the audio in seconds", + "rst_description": "*Optional*. Duration of the audio in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "String", + "description": "Performer of the audio", + "html_description": "Optional. Performer of the audio", + "rst_description": "*Optional*. Performer of the audio\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio", + "html_description": "Optional. Title of the audio", + "rst_description": "*Optional*. Title of the audio\n", + "name": "title", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmediadocument", + "name": "InputMediaDocument", + "description": "Represents a general file to be sent.", + "html_description": "

Represents a general file to be sent.

", + "rst_description": "Represents a general file to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "html_description": "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "rst_description": "*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always :code:`True`, if the document is sent as part of an album.\n", + "name": "disable_content_type_detection", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputfile", + "name": "InputFile", + "description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "html_description": "

This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.

", + "rst_description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "annotations": [], + "category": "types" + } + ], + "description": "All types used in the Bot API responses are represented as JSON-objects.\nIt is safe to use 32-bit signed integers for storing all Integer fields unless otherwise noted.\nOptional fields may be not returned when irrelevant." + }, + { + "title": "Available methods", + "anchor": "available-methods", + "children": [ + { + "anchor": "getme", + "name": "getMe", + "description": "A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.", + "html_description": "

A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.

", + "rst_description": "A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "logout", + "name": "logOut", + "description": "Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.", + "html_description": "

Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.

", + "rst_description": "Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "close", + "name": "close", + "description": "Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.", + "html_description": "

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.

", + "rst_description": "Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "sendmessage", + "name": "sendMessage", + "description": "Use this method to send text messages. On success, the sent Message is returned.", + "html_description": "

Use this method to send text messages. On success, the sent Message is returned.

", + "rst_description": "Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "html_description": "Text of the message to be sent, 1-4096 characters after entities parsing", + "rst_description": "Text of the message to be sent, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables link previews for links in this message", + "html_description": "Disables link previews for links in this message", + "rst_description": "Disables link previews for links in this message\n", + "name": "disable_web_page_preview" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "forwardmessage", + "name": "forwardMessage", + "description": "Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.", + "html_description": "

Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned.

", + "rst_description": "Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the forwarded message from forwarding and saving", + "html_description": "Protects the contents of the forwarded message from forwarding and saving", + "rst_description": "Protects the contents of the forwarded message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": true, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", + "name": "message_id" + } + ], + "category": "methods" + }, + { + "anchor": "copymessage", + "name": "copyMessage", + "description": "Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.", + "html_description": "

Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.

", + "rst_description": "Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "html_description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)", + "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", + "name": "from_chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Message identifier in the chat specified in from_chat_id", + "html_description": "Message identifier in the chat specified in from_chat_id", + "rst_description": "Message identifier in the chat specified in *from_chat_id*\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "html_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept", + "rst_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the new caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the new caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendphoto", + "name": "sendPhoto", + "description": "Use this method to send photos. On success, the sent Message is returned.", + "html_description": "

Use this method to send photos. On success, the sent Message is returned.

", + "rst_description": "Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. More information on Sending Files", + "html_description": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. More information on Sending Files »", + "rst_description": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป `\n", + "name": "photo" + }, + { + "type": "String", + "required": false, + "description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "html_description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendaudio", + "name": "sendAudio", + "description": "Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the sendVoice method instead.", + "html_description": "

Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

For sending voice messages, use the sendVoice method instead.

", + "rst_description": "Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "audio" + }, + { + "type": "String", + "required": false, + "description": "Audio caption, 0-1024 characters after entities parsing", + "html_description": "Audio caption, 0-1024 characters after entities parsing", + "rst_description": "Audio caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of the audio in seconds", + "html_description": "Duration of the audio in seconds", + "rst_description": "Duration of the audio in seconds\n", + "name": "duration" + }, + { + "type": "String", + "required": false, + "description": "Performer", + "html_description": "Performer", + "rst_description": "Performer\n", + "name": "performer" + }, + { + "type": "String", + "required": false, + "description": "Track name", + "html_description": "Track name", + "rst_description": "Track name\n", + "name": "title" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "senddocument", + "name": "sendDocument", + "description": "Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "document" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "String", + "required": false, + "description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "html_description": "Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing", + "rst_description": "Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "html_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data", + "rst_description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data\n", + "name": "disable_content_type_detection" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvideo", + "name": "sendVideo", + "description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. More information on Sending Files", + "html_description": "Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. More information on Sending Files »", + "rst_description": "Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "video" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width", + "html_description": "Video width", + "rst_description": "Video width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Video height", + "html_description": "Video height", + "rst_description": "Video height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "String", + "required": false, + "description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "html_description": "Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing", + "rst_description": "Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Pass True if the uploaded video is suitable for streaming", + "rst_description": "Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendanimation", + "name": "sendAnimation", + "description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. More information on Sending Files", + "html_description": "Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. More information on Sending Files »", + "rst_description": "Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "animation" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent animation in seconds", + "html_description": "Duration of sent animation in seconds", + "rst_description": "Duration of sent animation in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Animation width", + "html_description": "Animation width", + "rst_description": "Animation width\n", + "name": "width" + }, + { + "type": "Integer", + "required": false, + "description": "Animation height", + "html_description": "Animation height", + "rst_description": "Animation height\n", + "name": "height" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "String", + "required": false, + "description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "html_description": "Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing", + "rst_description": "Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the animation caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvoice", + "name": "sendVoice", + "description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", + "html_description": "

Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

", + "rst_description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "voice" + }, + { + "type": "String", + "required": false, + "description": "Voice message caption, 0-1024 characters after entities parsing", + "html_description": "Voice message caption, 0-1024 characters after entities parsing", + "rst_description": "Voice message caption, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of the voice message in seconds", + "html_description": "Duration of the voice message in seconds", + "rst_description": "Duration of the voice message in seconds\n", + "name": "duration" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvideonote", + "name": "sendVideoNote", + "description": "As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.", + "html_description": "

As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned.

", + "rst_description": "As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. More information on Sending Files. Sending video notes by a URL is currently unsupported", + "html_description": "Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. More information on Sending Files ». Sending video notes by a URL is currently unsupported", + "rst_description": "Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported\n", + "name": "video_note" + }, + { + "type": "Integer", + "required": false, + "description": "Duration of sent video in seconds", + "html_description": "Duration of sent video in seconds", + "rst_description": "Duration of sent video in seconds\n", + "name": "duration" + }, + { + "type": "Integer", + "required": false, + "description": "Video width and height, i.e. diameter of the video message", + "html_description": "Video width and height, i.e. diameter of the video message", + "rst_description": "Video width and height, i.e. diameter of the video message\n", + "name": "length" + }, + { + "type": "InputFile or String", + "required": false, + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendmediagroup", + "name": "sendMediaGroup", + "description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.", + "html_description": "

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.

", + "rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Array of InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", + "required": true, + "description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "html_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items", + "rst_description": "A JSON-serialized array describing messages to be sent, must include 2-10 items\n", + "name": "media" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends messages silently. Users will receive a notification with no sound.", + "html_description": "Sends messages silently. Users will receive a notification with no sound.", + "rst_description": "Sends messages `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent messages from forwarding and saving", + "html_description": "Protects the contents of the sent messages from forwarding and saving", + "rst_description": "Protects the contents of the sent messages from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the messages are a reply, ID of the original message", + "html_description": "If the messages are a reply, ID of the original message", + "rst_description": "If the messages are a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + } + ], + "category": "methods" + }, + { + "anchor": "sendlocation", + "name": "sendLocation", + "description": "Use this method to send point on the map. On success, the sent Message is returned.", + "html_description": "

Use this method to send point on the map. On success, the sent Message is returned.

", + "rst_description": "Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Float number", + "required": true, + "description": "Latitude of the location", + "html_description": "Latitude of the location", + "rst_description": "Latitude of the location\n", + "name": "latitude" + }, + { + "type": "Float number", + "required": true, + "description": "Longitude of the location", + "html_description": "Longitude of the location", + "rst_description": "Longitude of the location\n", + "name": "longitude" + }, + { + "type": "Float number", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", + "html_description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", + "rst_description": "Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400.\n", + "name": "live_period" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagelivelocation", + "name": "editMessageLiveLocation", + "description": "Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "Float number", + "required": true, + "description": "Latitude of new location", + "html_description": "Latitude of new location", + "rst_description": "Latitude of new location\n", + "name": "latitude" + }, + { + "type": "Float number", + "required": true, + "description": "Longitude of new location", + "html_description": "Longitude of new location", + "rst_description": "Longitude of new location\n", + "name": "longitude" + }, + { + "type": "Float number", + "required": false, + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy" + }, + { + "type": "Integer", + "required": false, + "description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "stopmessagelivelocation", + "name": "stopMessageLiveLocation", + "description": "Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "html_description": "Required if inline_message_id is not specified. Identifier of the message with live location to stop", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message with live location to stop\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendvenue", + "name": "sendVenue", + "description": "Use this method to send information about a venue. On success, the sent Message is returned.", + "html_description": "

Use this method to send information about a venue. On success, the sent Message is returned.

", + "rst_description": "Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "Float number", + "required": true, + "description": "Latitude of the venue", + "html_description": "Latitude of the venue", + "rst_description": "Latitude of the venue\n", + "name": "latitude" + }, + { + "type": "Float number", + "required": true, + "description": "Longitude of the venue", + "html_description": "Longitude of the venue", + "rst_description": "Longitude of the venue\n", + "name": "longitude" + }, + { + "type": "String", + "required": true, + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address" + }, + { + "type": "String", + "required": false, + "description": "Foursquare identifier of the venue", + "html_description": "Foursquare identifier of the venue", + "rst_description": "Foursquare identifier of the venue\n", + "name": "foursquare_id" + }, + { + "type": "String", + "required": false, + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type" + }, + { + "type": "String", + "required": false, + "description": "Google Places identifier of the venue", + "html_description": "Google Places identifier of the venue", + "rst_description": "Google Places identifier of the venue\n", + "name": "google_place_id" + }, + { + "type": "String", + "required": false, + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Google Places type of the venue. (See supported types.)", + "rst_description": "Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendcontact", + "name": "sendContact", + "description": "Use this method to send phone contacts. On success, the sent Message is returned.", + "html_description": "

Use this method to send phone contacts. On success, the sent Message is returned.

", + "rst_description": "Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number" + }, + { + "type": "String", + "required": true, + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name" + }, + { + "type": "String", + "required": false, + "description": "Contact's last name", + "html_description": "Contact's last name", + "rst_description": "Contact's last name\n", + "name": "last_name" + }, + { + "type": "String", + "required": false, + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendpoll", + "name": "sendPoll", + "description": "Use this method to send a native poll. On success, the sent Message is returned.", + "html_description": "

Use this method to send a native poll. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question" + }, + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each", + "html_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each", + "rst_description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each\n", + "name": "options" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if the poll needs to be anonymous, defaults to True", + "html_description": "True, if the poll needs to be anonymous, defaults to True", + "rst_description": ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`\n", + "name": "is_anonymous" + }, + { + "type": "String", + "required": false, + "description": "Poll type, 'quiz' or 'regular', defaults to 'regular'", + "html_description": "Poll type, “quiz” or “regular”, defaults to “regular”", + "rst_description": "Poll type, 'quiz' or 'regular', defaults to 'regular'\n", + "name": "type" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", + "html_description": "True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False", + "rst_description": ":code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False`\n", + "name": "allows_multiple_answers" + }, + { + "type": "Integer", + "required": false, + "description": "0-based identifier of the correct answer option, required for polls in quiz mode", + "html_description": "0-based identifier of the correct answer option, required for polls in quiz mode", + "rst_description": "0-based identifier of the correct answer option, required for polls in quiz mode\n", + "name": "correct_option_id" + }, + { + "type": "String", + "required": false, + "description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing", + "html_description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing", + "rst_description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing\n", + "name": "explanation" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "html_description": "Mode for parsing entities in the explanation. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the explanation. See `formatting options `_ for more details.\n", + "name": "explanation_parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode*\n", + "name": "explanation_entities" + }, + { + "type": "Integer", + "required": false, + "description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", + "html_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", + "rst_description": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.\n", + "name": "open_period" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", + "html_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.", + "rst_description": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*.\n", + "name": "close_date" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "html_description": "Pass True if the poll needs to be immediately closed. This can be useful for poll preview.", + "rst_description": "Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.\n", + "name": "is_closed" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "senddice", + "name": "sendDice", + "description": "Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.", + "html_description": "

Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.

", + "rst_description": "Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": false, + "description": "Emoji on which the dice throw animation is based. Currently, must be one of '', '', '', '', '', or ''. Dice can have values 1-6 for '', '' and '', values 1-5 for '' and '', and values 1-64 for ''. Defaults to ''", + "html_description": "Emoji on which the dice throw animation is based. Currently, must be one of “\"🎲\"/”, “\"🎯\"/”, “\"🏀\"/”, “\"⚽\"/”, “\"🎳\"/”, or “\"🎰\"/”. Dice can have values 1-6 for “\"🎲\"/”, “\"🎯\"/” and “\"🎳\"/”, values 1-5 for “\"🏀\"/” and “\"⚽\"/”, and values 1-64 for “\"🎰\"/”. Defaults to “\"🎲\"/”", + "rst_description": "Emoji on which the dice throw animation is based. Currently, must be one of '๐ŸŽฒ', '๐ŸŽฏ', '๐Ÿ€', 'โšฝ', '๐ŸŽณ', or '๐ŸŽฐ'. Dice can have values 1-6 for '๐ŸŽฒ', '๐ŸŽฏ' and '๐ŸŽณ', values 1-5 for '๐Ÿ€' and 'โšฝ', and values 1-64 for '๐ŸŽฐ'. Defaults to '๐ŸŽฒ'\n", + "name": "emoji" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding", + "html_description": "Protects the contents of the sent message from forwarding", + "rst_description": "Protects the contents of the sent message from forwarding\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "sendchataction", + "name": "sendChatAction", + "description": "Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.\nExample: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please waitโ€ฆ', the bot may use sendChatAction with action = upload_photo. The user will see a 'sending photo' status for the bot.\nWe only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.", + "html_description": "

Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.

\n

Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.

\n

We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.

", + "rst_description": "Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success.\n\n Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please waitโ€ฆ', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot.\n\nWe only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.", + "html_description": "Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.", + "rst_description": "Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.\n", + "name": "action" + } + ], + "category": "methods" + }, + { + "anchor": "getuserprofilephotos", + "name": "getUserProfilePhotos", + "description": "Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.", + "html_description": "

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

", + "rst_description": "Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Sequential number of the first photo to be returned. By default, all photos are returned.", + "html_description": "Sequential number of the first photo to be returned. By default, all photos are returned.", + "rst_description": "Sequential number of the first photo to be returned. By default, all photos are returned.\n", + "name": "offset" + }, + { + "type": "Integer", + "required": false, + "description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "html_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "rst_description": "Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n", + "name": "limit" + } + ], + "category": "methods" + }, + { + "anchor": "getfile", + "name": "getFile", + "description": "Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.\nNote: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "html_description": "

Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.

Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.

", + "rst_description": "Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again.\n**Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier to get information about", + "html_description": "File identifier to get information about", + "rst_description": "File identifier to get information about\n", + "name": "file_id" + } + ], + "category": "methods" + }, + { + "anchor": "banchatmember", + "name": "banChatMember", + "description": "Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.", + "html_description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.", + "rst_description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.\n", + "name": "until_date" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "html_description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.", + "rst_description": "Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.\n", + "name": "revoke_messages" + } + ], + "category": "methods" + }, + { + "anchor": "unbanchatmember", + "name": "unbanChatMember", + "description": "Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.", + "html_description": "

Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.

", + "rst_description": "Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Do nothing if the user is not banned", + "html_description": "Do nothing if the user is not banned", + "rst_description": "Do nothing if the user is not banned\n", + "name": "only_if_banned" + } + ], + "category": "methods" + }, + { + "anchor": "restrictchatmember", + "name": "restrictChatMember", + "description": "Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.", + "html_description": "

Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.

", + "rst_description": "Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new user permissions", + "html_description": "A JSON-serialized object for new user permissions", + "rst_description": "A JSON-serialized object for new user permissions\n", + "name": "permissions" + }, + { + "type": "Integer", + "required": false, + "description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever", + "html_description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever", + "rst_description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever\n", + "name": "until_date" + } + ], + "category": "methods" + }, + { + "anchor": "promotechatmember", + "name": "promoteChatMember", + "description": "Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.", + "html_description": "

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.

", + "rst_description": "Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator's presence in the chat is hidden", + "html_description": "Pass True if the administrator's presence in the chat is hidden", + "rst_description": "Pass :code:`True` if the administrator's presence in the chat is hidden\n", + "name": "is_anonymous" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "html_description": "Pass True if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "rst_description": "Pass :code:`True` if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n", + "name": "can_manage_chat" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can create channel posts, channels only", + "html_description": "Pass True if the administrator can create channel posts, channels only", + "rst_description": "Pass :code:`True` if the administrator can create channel posts, channels only\n", + "name": "can_post_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can edit messages of other users and can pin messages, channels only", + "html_description": "Pass True if the administrator can edit messages of other users and can pin messages, channels only", + "rst_description": "Pass :code:`True` if the administrator can edit messages of other users and can pin messages, channels only\n", + "name": "can_edit_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can delete messages of other users", + "html_description": "Pass True if the administrator can delete messages of other users", + "rst_description": "Pass :code:`True` if the administrator can delete messages of other users\n", + "name": "can_delete_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can manage video chats", + "html_description": "Pass True if the administrator can manage video chats", + "rst_description": "Pass :code:`True` if the administrator can manage video chats\n", + "name": "can_manage_video_chats" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can restrict, ban or unban chat members", + "html_description": "Pass True if the administrator can restrict, ban or unban chat members", + "rst_description": "Pass :code:`True` if the administrator can restrict, ban or unban chat members\n", + "name": "can_restrict_members" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)", + "html_description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)", + "rst_description": "Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)\n", + "name": "can_promote_members" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can change chat title, photo and other settings", + "html_description": "Pass True if the administrator can change chat title, photo and other settings", + "rst_description": "Pass :code:`True` if the administrator can change chat title, photo and other settings\n", + "name": "can_change_info" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can invite new users to the chat", + "html_description": "Pass True if the administrator can invite new users to the chat", + "rst_description": "Pass :code:`True` if the administrator can invite new users to the chat\n", + "name": "can_invite_users" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the administrator can pin messages, supergroups only", + "html_description": "Pass True if the administrator can pin messages, supergroups only", + "rst_description": "Pass :code:`True` if the administrator can pin messages, supergroups only\n", + "name": "can_pin_messages" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only", + "html_description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only", + "rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only\n", + "name": "can_manage_topics" + } + ], + "category": "methods" + }, + { + "anchor": "setchatadministratorcustomtitle", + "name": "setChatAdministratorCustomTitle", + "description": "Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.", + "html_description": "

Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.

", + "rst_description": "Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "html_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed", + "rst_description": "New custom title for the administrator; 0-16 characters, emoji are not allowed\n", + "name": "custom_title" + } + ], + "category": "methods" + }, + { + "anchor": "banchatsenderchat", + "name": "banChatSenderChat", + "description": "Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "unbanchatsenderchat", + "name": "unbanChatSenderChat", + "description": "Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target sender chat", + "html_description": "Unique identifier of the target sender chat", + "rst_description": "Unique identifier of the target sender chat\n", + "name": "sender_chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "setchatpermissions", + "name": "setChatPermissions", + "description": "Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.", + "html_description": "

Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.

", + "rst_description": "Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "ChatPermissions", + "required": true, + "description": "A JSON-serialized object for new default chat permissions", + "html_description": "A JSON-serialized object for new default chat permissions", + "rst_description": "A JSON-serialized object for new default chat permissions\n", + "name": "permissions" + } + ], + "category": "methods" + }, + { + "anchor": "exportchatinvitelink", + "name": "exportChatInviteLink", + "description": "Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.\nNote: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.", + "html_description": "

Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.

\n

Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.

\n
", + "rst_description": "Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success.\n\n Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "createchatinvitelink", + "name": "createChatInviteLink", + "description": "Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.", + "html_description": "

Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.

", + "rst_description": "Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified\n", + "name": "creates_join_request" + } + ], + "category": "methods" + }, + { + "anchor": "editchatinvitelink", + "name": "editChatInviteLink", + "description": "Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.", + "html_description": "

Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.

", + "rst_description": "Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "The invite link to edit", + "html_description": "The invite link to edit", + "rst_description": "The invite link to edit\n", + "name": "invite_link" + }, + { + "type": "String", + "required": false, + "description": "Invite link name; 0-32 characters", + "html_description": "Invite link name; 0-32 characters", + "rst_description": "Invite link name; 0-32 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "Point in time (Unix timestamp) when the link will expire", + "html_description": "Point in time (Unix timestamp) when the link will expire", + "rst_description": "Point in time (Unix timestamp) when the link will expire\n", + "name": "expire_date" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit" + }, + { + "type": "Boolean", + "required": false, + "description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified\n", + "name": "creates_join_request" + } + ], + "category": "methods" + }, + { + "anchor": "revokechatinvitelink", + "name": "revokeChatInviteLink", + "description": "Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.", + "html_description": "

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.

", + "rst_description": "Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier of the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "The invite link to revoke", + "html_description": "The invite link to revoke", + "rst_description": "The invite link to revoke\n", + "name": "invite_link" + } + ], + "category": "methods" + }, + { + "anchor": "approvechatjoinrequest", + "name": "approveChatJoinRequest", + "description": "Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.", + "html_description": "

Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

", + "rst_description": "Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + }, + { + "anchor": "declinechatjoinrequest", + "name": "declineChatJoinRequest", + "description": "Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.", + "html_description": "

Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.

", + "rst_description": "Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + }, + { + "anchor": "setchatphoto", + "name": "setChatPhoto", + "description": "Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "InputFile", + "required": true, + "description": "New chat photo, uploaded using multipart/form-data", + "html_description": "New chat photo, uploaded using multipart/form-data", + "rst_description": "New chat photo, uploaded using multipart/form-data\n", + "name": "photo" + } + ], + "category": "methods" + }, + { + "anchor": "deletechatphoto", + "name": "deleteChatPhoto", + "description": "Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "setchattitle", + "name": "setChatTitle", + "description": "Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "New chat title, 1-128 characters", + "html_description": "New chat title, 1-128 characters", + "rst_description": "New chat title, 1-128 characters\n", + "name": "title" + } + ], + "category": "methods" + }, + { + "anchor": "setchatdescription", + "name": "setChatDescription", + "description": "Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.", + "html_description": "

Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.

", + "rst_description": "Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": false, + "description": "New chat description, 0-255 characters", + "html_description": "New chat description, 0-255 characters", + "rst_description": "New chat description, 0-255 characters\n", + "name": "description" + } + ], + "category": "methods" + }, + { + "anchor": "pinchatmessage", + "name": "pinChatMessage", + "description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", + "html_description": "

Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", + "rst_description": "Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of a message to pin", + "html_description": "Identifier of a message to pin", + "rst_description": "Identifier of a message to pin\n", + "name": "message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.", + "html_description": "Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.", + "rst_description": "Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.\n", + "name": "disable_notification" + } + ], + "category": "methods" + }, + { + "anchor": "unpinchatmessage", + "name": "unpinChatMessage", + "description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", + "html_description": "

Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", + "rst_description": "Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "html_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.", + "rst_description": "Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.\n", + "name": "message_id" + } + ], + "category": "methods" + }, + { + "anchor": "unpinallchatmessages", + "name": "unpinAllChatMessages", + "description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "leavechat", + "name": "leaveChat", + "description": "Use this method for your bot to leave a group, supergroup or channel. Returns True on success.", + "html_description": "

Use this method for your bot to leave a group, supergroup or channel. Returns True on success.

", + "rst_description": "Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getchat", + "name": "getChat", + "description": "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.", + "html_description": "

Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.

", + "rst_description": "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a :class:`aiogram.types.chat.Chat` object on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getchatadministrators", + "name": "getChatAdministrators", + "description": "Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.", + "html_description": "

Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.

", + "rst_description": "Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getchatmembercount", + "name": "getChatMemberCount", + "description": "Use this method to get the number of members in a chat. Returns Int on success.", + "html_description": "

Use this method to get the number of members in a chat. Returns Int on success.

", + "rst_description": "Use this method to get the number of members in a chat. Returns *Int* on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getchatmember", + "name": "getChatMember", + "description": "Use this method to get information about a member of a chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id" + } + ], + "category": "methods" + }, + { + "anchor": "setchatstickerset", + "name": "setChatStickerSet", + "description": "Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Name of the sticker set to be set as the group sticker set", + "html_description": "Name of the sticker set to be set as the group sticker set", + "rst_description": "Name of the sticker set to be set as the group sticker set\n", + "name": "sticker_set_name" + } + ], + "category": "methods" + }, + { + "anchor": "deletechatstickerset", + "name": "deleteChatStickerSet", + "description": "Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.", + "html_description": "

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.

", + "rst_description": "Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "getforumtopiciconstickers", + "name": "getForumTopicIconStickers", + "description": "Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.", + "html_description": "

Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.

", + "rst_description": "Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.", + "annotations": [], + "category": "methods" + }, + { + "anchor": "createforumtopic", + "name": "createForumTopic", + "description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.", + "html_description": "

Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.

", + "rst_description": "Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "String", + "required": true, + "description": "Topic name, 1-128 characters", + "html_description": "Topic name, 1-128 characters", + "rst_description": "Topic name, 1-128 characters\n", + "name": "name" + }, + { + "type": "Integer", + "required": false, + "description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)", + "html_description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)", + "rst_description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)\n", + "name": "icon_color" + }, + { + "type": "String", + "required": false, + "description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "html_description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "rst_description": "Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + }, + { + "anchor": "editforumtopic", + "name": "editForumTopic", + "description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "New topic name, 1-128 characters", + "html_description": "New topic name, 1-128 characters", + "rst_description": "New topic name, 1-128 characters\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.", + "rst_description": "New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.\n", + "name": "icon_custom_emoji_id" + } + ], + "category": "methods" + }, + { + "anchor": "closeforumtopic", + "name": "closeForumTopic", + "description": "Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "anchor": "reopenforumtopic", + "name": "reopenForumTopic", + "description": "Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.", + "html_description": "

Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.

", + "rst_description": "Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "anchor": "deleteforumtopic", + "name": "deleteForumTopic", + "description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.", + "html_description": "

Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.

", + "rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "anchor": "unpinallforumtopicmessages", + "name": "unpinAllForumTopicMessages", + "description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.", + "html_description": "

Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.

", + "rst_description": "Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target message thread of the forum topic", + "html_description": "Unique identifier for the target message thread of the forum topic", + "rst_description": "Unique identifier for the target message thread of the forum topic\n", + "name": "message_thread_id" + } + ], + "category": "methods" + }, + { + "anchor": "answercallbackquery", + "name": "answerCallbackQuery", + "description": "Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.\nAlternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "

Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.

\n

Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

\n
", + "rst_description": "Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned.\n\n Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "callback_query_id" + }, + { + "type": "String", + "required": false, + "description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "html_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters", + "rst_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters\n", + "name": "text" + }, + { + "type": "Boolean", + "required": false, + "description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "html_description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.", + "rst_description": "If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.\n", + "name": "show_alert" + }, + { + "type": "String", + "required": false, + "description": "URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.\n\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "html_description": "URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.
\n
\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.", + "rst_description": "URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button.\n\n\n\nOtherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.\n", + "name": "url" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.", + "html_description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.", + "rst_description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.\n", + "name": "cache_time" + } + ], + "category": "methods" + }, + { + "anchor": "setmycommands", + "name": "setMyCommands", + "description": "Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.", + "html_description": "

Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.

", + "rst_description": "Use this method to change the list of the bot's commands. See `this manual `_ for more details about bot commands. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Array of BotCommand", + "required": true, + "description": "A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.", + "html_description": "A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.", + "rst_description": "A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.\n", + "name": "commands" + }, + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "html_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "rst_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "deletemycommands", + "name": "deleteMyCommands", + "description": "Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.", + "html_description": "

Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.

", + "rst_description": "Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands `_ will be shown to affected users. Returns :code:`True` on success.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "html_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands", + "rst_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "getmycommands", + "name": "getMyCommands", + "description": "Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.", + "html_description": "

Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.

", + "rst_description": "Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned.", + "annotations": [ + { + "type": "BotCommandScope", + "required": false, + "description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "html_description": "A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.", + "rst_description": "A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n", + "name": "scope" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code or an empty string", + "html_description": "A two-letter ISO 639-1 language code or an empty string", + "rst_description": "A two-letter ISO 639-1 language code or an empty string\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "setchatmenubutton", + "name": "setChatMenuButton", + "description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.", + "html_description": "

Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.

", + "rst_description": "Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be changed\n", + "name": "chat_id" + }, + { + "type": "MenuButton", + "required": false, + "description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "html_description": "A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault", + "rst_description": "A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n", + "name": "menu_button" + } + ], + "category": "methods" + }, + { + "anchor": "getchatmenubutton", + "name": "getChatMenuButton", + "description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.", + "html_description": "

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.

", + "rst_description": "Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success.", + "annotations": [ + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "html_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned", + "rst_description": "Unique identifier for the target private chat. If not specified, default bot's menu button will be returned\n", + "name": "chat_id" + } + ], + "category": "methods" + }, + { + "anchor": "setmydefaultadministratorrights", + "name": "setMyDefaultAdministratorRights", + "description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.", + "html_description": "

Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.

", + "rst_description": "Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "ChatAdministratorRights", + "required": false, + "description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "html_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.", + "rst_description": "A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.\n", + "name": "rights" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.", + "html_description": "Pass True to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.", + "rst_description": "Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.\n", + "name": "for_channels" + } + ], + "category": "methods" + }, + { + "anchor": "getmydefaultadministratorrights", + "name": "getMyDefaultAdministratorRights", + "description": "Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.", + "html_description": "

Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.

", + "rst_description": "Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success.", + "annotations": [ + { + "type": "Boolean", + "required": false, + "description": "Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.", + "html_description": "Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.", + "rst_description": "Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.\n", + "name": "for_channels" + } + ], + "category": "methods" + } + ], + "description": "All methods in the Bot API are case-insensitive. We support GET and POST HTTP methods. Use either URL query string or application/json or application/x-www-form-urlencoded or multipart/form-data for passing parameters in Bot API requests.\nOn successful call, a JSON-object containing the result will be returned." + }, + { + "title": "Updating messages", + "anchor": "updating-messages", + "children": [ + { + "anchor": "editmessagetext", + "name": "editMessageText", + "description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": true, + "description": "New text of the message, 1-4096 characters after entities parsing", + "html_description": "New text of the message, 1-4096 characters after entities parsing", + "rst_description": "New text of the message, 1-4096 characters after entities parsing\n", + "name": "text" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities" + }, + { + "type": "Boolean", + "required": false, + "description": "Disables link previews for links in this message", + "html_description": "Disables link previews for links in this message", + "rst_description": "Disables link previews for links in this message\n", + "name": "disable_web_page_preview" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagecaption", + "name": "editMessageCaption", + "description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "String", + "required": false, + "description": "New caption of the message, 0-1024 characters after entities parsing", + "html_description": "New caption of the message, 0-1024 characters after entities parsing", + "rst_description": "New caption of the message, 0-1024 characters after entities parsing\n", + "name": "caption" + }, + { + "type": "String", + "required": false, + "description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "html_description": "Mode for parsing entities in the message caption. See formatting options for more details.", + "rst_description": "Mode for parsing entities in the message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode" + }, + { + "type": "Array of MessageEntity", + "required": false, + "description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagemedia", + "name": "editMessageMedia", + "description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InputMedia", + "required": true, + "description": "A JSON-serialized object for a new media content of the message", + "html_description": "A JSON-serialized object for a new media content of the message", + "rst_description": "A JSON-serialized object for a new media content of the message\n", + "name": "media" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new inline keyboard.", + "html_description": "A JSON-serialized object for a new inline keyboard.", + "rst_description": "A JSON-serialized object for a new `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "editmessagereplymarkup", + "name": "editMessageReplyMarkup", + "description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "html_description": "

Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

", + "rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "html_description": "Required if inline_message_id is not specified. Identifier of the message to edit", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard.", + "html_description": "A JSON-serialized object for an inline keyboard.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "stoppoll", + "name": "stopPoll", + "description": "Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.", + "html_description": "

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.

", + "rst_description": "Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the original message with the poll", + "html_description": "Identifier of the original message with the poll", + "rst_description": "Identifier of the original message with the poll\n", + "name": "message_id" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for a new message inline keyboard.", + "html_description": "A JSON-serialized object for a new message inline keyboard.", + "rst_description": "A JSON-serialized object for a new message `inline keyboard `_.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "deletemessage", + "name": "deleteMessage", + "description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n- Bots can delete incoming messages in private chats.\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.\nReturns True on success.", + "html_description": "

Use this method to delete a message, including service messages, with the following limitations:
\n- A message can only be deleted if it was sent less than 48 hours ago.
\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.
\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
\n- Bots can delete outgoing messages in private chats, groups, and supergroups.
\n- Bots can delete incoming messages in private chats.
\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.
\n- If the bot is an administrator of a group, it can delete any message there.
\n- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
\nReturns True on success.

", + "rst_description": "Use this method to delete a message, including service messages, with the following limitations:\n\n- A message can only be deleted if it was sent less than 48 hours ago.\n\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n\n- Bots can delete incoming messages in private chats.\n\n- Bots granted *can_post_messages* permissions can delete outgoing messages in channels.\n\n- If the bot is an administrator of a group, it can delete any message there.\n\n- If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there.\n\nReturns :code:`True` on success.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": true, + "description": "Identifier of the message to delete", + "html_description": "Identifier of the message to delete", + "rst_description": "Identifier of the message to delete\n", + "name": "message_id" + } + ], + "category": "methods" + } + ], + "description": "The following methods allow you to change an existing message in the message history instead of sending a new one with a result of an action. This is most useful for messages with inline keyboards using callback queries, but can also help reduce clutter in conversations with regular chat bots.\nPlease note, that it is currently only possible to edit messages without reply_markup or with inline keyboards." + }, + { + "title": "Stickers", + "anchor": "stickers", + "children": [ + { + "anchor": "sticker", + "name": "Sticker", + "description": "This object represents a sticker.", + "html_description": "

This object represents a sticker.

", + "rst_description": "This object represents a sticker.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "String", + "description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "html_description": "Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "rst_description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields *is_animated* and *is_video*.\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Sticker width", + "html_description": "Sticker width", + "rst_description": "Sticker width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Sticker height", + "html_description": "Sticker height", + "rst_description": "Sticker height\n", + "name": "height", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is animated", + "html_description": "True, if the sticker is animated", + "rst_description": ":code:`True`, if the sticker is `animated `_\n", + "name": "is_animated", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is a video sticker", + "html_description": "True, if the sticker is a video sticker", + "rst_description": ":code:`True`, if the sticker is a `video sticker `_\n", + "name": "is_video", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker thumbnail in the .WEBP or .JPG format", + "html_description": "Optional. Sticker thumbnail in the .WEBP or .JPG format", + "rst_description": "*Optional*. Sticker thumbnail in the .WEBP or .JPG format\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Emoji associated with the sticker", + "html_description": "Optional. Emoji associated with the sticker", + "rst_description": "*Optional*. Emoji associated with the sticker\n", + "name": "emoji", + "required": false + }, + { + "type": "String", + "description": "Name of the sticker set to which the sticker belongs", + "html_description": "Optional. Name of the sticker set to which the sticker belongs", + "rst_description": "*Optional*. Name of the sticker set to which the sticker belongs\n", + "name": "set_name", + "required": false + }, + { + "type": "File", + "description": "For premium regular stickers, premium animation for the sticker", + "html_description": "Optional. For premium regular stickers, premium animation for the sticker", + "rst_description": "*Optional*. For premium regular stickers, premium animation for the sticker\n", + "name": "premium_animation", + "required": false + }, + { + "type": "MaskPosition", + "description": "For mask stickers, the position where the mask should be placed", + "html_description": "Optional. For mask stickers, the position where the mask should be placed", + "rst_description": "*Optional*. For mask stickers, the position where the mask should be placed\n", + "name": "mask_position", + "required": false + }, + { + "type": "String", + "description": "For custom emoji stickers, unique identifier of the custom emoji", + "html_description": "Optional. For custom emoji stickers, unique identifier of the custom emoji", + "rst_description": "*Optional*. For custom emoji stickers, unique identifier of the custom emoji\n", + "name": "custom_emoji_id", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "stickerset", + "name": "StickerSet", + "description": "This object represents a sticker set.", + "html_description": "

This object represents a sticker set.

", + "rst_description": "This object represents a sticker set.", + "annotations": [ + { + "type": "String", + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name", + "required": true + }, + { + "type": "String", + "description": "Sticker set title", + "html_description": "Sticker set title", + "rst_description": "Sticker set title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'", + "html_description": "Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”", + "rst_description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'\n", + "name": "sticker_type", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker set contains animated stickers", + "html_description": "True, if the sticker set contains animated stickers", + "rst_description": ":code:`True`, if the sticker set contains `animated stickers `_\n", + "name": "is_animated", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker set contains video stickers", + "html_description": "True, if the sticker set contains video stickers", + "rst_description": ":code:`True`, if the sticker set contains `video stickers `_\n", + "name": "is_video", + "required": true + }, + { + "type": "Array of Sticker", + "description": "List of all set stickers", + "html_description": "List of all set stickers", + "rst_description": "List of all set stickers\n", + "name": "stickers", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "html_description": "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "rst_description": "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format\n", + "name": "thumb", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "maskposition", + "name": "MaskPosition", + "description": "This object describes the position on faces where a mask should be placed by default.", + "html_description": "

This object describes the position on faces where a mask should be placed by default.

", + "rst_description": "This object describes the position on faces where a mask should be placed by default.", + "annotations": [ + { + "type": "String", + "description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.", + "html_description": "The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.", + "rst_description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.\n", + "name": "point", + "required": true + }, + { + "type": "Float number", + "description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "html_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "rst_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.\n", + "name": "x_shift", + "required": true + }, + { + "type": "Float number", + "description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "html_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "rst_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.\n", + "name": "y_shift", + "required": true + }, + { + "type": "Float number", + "description": "Mask scaling coefficient. For example, 2.0 means double size.", + "html_description": "Mask scaling coefficient. For example, 2.0 means double size.", + "rst_description": "Mask scaling coefficient. For example, 2.0 means double size.\n", + "name": "scale", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "sendsticker", + "name": "sendSticker", + "description": "Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.", + "html_description": "

Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.

", + "rst_description": "Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "InputFile or String", + "required": true, + "description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "sticker" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "required": false, + "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "html_description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "getstickerset", + "name": "getStickerSet", + "description": "Use this method to get a sticker set. On success, a StickerSet object is returned.", + "html_description": "

Use this method to get a sticker set. On success, a StickerSet object is returned.

", + "rst_description": "Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Name of the sticker set", + "html_description": "Name of the sticker set", + "rst_description": "Name of the sticker set\n", + "name": "name" + } + ], + "category": "methods" + }, + { + "anchor": "getcustomemojistickers", + "name": "getCustomEmojiStickers", + "description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.", + "html_description": "

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.

", + "rst_description": "Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.", + "annotations": [ + { + "type": "Array of String", + "required": true, + "description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "html_description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.", + "rst_description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.\n", + "name": "custom_emoji_ids" + } + ], + "category": "methods" + }, + { + "anchor": "uploadstickerfile", + "name": "uploadStickerFile", + "description": "Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.", + "html_description": "

Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.

", + "rst_description": "Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker file owner", + "html_description": "User identifier of sticker file owner", + "rst_description": "User identifier of sticker file owner\n", + "name": "user_id" + }, + { + "type": "InputFile", + "required": true, + "description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More information on Sending Files", + "html_description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More information on Sending Files »", + "rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files ยป `\n", + "name": "png_sticker" + } + ], + "category": "methods" + }, + { + "anchor": "createnewstickerset", + "name": "createNewStickerSet", + "description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success.", + "html_description": "

Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Returns True on success.

", + "rst_description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of created sticker set owner", + "html_description": "User identifier of created sticker set owner", + "rst_description": "User identifier of created sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in \"_by_\". is case insensitive. 1-64 characters.", + "html_description": "Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in \"_by_<bot_username>\". <bot_username> is case insensitive. 1-64 characters.", + "rst_description": "Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`\"_by_\"`. :code:`` is case insensitive. 1-64 characters.\n", + "name": "name" + }, + { + "type": "String", + "required": true, + "description": "Sticker set title, 1-64 characters", + "html_description": "Sticker set title, 1-64 characters", + "rst_description": "Sticker set title, 1-64 characters\n", + "name": "title" + }, + { + "type": "InputFile or String", + "required": false, + "description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "png_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "html_description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "rst_description": "**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements\n", + "name": "tgs_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "html_description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "rst_description": "**WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements\n", + "name": "webm_sticker" + }, + { + "type": "String", + "required": false, + "description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.", + "html_description": "Type of stickers in the set, pass “regular” or “mask”. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.", + "rst_description": "Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.\n", + "name": "sticker_type" + }, + { + "type": "String", + "required": true, + "description": "One or more emoji corresponding to the sticker", + "html_description": "One or more emoji corresponding to the sticker", + "rst_description": "One or more emoji corresponding to the sticker\n", + "name": "emojis" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object for position where the mask should be placed on faces", + "html_description": "A JSON-serialized object for position where the mask should be placed on faces", + "rst_description": "A JSON-serialized object for position where the mask should be placed on faces\n", + "name": "mask_position" + } + ], + "category": "methods" + }, + { + "anchor": "addstickertoset", + "name": "addStickerToSet", + "description": "Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.", + "html_description": "

Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker, tgs_sticker, or webm_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.

", + "rst_description": "Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier of sticker set owner", + "html_description": "User identifier of sticker set owner", + "rst_description": "User identifier of sticker set owner\n", + "name": "user_id" + }, + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "InputFile or String", + "required": false, + "description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files", + "html_description": "PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files »", + "rst_description": "**PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `\n", + "name": "png_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "html_description": "TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements", + "rst_description": "**TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements\n", + "name": "tgs_sticker" + }, + { + "type": "InputFile", + "required": false, + "description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "html_description": "WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements", + "rst_description": "**WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements\n", + "name": "webm_sticker" + }, + { + "type": "String", + "required": true, + "description": "One or more emoji corresponding to the sticker", + "html_description": "One or more emoji corresponding to the sticker", + "rst_description": "One or more emoji corresponding to the sticker\n", + "name": "emojis" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object for position where the mask should be placed on faces", + "html_description": "A JSON-serialized object for position where the mask should be placed on faces", + "rst_description": "A JSON-serialized object for position where the mask should be placed on faces\n", + "name": "mask_position" + } + ], + "category": "methods" + }, + { + "anchor": "setstickerpositioninset", + "name": "setStickerPositionInSet", + "description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.", + "html_description": "

Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.

", + "rst_description": "Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + }, + { + "type": "Integer", + "required": true, + "description": "New sticker position in the set, zero-based", + "html_description": "New sticker position in the set, zero-based", + "rst_description": "New sticker position in the set, zero-based\n", + "name": "position" + } + ], + "category": "methods" + }, + { + "anchor": "deletestickerfromset", + "name": "deleteStickerFromSet", + "description": "Use this method to delete a sticker from a set created by the bot. Returns True on success.", + "html_description": "

Use this method to delete a sticker from a set created by the bot. Returns True on success.

", + "rst_description": "Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "File identifier of the sticker", + "html_description": "File identifier of the sticker", + "rst_description": "File identifier of the sticker\n", + "name": "sticker" + } + ], + "category": "methods" + }, + { + "anchor": "setstickersetthumb", + "name": "setStickerSetThumb", + "description": "Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name" + }, + { + "type": "Integer", + "required": true, + "description": "User identifier of the sticker set owner", + "html_description": "User identifier of the sticker set owner", + "rst_description": "User identifier of the sticker set owner\n", + "name": "user_id" + }, + { + "type": "InputFile or String", + "required": false, + "description": "A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements, or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files. Animated sticker set thumbnails can't be uploaded via HTTP URL.", + "html_description": "A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements, or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated sticker set thumbnails can't be uploaded via HTTP URL.", + "rst_description": "A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `. Animated sticker set thumbnails can't be uploaded via HTTP URL.\n", + "name": "thumb" + } + ], + "category": "methods" + } + ], + "description": "The following methods and objects allow your bot to handle stickers and sticker sets." + }, + { + "title": "Inline mode", + "anchor": "inline-mode", + "children": [ + { + "anchor": "inlinequery", + "name": "InlineQuery", + "description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "html_description": "

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

", + "rst_description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Text of the query (up to 256 characters)", + "html_description": "Text of the query (up to 256 characters)", + "rst_description": "Text of the query (up to 256 characters)\n", + "name": "query", + "required": true + }, + { + "type": "String", + "description": "Offset of the results to be returned, can be controlled by the bot", + "html_description": "Offset of the results to be returned, can be controlled by the bot", + "rst_description": "Offset of the results to be returned, can be controlled by the bot\n", + "name": "offset", + "required": true + }, + { + "type": "String", + "description": "Type of the chat from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat", + "html_description": "Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat", + "rst_description": "*Optional*. Type of the chat from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat\n", + "name": "chat_type", + "required": false + }, + { + "type": "Location", + "description": "Sender location, only for bots that request user location", + "html_description": "Optional. Sender location, only for bots that request user location", + "rst_description": "*Optional*. Sender location, only for bots that request user location\n", + "name": "location", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "answerinlinequery", + "name": "answerInlineQuery", + "description": "Use this method to send answers to an inline query. On success, True is returned.\nNo more than 50 results per query are allowed.", + "html_description": "

Use this method to send answers to an inline query. On success, True is returned.
\nNo more than 50 results per query are allowed.

", + "rst_description": "Use this method to send answers to an inline query. On success, :code:`True` is returned.\n\nNo more than **50** results per query are allowed.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the answered query", + "html_description": "Unique identifier for the answered query", + "rst_description": "Unique identifier for the answered query\n", + "name": "inline_query_id" + }, + { + "type": "Array of InlineQueryResult", + "required": true, + "description": "A JSON-serialized array of results for the inline query", + "html_description": "A JSON-serialized array of results for the inline query", + "rst_description": "A JSON-serialized array of results for the inline query\n", + "name": "results" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "html_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", + "rst_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.\n", + "name": "cache_time" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query", + "html_description": "Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query", + "rst_description": "Pass :code:`True` if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query\n", + "name": "is_personal" + }, + { + "type": "String", + "required": false, + "description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.", + "html_description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.", + "rst_description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.\n", + "name": "next_offset" + }, + { + "type": "String", + "required": false, + "description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter", + "html_description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter", + "rst_description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter*\n", + "name": "switch_pm_text" + }, + { + "type": "String", + "required": false, + "description": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.\n\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "html_description": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
\n
\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.", + "rst_description": "`Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed.\n\n\n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a `https://core.telegram.org/bots/api#inlinekeyboardmarkup `_ *switch_inline* button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.\n", + "name": "switch_pm_parameter" + } + ], + "category": "methods" + }, + { + "anchor": "inlinequeryresult", + "name": "InlineQueryResult", + "description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n - InlineQueryResultCachedAudio\n - InlineQueryResultCachedDocument\n - InlineQueryResultCachedGif\n - InlineQueryResultCachedMpeg4Gif\n - InlineQueryResultCachedPhoto\n - InlineQueryResultCachedSticker\n - InlineQueryResultCachedVideo\n - InlineQueryResultCachedVoice\n - InlineQueryResultArticle\n - InlineQueryResultAudio\n - InlineQueryResultContact\n - InlineQueryResultGame\n - InlineQueryResultDocument\n - InlineQueryResultGif\n - InlineQueryResultLocation\n - InlineQueryResultMpeg4Gif\n - InlineQueryResultPhoto\n - InlineQueryResultVenue\n - InlineQueryResultVideo\n - InlineQueryResultVoice\nNote: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.", + "html_description": "

This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:

Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.

", + "rst_description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n\n - :class:`aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio`\n - :class:`aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument`\n - :class:`aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif`\n - :class:`aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto`\n - :class:`aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker`\n - :class:`aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo`\n - :class:`aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice`\n - :class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`\n - :class:`aiogram.types.inline_query_result_audio.InlineQueryResultAudio`\n - :class:`aiogram.types.inline_query_result_contact.InlineQueryResultContact`\n - :class:`aiogram.types.inline_query_result_game.InlineQueryResultGame`\n - :class:`aiogram.types.inline_query_result_document.InlineQueryResultDocument`\n - :class:`aiogram.types.inline_query_result_gif.InlineQueryResultGif`\n - :class:`aiogram.types.inline_query_result_location.InlineQueryResultLocation`\n - :class:`aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_photo.InlineQueryResultPhoto`\n - :class:`aiogram.types.inline_query_result_venue.InlineQueryResultVenue`\n - :class:`aiogram.types.inline_query_result_video.InlineQueryResultVideo`\n - :class:`aiogram.types.inline_query_result_voice.InlineQueryResultVoice`\n\n**Note:** All URLs passed in inline query results will be available to end users and therefore must be assumed to be **public**.", + "annotations": [], + "category": "types" + }, + { + "anchor": "inlinequeryresultarticle", + "name": "InlineQueryResultArticle", + "description": "Represents a link to an article or web page.", + "html_description": "

Represents a link to an article or web page.

", + "rst_description": "Represents a link to an article or web page.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be article", + "html_description": "Type of the result, must be article", + "rst_description": "Type of the result, must be *article*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title of the result", + "html_description": "Title of the result", + "rst_description": "Title of the result\n", + "name": "title", + "required": true + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent", + "html_description": "Content of the message to be sent", + "rst_description": "Content of the message to be sent\n", + "name": "input_message_content", + "required": true + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "String", + "description": "URL of the result", + "html_description": "Optional. URL of the result", + "rst_description": "*Optional*. URL of the result\n", + "name": "url", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you don't want the URL to be shown in the message", + "html_description": "Optional. Pass True if you don't want the URL to be shown in the message", + "rst_description": "*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message\n", + "name": "hide_url", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultphoto", + "name": "InlineQueryResultPhoto", + "description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.", + "html_description": "

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

", + "rst_description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "html_description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "rst_description": "A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB\n", + "name": "photo_url", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail for the photo", + "html_description": "URL of the thumbnail for the photo", + "rst_description": "URL of the thumbnail for the photo\n", + "name": "thumb_url", + "required": true + }, + { + "type": "Integer", + "description": "Width of the photo", + "html_description": "Optional. Width of the photo", + "rst_description": "*Optional*. Width of the photo\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the photo", + "html_description": "Optional. Height of the photo", + "rst_description": "*Optional*. Height of the photo\n", + "name": "photo_height", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultgif", + "name": "InlineQueryResultGif", + "description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the GIF file. File size must not exceed 1MB", + "html_description": "A valid URL for the GIF file. File size must not exceed 1MB", + "rst_description": "A valid URL for the GIF file. File size must not exceed 1MB\n", + "name": "gif_url", + "required": true + }, + { + "type": "Integer", + "description": "Width of the GIF", + "html_description": "Optional. Width of the GIF", + "rst_description": "*Optional*. Width of the GIF\n", + "name": "gif_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the GIF", + "html_description": "Optional. Height of the GIF", + "rst_description": "*Optional*. Height of the GIF\n", + "name": "gif_height", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the GIF in seconds", + "html_description": "Optional. Duration of the GIF in seconds", + "rst_description": "*Optional*. Duration of the GIF in seconds\n", + "name": "gif_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumb_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumb_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultmpeg4gif", + "name": "InlineQueryResultMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", + "html_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", + "rst_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB\n", + "name": "mpeg4_url", + "required": true + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "mpeg4_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "mpeg4_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "mpeg4_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumb_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumb_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultvideo", + "name": "InlineQueryResultVideo", + "description": "Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.\nIf an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.", + "html_description": "

Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.

\n

If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.

\n
", + "rst_description": "Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the video.\n\n If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using *input_message_content*.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the embedded video player or video file", + "html_description": "A valid URL for the embedded video player or video file", + "rst_description": "A valid URL for the embedded video player or video file\n", + "name": "video_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'", + "html_description": "MIME type of the content of the video URL, “text/html” or “video/mp4”", + "rst_description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the video", + "html_description": "URL of the thumbnail (JPEG only) for the video", + "rst_description": "URL of the thumbnail (JPEG only) for the video\n", + "name": "thumb_url", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "video_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "video_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "video_duration", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).", + "html_description": "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).", + "rst_description": "*Optional*. Content of the message to be sent instead of the video. This field is **required** if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultaudio", + "name": "InlineQueryResultAudio", + "description": "Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the audio.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the audio file", + "html_description": "A valid URL for the audio file", + "rst_description": "A valid URL for the audio file\n", + "name": "audio_url", + "required": true + }, + { + "type": "String", + "description": "Title", + "html_description": "Title", + "rst_description": "Title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "Performer", + "html_description": "Optional. Performer", + "rst_description": "*Optional*. Performer\n", + "name": "performer", + "required": false + }, + { + "type": "Integer", + "description": "Audio duration in seconds", + "html_description": "Optional. Audio duration in seconds", + "rst_description": "*Optional*. Audio duration in seconds\n", + "name": "audio_duration", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultvoice", + "name": "InlineQueryResultVoice", + "description": "Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the the voice message.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the voice recording", + "html_description": "A valid URL for the voice recording", + "rst_description": "A valid URL for the voice recording\n", + "name": "voice_url", + "required": true + }, + { + "type": "String", + "description": "Recording title", + "html_description": "Recording title", + "rst_description": "Recording title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Recording duration in seconds", + "html_description": "Optional. Recording duration in seconds", + "rst_description": "*Optional*. Recording duration in seconds\n", + "name": "voice_duration", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice recording", + "html_description": "Optional. Content of the message to be sent instead of the voice recording", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice recording\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultdocument", + "name": "InlineQueryResultDocument", + "description": "Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "A valid URL for the file", + "html_description": "A valid URL for the file", + "rst_description": "A valid URL for the file\n", + "name": "document_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'", + "html_description": "MIME type of the content of the file, either “application/pdf” or “application/zip”", + "rst_description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. Inline keyboard attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the file", + "html_description": "Optional. URL of the thumbnail (JPEG only) for the file", + "rst_description": "*Optional*. URL of the thumbnail (JPEG only) for the file\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultlocation", + "name": "InlineQueryResultLocation", + "description": "Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the location.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be location", + "html_description": "Type of the result, must be location", + "rst_description": "Type of the result, must be *location*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "Float number", + "description": "Location latitude in degrees", + "html_description": "Location latitude in degrees", + "rst_description": "Location latitude in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float number", + "description": "Location longitude in degrees", + "html_description": "Location longitude in degrees", + "rst_description": "Location longitude in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Location title", + "html_description": "Location title", + "rst_description": "Location title\n", + "name": "title", + "required": true + }, + { + "type": "Float number", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", + "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", + "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the location", + "html_description": "Optional. Content of the message to be sent instead of the location", + "rst_description": "*Optional*. Content of the message to be sent instead of the location\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultvenue", + "name": "InlineQueryResultVenue", + "description": "Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the venue.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be venue", + "html_description": "Type of the result, must be venue", + "rst_description": "Type of the result, must be *venue*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "Float", + "description": "Latitude of the venue location in degrees", + "html_description": "Latitude of the venue location in degrees", + "rst_description": "Latitude of the venue location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue location in degrees", + "html_description": "Longitude of the venue location in degrees", + "rst_description": "Longitude of the venue location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Title of the venue", + "html_description": "Title of the venue", + "rst_description": "Title of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue if known", + "html_description": "Optional. Foursquare identifier of the venue if known", + "rst_description": "*Optional*. Foursquare identifier of the venue if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the venue", + "html_description": "Optional. Content of the message to be sent instead of the venue", + "rst_description": "*Optional*. Content of the message to be sent instead of the venue\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcontact", + "name": "InlineQueryResultContact", + "description": "Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the contact.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be contact", + "html_description": "Type of the result, must be contact", + "rst_description": "Type of the result, must be *contact*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the contact", + "html_description": "Optional. Content of the message to be sent instead of the contact", + "rst_description": "*Optional*. Content of the message to be sent instead of the contact\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultgame", + "name": "InlineQueryResultGame", + "description": "Represents a Game.\nNote: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.", + "html_description": "

Represents a Game.

Note: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.

", + "rst_description": "Represents a `Game `_.\n**Note:** This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be game", + "html_description": "Type of the result, must be game", + "rst_description": "Type of the result, must be *game*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Short name of the game", + "html_description": "Short name of the game", + "rst_description": "Short name of the game\n", + "name": "game_short_name", + "required": true + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedphoto", + "name": "InlineQueryResultCachedPhoto", + "description": "Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.", + "html_description": "

Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

", + "rst_description": "Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the photo", + "html_description": "A valid file identifier of the photo", + "rst_description": "A valid file identifier of the photo\n", + "name": "photo_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedgif", + "name": "InlineQueryResultCachedGif", + "description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the GIF file", + "html_description": "A valid file identifier for the GIF file", + "rst_description": "A valid file identifier for the GIF file\n", + "name": "gif_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedmpeg4gif", + "name": "InlineQueryResultCachedMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the MPEG4 file", + "html_description": "A valid file identifier for the MPEG4 file", + "rst_description": "A valid file identifier for the MPEG4 file\n", + "name": "mpeg4_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedsticker", + "name": "InlineQueryResultCachedSticker", + "description": "Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.\nNote: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.", + "html_description": "

Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.

Note: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.

", + "rst_description": "Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the sticker.\n**Note:** This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for `animated stickers `_. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be sticker", + "html_description": "Type of the result, must be sticker", + "rst_description": "Type of the result, must be *sticker*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the sticker", + "html_description": "A valid file identifier of the sticker", + "rst_description": "A valid file identifier of the sticker\n", + "name": "sticker_file_id", + "required": true + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the sticker", + "html_description": "Optional. Content of the message to be sent instead of the sticker", + "rst_description": "*Optional*. Content of the message to be sent instead of the sticker\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcacheddocument", + "name": "InlineQueryResultCachedDocument", + "description": "Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the file.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the file", + "html_description": "A valid file identifier for the file", + "rst_description": "A valid file identifier for the file\n", + "name": "document_file_id", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedvideo", + "name": "InlineQueryResultCachedVideo", + "description": "Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.", + "html_description": "

Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.

", + "rst_description": "Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the video.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the video file", + "html_description": "A valid file identifier for the video file", + "rst_description": "A valid file identifier for the video file\n", + "name": "video_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video", + "html_description": "Optional. Content of the message to be sent instead of the video", + "rst_description": "*Optional*. Content of the message to be sent instead of the video\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedvoice", + "name": "InlineQueryResultCachedVoice", + "description": "Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the voice message.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the voice message", + "html_description": "A valid file identifier for the voice message", + "rst_description": "A valid file identifier for the voice message\n", + "name": "voice_file_id", + "required": true + }, + { + "type": "String", + "description": "Voice message title", + "html_description": "Voice message title", + "rst_description": "Voice message title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice message", + "html_description": "Optional. Content of the message to be sent instead of the voice message", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice message\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inlinequeryresultcachedaudio", + "name": "InlineQueryResultCachedAudio", + "description": "Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the audio.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the audio file", + "html_description": "A valid file identifier for the audio file", + "rst_description": "A valid file identifier for the audio file\n", + "name": "audio_file_id", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputmessagecontent", + "name": "InputMessageContent", + "description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n - InputTextMessageContent\n - InputLocationMessageContent\n - InputVenueMessageContent\n - InputContactMessageContent\n - InputInvoiceMessageContent", + "html_description": "

This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:

", + "rst_description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n\n - :class:`aiogram.types.input_text_message_content.InputTextMessageContent`\n - :class:`aiogram.types.input_location_message_content.InputLocationMessageContent`\n - :class:`aiogram.types.input_venue_message_content.InputVenueMessageContent`\n - :class:`aiogram.types.input_contact_message_content.InputContactMessageContent`\n - :class:`aiogram.types.input_invoice_message_content.InputInvoiceMessageContent`", + "annotations": [], + "category": "types" + }, + { + "anchor": "inputtextmessagecontent", + "name": "InputTextMessageContent", + "description": "Represents the content of a text message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a text message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a text message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Text of the message to be sent, 1-4096 characters", + "html_description": "Text of the message to be sent, 1-4096 characters", + "rst_description": "Text of the message to be sent, 1-4096 characters\n", + "name": "message_text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities", + "required": false + }, + { + "type": "Boolean", + "description": "Disables link previews for links in the sent message", + "html_description": "Optional. Disables link previews for links in the sent message", + "rst_description": "*Optional*. Disables link previews for links in the sent message\n", + "name": "disable_web_page_preview", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputlocationmessagecontent", + "name": "InputLocationMessageContent", + "description": "Represents the content of a location message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a location message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a location message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the location in degrees", + "html_description": "Latitude of the location in degrees", + "rst_description": "Latitude of the location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the location in degrees", + "html_description": "Longitude of the location in degrees", + "rst_description": "Longitude of the location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "Float number", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", + "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", + "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputvenuemessagecontent", + "name": "InputVenueMessageContent", + "description": "Represents the content of a venue message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a venue message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a venue message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the venue in degrees", + "html_description": "Latitude of the venue in degrees", + "rst_description": "Latitude of the venue in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue in degrees", + "html_description": "Longitude of the venue in degrees", + "rst_description": "Longitude of the venue in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue, if known", + "html_description": "Optional. Foursquare identifier of the venue, if known", + "rst_description": "*Optional*. Foursquare identifier of the venue, if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputcontactmessagecontent", + "name": "InputContactMessageContent", + "description": "Represents the content of a contact message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a contact message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a contact message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "inputinvoicemessagecontent", + "name": "InputInvoiceMessageContent", + "description": "Represents the content of an invoice message to be sent as the result of an inline query.", + "html_description": "

Represents the content of an invoice message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of an invoice message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description", + "required": true + }, + { + "type": "String", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "name": "payload", + "required": true + }, + { + "type": "String", + "description": "Payment provider token, obtained via @BotFather", + "html_description": "Payment provider token, obtained via @BotFather", + "rst_description": "Payment provider token, obtained via `@BotFather `_\n", + "name": "provider_token", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, see more on currencies", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_\n", + "name": "currency", + "required": true + }, + { + "type": "Array of LabeledPrice", + "description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "html_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n", + "name": "prices", + "required": true + }, + { + "type": "Integer", + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "html_description": "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "rst_description": "*Optional*. The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n", + "name": "max_tip_amount", + "required": false + }, + { + "type": "Array of Integer", + "description": "A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "html_description": "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "rst_description": "*Optional*. A JSON-serialized array of suggested amounts of tip in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n", + "name": "suggested_tip_amounts", + "required": false + }, + { + "type": "String", + "description": "A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.", + "html_description": "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.", + "rst_description": "*Optional*. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.\n", + "name": "provider_data", + "required": false + }, + { + "type": "String", + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url", + "required": false + }, + { + "type": "Integer", + "description": "Photo size in bytes", + "html_description": "Optional. Photo size in bytes", + "rst_description": "*Optional*. Photo size in bytes\n", + "name": "photo_size", + "required": false + }, + { + "type": "Integer", + "description": "Photo width", + "html_description": "Optional. Photo width", + "rst_description": "*Optional*. Photo width\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Optional. Photo height", + "rst_description": "*Optional*. Photo height\n", + "name": "photo_height", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's full name to complete the order", + "html_description": "Optional. Pass True if you require the user's full name to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's full name to complete the order\n", + "name": "need_name", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's phone number to complete the order", + "html_description": "Optional. Pass True if you require the user's phone number to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's phone number to complete the order\n", + "name": "need_phone_number", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's email address to complete the order", + "html_description": "Optional. Pass True if you require the user's email address to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's email address to complete the order\n", + "name": "need_email", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's shipping address to complete the order", + "html_description": "Optional. Pass True if you require the user's shipping address to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's shipping address to complete the order\n", + "name": "need_shipping_address", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's phone number should be sent to provider", + "html_description": "Optional. Pass True if the user's phone number should be sent to provider", + "rst_description": "*Optional*. Pass :code:`True` if the user's phone number should be sent to provider\n", + "name": "send_phone_number_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's email address should be sent to provider", + "html_description": "Optional. Pass True if the user's email address should be sent to provider", + "rst_description": "*Optional*. Pass :code:`True` if the user's email address should be sent to provider\n", + "name": "send_email_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the final price depends on the shipping method", + "html_description": "Optional. Pass True if the final price depends on the shipping method", + "rst_description": "*Optional*. Pass :code:`True` if the final price depends on the shipping method\n", + "name": "is_flexible", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "choseninlineresult", + "name": "ChosenInlineResult", + "description": "Represents a result of an inline query that was chosen by the user and sent to their chat partner.\nNote: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.", + "html_description": "

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.

", + "rst_description": "Represents a `result `_ of an inline query that was chosen by the user and sent to their chat partner.\n**Note:** It is necessary to enable `inline feedback `_ via `@BotFather `_ in order to receive these objects in updates.", + "annotations": [ + { + "type": "String", + "description": "The unique identifier for the result that was chosen", + "html_description": "The unique identifier for the result that was chosen", + "rst_description": "The unique identifier for the result that was chosen\n", + "name": "result_id", + "required": true + }, + { + "type": "User", + "description": "The user that chose the result", + "html_description": "The user that chose the result", + "rst_description": "The user that chose the result\n", + "name": "from", + "required": true + }, + { + "type": "Location", + "description": "Sender location, only for bots that require user location", + "html_description": "Optional. Sender location, only for bots that require user location", + "rst_description": "*Optional*. Sender location, only for bots that require user location\n", + "name": "location", + "required": false + }, + { + "type": "String", + "description": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.", + "html_description": "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.", + "rst_description": "*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message. Will be also received in `callback queries `_ and can be used to `edit `_ the message.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "The query that was used to obtain the result", + "html_description": "The query that was used to obtain the result", + "rst_description": "The query that was used to obtain the result\n", + "name": "query", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "answerwebappquery", + "name": "answerWebAppQuery", + "description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.", + "html_description": "

Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.

", + "rst_description": "Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "web_app_query_id" + }, + { + "type": "InlineQueryResult", + "required": true, + "description": "A JSON-serialized object describing the message to be sent", + "html_description": "A JSON-serialized object describing the message to be sent", + "rst_description": "A JSON-serialized object describing the message to be sent\n", + "name": "result" + } + ], + "category": "methods" + }, + { + "anchor": "sentwebappmessage", + "name": "SentWebAppMessage", + "description": "Describes an inline message sent by a Web App on behalf of a user.", + "html_description": "

Describes an inline message sent by a Web App on behalf of a user.

", + "rst_description": "Describes an inline message sent by a `Web App `_ on behalf of a user.", + "annotations": [ + { + "type": "String", + "description": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", + "html_description": "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", + "rst_description": "*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message.\n", + "name": "inline_message_id", + "required": false + } + ], + "category": "types" + } + ], + "description": "The following methods and objects allow your bot to work in inline mode.\nPlease see our Introduction to Inline bots for more details.\nTo enable this option, send the /setinline command to @BotFather and provide the placeholder text that the user will see in the input field after typing your bot's name." + }, + { + "title": "Payments", + "anchor": "payments", + "children": [ + { + "anchor": "sendinvoice", + "name": "sendInvoice", + "description": "Use this method to send invoices. On success, the sent Message is returned.", + "html_description": "

Use this method to send invoices. On success, the sent Message is returned.

", + "rst_description": "Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer or String", + "required": true, + "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "html_description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "name": "payload" + }, + { + "type": "String", + "required": true, + "description": "Payment provider token, obtained via @BotFather", + "html_description": "Payment provider token, obtained via @BotFather", + "rst_description": "Payment provider token, obtained via `@BotFather `_\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "html_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n", + "name": "prices" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "html_description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "rst_description": "A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter", + "html_description": "Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter", + "rst_description": "Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a *Pay* button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a *URL* button with a deep link to the bot (instead of a *Pay* button), with the value used as the start parameter\n", + "name": "start_parameter" + }, + { + "type": "String", + "required": false, + "description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "html_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "rst_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.", + "html_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.", + "rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order", + "html_description": "Pass True if you require the user's full name to complete the order", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order", + "html_description": "Pass True if you require the user's phone number to complete the order", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order", + "html_description": "Pass True if you require the user's email address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order", + "html_description": "Pass True if you require the user's shipping address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to provider", + "html_description": "Pass True if the user's phone number should be sent to provider", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to provider\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to provider", + "html_description": "Pass True if the user's email address should be sent to provider", + "rst_description": "Pass :code:`True` if the user's email address should be sent to provider\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method", + "html_description": "Pass True if the final price depends on the shipping method", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method\n", + "name": "is_flexible" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "html_description": "A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "createinvoicelink", + "name": "createInvoiceLink", + "description": "Use this method to create a link for an invoice. Returns the created invoice link as String on success.", + "html_description": "

Use this method to create a link for an invoice. Returns the created invoice link as String on success.

", + "rst_description": "Use this method to create a link for an invoice. Returns the created invoice link as *String* on success.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title" + }, + { + "type": "String", + "required": true, + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description" + }, + { + "type": "String", + "required": true, + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "name": "payload" + }, + { + "type": "String", + "required": true, + "description": "Payment provider token, obtained via BotFather", + "html_description": "Payment provider token, obtained via BotFather", + "rst_description": "Payment provider token, obtained via `BotFather `_\n", + "name": "provider_token" + }, + { + "type": "String", + "required": true, + "description": "Three-letter ISO 4217 currency code, see more on currencies", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_\n", + "name": "currency" + }, + { + "type": "Array of LabeledPrice", + "required": true, + "description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "html_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n", + "name": "prices" + }, + { + "type": "Integer", + "required": false, + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "html_description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n", + "name": "max_tip_amount" + }, + { + "type": "Array of Integer", + "required": false, + "description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "html_description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "rst_description": "A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n", + "name": "suggested_tip_amounts" + }, + { + "type": "String", + "required": false, + "description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "html_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", + "rst_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.\n", + "name": "provider_data" + }, + { + "type": "String", + "required": false, + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url" + }, + { + "type": "Integer", + "required": false, + "description": "Photo size in bytes", + "html_description": "Photo size in bytes", + "rst_description": "Photo size in bytes\n", + "name": "photo_size" + }, + { + "type": "Integer", + "required": false, + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "photo_width" + }, + { + "type": "Integer", + "required": false, + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "photo_height" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's full name to complete the order", + "html_description": "Pass True if you require the user's full name to complete the order", + "rst_description": "Pass :code:`True` if you require the user's full name to complete the order\n", + "name": "need_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's phone number to complete the order", + "html_description": "Pass True if you require the user's phone number to complete the order", + "rst_description": "Pass :code:`True` if you require the user's phone number to complete the order\n", + "name": "need_phone_number" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's email address to complete the order", + "html_description": "Pass True if you require the user's email address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's email address to complete the order\n", + "name": "need_email" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if you require the user's shipping address to complete the order", + "html_description": "Pass True if you require the user's shipping address to complete the order", + "rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order\n", + "name": "need_shipping_address" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's phone number should be sent to the provider", + "html_description": "Pass True if the user's phone number should be sent to the provider", + "rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider\n", + "name": "send_phone_number_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the user's email address should be sent to the provider", + "html_description": "Pass True if the user's email address should be sent to the provider", + "rst_description": "Pass :code:`True` if the user's email address should be sent to the provider\n", + "name": "send_email_to_provider" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the final price depends on the shipping method", + "html_description": "Pass True if the final price depends on the shipping method", + "rst_description": "Pass :code:`True` if the final price depends on the shipping method\n", + "name": "is_flexible" + } + ], + "category": "methods" + }, + { + "anchor": "answershippingquery", + "name": "answerShippingQuery", + "description": "If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.", + "html_description": "

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.

", + "rst_description": "If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "shipping_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "html_description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)", + "rst_description": "Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)\n", + "name": "ok" + }, + { + "type": "Array of ShippingOption", + "required": false, + "description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "html_description": "Required if ok is True. A JSON-serialized array of available shipping options.", + "rst_description": "Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.\n", + "name": "shipping_options" + }, + { + "type": "String", + "required": false, + "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", + "html_description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", + "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", + "name": "error_message" + } + ], + "category": "methods" + }, + { + "anchor": "answerprecheckoutquery", + "name": "answerPreCheckoutQuery", + "description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.", + "html_description": "

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.

", + "rst_description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.", + "annotations": [ + { + "type": "String", + "required": true, + "description": "Unique identifier for the query to be answered", + "html_description": "Unique identifier for the query to be answered", + "rst_description": "Unique identifier for the query to be answered\n", + "name": "pre_checkout_query_id" + }, + { + "type": "Boolean", + "required": true, + "description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "html_description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.", + "rst_description": "Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems.\n", + "name": "ok" + }, + { + "type": "String", + "required": false, + "description": "Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.", + "html_description": "Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.", + "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.\n", + "name": "error_message" + } + ], + "category": "methods" + }, + { + "anchor": "labeledprice", + "name": "LabeledPrice", + "description": "This object represents a portion of the price for goods or services.", + "html_description": "

This object represents a portion of the price for goods or services.

", + "rst_description": "This object represents a portion of the price for goods or services.", + "annotations": [ + { + "type": "String", + "description": "Portion label", + "html_description": "Portion label", + "rst_description": "Portion label\n", + "name": "label", + "required": true + }, + { + "type": "Integer", + "description": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Price of the product in the *smallest units* of the `currency `_ (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "amount", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "invoice", + "name": "Invoice", + "description": "This object contains basic information about an invoice.", + "html_description": "

This object contains basic information about an invoice.

", + "rst_description": "This object contains basic information about an invoice.", + "annotations": [ + { + "type": "String", + "description": "Product name", + "html_description": "Product name", + "rst_description": "Product name\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description", + "html_description": "Product description", + "rst_description": "Product description\n", + "name": "description", + "required": true + }, + { + "type": "String", + "description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "html_description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "rst_description": "Unique bot deep-linking parameter that can be used to generate this invoice\n", + "name": "start_parameter", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code", + "html_description": "Three-letter ISO 4217 currency code", + "rst_description": "Three-letter ISO 4217 `currency `_ code\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "total_amount", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "shippingaddress", + "name": "ShippingAddress", + "description": "This object represents a shipping address.", + "html_description": "

This object represents a shipping address.

", + "rst_description": "This object represents a shipping address.", + "annotations": [ + { + "type": "String", + "description": "Two-letter ISO 3166-1 alpha-2 country code", + "html_description": "Two-letter ISO 3166-1 alpha-2 country code", + "rst_description": "Two-letter ISO 3166-1 alpha-2 country code\n", + "name": "country_code", + "required": true + }, + { + "type": "String", + "description": "State, if applicable", + "html_description": "State, if applicable", + "rst_description": "State, if applicable\n", + "name": "state", + "required": true + }, + { + "type": "String", + "description": "City", + "html_description": "City", + "rst_description": "City\n", + "name": "city", + "required": true + }, + { + "type": "String", + "description": "First line for the address", + "html_description": "First line for the address", + "rst_description": "First line for the address\n", + "name": "street_line1", + "required": true + }, + { + "type": "String", + "description": "Second line for the address", + "html_description": "Second line for the address", + "rst_description": "Second line for the address\n", + "name": "street_line2", + "required": true + }, + { + "type": "String", + "description": "Address post code", + "html_description": "Address post code", + "rst_description": "Address post code\n", + "name": "post_code", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "orderinfo", + "name": "OrderInfo", + "description": "This object represents information about an order.", + "html_description": "

This object represents information about an order.

", + "rst_description": "This object represents information about an order.", + "annotations": [ + { + "type": "String", + "description": "User name", + "html_description": "Optional. User name", + "rst_description": "*Optional*. User name\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "User's phone number", + "html_description": "Optional. User's phone number", + "rst_description": "*Optional*. User's phone number\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User email", + "html_description": "Optional. User email", + "rst_description": "*Optional*. User email\n", + "name": "email", + "required": false + }, + { + "type": "ShippingAddress", + "description": "User shipping address", + "html_description": "Optional. User shipping address", + "rst_description": "*Optional*. User shipping address\n", + "name": "shipping_address", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "shippingoption", + "name": "ShippingOption", + "description": "This object represents one shipping option.", + "html_description": "

This object represents one shipping option.

", + "rst_description": "This object represents one shipping option.", + "annotations": [ + { + "type": "String", + "description": "Shipping option identifier", + "html_description": "Shipping option identifier", + "rst_description": "Shipping option identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Option title", + "html_description": "Option title", + "rst_description": "Option title\n", + "name": "title", + "required": true + }, + { + "type": "Array of LabeledPrice", + "description": "List of price portions", + "html_description": "List of price portions", + "rst_description": "List of price portions\n", + "name": "prices", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "successfulpayment", + "name": "SuccessfulPayment", + "description": "This object contains basic information about a successful payment.", + "html_description": "

This object contains basic information about a successful payment.

", + "rst_description": "This object contains basic information about a successful payment.", + "annotations": [ + { + "type": "String", + "description": "Three-letter ISO 4217 currency code", + "html_description": "Three-letter ISO 4217 currency code", + "rst_description": "Three-letter ISO 4217 `currency `_ code\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "total_amount", + "required": true + }, + { + "type": "String", + "description": "Bot specified invoice payload", + "html_description": "Bot specified invoice payload", + "rst_description": "Bot specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "String", + "description": "Identifier of the shipping option chosen by the user", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "required": false + }, + { + "type": "String", + "description": "Telegram payment identifier", + "html_description": "Telegram payment identifier", + "rst_description": "Telegram payment identifier\n", + "name": "telegram_payment_charge_id", + "required": true + }, + { + "type": "String", + "description": "Provider payment identifier", + "html_description": "Provider payment identifier", + "rst_description": "Provider payment identifier\n", + "name": "provider_payment_charge_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "shippingquery", + "name": "ShippingQuery", + "description": "This object contains information about an incoming shipping query.", + "html_description": "

This object contains information about an incoming shipping query.

", + "rst_description": "This object contains information about an incoming shipping query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Bot specified invoice payload", + "html_description": "Bot specified invoice payload", + "rst_description": "Bot specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "ShippingAddress", + "description": "User specified shipping address", + "html_description": "User specified shipping address", + "rst_description": "User specified shipping address\n", + "name": "shipping_address", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "precheckoutquery", + "name": "PreCheckoutQuery", + "description": "This object contains information about an incoming pre-checkout query.", + "html_description": "

This object contains information about an incoming pre-checkout query.

", + "rst_description": "This object contains information about an incoming pre-checkout query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code", + "html_description": "Three-letter ISO 4217 currency code", + "rst_description": "Three-letter ISO 4217 `currency `_ code\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "total_amount", + "required": true + }, + { + "type": "String", + "description": "Bot specified invoice payload", + "html_description": "Bot specified invoice payload", + "rst_description": "Bot specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "String", + "description": "Identifier of the shipping option chosen by the user", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "required": false + } + ], + "category": "types" + } + ], + "description": "Your bot can accept payments from Telegram users. Please see the introduction to payments for more details on the process and how to set up payments for your bot. Please note that users will need Telegram v.4.0 or higher to use payments (released on May 18, 2017)." + }, + { + "title": "Telegram Passport", + "anchor": "telegram-passport", + "children": [ + { + "anchor": "passportdata", + "name": "PassportData", + "description": "Describes Telegram Passport data shared with the bot by the user.", + "html_description": "

Describes Telegram Passport data shared with the bot by the user.

", + "rst_description": "Describes Telegram Passport data shared with the bot by the user.", + "annotations": [ + { + "type": "Array of EncryptedPassportElement", + "description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "html_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "rst_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot\n", + "name": "data", + "required": true + }, + { + "type": "EncryptedCredentials", + "description": "Encrypted credentials required to decrypt the data", + "html_description": "Encrypted credentials required to decrypt the data", + "rst_description": "Encrypted credentials required to decrypt the data\n", + "name": "credentials", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportfile", + "name": "PassportFile", + "description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "html_description": "

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.

", + "rst_description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "File size in bytes", + "rst_description": "File size in bytes\n", + "name": "file_size", + "required": true + }, + { + "type": "Integer", + "description": "Unix time when the file was uploaded", + "html_description": "Unix time when the file was uploaded", + "rst_description": "Unix time when the file was uploaded\n", + "name": "file_date", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "encryptedpassportelement", + "name": "EncryptedPassportElement", + "description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "html_description": "

Describes documents or other Telegram Passport elements shared with the bot by the user.

", + "rst_description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "annotations": [ + { + "type": "String", + "description": "Element type. One of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration', 'phone_number', 'email'.", + "html_description": "Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.", + "rst_description": "Element type. One of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration', 'phone_number', 'email'.\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "User's verified phone number, available only for 'phone_number' type", + "html_description": "Optional. User's verified phone number, available only for “phone_number” type", + "rst_description": "*Optional*. User's verified phone number, available only for 'phone_number' type\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User's verified email address, available only for 'email' type", + "html_description": "Optional. User's verified email address, available only for “email” type", + "rst_description": "*Optional*. User's verified email address, available only for 'email' type\n", + "name": "email", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "files", + "required": false + }, + { + "type": "PassportFile", + "description": "Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "front_side", + "required": false + }, + { + "type": "PassportFile", + "description": "Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "reverse_side", + "required": false + }, + { + "type": "PassportFile", + "description": "Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "selfie", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "translation", + "required": false + }, + { + "type": "String", + "description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "html_description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "rst_description": "Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`\n", + "name": "hash", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "encryptedcredentials", + "name": "EncryptedCredentials", + "description": "Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.", + "html_description": "

Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.

", + "rst_description": "Describes data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes.", + "annotations": [ + { + "type": "String", + "description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "html_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "rst_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement` decryption and authentication\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash for data authentication", + "html_description": "Base64-encoded data hash for data authentication", + "rst_description": "Base64-encoded data hash for data authentication\n", + "name": "hash", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "html_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "rst_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption\n", + "name": "secret", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "setpassportdataerrors", + "name": "setPassportDataErrors", + "description": "Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "html_description": "

Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

", + "rst_description": "Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns :code:`True` on success.\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Array of PassportElementError", + "required": true, + "description": "A JSON-serialized array describing the errors", + "html_description": "A JSON-serialized array describing the errors", + "rst_description": "A JSON-serialized array describing the errors\n", + "name": "errors" + } + ], + "category": "methods" + }, + { + "anchor": "passportelementerror", + "name": "PassportElementError", + "description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n - PassportElementErrorDataField\n - PassportElementErrorFrontSide\n - PassportElementErrorReverseSide\n - PassportElementErrorSelfie\n - PassportElementErrorFile\n - PassportElementErrorFiles\n - PassportElementErrorTranslationFile\n - PassportElementErrorTranslationFiles\n - PassportElementErrorUnspecified", + "html_description": "

This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:

", + "rst_description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n\n - :class:`aiogram.types.passport_element_error_data_field.PassportElementErrorDataField`\n - :class:`aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide`\n - :class:`aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide`\n - :class:`aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie`\n - :class:`aiogram.types.passport_element_error_file.PassportElementErrorFile`\n - :class:`aiogram.types.passport_element_error_files.PassportElementErrorFiles`\n - :class:`aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile`\n - :class:`aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles`\n - :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`", + "annotations": [], + "category": "types" + }, + { + "anchor": "passportelementerrordatafield", + "name": "PassportElementErrorDataField", + "description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "html_description": "

Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.

", + "rst_description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be data", + "html_description": "Error source, must be data", + "rst_description": "Error source, must be *data*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'", + "html_description": "The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”", + "rst_description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Name of the data field which has the error", + "html_description": "Name of the data field which has the error", + "rst_description": "Name of the data field which has the error\n", + "name": "field_name", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash", + "html_description": "Base64-encoded data hash", + "rst_description": "Base64-encoded data hash\n", + "name": "data_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorfrontside", + "name": "PassportElementErrorFrontSide", + "description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "html_description": "

Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.

", + "rst_description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be front_side", + "html_description": "Error source, must be front_side", + "rst_description": "Error source, must be *front_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the front side of the document", + "html_description": "Base64-encoded hash of the file with the front side of the document", + "rst_description": "Base64-encoded hash of the file with the front side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorreverseside", + "name": "PassportElementErrorReverseSide", + "description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "html_description": "

Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.

", + "rst_description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be reverse_side", + "html_description": "Error source, must be reverse_side", + "rst_description": "Error source, must be *reverse_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the reverse side of the document", + "html_description": "Base64-encoded hash of the file with the reverse side of the document", + "rst_description": "Base64-encoded hash of the file with the reverse side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorselfie", + "name": "PassportElementErrorSelfie", + "description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "html_description": "

Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.

", + "rst_description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be selfie", + "html_description": "Error source, must be selfie", + "rst_description": "Error source, must be *selfie*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the selfie", + "html_description": "Base64-encoded hash of the file with the selfie", + "rst_description": "Base64-encoded hash of the file with the selfie\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorfile", + "name": "PassportElementErrorFile", + "description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "html_description": "

Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.

", + "rst_description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be file", + "html_description": "Error source, must be file", + "rst_description": "Error source, must be *file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorfiles", + "name": "PassportElementErrorFiles", + "description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "html_description": "

Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.

", + "rst_description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be files", + "html_description": "Error source, must be files", + "rst_description": "Error source, must be *files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrortranslationfile", + "name": "PassportElementErrorTranslationFile", + "description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "html_description": "

Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.

", + "rst_description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_file", + "html_description": "Error source, must be translation_file", + "rst_description": "Error source, must be *translation_file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrortranslationfiles", + "name": "PassportElementErrorTranslationFiles", + "description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "html_description": "

Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.

", + "rst_description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_files", + "html_description": "Error source, must be translation_files", + "rst_description": "Error source, must be *translation_files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "passportelementerrorunspecified", + "name": "PassportElementErrorUnspecified", + "description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "html_description": "

Represents an issue in an unspecified place. The error is considered resolved when new data is added.

", + "rst_description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be unspecified", + "html_description": "Error source, must be unspecified", + "rst_description": "Error source, must be *unspecified*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue", + "html_description": "Type of element of the user's Telegram Passport which has the issue", + "rst_description": "Type of element of the user's Telegram Passport which has the issue\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded element hash", + "html_description": "Base64-encoded element hash", + "rst_description": "Base64-encoded element hash\n", + "name": "element_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } + ], + "description": "Telegram Passport is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Please see the manual for details." + }, + { + "title": "Games", + "anchor": "games", + "children": [ + { + "anchor": "sendgame", + "name": "sendGame", + "description": "Use this method to send a game. On success, the sent Message is returned.", + "html_description": "

Use this method to send a game. On success, the sent Message is returned.

", + "rst_description": "Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Unique identifier for the target chat", + "html_description": "Unique identifier for the target chat", + "rst_description": "Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "html_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "rst_description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only\n", + "name": "message_thread_id" + }, + { + "type": "String", + "required": true, + "description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "html_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.", + "rst_description": "Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.\n", + "name": "game_short_name" + }, + { + "type": "Boolean", + "required": false, + "description": "Sends the message silently. Users will receive a notification with no sound.", + "html_description": "Sends the message silently. Users will receive a notification with no sound.", + "rst_description": "Sends the message `silently `_. Users will receive a notification with no sound.\n", + "name": "disable_notification" + }, + { + "type": "Boolean", + "required": false, + "description": "Protects the contents of the sent message from forwarding and saving", + "html_description": "Protects the contents of the sent message from forwarding and saving", + "rst_description": "Protects the contents of the sent message from forwarding and saving\n", + "name": "protect_content" + }, + { + "type": "Integer", + "required": false, + "description": "If the message is a reply, ID of the original message", + "html_description": "If the message is a reply, ID of the original message", + "rst_description": "If the message is a reply, ID of the original message\n", + "name": "reply_to_message_id" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "html_description": "Pass True if the message should be sent even if the specified replied-to message is not found", + "rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n", + "name": "allow_sending_without_reply" + }, + { + "type": "InlineKeyboardMarkup", + "required": false, + "description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.", + "html_description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.", + "rst_description": "A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.\n", + "name": "reply_markup" + } + ], + "category": "methods" + }, + { + "anchor": "game", + "name": "Game", + "description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "html_description": "

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

", + "rst_description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "annotations": [ + { + "type": "String", + "description": "Title of the game", + "html_description": "Title of the game", + "rst_description": "Title of the game\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Description of the game", + "html_description": "Description of the game", + "rst_description": "Description of the game\n", + "name": "description", + "required": true + }, + { + "type": "Array of PhotoSize", + "description": "Photo that will be displayed in the game message in chats.", + "html_description": "Photo that will be displayed in the game message in chats.", + "rst_description": "Photo that will be displayed in the game message in chats.\n", + "name": "photo", + "required": true + }, + { + "type": "String", + "description": "Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "html_description": "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "rst_description": "*Optional*. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls :class:`aiogram.methods.set_game_score.SetGameScore`, or manually edited using :class:`aiogram.methods.edit_message_text.EditMessageText`. 0-4096 characters.\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "html_description": "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "rst_description": "*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.\n", + "name": "text_entities", + "required": false + }, + { + "type": "Animation", + "description": "Animation that will be displayed in the game message in chats. Upload via BotFather", + "html_description": "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather", + "rst_description": "*Optional*. Animation that will be displayed in the game message in chats. Upload via `BotFather `_\n", + "name": "animation", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "callbackgame", + "name": "CallbackGame", + "description": "A placeholder, currently holds no information. Use BotFather to set up your game.", + "html_description": "

A placeholder, currently holds no information. Use BotFather to set up your game.

", + "rst_description": "A placeholder, currently holds no information. Use `BotFather `_ to set up your game.", + "annotations": [], + "category": "types" + }, + { + "anchor": "setgamescore", + "name": "setGameScore", + "description": "Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.", + "html_description": "

Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

", + "rst_description": "Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "User identifier", + "html_description": "User identifier", + "rst_description": "User identifier\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": true, + "description": "New score, must be non-negative", + "html_description": "New score, must be non-negative", + "rst_description": "New score, must be non-negative\n", + "name": "score" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "html_description": "Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", + "rst_description": "Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters\n", + "name": "force" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "html_description": "Pass True if the game message should not be automatically edited to include the current scoreboard", + "rst_description": "Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard\n", + "name": "disable_edit_message" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "category": "methods" + }, + { + "anchor": "getgamehighscores", + "name": "getGameHighScores", + "description": "Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.\nThis method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "html_description": "

Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.

\n

This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.

\n
", + "rst_description": "Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects.\n\n This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change.", + "annotations": [ + { + "type": "Integer", + "required": true, + "description": "Target user id", + "html_description": "Target user id", + "rst_description": "Target user id\n", + "name": "user_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "html_description": "Required if inline_message_id is not specified. Unique identifier for the target chat", + "rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat\n", + "name": "chat_id" + }, + { + "type": "Integer", + "required": false, + "description": "Required if inline_message_id is not specified. Identifier of the sent message", + "html_description": "Required if inline_message_id is not specified. Identifier of the sent message", + "rst_description": "Required if *inline_message_id* is not specified. Identifier of the sent message\n", + "name": "message_id" + }, + { + "type": "String", + "required": false, + "description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "html_description": "Required if chat_id and message_id are not specified. Identifier of the inline message", + "rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n", + "name": "inline_message_id" + } + ], + "category": "methods" + }, + { + "anchor": "gamehighscore", + "name": "GameHighScore", + "description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\nIf you've got any questions, please check out our Bot FAQ", + "html_description": "

This object represents one row of the high scores table for a game.

And that's about all we've got for now.
\nIf you've got any questions, please check out our Bot FAQ »

", + "rst_description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\n\nIf you've got any questions, please check out our `https://core.telegram.org/bots/faq `_ **Bot FAQ ยป**", + "annotations": [ + { + "type": "Integer", + "description": "Position in high score table for the game", + "html_description": "Position in high score table for the game", + "rst_description": "Position in high score table for the game\n", + "name": "position", + "required": true + }, + { + "type": "User", + "description": "User", + "html_description": "User", + "rst_description": "User\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Score", + "html_description": "Score", + "rst_description": "Score\n", + "name": "score", + "required": true + } + ], + "category": "types" + } + ], + "description": "Your bot can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Create games via @BotFather using the /newgame command. Please note that this kind of power requires responsibility: you will need to accept the terms for each game that your bots will be offering.\n - Games are a new type of content on Telegram, represented by the Game and InlineQueryResultGame objects.\n - Once you've created a game via BotFather, you can send games to chats as regular messages using the sendGame method, or use inline mode with InlineQueryResultGame.\n - If you send the game message without any buttons, it will automatically have a 'Play GameName' button. When this button is pressed, your bot gets a CallbackQuery with the game_short_name of the requested game. You provide the correct URL for this particular user and the app opens the game in the in-app browser.\n - You can manually add multiple buttons to your game message. Please note that the first button in the first row must always launch the game, using the field callback_game in InlineKeyboardButton. You can add extra buttons according to taste: e.g., for a description of the rules, or to open the game's official community.\n - To make your game more attractive, you can upload a GIF animation that demostrates the game to the users via BotFather (see Lumberjack for example).\n - A game message will also display high scores for the current chat. Use setGameScore to post high scores to the chat with the game, add the edit_message parameter to automatically update the message with the current scoreboard.\n - Use getGameHighScores to get data for in-game high score tables.\n - You can also add an extra sharing button for users to share their best score to different chats.\n - For examples of what can be done using this new stuff, check the @gamebot and @gamee bots." + } + ] +} diff --git a/.butcher/templates/enums/entity.rst.jinja2 b/.butcher/templates/enums/entity.rst.jinja2 new file mode 100644 index 00000000..da25faa0 --- /dev/null +++ b/.butcher/templates/enums/entity.rst.jinja2 @@ -0,0 +1,13 @@ +{{ object.name|header('#') }} +{{ object.name }} +{{ object.name|header('#') }} + + +.. automodule:: aiogram.enums.{{ object.name|pythonize_name }} + :members: + :member-order: bysource + :undoc-members: True + +{% if docs %} +{{ docs }} +{% endif %} diff --git a/.butcher/templates/enums/index.rst.jinja2 b/.butcher/templates/enums/index.rst.jinja2 new file mode 100644 index 00000000..4dd55eb2 --- /dev/null +++ b/.butcher/templates/enums/index.rst.jinja2 @@ -0,0 +1,13 @@ +##### +Types +##### + +Here is list of all available enums: + +{% for title, group in groups.items() %} +.. toctree:: + :maxdepth: 1 +{% for name in group %} + {{ name|pythonize_name }} +{%- endfor %} +{% endfor %} diff --git a/.butcher/templates/methods/entity.rst.jinja2 b/.butcher/templates/methods/entity.rst.jinja2 new file mode 100755 index 00000000..3e3ab837 --- /dev/null +++ b/.butcher/templates/methods/entity.rst.jinja2 @@ -0,0 +1,54 @@ +{{ object.name|header('#') }} +{{ object.name }} +{{ object.name|header('#') }} + +Returns: :obj:`{{ object.returning.parsed_type|type }}` + +.. automodule:: aiogram.methods.{{ object.name|pythonize_name }} + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: {{ object.returning.parsed_type|type }} = await bot.{{ object.name|pythonize_name }}(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.{{ object.name|pythonize_name }} import {{ object.name|pythonize_class_name }}` +- alias: :code:`from aiogram.methods import {{ object.name|pythonize_class_name }}` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: {{ object.returning.parsed_type|type }} = await bot({{ object.name|pythonize_class_name }}(...)) + +{% if can_be_used_in_webhook -%} +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return {{ object.name|pythonize_class_name }}(...) +{%- endif %} + +{% if aliased %} +As shortcut from received object +------------------- +{% for alias in aliased %} +- :meth:`aiogram.types.{{ alias.type|pythonize_name }}.{{ alias.type|pythonize_class_name }}.{{ alias.name }}` +{%- endfor %} +{% endif %} diff --git a/.butcher/templates/methods/index.rst.jinja2 b/.butcher/templates/methods/index.rst.jinja2 new file mode 100644 index 00000000..a8e04c97 --- /dev/null +++ b/.butcher/templates/methods/index.rst.jinja2 @@ -0,0 +1,16 @@ +####### +Methods +####### + +Here is list of all available API methods: + +{% for title, group in groups.items() %} +{{ title }} +{{ title|header('=') }} + +.. toctree:: + :maxdepth: 1 +{% for name in group %} + {{ name|pythonize_name }} +{%- endfor %} +{% endfor %} diff --git a/.butcher/templates/types/entity.rst.jinja2 b/.butcher/templates/types/entity.rst.jinja2 new file mode 100644 index 00000000..6b9907c3 --- /dev/null +++ b/.butcher/templates/types/entity.rst.jinja2 @@ -0,0 +1,9 @@ +{{ object.name|header('#') }} +{{ object.name }} +{{ object.name|header('#') }} + + +.. automodule:: aiogram.types.{{ object.name|pythonize_name }} + :members: + :member-order: bysource + :undoc-members: True diff --git a/.butcher/templates/types/index.rst.jinja2 b/.butcher/templates/types/index.rst.jinja2 new file mode 100644 index 00000000..c812ce24 --- /dev/null +++ b/.butcher/templates/types/index.rst.jinja2 @@ -0,0 +1,16 @@ +##### +Types +##### + +Here is list of all available API types: + +{% for title, group in groups.items() %} +{{ title }} +{{ title|header('=') }} + +.. toctree:: + :maxdepth: 1 +{% for name in group %} + {{ name|pythonize_name }} +{%- endfor %} +{% endfor %} diff --git a/.butcher/types/Animation/entity.json b/.butcher/types/Animation/entity.json new file mode 100644 index 00000000..2de45c1b --- /dev/null +++ b/.butcher/types/Animation/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "animation", + "name": "Animation", + "description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "html_description": "

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

", + "rst_description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width as defined by sender", + "html_description": "Video width as defined by sender", + "rst_description": "Video width as defined by sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by sender", + "html_description": "Video height as defined by sender", + "rst_description": "Video height as defined by sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by sender", + "html_description": "Duration of the video in seconds as defined by sender", + "rst_description": "Duration of the video in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Animation thumbnail as defined by sender", + "html_description": "Optional. Animation thumbnail as defined by sender", + "rst_description": "*Optional*. Animation thumbnail as defined by sender\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Original animation filename as defined by sender", + "html_description": "Optional. Original animation filename as defined by sender", + "rst_description": "*Optional*. Original animation filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Audio/entity.json b/.butcher/types/Audio/entity.json new file mode 100644 index 00000000..4b94b3a1 --- /dev/null +++ b/.butcher/types/Audio/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "audio", + "name": "Audio", + "description": "This object represents an audio file to be treated as music by the Telegram clients.", + "html_description": "

This object represents an audio file to be treated as music by the Telegram clients.

", + "rst_description": "This object represents an audio file to be treated as music by the Telegram clients.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds as defined by sender", + "html_description": "Duration of the audio in seconds as defined by sender", + "rst_description": "Duration of the audio in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "Performer of the audio as defined by sender or by audio tags", + "html_description": "Optional. Performer of the audio as defined by sender or by audio tags", + "rst_description": "*Optional*. Performer of the audio as defined by sender or by audio tags\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio as defined by sender or by audio tags", + "html_description": "Optional. Title of the audio as defined by sender or by audio tags", + "rst_description": "*Optional*. Title of the audio as defined by sender or by audio tags\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by sender", + "html_description": "Optional. Original filename as defined by sender", + "rst_description": "*Optional*. Original filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + }, + { + "type": "PhotoSize", + "description": "Thumbnail of the album cover to which the music file belongs", + "html_description": "Optional. Thumbnail of the album cover to which the music file belongs", + "rst_description": "*Optional*. Thumbnail of the album cover to which the music file belongs\n", + "name": "thumb", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommand/entity.json b/.butcher/types/BotCommand/entity.json new file mode 100644 index 00000000..54cf79a1 --- /dev/null +++ b/.butcher/types/BotCommand/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommand", + "name": "BotCommand", + "description": "This object represents a bot command.", + "html_description": "

This object represents a bot command.

", + "rst_description": "This object represents a bot command.", + "annotations": [ + { + "type": "String", + "description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "html_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.", + "rst_description": "Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.\n", + "name": "command", + "required": true + }, + { + "type": "String", + "description": "Description of the command; 1-256 characters.", + "html_description": "Description of the command; 1-256 characters.", + "rst_description": "Description of the command; 1-256 characters.\n", + "name": "description", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommand/replace.yml b/.butcher/types/BotCommand/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/BotCommand/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/BotCommandScope/entity.json b/.butcher/types/BotCommandScope/entity.json new file mode 100644 index 00000000..a43e32bd --- /dev/null +++ b/.butcher/types/BotCommandScope/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscope", + "name": "BotCommandScope", + "description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n - BotCommandScopeDefault\n - BotCommandScopeAllPrivateChats\n - BotCommandScopeAllGroupChats\n - BotCommandScopeAllChatAdministrators\n - BotCommandScopeChat\n - BotCommandScopeChatAdministrators\n - BotCommandScopeChatMember", + "html_description": "

This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:

", + "rst_description": "This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:\n\n - :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`\n - :class:`aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats`\n - :class:`aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats`\n - :class:`aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat.BotCommandScopeChat`\n - :class:`aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators`\n - :class:`aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json b/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json new file mode 100644 index 00000000..f1d09250 --- /dev/null +++ b/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopeallchatadministrators", + "name": "BotCommandScopeAllChatAdministrators", + "description": "Represents the scope of bot commands, covering all group and supergroup chat administrators.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chat administrators.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chat administrators.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_chat_administrators", + "html_description": "Scope type, must be all_chat_administrators", + "rst_description": "Scope type, must be *all_chat_administrators*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeAllChatAdministrators/replace.yml b/.butcher/types/BotCommandScopeAllChatAdministrators/replace.yml new file mode 100644 index 00000000..ddb65490 --- /dev/null +++ b/.butcher/types/BotCommandScopeAllChatAdministrators/replace.yml @@ -0,0 +1,2 @@ +bases: + - BotCommandScope diff --git a/.butcher/types/BotCommandScopeAllGroupChats/entity.json b/.butcher/types/BotCommandScopeAllGroupChats/entity.json new file mode 100644 index 00000000..9d1698cb --- /dev/null +++ b/.butcher/types/BotCommandScopeAllGroupChats/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopeallgroupchats", + "name": "BotCommandScopeAllGroupChats", + "description": "Represents the scope of bot commands, covering all group and supergroup chats.", + "html_description": "

Represents the scope of bot commands, covering all group and supergroup chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all group and supergroup chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_group_chats", + "html_description": "Scope type, must be all_group_chats", + "rst_description": "Scope type, must be *all_group_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeAllGroupChats/replace.yml b/.butcher/types/BotCommandScopeAllGroupChats/replace.yml new file mode 100644 index 00000000..ddb65490 --- /dev/null +++ b/.butcher/types/BotCommandScopeAllGroupChats/replace.yml @@ -0,0 +1,2 @@ +bases: + - BotCommandScope diff --git a/.butcher/types/BotCommandScopeAllPrivateChats/entity.json b/.butcher/types/BotCommandScopeAllPrivateChats/entity.json new file mode 100644 index 00000000..c7950f92 --- /dev/null +++ b/.butcher/types/BotCommandScopeAllPrivateChats/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopeallprivatechats", + "name": "BotCommandScopeAllPrivateChats", + "description": "Represents the scope of bot commands, covering all private chats.", + "html_description": "

Represents the scope of bot commands, covering all private chats.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all private chats.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be all_private_chats", + "html_description": "Scope type, must be all_private_chats", + "rst_description": "Scope type, must be *all_private_chats*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeAllPrivateChats/replace.yml b/.butcher/types/BotCommandScopeAllPrivateChats/replace.yml new file mode 100644 index 00000000..ddb65490 --- /dev/null +++ b/.butcher/types/BotCommandScopeAllPrivateChats/replace.yml @@ -0,0 +1,2 @@ +bases: + - BotCommandScope diff --git a/.butcher/types/BotCommandScopeChat/entity.json b/.butcher/types/BotCommandScopeChat/entity.json new file mode 100644 index 00000000..c0189614 --- /dev/null +++ b/.butcher/types/BotCommandScopeChat/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopechat", + "name": "BotCommandScopeChat", + "description": "Represents the scope of bot commands, covering a specific chat.", + "html_description": "

Represents the scope of bot commands, covering a specific chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat", + "html_description": "Scope type, must be chat", + "rst_description": "Scope type, must be *chat*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeChat/replace.yml b/.butcher/types/BotCommandScopeChat/replace.yml new file mode 100644 index 00000000..ddb65490 --- /dev/null +++ b/.butcher/types/BotCommandScopeChat/replace.yml @@ -0,0 +1,2 @@ +bases: + - BotCommandScope diff --git a/.butcher/types/BotCommandScopeChatAdministrators/entity.json b/.butcher/types/BotCommandScopeChatAdministrators/entity.json new file mode 100644 index 00000000..0f073037 --- /dev/null +++ b/.butcher/types/BotCommandScopeChatAdministrators/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopechatadministrators", + "name": "BotCommandScopeChatAdministrators", + "description": "Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering all administrators of a specific group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_administrators", + "html_description": "Scope type, must be chat_administrators", + "rst_description": "Scope type, must be *chat_administrators*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeChatAdministrators/replace.yml b/.butcher/types/BotCommandScopeChatAdministrators/replace.yml new file mode 100644 index 00000000..ddb65490 --- /dev/null +++ b/.butcher/types/BotCommandScopeChatAdministrators/replace.yml @@ -0,0 +1,2 @@ +bases: + - BotCommandScope diff --git a/.butcher/types/BotCommandScopeChatMember/entity.json b/.butcher/types/BotCommandScopeChatMember/entity.json new file mode 100644 index 00000000..ea0bb34e --- /dev/null +++ b/.butcher/types/BotCommandScopeChatMember/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopechatmember", + "name": "BotCommandScopeChatMember", + "description": "Represents the scope of bot commands, covering a specific member of a group or supergroup chat.", + "html_description": "

Represents the scope of bot commands, covering a specific member of a group or supergroup chat.

", + "rst_description": "Represents the `scope `_ of bot commands, covering a specific member of a group or supergroup chat.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be chat_member", + "html_description": "Scope type, must be chat_member", + "rst_description": "Scope type, must be *chat_member*\n", + "name": "type", + "required": true + }, + { + "type": "Integer or String", + "description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "html_description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)", + "rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n", + "name": "chat_id", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier of the target user", + "html_description": "Unique identifier of the target user", + "rst_description": "Unique identifier of the target user\n", + "name": "user_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeChatMember/replace.yml b/.butcher/types/BotCommandScopeChatMember/replace.yml new file mode 100644 index 00000000..ddb65490 --- /dev/null +++ b/.butcher/types/BotCommandScopeChatMember/replace.yml @@ -0,0 +1,2 @@ +bases: + - BotCommandScope diff --git a/.butcher/types/BotCommandScopeDefault/entity.json b/.butcher/types/BotCommandScopeDefault/entity.json new file mode 100644 index 00000000..a1235132 --- /dev/null +++ b/.butcher/types/BotCommandScopeDefault/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botcommandscopedefault", + "name": "BotCommandScopeDefault", + "description": "Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.", + "html_description": "

Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.

", + "rst_description": "Represents the default `scope `_ of bot commands. Default commands are used if no commands with a `narrower scope `_ are specified for the user.", + "annotations": [ + { + "type": "String", + "description": "Scope type, must be default", + "html_description": "Scope type, must be default", + "rst_description": "Scope type, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotCommandScopeDefault/replace.yml b/.butcher/types/BotCommandScopeDefault/replace.yml new file mode 100644 index 00000000..ddb65490 --- /dev/null +++ b/.butcher/types/BotCommandScopeDefault/replace.yml @@ -0,0 +1,2 @@ +bases: + - BotCommandScope diff --git a/.butcher/types/CallbackGame/entity.json b/.butcher/types/CallbackGame/entity.json new file mode 100644 index 00000000..f72d1945 --- /dev/null +++ b/.butcher/types/CallbackGame/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "callbackgame", + "name": "CallbackGame", + "description": "A placeholder, currently holds no information. Use BotFather to set up your game.", + "html_description": "

A placeholder, currently holds no information. Use BotFather to set up your game.

", + "rst_description": "A placeholder, currently holds no information. Use `BotFather `_ to set up your game.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/CallbackQuery/entity.json b/.butcher/types/CallbackQuery/entity.json new file mode 100644 index 00000000..760d0e3e --- /dev/null +++ b/.butcher/types/CallbackQuery/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "callbackquery", + "name": "CallbackQuery", + "description": "This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.\nNOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "html_description": "

This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.

\n

NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).

\n
", + "rst_description": "This object represents an incoming callback query from a callback button in an `inline keyboard `_. If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in `inline mode `_), the field *inline_message_id* will be present. Exactly one of the fields *data* or *game_short_name* will be present.\n\n **NOTE:** After the user presses a callback button, Telegram clients will display a progress bar until you call :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`. It is, therefore, necessary to react by calling :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` even if no notification to the user is needed (e.g., without specifying any of the optional parameters).", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "Message", + "description": "Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old", + "html_description": "Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old", + "rst_description": "*Optional*. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old\n", + "name": "message", + "required": false + }, + { + "type": "String", + "description": "Identifier of the message sent via the bot in inline mode, that originated the query.", + "html_description": "Optional. Identifier of the message sent via the bot in inline mode, that originated the query.", + "rst_description": "*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "html_description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", + "rst_description": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in :class:`aiogram.methods.games.Games`.\n", + "name": "chat_instance", + "required": true + }, + { + "type": "String", + "description": "Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "html_description": "Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.", + "rst_description": "*Optional*. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "Short name of a Game to be returned, serves as the unique identifier for the game", + "html_description": "Optional. Short name of a Game to be returned, serves as the unique identifier for the game", + "rst_description": "*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game\n", + "name": "game_short_name", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Chat/aliases.yml b/.butcher/types/Chat/aliases.yml new file mode 100644 index 00000000..3d3a2da4 --- /dev/null +++ b/.butcher/types/Chat/aliases.yml @@ -0,0 +1,108 @@ +#ban_sender_chat: +# method: banChatSenderChat +# fill: &self +# chat_id: self.id +# +#unban_sender_chat: +# method: unbanChatSenderChat +# fill: *self +# +#get_administrators: +# method: getChatAdministrators +# fill: *self +# +#delete_message: +# method: deleteMessage +# fill: *self +# +#revoke_invite_link: +# method: revokeChatInviteLink +# fill: *self +# +#edit_invite_link: +# method: editChatInviteLink +# fill: *self +# +#create_invite_link: +# method: createChatInviteLink +# fill: *self +# +#export_invite_link: +# method: exportChatInviteLink +# fill: *self +# +#do: +# method: sendChatAction +# fill: *self +# +#delete_sticker_set: +# method: deleteChatStickerSet +# fill: *self +# +#set_sticker_set: +# method: setChatStickerSet +# fill: *self +# +#get_member: +# method: getChatMember +# fill: *self +# +#get_member_count: +# method: getChatMemberCount +# fill: *self +# +#leave: +# method: leaveChat +# fill: *self +# +#unpin_all_messages: +# method: unpinAllChatMessages +# fill: *self +# +#unpin_message: +# method: unpinChatMessage +# fill: *self +# +#pin_message: +# method: pinChatMessage +# fill: *self +# +#set_administrator_custom_title: +# method: setChatAdministratorCustomTitle +# fill: *self +# +#set_permissions: +# method: setChatPermissions +# fill: *self +# +#promote: +# method: promoteChatMember +# fill: *self +# +#restrict: +# method: restrictChatMember +# fill: *self +# +#unban: +# method: unbanChatMember +# fill: *self +# +#ban: +# method: banChatMember +# fill: *self +# +#set_description: +# method: setChatDescription +# fill: *self +# +#set_title: +# method: setChatTitle +# fill: *self +# +#delete_photo: +# method: deleteChatPhoto +# fill: *self +# +#set_photo: +# method: setChatPhoto +# fill: *self diff --git a/.butcher/types/Chat/entity.json b/.butcher/types/Chat/entity.json new file mode 100644 index 00000000..49660a75 --- /dev/null +++ b/.butcher/types/Chat/entity.json @@ -0,0 +1,227 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chat", + "name": "Chat", + "description": "This object represents a chat.", + "html_description": "

This object represents a chat.

", + "rst_description": "This object represents a chat.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'", + "html_description": "Type of chat, can be either “private”, “group”, “supergroup” or “channel”", + "rst_description": "Type of chat, can be either 'private', 'group', 'supergroup' or 'channel'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Title, for supergroups, channels and group chats", + "html_description": "Optional. Title, for supergroups, channels and group chats", + "rst_description": "*Optional*. Title, for supergroups, channels and group chats\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Username, for private chats, supergroups and channels if available", + "html_description": "Optional. Username, for private chats, supergroups and channels if available", + "rst_description": "*Optional*. Username, for private chats, supergroups and channels if available\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "First name of the other party in a private chat", + "html_description": "Optional. First name of the other party in a private chat", + "rst_description": "*Optional*. First name of the other party in a private chat\n", + "name": "first_name", + "required": false + }, + { + "type": "String", + "description": "Last name of the other party in a private chat", + "html_description": "Optional. Last name of the other party in a private chat", + "rst_description": "*Optional*. Last name of the other party in a private chat\n", + "name": "last_name", + "required": false + }, + { + "type": "True", + "description": "True, if the supergroup chat is a forum (has topics enabled)", + "html_description": "Optional. True, if the supergroup chat is a forum (has topics enabled)", + "rst_description": "*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)\n", + "name": "is_forum", + "required": false + }, + { + "type": "ChatPhoto", + "description": "Chat photo. Returned only in getChat.", + "html_description": "Optional. Chat photo. Returned only in getChat.", + "rst_description": "*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "photo", + "required": false + }, + { + "type": "Array of String", + "description": "If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.", + "html_description": "Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.", + "rst_description": "*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "active_usernames", + "required": false + }, + { + "type": "String", + "description": "Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.", + "html_description": "Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.", + "rst_description": "*Optional*. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "emoji_status_custom_emoji_id", + "required": false + }, + { + "type": "String", + "description": "Bio of the other party in a private chat. Returned only in getChat.", + "html_description": "Optional. Bio of the other party in a private chat. Returned only in getChat.", + "rst_description": "*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "bio", + "required": false + }, + { + "type": "True", + "description": "True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.", + "html_description": "Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_private_forwards", + "required": false + }, + { + "type": "True", + "description": "True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.", + "html_description": "Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_restricted_voice_and_video_messages", + "required": false + }, + { + "type": "True", + "description": "True, if users need to join the supergroup before they can send messages. Returned only in getChat.", + "html_description": "Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "join_to_send_messages", + "required": false + }, + { + "type": "True", + "description": "True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.", + "html_description": "Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "join_by_request", + "required": false + }, + { + "type": "String", + "description": "Description, for groups, supergroups and channel chats. Returned only in getChat.", + "html_description": "Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.", + "rst_description": "*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.", + "html_description": "Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.", + "rst_description": "*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "invite_link", + "required": false + }, + { + "type": "Message", + "description": "The most recent pinned message (by sending date). Returned only in getChat.", + "html_description": "Optional. The most recent pinned message (by sending date). Returned only in getChat.", + "rst_description": "*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "pinned_message", + "required": false + }, + { + "type": "ChatPermissions", + "description": "Default chat member permissions, for groups and supergroups. Returned only in getChat.", + "html_description": "Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.", + "rst_description": "*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "permissions", + "required": false + }, + { + "type": "Integer", + "description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.", + "html_description": "Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "slow_mode_delay", + "required": false + }, + { + "type": "Integer", + "description": "The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.", + "html_description": "Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.", + "rst_description": "*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "message_auto_delete_time", + "required": false + }, + { + "type": "True", + "description": "True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", + "html_description": "Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_protected_content", + "required": false + }, + { + "type": "String", + "description": "For supergroups, name of group sticker set. Returned only in getChat.", + "html_description": "Optional. For supergroups, name of group sticker set. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "sticker_set_name", + "required": false + }, + { + "type": "True", + "description": "True, if the bot can change the group sticker set. Returned only in getChat.", + "html_description": "Optional. True, if the bot can change the group sticker set. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if the bot can change the group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "can_set_sticker_set", + "required": false + }, + { + "type": "Integer", + "description": "Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.", + "html_description": "Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.", + "rst_description": "*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "linked_chat_id", + "required": false + }, + { + "type": "ChatLocation", + "description": "For supergroups, the location to which the supergroup is connected. Returned only in getChat.", + "html_description": "Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.", + "rst_description": "*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "location", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatAdministratorRights/entity.json b/.butcher/types/ChatAdministratorRights/entity.json new file mode 100644 index 00000000..b4374b93 --- /dev/null +++ b/.butcher/types/ChatAdministratorRights/entity.json @@ -0,0 +1,115 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatadministratorrights", + "name": "ChatAdministratorRights", + "description": "Represents the rights of an administrator in a chat.", + "html_description": "

Represents the rights of an administrator in a chat.

", + "rst_description": "Represents the rights of an administrator in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "html_description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n", + "name": "can_manage_chat", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members", + "html_description": "True, if the administrator can restrict, ban or unban chat members", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "html_description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post in the channel; channels only", + "html_description": "Optional. True, if the administrator can post in the channel; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n", + "name": "can_post_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only\n", + "name": "can_manage_topics", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatInviteLink/entity.json b/.butcher/types/ChatInviteLink/entity.json new file mode 100644 index 00000000..7b96a2c4 --- /dev/null +++ b/.butcher/types/ChatInviteLink/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatinvitelink", + "name": "ChatInviteLink", + "description": "Represents an invite link for a chat.", + "html_description": "

Represents an invite link for a chat.

", + "rst_description": "Represents an invite link for a chat.", + "annotations": [ + { + "type": "String", + "description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with 'โ€ฆ'.", + "html_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.", + "rst_description": "The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with 'โ€ฆ'.\n", + "name": "invite_link", + "required": true + }, + { + "type": "User", + "description": "Creator of the link", + "html_description": "Creator of the link", + "rst_description": "Creator of the link\n", + "name": "creator", + "required": true + }, + { + "type": "Boolean", + "description": "True, if users joining the chat via the link need to be approved by chat administrators", + "html_description": "True, if users joining the chat via the link need to be approved by chat administrators", + "rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators\n", + "name": "creates_join_request", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is primary", + "html_description": "True, if the link is primary", + "rst_description": ":code:`True`, if the link is primary\n", + "name": "is_primary", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the link is revoked", + "html_description": "True, if the link is revoked", + "rst_description": ":code:`True`, if the link is revoked\n", + "name": "is_revoked", + "required": true + }, + { + "type": "String", + "description": "Invite link name", + "html_description": "Optional. Invite link name", + "rst_description": "*Optional*. Invite link name\n", + "name": "name", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the link will expire or has been expired", + "html_description": "Optional. Point in time (Unix timestamp) when the link will expire or has been expired", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired\n", + "name": "expire_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "html_description": "Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999", + "rst_description": "*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n", + "name": "member_limit", + "required": false + }, + { + "type": "Integer", + "description": "Number of pending join requests created using this link", + "html_description": "Optional. Number of pending join requests created using this link", + "rst_description": "*Optional*. Number of pending join requests created using this link\n", + "name": "pending_join_request_count", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatInviteLink/replace.yml b/.butcher/types/ChatInviteLink/replace.yml new file mode 100644 index 00000000..2577c954 --- /dev/null +++ b/.butcher/types/ChatInviteLink/replace.yml @@ -0,0 +1,5 @@ +annotations: + expire_date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/ChatJoinRequest/entity.json b/.butcher/types/ChatJoinRequest/entity.json new file mode 100644 index 00000000..172bd5ab --- /dev/null +++ b/.butcher/types/ChatJoinRequest/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatjoinrequest", + "name": "ChatJoinRequest", + "description": "Represents a join request sent to a chat.", + "html_description": "

Represents a join request sent to a chat.

", + "rst_description": "Represents a join request sent to a chat.", + "annotations": [ + { + "type": "Chat", + "description": "Chat to which the request was sent", + "html_description": "Chat to which the request was sent", + "rst_description": "Chat to which the request was sent\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "User that sent the join request", + "html_description": "User that sent the join request", + "rst_description": "User that sent the join request\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "Date the request was sent in Unix time", + "html_description": "Date the request was sent in Unix time", + "rst_description": "Date the request was sent in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "String", + "description": "Bio of the user.", + "html_description": "Optional. Bio of the user.", + "rst_description": "*Optional*. Bio of the user.\n", + "name": "bio", + "required": false + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link that was used by the user to send the join request", + "html_description": "Optional. Chat invite link that was used by the user to send the join request", + "rst_description": "*Optional*. Chat invite link that was used by the user to send the join request\n", + "name": "invite_link", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatJoinRequest/replace.yml b/.butcher/types/ChatJoinRequest/replace.yml new file mode 100644 index 00000000..9a3a2842 --- /dev/null +++ b/.butcher/types/ChatJoinRequest/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/ChatLocation/entity.json b/.butcher/types/ChatLocation/entity.json new file mode 100644 index 00000000..02db74b8 --- /dev/null +++ b/.butcher/types/ChatLocation/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatlocation", + "name": "ChatLocation", + "description": "Represents a location to which a chat is connected.", + "html_description": "

Represents a location to which a chat is connected.

", + "rst_description": "Represents a location to which a chat is connected.", + "annotations": [ + { + "type": "Location", + "description": "The location to which the supergroup is connected. Can't be a live location.", + "html_description": "The location to which the supergroup is connected. Can't be a live location.", + "rst_description": "The location to which the supergroup is connected. Can't be a live location.\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Location address; 1-64 characters, as defined by the chat owner", + "html_description": "Location address; 1-64 characters, as defined by the chat owner", + "rst_description": "Location address; 1-64 characters, as defined by the chat owner\n", + "name": "address", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMember/entity.json b/.butcher/types/ChatMember/entity.json new file mode 100644 index 00000000..1aaccd38 --- /dev/null +++ b/.butcher/types/ChatMember/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmember", + "name": "ChatMember", + "description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n - ChatMemberOwner\n - ChatMemberAdministrator\n - ChatMemberMember\n - ChatMemberRestricted\n - ChatMemberLeft\n - ChatMemberBanned", + "html_description": "

This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:

", + "rst_description": "This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:\n\n - :class:`aiogram.types.chat_member_owner.ChatMemberOwner`\n - :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator`\n - :class:`aiogram.types.chat_member_member.ChatMemberMember`\n - :class:`aiogram.types.chat_member_restricted.ChatMemberRestricted`\n - :class:`aiogram.types.chat_member_left.ChatMemberLeft`\n - :class:`aiogram.types.chat_member_banned.ChatMemberBanned`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/ChatMember/extend.yml b/.butcher/types/ChatMember/extend.yml new file mode 100644 index 00000000..01ef4960 --- /dev/null +++ b/.butcher/types/ChatMember/extend.yml @@ -0,0 +1,27 @@ +define: + - type: "String" + description: "The member's status in the chat" + html_description: "The member's status in the chat" + rst_description: "The member's status in the chat" + name: "status" + required: true + +clone: + - ChatMemberOwner: + exclude: + - status + - ChatMemberAdministrator: + exclude: + - status + - ChatMemberMember: + exclude: + - status + - ChatMemberRestricted: + exclude: + - status + - ChatMemberLeft: + exclude: + - status + - ChatMemberBanned: + exclude: + - status diff --git a/.butcher/types/ChatMember/replace.yml b/.butcher/types/ChatMember/replace.yml new file mode 100644 index 00000000..0af85473 --- /dev/null +++ b/.butcher/types/ChatMember/replace.yml @@ -0,0 +1,5 @@ +annotations: + until_date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json new file mode 100644 index 00000000..b6e6bd2e --- /dev/null +++ b/.butcher/types/ChatMemberAdministrator/entity.json @@ -0,0 +1,147 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberadministrator", + "name": "ChatMemberAdministrator", + "description": "Represents a chat member that has some additional privileges.", + "html_description": "

Represents a chat member that has some additional privileges.

", + "rst_description": "Represents a `chat member `_ that has some additional privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'administrator'", + "html_description": "The member's status in the chat, always “administrator”", + "rst_description": "The member's status in the chat, always 'administrator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the bot is allowed to edit administrator privileges of that user", + "html_description": "True, if the bot is allowed to edit administrator privileges of that user", + "rst_description": ":code:`True`, if the bot is allowed to edit administrator privileges of that user\n", + "name": "can_be_edited", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "html_description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n", + "name": "can_manage_chat", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can delete messages of other users", + "html_description": "True, if the administrator can delete messages of other users", + "rst_description": ":code:`True`, if the administrator can delete messages of other users\n", + "name": "can_delete_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can manage video chats", + "html_description": "True, if the administrator can manage video chats", + "rst_description": ":code:`True`, if the administrator can manage video chats\n", + "name": "can_manage_video_chats", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can restrict, ban or unban chat members", + "html_description": "True, if the administrator can restrict, ban or unban chat members", + "rst_description": ":code:`True`, if the administrator can restrict, ban or unban chat members\n", + "name": "can_restrict_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "html_description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)", + "rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", + "name": "can_promote_members", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the administrator can post in the channel; channels only", + "html_description": "Optional. True, if the administrator can post in the channel; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n", + "name": "can_post_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "html_description": "Optional. True, if the administrator can edit messages of other users and can pin messages; channels only", + "rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only\n", + "name": "can_edit_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages; groups and supergroups only", + "html_description": "Optional. True, if the user is allowed to pin messages; groups and supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "html_description": "Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only\n", + "name": "can_manage_topics", + "required": false + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberAdministrator/replace.yml b/.butcher/types/ChatMemberAdministrator/replace.yml new file mode 100644 index 00000000..619942cd --- /dev/null +++ b/.butcher/types/ChatMemberAdministrator/replace.yml @@ -0,0 +1,2 @@ +bases: + - ChatMember diff --git a/.butcher/types/ChatMemberBanned/entity.json b/.butcher/types/ChatMemberBanned/entity.json new file mode 100644 index 00000000..95f50234 --- /dev/null +++ b/.butcher/types/ChatMemberBanned/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberbanned", + "name": "ChatMemberBanned", + "description": "Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.", + "html_description": "

Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.

", + "rst_description": "Represents a `chat member `_ that was banned in the chat and can't return to the chat or view chat messages.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'kicked'", + "html_description": "The member's status in the chat, always “kicked”", + "rst_description": "The member's status in the chat, always 'kicked'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever", + "html_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever", + "rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberBanned/replace.yml b/.butcher/types/ChatMemberBanned/replace.yml new file mode 100644 index 00000000..6a3882af --- /dev/null +++ b/.butcher/types/ChatMemberBanned/replace.yml @@ -0,0 +1,7 @@ +bases: + - ChatMember +annotations: + until_date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/ChatMemberLeft/entity.json b/.butcher/types/ChatMemberLeft/entity.json new file mode 100644 index 00000000..f9754ded --- /dev/null +++ b/.butcher/types/ChatMemberLeft/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberleft", + "name": "ChatMemberLeft", + "description": "Represents a chat member that isn't currently a member of the chat, but may join it themselves.", + "html_description": "

Represents a chat member that isn't currently a member of the chat, but may join it themselves.

", + "rst_description": "Represents a `chat member `_ that isn't currently a member of the chat, but may join it themselves.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'left'", + "html_description": "The member's status in the chat, always “left”", + "rst_description": "The member's status in the chat, always 'left'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberLeft/replace.yml b/.butcher/types/ChatMemberLeft/replace.yml new file mode 100644 index 00000000..619942cd --- /dev/null +++ b/.butcher/types/ChatMemberLeft/replace.yml @@ -0,0 +1,2 @@ +bases: + - ChatMember diff --git a/.butcher/types/ChatMemberMember/entity.json b/.butcher/types/ChatMemberMember/entity.json new file mode 100644 index 00000000..43f9cab2 --- /dev/null +++ b/.butcher/types/ChatMemberMember/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmembermember", + "name": "ChatMemberMember", + "description": "Represents a chat member that has no additional privileges or restrictions.", + "html_description": "

Represents a chat member that has no additional privileges or restrictions.

", + "rst_description": "Represents a `chat member `_ that has no additional privileges or restrictions.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'member'", + "html_description": "The member's status in the chat, always “member”", + "rst_description": "The member's status in the chat, always 'member'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberMember/replace.yml b/.butcher/types/ChatMemberMember/replace.yml new file mode 100644 index 00000000..619942cd --- /dev/null +++ b/.butcher/types/ChatMemberMember/replace.yml @@ -0,0 +1,2 @@ +bases: + - ChatMember diff --git a/.butcher/types/ChatMemberOwner/entity.json b/.butcher/types/ChatMemberOwner/entity.json new file mode 100644 index 00000000..7a9c439e --- /dev/null +++ b/.butcher/types/ChatMemberOwner/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberowner", + "name": "ChatMemberOwner", + "description": "Represents a chat member that owns the chat and has all administrator privileges.", + "html_description": "

Represents a chat member that owns the chat and has all administrator privileges.

", + "rst_description": "Represents a `chat member `_ that owns the chat and has all administrator privileges.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'creator'", + "html_description": "The member's status in the chat, always “creator”", + "rst_description": "The member's status in the chat, always 'creator'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user's presence in the chat is hidden", + "html_description": "True, if the user's presence in the chat is hidden", + "rst_description": ":code:`True`, if the user's presence in the chat is hidden\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Custom title for this user", + "html_description": "Optional. Custom title for this user", + "rst_description": "*Optional*. Custom title for this user\n", + "name": "custom_title", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberOwner/replace.yml b/.butcher/types/ChatMemberOwner/replace.yml new file mode 100644 index 00000000..619942cd --- /dev/null +++ b/.butcher/types/ChatMemberOwner/replace.yml @@ -0,0 +1,2 @@ +bases: + - ChatMember diff --git a/.butcher/types/ChatMemberRestricted/entity.json b/.butcher/types/ChatMemberRestricted/entity.json new file mode 100644 index 00000000..f582df2f --- /dev/null +++ b/.butcher/types/ChatMemberRestricted/entity.json @@ -0,0 +1,123 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberrestricted", + "name": "ChatMemberRestricted", + "description": "Represents a chat member that is under certain restrictions in the chat. Supergroups only.", + "html_description": "

Represents a chat member that is under certain restrictions in the chat. Supergroups only.

", + "rst_description": "Represents a `chat member `_ that is under certain restrictions in the chat. Supergroups only.", + "annotations": [ + { + "type": "String", + "description": "The member's status in the chat, always 'restricted'", + "html_description": "The member's status in the chat, always “restricted”", + "rst_description": "The member's status in the chat, always 'restricted'\n", + "name": "status", + "required": true + }, + { + "type": "User", + "description": "Information about the user", + "html_description": "Information about the user", + "rst_description": "Information about the user\n", + "name": "user", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is a member of the chat at the moment of the request", + "html_description": "True, if the user is a member of the chat at the moment of the request", + "rst_description": ":code:`True`, if the user is a member of the chat at the moment of the request\n", + "name": "is_member", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings", + "html_description": "True, if the user is allowed to change the chat title, photo and other settings", + "rst_description": ":code:`True`, if the user is allowed to change the chat title, photo and other settings\n", + "name": "can_change_info", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "True, if the user is allowed to invite new users to the chat", + "rst_description": ":code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages", + "html_description": "True, if the user is allowed to pin messages", + "rst_description": ":code:`True`, if the user is allowed to pin messages\n", + "name": "can_pin_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics", + "html_description": "True, if the user is allowed to create forum topics", + "rst_description": ":code:`True`, if the user is allowed to create forum topics\n", + "name": "can_manage_topics", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, locations and venues", + "html_description": "True, if the user is allowed to send text messages, contacts, locations and venues", + "rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n", + "name": "can_send_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes", + "html_description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes", + "rst_description": ":code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes\n", + "name": "can_send_media_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send polls", + "html_description": "True, if the user is allowed to send polls", + "rst_description": ":code:`True`, if the user is allowed to send polls\n", + "name": "can_send_polls", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n", + "name": "can_send_other_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "True, if the user is allowed to add web page previews to their messages", + "rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n", + "name": "can_add_web_page_previews", + "required": true + }, + { + "type": "Integer", + "description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever", + "html_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever", + "rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever\n", + "name": "until_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberRestricted/replace.yml b/.butcher/types/ChatMemberRestricted/replace.yml new file mode 100644 index 00000000..6a3882af --- /dev/null +++ b/.butcher/types/ChatMemberRestricted/replace.yml @@ -0,0 +1,7 @@ +bases: + - ChatMember +annotations: + until_date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/ChatMemberUpdated/entity.json b/.butcher/types/ChatMemberUpdated/entity.json new file mode 100644 index 00000000..4bd3bc15 --- /dev/null +++ b/.butcher/types/ChatMemberUpdated/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatmemberupdated", + "name": "ChatMemberUpdated", + "description": "This object represents changes in the status of a chat member.", + "html_description": "

This object represents changes in the status of a chat member.

", + "rst_description": "This object represents changes in the status of a chat member.", + "annotations": [ + { + "type": "Chat", + "description": "Chat the user belongs to", + "html_description": "Chat the user belongs to", + "rst_description": "Chat the user belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "Performer of the action, which resulted in the change", + "html_description": "Performer of the action, which resulted in the change", + "rst_description": "Performer of the action, which resulted in the change\n", + "name": "from", + "required": true + }, + { + "type": "Integer", + "description": "Date the change was done in Unix time", + "html_description": "Date the change was done in Unix time", + "rst_description": "Date the change was done in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "ChatMember", + "description": "Previous information about the chat member", + "html_description": "Previous information about the chat member", + "rst_description": "Previous information about the chat member\n", + "name": "old_chat_member", + "required": true + }, + { + "type": "ChatMember", + "description": "New information about the chat member", + "html_description": "New information about the chat member", + "rst_description": "New information about the chat member\n", + "name": "new_chat_member", + "required": true + }, + { + "type": "ChatInviteLink", + "description": "Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "html_description": "Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "rst_description": "*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.\n", + "name": "invite_link", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatMemberUpdated/replace.yml b/.butcher/types/ChatMemberUpdated/replace.yml new file mode 100644 index 00000000..66c1b64c --- /dev/null +++ b/.butcher/types/ChatMemberUpdated/replace.yml @@ -0,0 +1,34 @@ +annotations: + date: + parsed_type: + type: std + name: datetime.datetime + old_chat_member: &chat-member-type + parsed_type: + type: union + items: + - type: entity + references: + category: types + name: ChatMemberOwner + - type: entity + references: + category: types + name: ChatMemberAdministrator + - type: entity + references: + category: types + name: ChatMemberMember + - type: entity + references: + category: types + name: ChatMemberRestricted + - type: entity + references: + category: types + name: ChatMemberLeft + - type: entity + references: + category: types + name: ChatMemberBanned + new_chat_member: *chat-member-type diff --git a/.butcher/types/ChatPermissions/entity.json b/.butcher/types/ChatPermissions/entity.json new file mode 100644 index 00000000..0d7d2548 --- /dev/null +++ b/.butcher/types/ChatPermissions/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatpermissions", + "name": "ChatPermissions", + "description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "html_description": "

Describes actions that a non-administrator user is allowed to take in a chat.

", + "rst_description": "Describes actions that a non-administrator user is allowed to take in a chat.", + "annotations": [ + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, locations and venues", + "html_description": "Optional. True, if the user is allowed to send text messages, contacts, locations and venues", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n", + "name": "can_send_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages", + "html_description": "Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages\n", + "name": "can_send_media_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send polls, implies can_send_messages", + "html_description": "Optional. True, if the user is allowed to send polls, implies can_send_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls, implies can_send_messages\n", + "name": "can_send_polls", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages", + "html_description": "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages\n", + "name": "can_send_other_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages", + "html_description": "Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages, implies can_send_media_messages\n", + "name": "can_add_web_page_previews", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", + "html_description": "Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups\n", + "name": "can_change_info", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to invite new users to the chat", + "html_description": "Optional. True, if the user is allowed to invite new users to the chat", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to invite new users to the chat\n", + "name": "can_invite_users", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to pin messages. Ignored in public supergroups", + "html_description": "Optional. True, if the user is allowed to pin messages. Ignored in public supergroups", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored in public supergroups\n", + "name": "can_pin_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "html_description": "Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages\n", + "name": "can_manage_topics", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChatPermissions/replace.yml b/.butcher/types/ChatPermissions/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/ChatPermissions/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/ChatPhoto/entity.json b/.butcher/types/ChatPhoto/entity.json new file mode 100644 index 00000000..eefcb188 --- /dev/null +++ b/.butcher/types/ChatPhoto/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatphoto", + "name": "ChatPhoto", + "description": "This object represents a chat photo.", + "html_description": "

This object represents a chat photo.

", + "rst_description": "This object represents a chat photo.", + "annotations": [ + { + "type": "String", + "description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "small_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "small_file_unique_id", + "required": true + }, + { + "type": "String", + "description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "html_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.", + "rst_description": "File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.\n", + "name": "big_file_id", + "required": true + }, + { + "type": "String", + "description": "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "big_file_unique_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ChosenInlineResult/entity.json b/.butcher/types/ChosenInlineResult/entity.json new file mode 100644 index 00000000..d3df812c --- /dev/null +++ b/.butcher/types/ChosenInlineResult/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "choseninlineresult", + "name": "ChosenInlineResult", + "description": "Represents a result of an inline query that was chosen by the user and sent to their chat partner.\nNote: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.", + "html_description": "

Represents a result of an inline query that was chosen by the user and sent to their chat partner.

Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.

", + "rst_description": "Represents a `result `_ of an inline query that was chosen by the user and sent to their chat partner.\n**Note:** It is necessary to enable `inline feedback `_ via `@BotFather `_ in order to receive these objects in updates.", + "annotations": [ + { + "type": "String", + "description": "The unique identifier for the result that was chosen", + "html_description": "The unique identifier for the result that was chosen", + "rst_description": "The unique identifier for the result that was chosen\n", + "name": "result_id", + "required": true + }, + { + "type": "User", + "description": "The user that chose the result", + "html_description": "The user that chose the result", + "rst_description": "The user that chose the result\n", + "name": "from", + "required": true + }, + { + "type": "Location", + "description": "Sender location, only for bots that require user location", + "html_description": "Optional. Sender location, only for bots that require user location", + "rst_description": "*Optional*. Sender location, only for bots that require user location\n", + "name": "location", + "required": false + }, + { + "type": "String", + "description": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.", + "html_description": "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.", + "rst_description": "*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message. Will be also received in `callback queries `_ and can be used to `edit `_ the message.\n", + "name": "inline_message_id", + "required": false + }, + { + "type": "String", + "description": "The query that was used to obtain the result", + "html_description": "The query that was used to obtain the result", + "rst_description": "The query that was used to obtain the result\n", + "name": "query", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Contact/entity.json b/.butcher/types/Contact/entity.json new file mode 100644 index 00000000..95081fb0 --- /dev/null +++ b/.butcher/types/Contact/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "contact", + "name": "Contact", + "description": "This object represents a phone contact.", + "html_description": "

This object represents a phone contact.

", + "rst_description": "This object represents a phone contact.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "Integer", + "description": "Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "user_id", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard", + "html_description": "Optional. Additional data about the contact in the form of a vCard", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_\n", + "name": "vcard", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Dice/entity.json b/.butcher/types/Dice/entity.json new file mode 100644 index 00000000..1302cb88 --- /dev/null +++ b/.butcher/types/Dice/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "dice", + "name": "Dice", + "description": "This object represents an animated emoji that displays a random value.", + "html_description": "

This object represents an animated emoji that displays a random value.

", + "rst_description": "This object represents an animated emoji that displays a random value.", + "annotations": [ + { + "type": "String", + "description": "Emoji on which the dice throw animation is based", + "html_description": "Emoji on which the dice throw animation is based", + "rst_description": "Emoji on which the dice throw animation is based\n", + "name": "emoji", + "required": true + }, + { + "type": "Integer", + "description": "Value of the dice, 1-6 for '', '' and '' base emoji, 1-5 for '' and '' base emoji, 1-64 for '' base emoji", + "html_description": "Value of the dice, 1-6 for “\"🎲\"/”, “\"🎯\"/” and “\"🎳\"/” base emoji, 1-5 for “\"🏀\"/” and “\"⚽\"/” base emoji, 1-64 for “\"🎰\"/” base emoji", + "rst_description": "Value of the dice, 1-6 for '๐ŸŽฒ', '๐ŸŽฏ' and '๐ŸŽณ' base emoji, 1-5 for '๐Ÿ€' and 'โšฝ' base emoji, 1-64 for '๐ŸŽฐ' base emoji\n", + "name": "value", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Document/entity.json b/.butcher/types/Document/entity.json new file mode 100644 index 00000000..65e0386d --- /dev/null +++ b/.butcher/types/Document/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "document", + "name": "Document", + "description": "This object represents a general file (as opposed to photos, voice messages and audio files).", + "html_description": "

This object represents a general file (as opposed to photos, voice messages and audio files).

", + "rst_description": "This object represents a general file (as opposed to `photos `_, `voice messages `_ and `audio files `_).", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "PhotoSize", + "description": "Document thumbnail as defined by sender", + "html_description": "Optional. Document thumbnail as defined by sender", + "rst_description": "*Optional*. Document thumbnail as defined by sender\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by sender", + "html_description": "Optional. Original filename as defined by sender", + "rst_description": "*Optional*. Original filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/EncryptedCredentials/entity.json b/.butcher/types/EncryptedCredentials/entity.json new file mode 100644 index 00000000..906910b7 --- /dev/null +++ b/.butcher/types/EncryptedCredentials/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "encryptedcredentials", + "name": "EncryptedCredentials", + "description": "Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.", + "html_description": "

Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.

", + "rst_description": "Describes data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes.", + "annotations": [ + { + "type": "String", + "description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "html_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication", + "rst_description": "Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement` decryption and authentication\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash for data authentication", + "html_description": "Base64-encoded data hash for data authentication", + "rst_description": "Base64-encoded data hash for data authentication\n", + "name": "hash", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "html_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption", + "rst_description": "Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption\n", + "name": "secret", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/EncryptedPassportElement/entity.json b/.butcher/types/EncryptedPassportElement/entity.json new file mode 100644 index 00000000..c098c209 --- /dev/null +++ b/.butcher/types/EncryptedPassportElement/entity.json @@ -0,0 +1,99 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "encryptedpassportelement", + "name": "EncryptedPassportElement", + "description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "html_description": "

Describes documents or other Telegram Passport elements shared with the bot by the user.

", + "rst_description": "Describes documents or other Telegram Passport elements shared with the bot by the user.", + "annotations": [ + { + "type": "String", + "description": "Element type. One of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration', 'phone_number', 'email'.", + "html_description": "Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.", + "rst_description": "Element type. One of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration', 'phone_number', 'email'.\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "data", + "required": false + }, + { + "type": "String", + "description": "User's verified phone number, available only for 'phone_number' type", + "html_description": "Optional. User's verified phone number, available only for “phone_number” type", + "rst_description": "*Optional*. User's verified phone number, available only for 'phone_number' type\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User's verified email address, available only for 'email' type", + "html_description": "Optional. User's verified email address, available only for “email” type", + "rst_description": "*Optional*. User's verified email address, available only for 'email' type\n", + "name": "email", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "files", + "required": false + }, + { + "type": "PassportFile", + "description": "Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "front_side", + "required": false + }, + { + "type": "PassportFile", + "description": "Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "reverse_side", + "required": false + }, + { + "type": "PassportFile", + "description": "Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "selfie", + "required": false + }, + { + "type": "Array of PassportFile", + "description": "Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "html_description": "Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.", + "rst_description": "*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n", + "name": "translation", + "required": false + }, + { + "type": "String", + "description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "html_description": "Base64-encoded element hash for using in PassportElementErrorUnspecified", + "rst_description": "Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`\n", + "name": "hash", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/File/entity.json b/.butcher/types/File/entity.json new file mode 100644 index 00000000..22170036 --- /dev/null +++ b/.butcher/types/File/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "file", + "name": "File", + "description": "This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.\nThe maximum file size to download is 20 MB", + "html_description": "

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.

\n

The maximum file size to download is 20 MB

\n
", + "rst_description": "This object represents a file ready to be downloaded. The file can be downloaded via the link :code:`https://api.telegram.org/file/bot/`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile`.\n\n The maximum file size to download is 20 MB", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + }, + { + "type": "String", + "description": "File path. Use https://api.telegram.org/file/bot/ to get the file.", + "html_description": "Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.", + "rst_description": "*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.\n", + "name": "file_path", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ForceReply/entity.json b/.butcher/types/ForceReply/entity.json new file mode 100644 index 00000000..679e8606 --- /dev/null +++ b/.butcher/types/ForceReply/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forcereply", + "name": "ForceReply", + "description": "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.\nExample: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n\nExplain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\nGuide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\nThe last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "html_description": "

Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.

\n

Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:

\n
    \n
  • Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.
  • \n
  • Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.
  • \n
\n

The last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.

\n
", + "rst_description": "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice `privacy mode `_.\n\n **Example:** A `poll bot `_ for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:\n \n - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.\n - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.\n \n The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.", + "annotations": [ + { + "type": "True", + "description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "html_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'", + "rst_description": "Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'\n", + "name": "force_reply", + "required": true + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the reply is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.", + "html_description": "Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.", + "rst_description": "*Optional*. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ForceReply/replace.yml b/.butcher/types/ForceReply/replace.yml new file mode 100644 index 00000000..f84465de --- /dev/null +++ b/.butcher/types/ForceReply/replace.yml @@ -0,0 +1,5 @@ +bases: + - MutableTelegramObject +annotations: + force_reply: + const: "True" diff --git a/.butcher/types/ForumTopic/entity.json b/.butcher/types/ForumTopic/entity.json new file mode 100644 index 00000000..4dabd630 --- /dev/null +++ b/.butcher/types/ForumTopic/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopic", + "name": "ForumTopic", + "description": "This object represents a forum topic.", + "html_description": "

This object represents a forum topic.

", + "rst_description": "This object represents a forum topic.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier of the forum topic", + "html_description": "Unique identifier of the forum topic", + "rst_description": "Unique identifier of the forum topic\n", + "name": "message_thread_id", + "required": true + }, + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ForumTopicClosed/entity.json b/.butcher/types/ForumTopicClosed/entity.json new file mode 100644 index 00000000..4b54cd59 --- /dev/null +++ b/.butcher/types/ForumTopicClosed/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopicclosed", + "name": "ForumTopicClosed", + "description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic closed in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/ForumTopicCreated/entity.json b/.butcher/types/ForumTopicCreated/entity.json new file mode 100644 index 00000000..16b90aeb --- /dev/null +++ b/.butcher/types/ForumTopicCreated/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopiccreated", + "name": "ForumTopicCreated", + "description": "This object represents a service message about a new forum topic created in the chat.", + "html_description": "

This object represents a service message about a new forum topic created in the chat.

", + "rst_description": "This object represents a service message about a new forum topic created in the chat.", + "annotations": [ + { + "type": "String", + "description": "Name of the topic", + "html_description": "Name of the topic", + "rst_description": "Name of the topic\n", + "name": "name", + "required": true + }, + { + "type": "Integer", + "description": "Color of the topic icon in RGB format", + "html_description": "Color of the topic icon in RGB format", + "rst_description": "Color of the topic icon in RGB format\n", + "name": "icon_color", + "required": true + }, + { + "type": "String", + "description": "Unique identifier of the custom emoji shown as the topic icon", + "html_description": "Optional. Unique identifier of the custom emoji shown as the topic icon", + "rst_description": "*Optional*. Unique identifier of the custom emoji shown as the topic icon\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ForumTopicReopened/entity.json b/.butcher/types/ForumTopicReopened/entity.json new file mode 100644 index 00000000..6b701c95 --- /dev/null +++ b/.butcher/types/ForumTopicReopened/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopicreopened", + "name": "ForumTopicReopened", + "description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a forum topic reopened in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a forum topic reopened in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/Game/entity.json b/.butcher/types/Game/entity.json new file mode 100644 index 00000000..9a0ebe64 --- /dev/null +++ b/.butcher/types/Game/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "game", + "name": "Game", + "description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "html_description": "

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

", + "rst_description": "This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.", + "annotations": [ + { + "type": "String", + "description": "Title of the game", + "html_description": "Title of the game", + "rst_description": "Title of the game\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Description of the game", + "html_description": "Description of the game", + "rst_description": "Description of the game\n", + "name": "description", + "required": true + }, + { + "type": "Array of PhotoSize", + "description": "Photo that will be displayed in the game message in chats.", + "html_description": "Photo that will be displayed in the game message in chats.", + "rst_description": "Photo that will be displayed in the game message in chats.\n", + "name": "photo", + "required": true + }, + { + "type": "String", + "description": "Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "html_description": "Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.", + "rst_description": "*Optional*. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls :class:`aiogram.methods.set_game_score.SetGameScore`, or manually edited using :class:`aiogram.methods.edit_message_text.EditMessageText`. 0-4096 characters.\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "html_description": "Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.", + "rst_description": "*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.\n", + "name": "text_entities", + "required": false + }, + { + "type": "Animation", + "description": "Animation that will be displayed in the game message in chats. Upload via BotFather", + "html_description": "Optional. Animation that will be displayed in the game message in chats. Upload via BotFather", + "rst_description": "*Optional*. Animation that will be displayed in the game message in chats. Upload via `BotFather `_\n", + "name": "animation", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/GameHighScore/entity.json b/.butcher/types/GameHighScore/entity.json new file mode 100644 index 00000000..291fc839 --- /dev/null +++ b/.butcher/types/GameHighScore/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Games", + "anchor": "games" + }, + "object": { + "anchor": "gamehighscore", + "name": "GameHighScore", + "description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\nIf you've got any questions, please check out our Bot FAQ", + "html_description": "

This object represents one row of the high scores table for a game.

And that's about all we've got for now.
\nIf you've got any questions, please check out our Bot FAQ »

", + "rst_description": "This object represents one row of the high scores table for a game.\nAnd that's about all we've got for now.\n\nIf you've got any questions, please check out our `https://core.telegram.org/bots/faq `_ **Bot FAQ ยป**", + "annotations": [ + { + "type": "Integer", + "description": "Position in high score table for the game", + "html_description": "Position in high score table for the game", + "rst_description": "Position in high score table for the game\n", + "name": "position", + "required": true + }, + { + "type": "User", + "description": "User", + "html_description": "User", + "rst_description": "User\n", + "name": "user", + "required": true + }, + { + "type": "Integer", + "description": "Score", + "html_description": "Score", + "rst_description": "Score\n", + "name": "score", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineKeyboardButton/entity.json b/.butcher/types/InlineKeyboardButton/entity.json new file mode 100644 index 00000000..3b243461 --- /dev/null +++ b/.butcher/types/InlineKeyboardButton/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inlinekeyboardbutton", + "name": "InlineKeyboardButton", + "description": "This object represents one button of an inline keyboard. You must use exactly one of the optional fields.", + "html_description": "

This object represents one button of an inline keyboard. You must use exactly one of the optional fields.

", + "rst_description": "This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields.", + "annotations": [ + { + "type": "String", + "description": "Label text on the button", + "html_description": "Label text on the button", + "rst_description": "Label text on the button\n", + "name": "text", + "required": true + }, + { + "type": "String", + "description": "HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.", + "html_description": "Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.", + "rst_description": "*Optional*. HTTP or tg:// URL to be opened when the button is pressed. Links :code:`tg://user?id=` can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.\n", + "name": "url", + "required": false + }, + { + "type": "String", + "description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", + "html_description": "Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", + "rst_description": "*Optional*. Data to be sent in a `callback query `_ to the bot when button is pressed, 1-64 bytes\n", + "name": "callback_data", + "required": false + }, + { + "type": "WebAppInfo", + "description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.", + "html_description": "Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.", + "rst_description": "*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Available only in private chats between a user and the bot.\n", + "name": "web_app", + "required": false + }, + { + "type": "LoginUrl", + "description": "An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "html_description": "Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.", + "rst_description": "*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.\n", + "name": "login_url", + "required": false + }, + { + "type": "String", + "description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.\n\nNote: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pmโ€ฆ actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.", + "html_description": "Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.
\n
\nNote: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.", + "rst_description": "*Optional*. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted.\n\n\n\n**Note:** This offers an easy way for users to start using your bot in `inline mode `_ when they are currently in a private chat with it. Especially useful when combined with `https://core.telegram.org/bots/api#answerinlinequery `_ *switch_pmโ€ฆ* actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.\n", + "name": "switch_inline_query", + "required": false + }, + { + "type": "String", + "description": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.", + "html_description": "Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.
\n
\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.", + "rst_description": "*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.\n\n\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.\n", + "name": "switch_inline_query_current_chat", + "required": false + }, + { + "type": "CallbackGame", + "description": "Description of the game that will be launched when the user presses the button.\n\nNOTE: This type of button must always be the first button in the first row.", + "html_description": "Optional. Description of the game that will be launched when the user presses the button.
\n
\nNOTE: This type of button must always be the first button in the first row.", + "rst_description": "*Optional*. Description of the game that will be launched when the user presses the button.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row.\n", + "name": "callback_game", + "required": false + }, + { + "type": "Boolean", + "description": "Specify True, to send a Pay button.\n\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "html_description": "Optional. Specify True, to send a Pay button.
\n
\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "rst_description": "*Optional*. Specify :code:`True`, to send a `Pay button `_.\n\n\n\n**NOTE:** This type of button **must** always be the first button in the first row and can only be used in invoice messages.\n", + "name": "pay", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineKeyboardButton/replace.yml b/.butcher/types/InlineKeyboardButton/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InlineKeyboardButton/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InlineKeyboardMarkup/entity.json b/.butcher/types/InlineKeyboardMarkup/entity.json new file mode 100644 index 00000000..8e8d3708 --- /dev/null +++ b/.butcher/types/InlineKeyboardMarkup/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inlinekeyboardmarkup", + "name": "InlineKeyboardMarkup", + "description": "This object represents an inline keyboard that appears right next to the message it belongs to.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.", + "html_description": "

This object represents an inline keyboard that appears right next to the message it belongs to.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.

", + "rst_description": "This object represents an `inline keyboard `_ that appears right next to the message it belongs to.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.", + "annotations": [ + { + "type": "Array of Array of InlineKeyboardButton", + "description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of InlineKeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` objects\n", + "name": "inline_keyboard", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineKeyboardMarkup/replace.yml b/.butcher/types/InlineKeyboardMarkup/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InlineKeyboardMarkup/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InlineQuery/entity.json b/.butcher/types/InlineQuery/entity.json new file mode 100644 index 00000000..56284893 --- /dev/null +++ b/.butcher/types/InlineQuery/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequery", + "name": "InlineQuery", + "description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "html_description": "

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

", + "rst_description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.", + "annotations": [ + { + "type": "String", + "description": "Unique identifier for this query", + "html_description": "Unique identifier for this query", + "rst_description": "Unique identifier for this query\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "Sender", + "html_description": "Sender", + "rst_description": "Sender\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Text of the query (up to 256 characters)", + "html_description": "Text of the query (up to 256 characters)", + "rst_description": "Text of the query (up to 256 characters)\n", + "name": "query", + "required": true + }, + { + "type": "String", + "description": "Offset of the results to be returned, can be controlled by the bot", + "html_description": "Offset of the results to be returned, can be controlled by the bot", + "rst_description": "Offset of the results to be returned, can be controlled by the bot\n", + "name": "offset", + "required": true + }, + { + "type": "String", + "description": "Type of the chat from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat", + "html_description": "Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat", + "rst_description": "*Optional*. Type of the chat from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat\n", + "name": "chat_type", + "required": false + }, + { + "type": "Location", + "description": "Sender location, only for bots that request user location", + "html_description": "Optional. Sender location, only for bots that request user location", + "rst_description": "*Optional*. Sender location, only for bots that request user location\n", + "name": "location", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResult/entity.json b/.butcher/types/InlineQueryResult/entity.json new file mode 100644 index 00000000..71c5a3b4 --- /dev/null +++ b/.butcher/types/InlineQueryResult/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresult", + "name": "InlineQueryResult", + "description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n - InlineQueryResultCachedAudio\n - InlineQueryResultCachedDocument\n - InlineQueryResultCachedGif\n - InlineQueryResultCachedMpeg4Gif\n - InlineQueryResultCachedPhoto\n - InlineQueryResultCachedSticker\n - InlineQueryResultCachedVideo\n - InlineQueryResultCachedVoice\n - InlineQueryResultArticle\n - InlineQueryResultAudio\n - InlineQueryResultContact\n - InlineQueryResultGame\n - InlineQueryResultDocument\n - InlineQueryResultGif\n - InlineQueryResultLocation\n - InlineQueryResultMpeg4Gif\n - InlineQueryResultPhoto\n - InlineQueryResultVenue\n - InlineQueryResultVideo\n - InlineQueryResultVoice\nNote: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.", + "html_description": "

This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:

Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.

", + "rst_description": "This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:\n\n - :class:`aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio`\n - :class:`aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument`\n - :class:`aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif`\n - :class:`aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto`\n - :class:`aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker`\n - :class:`aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo`\n - :class:`aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice`\n - :class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle`\n - :class:`aiogram.types.inline_query_result_audio.InlineQueryResultAudio`\n - :class:`aiogram.types.inline_query_result_contact.InlineQueryResultContact`\n - :class:`aiogram.types.inline_query_result_game.InlineQueryResultGame`\n - :class:`aiogram.types.inline_query_result_document.InlineQueryResultDocument`\n - :class:`aiogram.types.inline_query_result_gif.InlineQueryResultGif`\n - :class:`aiogram.types.inline_query_result_location.InlineQueryResultLocation`\n - :class:`aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif`\n - :class:`aiogram.types.inline_query_result_photo.InlineQueryResultPhoto`\n - :class:`aiogram.types.inline_query_result_venue.InlineQueryResultVenue`\n - :class:`aiogram.types.inline_query_result_video.InlineQueryResultVideo`\n - :class:`aiogram.types.inline_query_result_voice.InlineQueryResultVoice`\n\n**Note:** All URLs passed in inline query results will be available to end users and therefore must be assumed to be **public**.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResult/replace.yml b/.butcher/types/InlineQueryResult/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InlineQueryResult/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InlineQueryResultArticle/entity.json b/.butcher/types/InlineQueryResultArticle/entity.json new file mode 100644 index 00000000..93c397e7 --- /dev/null +++ b/.butcher/types/InlineQueryResultArticle/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultarticle", + "name": "InlineQueryResultArticle", + "description": "Represents a link to an article or web page.", + "html_description": "

Represents a link to an article or web page.

", + "rst_description": "Represents a link to an article or web page.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be article", + "html_description": "Type of the result, must be article", + "rst_description": "Type of the result, must be *article*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title of the result", + "html_description": "Title of the result", + "rst_description": "Title of the result\n", + "name": "title", + "required": true + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent", + "html_description": "Content of the message to be sent", + "rst_description": "Content of the message to be sent\n", + "name": "input_message_content", + "required": true + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "String", + "description": "URL of the result", + "html_description": "Optional. URL of the result", + "rst_description": "*Optional*. URL of the result\n", + "name": "url", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you don't want the URL to be shown in the message", + "html_description": "Optional. Pass True if you don't want the URL to be shown in the message", + "rst_description": "*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message\n", + "name": "hide_url", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultArticle/replace.yml b/.butcher/types/InlineQueryResultArticle/replace.yml new file mode 100644 index 00000000..cbe6bc26 --- /dev/null +++ b/.butcher/types/InlineQueryResultArticle/replace.yml @@ -0,0 +1,2 @@ +bases: + - InlineQueryResult diff --git a/.butcher/types/InlineQueryResultAudio/entity.json b/.butcher/types/InlineQueryResultAudio/entity.json new file mode 100644 index 00000000..83170481 --- /dev/null +++ b/.butcher/types/InlineQueryResultAudio/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultaudio", + "name": "InlineQueryResultAudio", + "description": "Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the audio.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the audio file", + "html_description": "A valid URL for the audio file", + "rst_description": "A valid URL for the audio file\n", + "name": "audio_url", + "required": true + }, + { + "type": "String", + "description": "Title", + "html_description": "Title", + "rst_description": "Title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "Performer", + "html_description": "Optional. Performer", + "rst_description": "*Optional*. Performer\n", + "name": "performer", + "required": false + }, + { + "type": "Integer", + "description": "Audio duration in seconds", + "html_description": "Optional. Audio duration in seconds", + "rst_description": "*Optional*. Audio duration in seconds\n", + "name": "audio_duration", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultAudio/replace.yml b/.butcher/types/InlineQueryResultAudio/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultAudio/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultCachedAudio/entity.json b/.butcher/types/InlineQueryResultCachedAudio/entity.json new file mode 100644 index 00000000..ec759647 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedAudio/entity.json @@ -0,0 +1,83 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedaudio", + "name": "InlineQueryResultCachedAudio", + "description": "Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the audio.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the audio file", + "html_description": "A valid file identifier for the audio file", + "rst_description": "A valid file identifier for the audio file\n", + "name": "audio_file_id", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the audio", + "html_description": "Optional. Content of the message to be sent instead of the audio", + "rst_description": "*Optional*. Content of the message to be sent instead of the audio\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedAudio/replace.yml b/.butcher/types/InlineQueryResultCachedAudio/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedAudio/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultCachedDocument/entity.json b/.butcher/types/InlineQueryResultCachedDocument/entity.json new file mode 100644 index 00000000..a00bf785 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedDocument/entity.json @@ -0,0 +1,99 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcacheddocument", + "name": "InlineQueryResultCachedDocument", + "description": "Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the file.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the file", + "html_description": "A valid file identifier for the file", + "rst_description": "A valid file identifier for the file\n", + "name": "document_file_id", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedDocument/replace.yml b/.butcher/types/InlineQueryResultCachedDocument/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedDocument/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultCachedGif/entity.json b/.butcher/types/InlineQueryResultCachedGif/entity.json new file mode 100644 index 00000000..5d18e4cb --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedGif/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedgif", + "name": "InlineQueryResultCachedGif", + "description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the GIF file", + "html_description": "A valid file identifier for the GIF file", + "rst_description": "A valid file identifier for the GIF file\n", + "name": "gif_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedGif/replace.yml b/.butcher/types/InlineQueryResultCachedGif/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedGif/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json new file mode 100644 index 00000000..8dbef2eb --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedmpeg4gif", + "name": "InlineQueryResultCachedMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the MPEG4 file", + "html_description": "A valid file identifier for the MPEG4 file", + "rst_description": "A valid file identifier for the MPEG4 file\n", + "name": "mpeg4_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml b/.butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultCachedPhoto/entity.json b/.butcher/types/InlineQueryResultCachedPhoto/entity.json new file mode 100644 index 00000000..460c3274 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedPhoto/entity.json @@ -0,0 +1,99 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedphoto", + "name": "InlineQueryResultCachedPhoto", + "description": "Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.", + "html_description": "

Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

", + "rst_description": "Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the photo", + "html_description": "A valid file identifier of the photo", + "rst_description": "A valid file identifier of the photo\n", + "name": "photo_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedPhoto/replace.yml b/.butcher/types/InlineQueryResultCachedPhoto/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedPhoto/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultCachedSticker/entity.json b/.butcher/types/InlineQueryResultCachedSticker/entity.json new file mode 100644 index 00000000..7f3f4e47 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedSticker/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedsticker", + "name": "InlineQueryResultCachedSticker", + "description": "Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.\nNote: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.", + "html_description": "

Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.

Note: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.

", + "rst_description": "Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the sticker.\n**Note:** This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for `animated stickers `_. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be sticker", + "html_description": "Type of the result, must be sticker", + "rst_description": "Type of the result, must be *sticker*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier of the sticker", + "html_description": "A valid file identifier of the sticker", + "rst_description": "A valid file identifier of the sticker\n", + "name": "sticker_file_id", + "required": true + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the sticker", + "html_description": "Optional. Content of the message to be sent instead of the sticker", + "rst_description": "*Optional*. Content of the message to be sent instead of the sticker\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedSticker/replace.yml b/.butcher/types/InlineQueryResultCachedSticker/replace.yml new file mode 100644 index 00000000..cbe6bc26 --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedSticker/replace.yml @@ -0,0 +1,2 @@ +bases: + - InlineQueryResult diff --git a/.butcher/types/InlineQueryResultCachedVideo/entity.json b/.butcher/types/InlineQueryResultCachedVideo/entity.json new file mode 100644 index 00000000..c7e60fea --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVideo/entity.json @@ -0,0 +1,99 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedvideo", + "name": "InlineQueryResultCachedVideo", + "description": "Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.", + "html_description": "

Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.

", + "rst_description": "Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the video.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the video file", + "html_description": "A valid file identifier for the video file", + "rst_description": "A valid file identifier for the video file\n", + "name": "video_file_id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video", + "html_description": "Optional. Content of the message to be sent instead of the video", + "rst_description": "*Optional*. Content of the message to be sent instead of the video\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedVideo/replace.yml b/.butcher/types/InlineQueryResultCachedVideo/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVideo/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultCachedVoice/entity.json b/.butcher/types/InlineQueryResultCachedVoice/entity.json new file mode 100644 index 00000000..6dd0ea0d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVoice/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcachedvoice", + "name": "InlineQueryResultCachedVoice", + "description": "Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the voice message.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid file identifier for the voice message", + "html_description": "A valid file identifier for the voice message", + "rst_description": "A valid file identifier for the voice message\n", + "name": "voice_file_id", + "required": true + }, + { + "type": "String", + "description": "Voice message title", + "html_description": "Voice message title", + "rst_description": "Voice message title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice message", + "html_description": "Optional. Content of the message to be sent instead of the voice message", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice message\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultCachedVoice/replace.yml b/.butcher/types/InlineQueryResultCachedVoice/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultCachedVoice/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultContact/entity.json b/.butcher/types/InlineQueryResultContact/entity.json new file mode 100644 index 00000000..3b9b65fa --- /dev/null +++ b/.butcher/types/InlineQueryResultContact/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultcontact", + "name": "InlineQueryResultContact", + "description": "Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the contact.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be contact", + "html_description": "Type of the result, must be contact", + "rst_description": "Type of the result, must be *contact*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the contact", + "html_description": "Optional. Content of the message to be sent instead of the contact", + "rst_description": "*Optional*. Content of the message to be sent instead of the contact\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultContact/replace.yml b/.butcher/types/InlineQueryResultContact/replace.yml new file mode 100644 index 00000000..cbe6bc26 --- /dev/null +++ b/.butcher/types/InlineQueryResultContact/replace.yml @@ -0,0 +1,2 @@ +bases: + - InlineQueryResult diff --git a/.butcher/types/InlineQueryResultDocument/entity.json b/.butcher/types/InlineQueryResultDocument/entity.json new file mode 100644 index 00000000..76a1bb70 --- /dev/null +++ b/.butcher/types/InlineQueryResultDocument/entity.json @@ -0,0 +1,131 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultdocument", + "name": "InlineQueryResultDocument", + "description": "Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "String", + "description": "A valid URL for the file", + "html_description": "A valid URL for the file", + "rst_description": "A valid URL for the file\n", + "name": "document_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'", + "html_description": "MIME type of the content of the file, either “application/pdf” or “application/zip”", + "rst_description": "MIME type of the content of the file, either 'application/pdf' or 'application/zip'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. Inline keyboard attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the file", + "html_description": "Optional. Content of the message to be sent instead of the file", + "rst_description": "*Optional*. Content of the message to be sent instead of the file\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the file", + "html_description": "Optional. URL of the thumbnail (JPEG only) for the file", + "rst_description": "*Optional*. URL of the thumbnail (JPEG only) for the file\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultDocument/replace.yml b/.butcher/types/InlineQueryResultDocument/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultDocument/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultGame/entity.json b/.butcher/types/InlineQueryResultGame/entity.json new file mode 100644 index 00000000..00728d78 --- /dev/null +++ b/.butcher/types/InlineQueryResultGame/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultgame", + "name": "InlineQueryResultGame", + "description": "Represents a Game.\nNote: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.", + "html_description": "

Represents a Game.

Note: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.

", + "rst_description": "Represents a `Game `_.\n**Note:** This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be game", + "html_description": "Type of the result, must be game", + "rst_description": "Type of the result, must be *game*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Short name of the game", + "html_description": "Short name of the game", + "rst_description": "Short name of the game\n", + "name": "game_short_name", + "required": true + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultGame/replace.yml b/.butcher/types/InlineQueryResultGame/replace.yml new file mode 100644 index 00000000..cbe6bc26 --- /dev/null +++ b/.butcher/types/InlineQueryResultGame/replace.yml @@ -0,0 +1,2 @@ +bases: + - InlineQueryResult diff --git a/.butcher/types/InlineQueryResultGif/entity.json b/.butcher/types/InlineQueryResultGif/entity.json new file mode 100644 index 00000000..89f56afc --- /dev/null +++ b/.butcher/types/InlineQueryResultGif/entity.json @@ -0,0 +1,131 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultgif", + "name": "InlineQueryResultGif", + "description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be gif", + "html_description": "Type of the result, must be gif", + "rst_description": "Type of the result, must be *gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the GIF file. File size must not exceed 1MB", + "html_description": "A valid URL for the GIF file. File size must not exceed 1MB", + "rst_description": "A valid URL for the GIF file. File size must not exceed 1MB\n", + "name": "gif_url", + "required": true + }, + { + "type": "Integer", + "description": "Width of the GIF", + "html_description": "Optional. Width of the GIF", + "rst_description": "*Optional*. Width of the GIF\n", + "name": "gif_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the GIF", + "html_description": "Optional. Height of the GIF", + "rst_description": "*Optional*. Height of the GIF\n", + "name": "gif_height", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the GIF in seconds", + "html_description": "Optional. Duration of the GIF in seconds", + "rst_description": "*Optional*. Duration of the GIF in seconds\n", + "name": "gif_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumb_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumb_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the GIF animation", + "html_description": "Optional. Content of the message to be sent instead of the GIF animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the GIF animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultGif/replace.yml b/.butcher/types/InlineQueryResultGif/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultGif/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultLocation/entity.json b/.butcher/types/InlineQueryResultLocation/entity.json new file mode 100644 index 00000000..7f14565f --- /dev/null +++ b/.butcher/types/InlineQueryResultLocation/entity.json @@ -0,0 +1,131 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultlocation", + "name": "InlineQueryResultLocation", + "description": "Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the location.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be location", + "html_description": "Type of the result, must be location", + "rst_description": "Type of the result, must be *location*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "Float number", + "description": "Location latitude in degrees", + "html_description": "Location latitude in degrees", + "rst_description": "Location latitude in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float number", + "description": "Location longitude in degrees", + "html_description": "Location longitude in degrees", + "rst_description": "Location longitude in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Location title", + "html_description": "Location title", + "rst_description": "Location title\n", + "name": "title", + "required": true + }, + { + "type": "Float number", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", + "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", + "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the location", + "html_description": "Optional. Content of the message to be sent instead of the location", + "rst_description": "*Optional*. Content of the message to be sent instead of the location\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultLocation/replace.yml b/.butcher/types/InlineQueryResultLocation/replace.yml new file mode 100644 index 00000000..cbe6bc26 --- /dev/null +++ b/.butcher/types/InlineQueryResultLocation/replace.yml @@ -0,0 +1,2 @@ +bases: + - InlineQueryResult diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json new file mode 100644 index 00000000..27ebd1e3 --- /dev/null +++ b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json @@ -0,0 +1,131 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultmpeg4gif", + "name": "InlineQueryResultMpeg4Gif", + "description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.", + "html_description": "

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.

", + "rst_description": "Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be mpeg4_gif", + "html_description": "Type of the result, must be mpeg4_gif", + "rst_description": "Type of the result, must be *mpeg4_gif*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", + "html_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB", + "rst_description": "A valid URL for the MPEG4 file. File size must not exceed 1MB\n", + "name": "mpeg4_url", + "required": true + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "mpeg4_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "mpeg4_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "mpeg4_duration", + "required": false + }, + { + "type": "String", + "description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "html_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result", + "rst_description": "URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result\n", + "name": "thumb_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'", + "html_description": "Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”", + "rst_description": "*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'\n", + "name": "thumb_mime_type", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video animation", + "html_description": "Optional. Content of the message to be sent instead of the video animation", + "rst_description": "*Optional*. Content of the message to be sent instead of the video animation\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/replace.yml b/.butcher/types/InlineQueryResultMpeg4Gif/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultMpeg4Gif/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultPhoto/entity.json b/.butcher/types/InlineQueryResultPhoto/entity.json new file mode 100644 index 00000000..9aa12a16 --- /dev/null +++ b/.butcher/types/InlineQueryResultPhoto/entity.json @@ -0,0 +1,123 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultphoto", + "name": "InlineQueryResultPhoto", + "description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.", + "html_description": "

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

", + "rst_description": "Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "html_description": "A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB", + "rst_description": "A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB\n", + "name": "photo_url", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail for the photo", + "html_description": "URL of the thumbnail for the photo", + "rst_description": "URL of the thumbnail for the photo\n", + "name": "thumb_url", + "required": true + }, + { + "type": "Integer", + "description": "Width of the photo", + "html_description": "Optional. Width of the photo", + "rst_description": "*Optional*. Width of the photo\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Height of the photo", + "html_description": "Optional. Height of the photo", + "rst_description": "*Optional*. Height of the photo\n", + "name": "photo_height", + "required": false + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Optional. Title for the result", + "rst_description": "*Optional*. Title for the result\n", + "name": "title", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the photo", + "html_description": "Optional. Content of the message to be sent instead of the photo", + "rst_description": "*Optional*. Content of the message to be sent instead of the photo\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultPhoto/replace.yml b/.butcher/types/InlineQueryResultPhoto/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultPhoto/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultVenue/entity.json b/.butcher/types/InlineQueryResultVenue/entity.json new file mode 100644 index 00000000..af6c2d22 --- /dev/null +++ b/.butcher/types/InlineQueryResultVenue/entity.json @@ -0,0 +1,139 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultvenue", + "name": "InlineQueryResultVenue", + "description": "Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the venue.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be venue", + "html_description": "Type of the result, must be venue", + "rst_description": "Type of the result, must be *venue*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 Bytes", + "html_description": "Unique identifier for this result, 1-64 Bytes", + "rst_description": "Unique identifier for this result, 1-64 Bytes\n", + "name": "id", + "required": true + }, + { + "type": "Float", + "description": "Latitude of the venue location in degrees", + "html_description": "Latitude of the venue location in degrees", + "rst_description": "Latitude of the venue location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue location in degrees", + "html_description": "Longitude of the venue location in degrees", + "rst_description": "Longitude of the venue location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Title of the venue", + "html_description": "Title of the venue", + "rst_description": "Title of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue if known", + "html_description": "Optional. Foursquare identifier of the venue if known", + "rst_description": "*Optional*. Foursquare identifier of the venue if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the venue", + "html_description": "Optional. Content of the message to be sent instead of the venue", + "rst_description": "*Optional*. Content of the message to be sent instead of the venue\n", + "name": "input_message_content", + "required": false + }, + { + "type": "String", + "description": "Url of the thumbnail for the result", + "html_description": "Optional. Url of the thumbnail for the result", + "rst_description": "*Optional*. Url of the thumbnail for the result\n", + "name": "thumb_url", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail width", + "html_description": "Optional. Thumbnail width", + "rst_description": "*Optional*. Thumbnail width\n", + "name": "thumb_width", + "required": false + }, + { + "type": "Integer", + "description": "Thumbnail height", + "html_description": "Optional. Thumbnail height", + "rst_description": "*Optional*. Thumbnail height\n", + "name": "thumb_height", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultVenue/replace.yml b/.butcher/types/InlineQueryResultVenue/replace.yml new file mode 100644 index 00000000..cbe6bc26 --- /dev/null +++ b/.butcher/types/InlineQueryResultVenue/replace.yml @@ -0,0 +1,2 @@ +bases: + - InlineQueryResult diff --git a/.butcher/types/InlineQueryResultVideo/entity.json b/.butcher/types/InlineQueryResultVideo/entity.json new file mode 100644 index 00000000..784a8728 --- /dev/null +++ b/.butcher/types/InlineQueryResultVideo/entity.json @@ -0,0 +1,139 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultvideo", + "name": "InlineQueryResultVideo", + "description": "Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.\nIf an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.", + "html_description": "

Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.

\n

If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.

\n
", + "rst_description": "Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the video.\n\n If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using *input_message_content*.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the embedded video player or video file", + "html_description": "A valid URL for the embedded video player or video file", + "rst_description": "A valid URL for the embedded video player or video file\n", + "name": "video_url", + "required": true + }, + { + "type": "String", + "description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'", + "html_description": "MIME type of the content of the video URL, “text/html” or “video/mp4”", + "rst_description": "MIME type of the content of the video URL, 'text/html' or 'video/mp4'\n", + "name": "mime_type", + "required": true + }, + { + "type": "String", + "description": "URL of the thumbnail (JPEG only) for the video", + "html_description": "URL of the thumbnail (JPEG only) for the video", + "rst_description": "URL of the thumbnail (JPEG only) for the video\n", + "name": "thumb_url", + "required": true + }, + { + "type": "String", + "description": "Title for the result", + "html_description": "Title for the result", + "rst_description": "Title for the result\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "video_width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "video_height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "video_duration", + "required": false + }, + { + "type": "String", + "description": "Short description of the result", + "html_description": "Optional. Short description of the result", + "rst_description": "*Optional*. Short description of the result\n", + "name": "description", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).", + "html_description": "Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).", + "rst_description": "*Optional*. Content of the message to be sent instead of the video. This field is **required** if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultVideo/replace.yml b/.butcher/types/InlineQueryResultVideo/replace.yml new file mode 100644 index 00000000..b877a94d --- /dev/null +++ b/.butcher/types/InlineQueryResultVideo/replace.yml @@ -0,0 +1,6 @@ +bases: + - InlineQueryResult + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InlineQueryResultVoice/entity.json b/.butcher/types/InlineQueryResultVoice/entity.json new file mode 100644 index 00000000..ad3d394e --- /dev/null +++ b/.butcher/types/InlineQueryResultVoice/entity.json @@ -0,0 +1,99 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inlinequeryresultvoice", + "name": "InlineQueryResultVoice", + "description": "Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.\nNote: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "html_description": "

Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

", + "rst_description": "Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the the voice message.\n**Note:** This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be voice", + "html_description": "Type of the result, must be voice", + "rst_description": "Type of the result, must be *voice*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this result, 1-64 bytes", + "html_description": "Unique identifier for this result, 1-64 bytes", + "rst_description": "Unique identifier for this result, 1-64 bytes\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "A valid URL for the voice recording", + "html_description": "A valid URL for the voice recording", + "rst_description": "A valid URL for the voice recording\n", + "name": "voice_url", + "required": true + }, + { + "type": "String", + "description": "Recording title", + "html_description": "Recording title", + "rst_description": "Recording title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Caption, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the voice message caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Recording duration in seconds", + "html_description": "Optional. Recording duration in seconds", + "rst_description": "*Optional*. Recording duration in seconds\n", + "name": "voice_duration", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message", + "html_description": "Optional. Inline keyboard attached to the message", + "rst_description": "*Optional*. `Inline keyboard `_ attached to the message\n", + "name": "reply_markup", + "required": false + }, + { + "type": "InputMessageContent", + "description": "Content of the message to be sent instead of the voice recording", + "html_description": "Optional. Content of the message to be sent instead of the voice recording", + "rst_description": "*Optional*. Content of the message to be sent instead of the voice recording\n", + "name": "input_message_content", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InlineQueryResultVoice/replace.yml b/.butcher/types/InlineQueryResultVoice/replace.yml new file mode 100644 index 00000000..cd07671d --- /dev/null +++ b/.butcher/types/InlineQueryResultVoice/replace.yml @@ -0,0 +1,5 @@ +bases: + - InlineQueryResult +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InputContactMessageContent/entity.json b/.butcher/types/InputContactMessageContent/entity.json new file mode 100644 index 00000000..6f465e9e --- /dev/null +++ b/.butcher/types/InputContactMessageContent/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputcontactmessagecontent", + "name": "InputContactMessageContent", + "description": "Represents the content of a contact message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a contact message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a contact message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Contact's phone number", + "html_description": "Contact's phone number", + "rst_description": "Contact's phone number\n", + "name": "phone_number", + "required": true + }, + { + "type": "String", + "description": "Contact's first name", + "html_description": "Contact's first name", + "rst_description": "Contact's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "Contact's last name", + "html_description": "Optional. Contact's last name", + "rst_description": "*Optional*. Contact's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "Additional data about the contact in the form of a vCard, 0-2048 bytes", + "html_description": "Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes", + "rst_description": "*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes\n", + "name": "vcard", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputContactMessageContent/replace.yml b/.butcher/types/InputContactMessageContent/replace.yml new file mode 100644 index 00000000..29166299 --- /dev/null +++ b/.butcher/types/InputContactMessageContent/replace.yml @@ -0,0 +1,2 @@ +bases: + - InputMessageContent diff --git a/.butcher/types/InputFile/entity.json b/.butcher/types/InputFile/entity.json new file mode 100644 index 00000000..009d6131 --- /dev/null +++ b/.butcher/types/InputFile/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputfile", + "name": "InputFile", + "description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "html_description": "

This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.

", + "rst_description": "This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputFile/replace.yml b/.butcher/types/InputFile/replace.yml new file mode 100644 index 00000000..b040efad --- /dev/null +++ b/.butcher/types/InputFile/replace.yml @@ -0,0 +1,2 @@ +bases: + - ABC diff --git a/.butcher/types/InputInvoiceMessageContent/entity.json b/.butcher/types/InputInvoiceMessageContent/entity.json new file mode 100644 index 00000000..bc5c8048 --- /dev/null +++ b/.butcher/types/InputInvoiceMessageContent/entity.json @@ -0,0 +1,179 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputinvoicemessagecontent", + "name": "InputInvoiceMessageContent", + "description": "Represents the content of an invoice message to be sent as the result of an inline query.", + "html_description": "

Represents the content of an invoice message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of an invoice message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Product name, 1-32 characters", + "html_description": "Product name, 1-32 characters", + "rst_description": "Product name, 1-32 characters\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description, 1-255 characters", + "html_description": "Product description, 1-255 characters", + "rst_description": "Product description, 1-255 characters\n", + "name": "description", + "required": true + }, + { + "type": "String", + "description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "html_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", + "rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n", + "name": "payload", + "required": true + }, + { + "type": "String", + "description": "Payment provider token, obtained via @BotFather", + "html_description": "Payment provider token, obtained via @BotFather", + "rst_description": "Payment provider token, obtained via `@BotFather `_\n", + "name": "provider_token", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code, see more on currencies", + "html_description": "Three-letter ISO 4217 currency code, see more on currencies", + "rst_description": "Three-letter ISO 4217 currency code, see `more on currencies `_\n", + "name": "currency", + "required": true + }, + { + "type": "Array of LabeledPrice", + "description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "html_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n", + "name": "prices", + "required": true + }, + { + "type": "Integer", + "description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "html_description": "Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "rst_description": "*Optional*. The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n", + "name": "max_tip_amount", + "required": false + }, + { + "type": "Array of Integer", + "description": "A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "html_description": "Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", + "rst_description": "*Optional*. A JSON-serialized array of suggested amounts of tip in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n", + "name": "suggested_tip_amounts", + "required": false + }, + { + "type": "String", + "description": "A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.", + "html_description": "Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.", + "rst_description": "*Optional*. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.\n", + "name": "provider_data", + "required": false + }, + { + "type": "String", + "description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "html_description": "Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.", + "rst_description": "*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n", + "name": "photo_url", + "required": false + }, + { + "type": "Integer", + "description": "Photo size in bytes", + "html_description": "Optional. Photo size in bytes", + "rst_description": "*Optional*. Photo size in bytes\n", + "name": "photo_size", + "required": false + }, + { + "type": "Integer", + "description": "Photo width", + "html_description": "Optional. Photo width", + "rst_description": "*Optional*. Photo width\n", + "name": "photo_width", + "required": false + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Optional. Photo height", + "rst_description": "*Optional*. Photo height\n", + "name": "photo_height", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's full name to complete the order", + "html_description": "Optional. Pass True if you require the user's full name to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's full name to complete the order\n", + "name": "need_name", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's phone number to complete the order", + "html_description": "Optional. Pass True if you require the user's phone number to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's phone number to complete the order\n", + "name": "need_phone_number", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's email address to complete the order", + "html_description": "Optional. Pass True if you require the user's email address to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's email address to complete the order\n", + "name": "need_email", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if you require the user's shipping address to complete the order", + "html_description": "Optional. Pass True if you require the user's shipping address to complete the order", + "rst_description": "*Optional*. Pass :code:`True` if you require the user's shipping address to complete the order\n", + "name": "need_shipping_address", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's phone number should be sent to provider", + "html_description": "Optional. Pass True if the user's phone number should be sent to provider", + "rst_description": "*Optional*. Pass :code:`True` if the user's phone number should be sent to provider\n", + "name": "send_phone_number_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the user's email address should be sent to provider", + "html_description": "Optional. Pass True if the user's email address should be sent to provider", + "rst_description": "*Optional*. Pass :code:`True` if the user's email address should be sent to provider\n", + "name": "send_email_to_provider", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the final price depends on the shipping method", + "html_description": "Optional. Pass True if the final price depends on the shipping method", + "rst_description": "*Optional*. Pass :code:`True` if the final price depends on the shipping method\n", + "name": "is_flexible", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputInvoiceMessageContent/replace.yml b/.butcher/types/InputInvoiceMessageContent/replace.yml new file mode 100644 index 00000000..29166299 --- /dev/null +++ b/.butcher/types/InputInvoiceMessageContent/replace.yml @@ -0,0 +1,2 @@ +bases: + - InputMessageContent diff --git a/.butcher/types/InputLocationMessageContent/entity.json b/.butcher/types/InputLocationMessageContent/entity.json new file mode 100644 index 00000000..460ed0d0 --- /dev/null +++ b/.butcher/types/InputLocationMessageContent/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputlocationmessagecontent", + "name": "InputLocationMessageContent", + "description": "Represents the content of a location message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a location message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a location message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the location in degrees", + "html_description": "Latitude of the location in degrees", + "rst_description": "Latitude of the location in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the location in degrees", + "html_description": "Longitude of the location in degrees", + "rst_description": "Longitude of the location in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "Float number", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", + "html_description": "Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.", + "rst_description": "*Optional*. Period in seconds for which the location can be updated, should be between 60 and 86400.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "html_description": "Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.", + "rst_description": "*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "html_description": "Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.", + "rst_description": "*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n", + "name": "proximity_alert_radius", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputLocationMessageContent/replace.yml b/.butcher/types/InputLocationMessageContent/replace.yml new file mode 100644 index 00000000..29166299 --- /dev/null +++ b/.butcher/types/InputLocationMessageContent/replace.yml @@ -0,0 +1,2 @@ +bases: + - InputMessageContent diff --git a/.butcher/types/InputMedia/entity.json b/.butcher/types/InputMedia/entity.json new file mode 100644 index 00000000..b1965e5c --- /dev/null +++ b/.butcher/types/InputMedia/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmedia", + "name": "InputMedia", + "description": "This object represents the content of a media message to be sent. It should be one of\n - InputMediaAnimation\n - InputMediaDocument\n - InputMediaAudio\n - InputMediaPhoto\n - InputMediaVideo", + "html_description": "

This object represents the content of a media message to be sent. It should be one of

", + "rst_description": "This object represents the content of a media message to be sent. It should be one of\n\n - :class:`aiogram.types.input_media_animation.InputMediaAnimation`\n - :class:`aiogram.types.input_media_document.InputMediaDocument`\n - :class:`aiogram.types.input_media_audio.InputMediaAudio`\n - :class:`aiogram.types.input_media_photo.InputMediaPhoto`\n - :class:`aiogram.types.input_media_video.InputMediaVideo`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputMedia/replace.yml b/.butcher/types/InputMedia/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InputMedia/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InputMediaAnimation/entity.json b/.butcher/types/InputMediaAnimation/entity.json new file mode 100644 index 00000000..a106d803 --- /dev/null +++ b/.butcher/types/InputMediaAnimation/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediaanimation", + "name": "InputMediaAnimation", + "description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "html_description": "

Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

", + "rst_description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be animation", + "html_description": "Type of the result, must be animation", + "rst_description": "Type of the result, must be *animation*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the animation to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the animation caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the animation caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the animation caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Animation width", + "html_description": "Optional. Animation width", + "rst_description": "*Optional*. Animation width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Animation height", + "html_description": "Optional. Animation height", + "rst_description": "*Optional*. Animation height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Animation duration in seconds", + "html_description": "Optional. Animation duration in seconds", + "rst_description": "*Optional*. Animation duration in seconds\n", + "name": "duration", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaAnimation/replace.yml b/.butcher/types/InputMediaAnimation/replace.yml new file mode 100644 index 00000000..d2375f89 --- /dev/null +++ b/.butcher/types/InputMediaAnimation/replace.yml @@ -0,0 +1,15 @@ +bases: + - InputMedia +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile + parse_mode: + value: UNSET diff --git a/.butcher/types/InputMediaAudio/entity.json b/.butcher/types/InputMediaAudio/entity.json new file mode 100644 index 00000000..43963950 --- /dev/null +++ b/.butcher/types/InputMediaAudio/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediaaudio", + "name": "InputMediaAudio", + "description": "Represents an audio file to be treated as music to be sent.", + "html_description": "

Represents an audio file to be treated as music to be sent.

", + "rst_description": "Represents an audio file to be treated as music to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be audio", + "html_description": "Type of the result, must be audio", + "rst_description": "Type of the result, must be *audio*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the audio to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the audio caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the audio caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds", + "html_description": "Optional. Duration of the audio in seconds", + "rst_description": "*Optional*. Duration of the audio in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "String", + "description": "Performer of the audio", + "html_description": "Optional. Performer of the audio", + "rst_description": "*Optional*. Performer of the audio\n", + "name": "performer", + "required": false + }, + { + "type": "String", + "description": "Title of the audio", + "html_description": "Optional. Title of the audio", + "rst_description": "*Optional*. Title of the audio\n", + "name": "title", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaAudio/replace.yml b/.butcher/types/InputMediaAudio/replace.yml new file mode 100644 index 00000000..d2375f89 --- /dev/null +++ b/.butcher/types/InputMediaAudio/replace.yml @@ -0,0 +1,15 @@ +bases: + - InputMedia +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile + parse_mode: + value: UNSET diff --git a/.butcher/types/InputMediaDocument/entity.json b/.butcher/types/InputMediaDocument/entity.json new file mode 100644 index 00000000..cd51dea9 --- /dev/null +++ b/.butcher/types/InputMediaDocument/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediadocument", + "name": "InputMediaDocument", + "description": "Represents a general file to be sent.", + "html_description": "

Represents a general file to be sent.

", + "rst_description": "Represents a general file to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be document", + "html_description": "Type of the result, must be document", + "rst_description": "Type of the result, must be *document*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the document to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the document to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the document caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the document caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Boolean", + "description": "Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "html_description": "Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.", + "rst_description": "*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always :code:`True`, if the document is sent as part of an album.\n", + "name": "disable_content_type_detection", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaDocument/replace.yml b/.butcher/types/InputMediaDocument/replace.yml new file mode 100644 index 00000000..d2375f89 --- /dev/null +++ b/.butcher/types/InputMediaDocument/replace.yml @@ -0,0 +1,15 @@ +bases: + - InputMedia +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile + parse_mode: + value: UNSET diff --git a/.butcher/types/InputMediaPhoto/entity.json b/.butcher/types/InputMediaPhoto/entity.json new file mode 100644 index 00000000..792f2cd1 --- /dev/null +++ b/.butcher/types/InputMediaPhoto/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediaphoto", + "name": "InputMediaPhoto", + "description": "Represents a photo to be sent.", + "html_description": "

Represents a photo to be sent.

", + "rst_description": "Represents a photo to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be photo", + "html_description": "Type of the result, must be photo", + "rst_description": "Type of the result, must be *photo*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "String", + "description": "Caption of the photo to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the photo caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the photo caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaPhoto/replace.yml b/.butcher/types/InputMediaPhoto/replace.yml new file mode 100644 index 00000000..d2375f89 --- /dev/null +++ b/.butcher/types/InputMediaPhoto/replace.yml @@ -0,0 +1,15 @@ +bases: + - InputMedia +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile + parse_mode: + value: UNSET diff --git a/.butcher/types/InputMediaVideo/entity.json b/.butcher/types/InputMediaVideo/entity.json new file mode 100644 index 00000000..2f200b46 --- /dev/null +++ b/.butcher/types/InputMediaVideo/entity.json @@ -0,0 +1,99 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "inputmediavideo", + "name": "InputMediaVideo", + "description": "Represents a video to be sent.", + "html_description": "

Represents a video to be sent.

", + "rst_description": "Represents a video to be sent.", + "annotations": [ + { + "type": "String", + "description": "Type of the result, must be video", + "html_description": "Type of the result, must be video", + "rst_description": "Type of the result, must be *video*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. More information on Sending Files", + "html_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files »", + "rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files ยป `\n", + "name": "media", + "required": true + }, + { + "type": "InputFile or String", + "description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files", + "html_description": "Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »", + "rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป `\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Caption of the video to be sent, 0-1024 characters after entities parsing", + "html_description": "Optional. Caption of the video to be sent, 0-1024 characters after entities parsing", + "rst_description": "*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing\n", + "name": "caption", + "required": false + }, + { + "type": "String", + "description": "Mode for parsing entities in the video caption. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the video caption. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in the caption, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Integer", + "description": "Video width", + "html_description": "Optional. Video width", + "rst_description": "*Optional*. Video width\n", + "name": "width", + "required": false + }, + { + "type": "Integer", + "description": "Video height", + "html_description": "Optional. Video height", + "rst_description": "*Optional*. Video height\n", + "name": "height", + "required": false + }, + { + "type": "Integer", + "description": "Video duration in seconds", + "html_description": "Optional. Video duration in seconds", + "rst_description": "*Optional*. Video duration in seconds\n", + "name": "duration", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the uploaded video is suitable for streaming", + "html_description": "Optional. Pass True if the uploaded video is suitable for streaming", + "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", + "name": "supports_streaming", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaVideo/replace.yml b/.butcher/types/InputMediaVideo/replace.yml new file mode 100644 index 00000000..d2375f89 --- /dev/null +++ b/.butcher/types/InputMediaVideo/replace.yml @@ -0,0 +1,15 @@ +bases: + - InputMedia +annotations: + media: + parsed_type: + type: union + items: + - type: std + name: str + - type: entity + references: + category: types + name: InputFile + parse_mode: + value: UNSET diff --git a/.butcher/types/InputMessageContent/entity.json b/.butcher/types/InputMessageContent/entity.json new file mode 100644 index 00000000..f578b8de --- /dev/null +++ b/.butcher/types/InputMessageContent/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputmessagecontent", + "name": "InputMessageContent", + "description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n - InputTextMessageContent\n - InputLocationMessageContent\n - InputVenueMessageContent\n - InputContactMessageContent\n - InputInvoiceMessageContent", + "html_description": "

This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:

", + "rst_description": "This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:\n\n - :class:`aiogram.types.input_text_message_content.InputTextMessageContent`\n - :class:`aiogram.types.input_location_message_content.InputLocationMessageContent`\n - :class:`aiogram.types.input_venue_message_content.InputVenueMessageContent`\n - :class:`aiogram.types.input_contact_message_content.InputContactMessageContent`\n - :class:`aiogram.types.input_invoice_message_content.InputInvoiceMessageContent`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputMessageContent/replace.yml b/.butcher/types/InputMessageContent/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/InputMessageContent/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/InputTextMessageContent/entity.json b/.butcher/types/InputTextMessageContent/entity.json new file mode 100644 index 00000000..88f794f8 --- /dev/null +++ b/.butcher/types/InputTextMessageContent/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputtextmessagecontent", + "name": "InputTextMessageContent", + "description": "Represents the content of a text message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a text message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a text message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "String", + "description": "Text of the message to be sent, 1-4096 characters", + "html_description": "Text of the message to be sent, 1-4096 characters", + "rst_description": "Text of the message to be sent, 1-4096 characters\n", + "name": "message_text", + "required": true + }, + { + "type": "String", + "description": "Mode for parsing entities in the message text. See formatting options for more details.", + "html_description": "Optional. Mode for parsing entities in the message text. See formatting options for more details.", + "rst_description": "*Optional*. Mode for parsing entities in the message text. See `formatting options `_ for more details.\n", + "name": "parse_mode", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "List of special entities that appear in message text, which can be specified instead of parse_mode", + "html_description": "Optional. List of special entities that appear in message text, which can be specified instead of parse_mode", + "rst_description": "*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*\n", + "name": "entities", + "required": false + }, + { + "type": "Boolean", + "description": "Disables link previews for links in the sent message", + "html_description": "Optional. Disables link previews for links in the sent message", + "rst_description": "*Optional*. Disables link previews for links in the sent message\n", + "name": "disable_web_page_preview", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputTextMessageContent/replace.yml b/.butcher/types/InputTextMessageContent/replace.yml new file mode 100644 index 00000000..c79933d0 --- /dev/null +++ b/.butcher/types/InputTextMessageContent/replace.yml @@ -0,0 +1,6 @@ +bases: + - InputMessageContent + +annotations: + parse_mode: + value: UNSET diff --git a/.butcher/types/InputVenueMessageContent/entity.json b/.butcher/types/InputVenueMessageContent/entity.json new file mode 100644 index 00000000..34bd84aa --- /dev/null +++ b/.butcher/types/InputVenueMessageContent/entity.json @@ -0,0 +1,83 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "inputvenuemessagecontent", + "name": "InputVenueMessageContent", + "description": "Represents the content of a venue message to be sent as the result of an inline query.", + "html_description": "

Represents the content of a venue message to be sent as the result of an inline query.

", + "rst_description": "Represents the `content `_ of a venue message to be sent as the result of an inline query.", + "annotations": [ + { + "type": "Float", + "description": "Latitude of the venue in degrees", + "html_description": "Latitude of the venue in degrees", + "rst_description": "Latitude of the venue in degrees\n", + "name": "latitude", + "required": true + }, + { + "type": "Float", + "description": "Longitude of the venue in degrees", + "html_description": "Longitude of the venue in degrees", + "rst_description": "Longitude of the venue in degrees\n", + "name": "longitude", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue, if known", + "html_description": "Optional. Foursquare identifier of the venue, if known", + "rst_description": "*Optional*. Foursquare identifier of the venue, if known\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/InputVenueMessageContent/replace.yml b/.butcher/types/InputVenueMessageContent/replace.yml new file mode 100644 index 00000000..29166299 --- /dev/null +++ b/.butcher/types/InputVenueMessageContent/replace.yml @@ -0,0 +1,2 @@ +bases: + - InputMessageContent diff --git a/.butcher/types/Invoice/entity.json b/.butcher/types/Invoice/entity.json new file mode 100644 index 00000000..5cbd0f37 --- /dev/null +++ b/.butcher/types/Invoice/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "invoice", + "name": "Invoice", + "description": "This object contains basic information about an invoice.", + "html_description": "

This object contains basic information about an invoice.

", + "rst_description": "This object contains basic information about an invoice.", + "annotations": [ + { + "type": "String", + "description": "Product name", + "html_description": "Product name", + "rst_description": "Product name\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Product description", + "html_description": "Product description", + "rst_description": "Product description\n", + "name": "description", + "required": true + }, + { + "type": "String", + "description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "html_description": "Unique bot deep-linking parameter that can be used to generate this invoice", + "rst_description": "Unique bot deep-linking parameter that can be used to generate this invoice\n", + "name": "start_parameter", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code", + "html_description": "Three-letter ISO 4217 currency code", + "rst_description": "Three-letter ISO 4217 `currency `_ code\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "total_amount", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButton/entity.json b/.butcher/types/KeyboardButton/entity.json new file mode 100644 index 00000000..2ecfaca1 --- /dev/null +++ b/.butcher/types/KeyboardButton/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbutton", + "name": "KeyboardButton", + "description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.\nNote: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.", + "html_description": "

This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.

Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.
\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.

", + "rst_description": "This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *web_app*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.\n**Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.\n\n**Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*.\n\n**Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*.", + "annotations": [ + { + "type": "String", + "description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", + "html_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed", + "rst_description": "Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed\n", + "name": "text", + "required": true + }, + { + "type": "Boolean", + "description": "If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", + "html_description": "Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If :code:`True`, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.\n", + "name": "request_contact", + "required": false + }, + { + "type": "Boolean", + "description": "If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "html_description": "Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If :code:`True`, the user's current location will be sent when the button is pressed. Available in private chats only.\n", + "name": "request_location", + "required": false + }, + { + "type": "KeyboardButtonPollType", + "description": "If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.", + "html_description": "Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.", + "rst_description": "*Optional*. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.\n", + "name": "request_poll", + "required": false + }, + { + "type": "WebAppInfo", + "description": "If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.", + "html_description": "Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.", + "rst_description": "*Optional*. If specified, the described `Web App `_ will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.\n", + "name": "web_app", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButton/replace.yml b/.butcher/types/KeyboardButton/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/KeyboardButton/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/KeyboardButtonPollType/entity.json b/.butcher/types/KeyboardButtonPollType/entity.json new file mode 100644 index 00000000..3c1f026e --- /dev/null +++ b/.butcher/types/KeyboardButtonPollType/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonpolltype", + "name": "KeyboardButtonPollType", + "description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "html_description": "

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.

", + "rst_description": "This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.", + "annotations": [ + { + "type": "String", + "description": "If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.", + "html_description": "Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.", + "rst_description": "*Optional*. If *quiz* is passed, the user will be allowed to create only polls in the quiz mode. If *regular* is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.\n", + "name": "type", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButtonPollType/replace.yml b/.butcher/types/KeyboardButtonPollType/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/KeyboardButtonPollType/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/LabeledPrice/entity.json b/.butcher/types/LabeledPrice/entity.json new file mode 100644 index 00000000..38963855 --- /dev/null +++ b/.butcher/types/LabeledPrice/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "labeledprice", + "name": "LabeledPrice", + "description": "This object represents a portion of the price for goods or services.", + "html_description": "

This object represents a portion of the price for goods or services.

", + "rst_description": "This object represents a portion of the price for goods or services.", + "annotations": [ + { + "type": "String", + "description": "Portion label", + "html_description": "Portion label", + "rst_description": "Portion label\n", + "name": "label", + "required": true + }, + { + "type": "Integer", + "description": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Price of the product in the *smallest units* of the `currency `_ (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "amount", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/LabeledPrice/replace.yml b/.butcher/types/LabeledPrice/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/LabeledPrice/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/Location/entity.json b/.butcher/types/Location/entity.json new file mode 100644 index 00000000..5ae27da8 --- /dev/null +++ b/.butcher/types/Location/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "location", + "name": "Location", + "description": "This object represents a point on the map.", + "html_description": "

This object represents a point on the map.

", + "rst_description": "This object represents a point on the map.", + "annotations": [ + { + "type": "Float", + "description": "Longitude as defined by sender", + "html_description": "Longitude as defined by sender", + "rst_description": "Longitude as defined by sender\n", + "name": "longitude", + "required": true + }, + { + "type": "Float", + "description": "Latitude as defined by sender", + "html_description": "Latitude as defined by sender", + "rst_description": "Latitude as defined by sender\n", + "name": "latitude", + "required": true + }, + { + "type": "Float number", + "description": "The radius of uncertainty for the location, measured in meters; 0-1500", + "html_description": "Optional. The radius of uncertainty for the location, measured in meters; 0-1500", + "rst_description": "*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500\n", + "name": "horizontal_accuracy", + "required": false + }, + { + "type": "Integer", + "description": "Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "html_description": "Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.", + "rst_description": "*Optional*. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.\n", + "name": "live_period", + "required": false + }, + { + "type": "Integer", + "description": "The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "html_description": "Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.", + "rst_description": "*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.\n", + "name": "heading", + "required": false + }, + { + "type": "Integer", + "description": "The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "html_description": "Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.", + "rst_description": "*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.\n", + "name": "proximity_alert_radius", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/LoginUrl/entity.json b/.butcher/types/LoginUrl/entity.json new file mode 100644 index 00000000..1085f9c4 --- /dev/null +++ b/.butcher/types/LoginUrl/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "loginurl", + "name": "LoginUrl", + "description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of version 5.7.\nSample bot: @discussbot", + "html_description": "

This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:

Telegram apps support these buttons as of version 5.7.

\n

Sample bot: @discussbot

\n
", + "rst_description": "This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the `Telegram Login Widget `_ when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:\nTelegram apps support these buttons as of `version 5.7 `_.\n\n Sample bot: `@discussbot `_", + "annotations": [ + { + "type": "String", + "description": "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.\n\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "html_description": "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
\n
\nNOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", + "rst_description": "An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in `Receiving authorization data `_.\n\n\n\n**NOTE:** You **must** always check the hash of the received data to verify the authentication and the integrity of the data as described in `Checking authorization `_.\n", + "name": "url", + "required": true + }, + { + "type": "String", + "description": "New text of the button in forwarded messages.", + "html_description": "Optional. New text of the button in forwarded messages.", + "rst_description": "*Optional*. New text of the button in forwarded messages.\n", + "name": "forward_text", + "required": false + }, + { + "type": "String", + "description": "Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.", + "html_description": "Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.", + "rst_description": "*Optional*. Username of a bot, which will be used for user authorization. See `Setting up a bot `_ for more details. If not specified, the current bot's username will be assumed. The *url*'s domain must be the same as the domain linked with the bot. See `Linking your domain to the bot `_ for more details.\n", + "name": "bot_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request the permission for your bot to send messages to the user.", + "html_description": "Optional. Pass True to request the permission for your bot to send messages to the user.", + "rst_description": "*Optional*. Pass :code:`True` to request the permission for your bot to send messages to the user.\n", + "name": "request_write_access", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MaskPosition/entity.json b/.butcher/types/MaskPosition/entity.json new file mode 100644 index 00000000..24a015d5 --- /dev/null +++ b/.butcher/types/MaskPosition/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "maskposition", + "name": "MaskPosition", + "description": "This object describes the position on faces where a mask should be placed by default.", + "html_description": "

This object describes the position on faces where a mask should be placed by default.

", + "rst_description": "This object describes the position on faces where a mask should be placed by default.", + "annotations": [ + { + "type": "String", + "description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.", + "html_description": "The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.", + "rst_description": "The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.\n", + "name": "point", + "required": true + }, + { + "type": "Float number", + "description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "html_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", + "rst_description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.\n", + "name": "x_shift", + "required": true + }, + { + "type": "Float number", + "description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "html_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", + "rst_description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.\n", + "name": "y_shift", + "required": true + }, + { + "type": "Float number", + "description": "Mask scaling coefficient. For example, 2.0 means double size.", + "html_description": "Mask scaling coefficient. For example, 2.0 means double size.", + "rst_description": "Mask scaling coefficient. For example, 2.0 means double size.\n", + "name": "scale", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MenuButton/entity.json b/.butcher/types/MenuButton/entity.json new file mode 100644 index 00000000..deb0a185 --- /dev/null +++ b/.butcher/types/MenuButton/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubutton", + "name": "MenuButton", + "description": "This object describes the bot's menu button in a private chat. It should be one of\n - MenuButtonCommands\n - MenuButtonWebApp\n - MenuButtonDefault\nIf a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "html_description": "

This object describes the bot's menu button in a private chat. It should be one of

If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.

", + "rst_description": "This object describes the bot's menu button in a private chat. It should be one of\n\n - :class:`aiogram.types.menu_button_commands.MenuButtonCommands`\n - :class:`aiogram.types.menu_button_web_app.MenuButtonWebApp`\n - :class:`aiogram.types.menu_button_default.MenuButtonDefault`\n\nIf a menu button other than :class:`aiogram.types.menu_button_default.MenuButtonDefault` is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/MenuButton/extend.yml b/.butcher/types/MenuButton/extend.yml new file mode 100644 index 00000000..1d841ebc --- /dev/null +++ b/.butcher/types/MenuButton/extend.yml @@ -0,0 +1,18 @@ +define: + - type: "String" + description: "Type of the button" + html_description: "Type of the button" + rst_description: "Type of the button" + name: "type" + required: true + +clone: + - MenuButtonCommands: + exclude: + - type + - MenuButtonDefault: + exclude: + - type + - MenuButtonWebApp: + exclude: + - type diff --git a/.butcher/types/MenuButton/replace.yml b/.butcher/types/MenuButton/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/MenuButton/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/MenuButtonCommands/entity.json b/.butcher/types/MenuButtonCommands/entity.json new file mode 100644 index 00000000..5ea1805c --- /dev/null +++ b/.butcher/types/MenuButtonCommands/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubuttoncommands", + "name": "MenuButtonCommands", + "description": "Represents a menu button, which opens the bot's list of commands.", + "html_description": "

Represents a menu button, which opens the bot's list of commands.

", + "rst_description": "Represents a menu button, which opens the bot's list of commands.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be commands", + "html_description": "Type of the button, must be commands", + "rst_description": "Type of the button, must be *commands*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MenuButtonCommands/replace.yml b/.butcher/types/MenuButtonCommands/replace.yml new file mode 100644 index 00000000..cc566462 --- /dev/null +++ b/.butcher/types/MenuButtonCommands/replace.yml @@ -0,0 +1,2 @@ +bases: + - MenuButton diff --git a/.butcher/types/MenuButtonDefault/entity.json b/.butcher/types/MenuButtonDefault/entity.json new file mode 100644 index 00000000..2760f7b8 --- /dev/null +++ b/.butcher/types/MenuButtonDefault/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubuttondefault", + "name": "MenuButtonDefault", + "description": "Describes that no specific value for the menu button was set.", + "html_description": "

Describes that no specific value for the menu button was set.

", + "rst_description": "Describes that no specific value for the menu button was set.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be default", + "html_description": "Type of the button, must be default", + "rst_description": "Type of the button, must be *default*\n", + "name": "type", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MenuButtonDefault/replace.yml b/.butcher/types/MenuButtonDefault/replace.yml new file mode 100644 index 00000000..cc566462 --- /dev/null +++ b/.butcher/types/MenuButtonDefault/replace.yml @@ -0,0 +1,2 @@ +bases: + - MenuButton diff --git a/.butcher/types/MenuButtonWebApp/entity.json b/.butcher/types/MenuButtonWebApp/entity.json new file mode 100644 index 00000000..63311034 --- /dev/null +++ b/.butcher/types/MenuButtonWebApp/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "menubuttonwebapp", + "name": "MenuButtonWebApp", + "description": "Represents a menu button, which launches a Web App.", + "html_description": "

Represents a menu button, which launches a Web App.

", + "rst_description": "Represents a menu button, which launches a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "Type of the button, must be web_app", + "html_description": "Type of the button, must be web_app", + "rst_description": "Type of the button, must be *web_app*\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Text on the button", + "html_description": "Text on the button", + "rst_description": "Text on the button\n", + "name": "text", + "required": true + }, + { + "type": "WebAppInfo", + "description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.", + "html_description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.", + "rst_description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`.\n", + "name": "web_app", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MenuButtonWebApp/replace.yml b/.butcher/types/MenuButtonWebApp/replace.yml new file mode 100644 index 00000000..cc566462 --- /dev/null +++ b/.butcher/types/MenuButtonWebApp/replace.yml @@ -0,0 +1,2 @@ +bases: + - MenuButton diff --git a/.butcher/types/Message/aliases.yml b/.butcher/types/Message/aliases.yml new file mode 100644 index 00000000..7fab6d03 --- /dev/null +++ b/.butcher/types/Message/aliases.yml @@ -0,0 +1,139 @@ +#answer: +# method: sendMessage +# fill: &fill-answer +# chat_id: self.chat.id +# message_thread_id: self.message_thread_id if self.is_topic_message else None +# +#reply: +# method: sendMessage +# fill: &fill-reply +# <<: *fill-answer +# reply_to_message_id: self.message_id +# +#answer_animation: +# method: sendAnimation +# fill: *fill-answer +# +#reply_animation: +# method: sendAnimation +# fill: *fill-reply +# +#answer_audio: +# method: sendAudio +# fill: *fill-answer +# +#reply_audio: +# method: sendAudio +# fill: *fill-reply +# +#answer_contact: +# method: sendContact +# fill: *fill-answer +# +#reply_contact: +# method: sendContact +# fill: *fill-reply +# +#answer_document: +# method: sendDocument +# fill: *fill-answer +# +#reply_document: +# method: sendDocument +# fill: *fill-reply +# +#answer_game: +# method: sendGame +# fill: *fill-answer +# +#reply_game: +# method: sendGame +# fill: *fill-reply +# +#answer_invoice: +# method: sendInvoice +# fill: *fill-answer +# +#reply_invoice: +# method: sendInvoice +# fill: *fill-reply +# +#answer_location: +# method: sendLocation +# fill: *fill-answer +# +#reply_location: +# method: sendLocation +# fill: *fill-reply +# +#answer_media_group: +# method: sendMediaGroup +# fill: *fill-answer +# +#reply_media_group: +# method: sendMediaGroup +# fill: *fill-reply +# +#answer_photo: +# method: sendPhoto +# fill: *fill-answer +# +#reply_photo: +# method: sendPhoto +# fill: *fill-reply +# +#answer_poll: +# method: sendPoll +# fill: *fill-answer +# +#reply_poll: +# method: sendPoll +# fill: *fill-reply +# +#answer_dice: +# method: sendDice +# fill: *fill-answer +# +#reply_dice: +# method: sendDice +# fill: *fill-reply +# +#answer_sticker: +# method: sendSticker +# fill: *fill-answer +# +#reply_sticker: +# method: sendSticker +# fill: *fill-reply +# +#answer_venue: +# method: sendVenue +# fill: *fill-answer +# +#reply_venue: +# method: sendVenue +# fill: *fill-reply +# +#answer_video: +# method: sendVideo +# fill: *fill-answer +# +#reply_video: +# method: sendVideo +# fill: *fill-reply +# +#answer_video_note: +# method: sendVideoNote +# fill: *fill-answer +# +#reply_video_note: +# method: sendVideoNote +# fill: *fill-reply +# +#answer_voice: +# method: sendVoice +# fill: *fill-answer +# +#reply_voice: +# method: sendVoice +# fill: *fill-reply diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json new file mode 100644 index 00000000..8ebf773a --- /dev/null +++ b/.butcher/types/Message/entity.json @@ -0,0 +1,531 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "message", + "name": "Message", + "description": "This object represents a message.", + "html_description": "

This object represents a message.

", + "rst_description": "This object represents a message.", + "annotations": [ + { + "type": "Integer", + "description": "Unique message identifier inside this chat", + "html_description": "Unique message identifier inside this chat", + "rst_description": "Unique message identifier inside this chat\n", + "name": "message_id", + "required": true + }, + { + "type": "Integer", + "description": "Unique identifier of a message thread to which the message belongs; for supergroups only", + "html_description": "Optional. Unique identifier of a message thread to which the message belongs; for supergroups only", + "rst_description": "*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only\n", + "name": "message_thread_id", + "required": false + }, + { + "type": "User", + "description": "Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "html_description": "Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "rst_description": "*Optional*. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "name": "from", + "required": false + }, + { + "type": "Chat", + "description": "Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "html_description": "Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.", + "rst_description": "*Optional*. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field *from* contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.\n", + "name": "sender_chat", + "required": false + }, + { + "type": "Integer", + "description": "Date the message was sent in Unix time", + "html_description": "Date the message was sent in Unix time", + "rst_description": "Date the message was sent in Unix time\n", + "name": "date", + "required": true + }, + { + "type": "Chat", + "description": "Conversation the message belongs to", + "html_description": "Conversation the message belongs to", + "rst_description": "Conversation the message belongs to\n", + "name": "chat", + "required": true + }, + { + "type": "User", + "description": "For forwarded messages, sender of the original message", + "html_description": "Optional. For forwarded messages, sender of the original message", + "rst_description": "*Optional*. For forwarded messages, sender of the original message\n", + "name": "forward_from", + "required": false + }, + { + "type": "Chat", + "description": "For messages forwarded from channels or from anonymous administrators, information about the original sender chat", + "html_description": "Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat", + "rst_description": "*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat\n", + "name": "forward_from_chat", + "required": false + }, + { + "type": "Integer", + "description": "For messages forwarded from channels, identifier of the original message in the channel", + "html_description": "Optional. For messages forwarded from channels, identifier of the original message in the channel", + "rst_description": "*Optional*. For messages forwarded from channels, identifier of the original message in the channel\n", + "name": "forward_from_message_id", + "required": false + }, + { + "type": "String", + "description": "For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present", + "html_description": "Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present", + "rst_description": "*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present\n", + "name": "forward_signature", + "required": false + }, + { + "type": "String", + "description": "Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages", + "html_description": "Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages", + "rst_description": "*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages\n", + "name": "forward_sender_name", + "required": false + }, + { + "type": "Integer", + "description": "For forwarded messages, date the original message was sent in Unix time", + "html_description": "Optional. For forwarded messages, date the original message was sent in Unix time", + "rst_description": "*Optional*. For forwarded messages, date the original message was sent in Unix time\n", + "name": "forward_date", + "required": false + }, + { + "type": "True", + "description": "True, if the message is sent to a forum topic", + "html_description": "Optional. True, if the message is sent to a forum topic", + "rst_description": "*Optional*. :code:`True`, if the message is sent to a forum topic\n", + "name": "is_topic_message", + "required": false + }, + { + "type": "True", + "description": "True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "html_description": "Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group", + "rst_description": "*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group\n", + "name": "is_automatic_forward", + "required": false + }, + { + "type": "Message", + "description": "For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", + "html_description": "Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", + "rst_description": "*Optional*. For replies, the original message. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n", + "name": "reply_to_message", + "required": false + }, + { + "type": "User", + "description": "Bot through which the message was sent", + "html_description": "Optional. Bot through which the message was sent", + "rst_description": "*Optional*. Bot through which the message was sent\n", + "name": "via_bot", + "required": false + }, + { + "type": "Integer", + "description": "Date the message was last edited in Unix time", + "html_description": "Optional. Date the message was last edited in Unix time", + "rst_description": "*Optional*. Date the message was last edited in Unix time\n", + "name": "edit_date", + "required": false + }, + { + "type": "True", + "description": "True, if the message can't be forwarded", + "html_description": "Optional. True, if the message can't be forwarded", + "rst_description": "*Optional*. :code:`True`, if the message can't be forwarded\n", + "name": "has_protected_content", + "required": false + }, + { + "type": "String", + "description": "The unique identifier of a media message group this message belongs to", + "html_description": "Optional. The unique identifier of a media message group this message belongs to", + "rst_description": "*Optional*. The unique identifier of a media message group this message belongs to\n", + "name": "media_group_id", + "required": false + }, + { + "type": "String", + "description": "Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "html_description": "Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator", + "rst_description": "*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator\n", + "name": "author_signature", + "required": false + }, + { + "type": "String", + "description": "For text messages, the actual UTF-8 text of the message", + "html_description": "Optional. For text messages, the actual UTF-8 text of the message", + "rst_description": "*Optional*. For text messages, the actual UTF-8 text of the message\n", + "name": "text", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "html_description": "Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text", + "rst_description": "*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text\n", + "name": "entities", + "required": false + }, + { + "type": "Animation", + "description": "Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "html_description": "Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set", + "rst_description": "*Optional*. Message is an animation, information about the animation. For backward compatibility, when this field is set, the *document* field will also be set\n", + "name": "animation", + "required": false + }, + { + "type": "Audio", + "description": "Message is an audio file, information about the file", + "html_description": "Optional. Message is an audio file, information about the file", + "rst_description": "*Optional*. Message is an audio file, information about the file\n", + "name": "audio", + "required": false + }, + { + "type": "Document", + "description": "Message is a general file, information about the file", + "html_description": "Optional. Message is a general file, information about the file", + "rst_description": "*Optional*. Message is a general file, information about the file\n", + "name": "document", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "Message is a photo, available sizes of the photo", + "html_description": "Optional. Message is a photo, available sizes of the photo", + "rst_description": "*Optional*. Message is a photo, available sizes of the photo\n", + "name": "photo", + "required": false + }, + { + "type": "Sticker", + "description": "Message is a sticker, information about the sticker", + "html_description": "Optional. Message is a sticker, information about the sticker", + "rst_description": "*Optional*. Message is a sticker, information about the sticker\n", + "name": "sticker", + "required": false + }, + { + "type": "Video", + "description": "Message is a video, information about the video", + "html_description": "Optional. Message is a video, information about the video", + "rst_description": "*Optional*. Message is a video, information about the video\n", + "name": "video", + "required": false + }, + { + "type": "VideoNote", + "description": "Message is a video note, information about the video message", + "html_description": "Optional. Message is a video note, information about the video message", + "rst_description": "*Optional*. Message is a `video note `_, information about the video message\n", + "name": "video_note", + "required": false + }, + { + "type": "Voice", + "description": "Message is a voice message, information about the file", + "html_description": "Optional. Message is a voice message, information about the file", + "rst_description": "*Optional*. Message is a voice message, information about the file\n", + "name": "voice", + "required": false + }, + { + "type": "String", + "description": "Caption for the animation, audio, document, photo, video or voice", + "html_description": "Optional. Caption for the animation, audio, document, photo, video or voice", + "rst_description": "*Optional*. Caption for the animation, audio, document, photo, video or voice\n", + "name": "caption", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "html_description": "Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption", + "rst_description": "*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption\n", + "name": "caption_entities", + "required": false + }, + { + "type": "Contact", + "description": "Message is a shared contact, information about the contact", + "html_description": "Optional. Message is a shared contact, information about the contact", + "rst_description": "*Optional*. Message is a shared contact, information about the contact\n", + "name": "contact", + "required": false + }, + { + "type": "Dice", + "description": "Message is a dice with random value", + "html_description": "Optional. Message is a dice with random value", + "rst_description": "*Optional*. Message is a dice with random value\n", + "name": "dice", + "required": false + }, + { + "type": "Game", + "description": "Message is a game, information about the game.", + "html_description": "Optional. Message is a game, information about the game. More about games »", + "rst_description": "*Optional*. Message is a game, information about the game. `More about games ยป `_\n", + "name": "game", + "required": false + }, + { + "type": "Poll", + "description": "Message is a native poll, information about the poll", + "html_description": "Optional. Message is a native poll, information about the poll", + "rst_description": "*Optional*. Message is a native poll, information about the poll\n", + "name": "poll", + "required": false + }, + { + "type": "Venue", + "description": "Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "html_description": "Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set", + "rst_description": "*Optional*. Message is a venue, information about the venue. For backward compatibility, when this field is set, the *location* field will also be set\n", + "name": "venue", + "required": false + }, + { + "type": "Location", + "description": "Message is a shared location, information about the location", + "html_description": "Optional. Message is a shared location, information about the location", + "rst_description": "*Optional*. Message is a shared location, information about the location\n", + "name": "location", + "required": false + }, + { + "type": "Array of User", + "description": "New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "html_description": "Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)", + "rst_description": "*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)\n", + "name": "new_chat_members", + "required": false + }, + { + "type": "User", + "description": "A member was removed from the group, information about them (this member may be the bot itself)", + "html_description": "Optional. A member was removed from the group, information about them (this member may be the bot itself)", + "rst_description": "*Optional*. A member was removed from the group, information about them (this member may be the bot itself)\n", + "name": "left_chat_member", + "required": false + }, + { + "type": "String", + "description": "A chat title was changed to this value", + "html_description": "Optional. A chat title was changed to this value", + "rst_description": "*Optional*. A chat title was changed to this value\n", + "name": "new_chat_title", + "required": false + }, + { + "type": "Array of PhotoSize", + "description": "A chat photo was change to this value", + "html_description": "Optional. A chat photo was change to this value", + "rst_description": "*Optional*. A chat photo was change to this value\n", + "name": "new_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the chat photo was deleted", + "html_description": "Optional. Service message: the chat photo was deleted", + "rst_description": "*Optional*. Service message: the chat photo was deleted\n", + "name": "delete_chat_photo", + "required": false + }, + { + "type": "True", + "description": "Service message: the group has been created", + "html_description": "Optional. Service message: the group has been created", + "rst_description": "*Optional*. Service message: the group has been created\n", + "name": "group_chat_created", + "required": false + }, + { + "type": "True", + "description": "Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.", + "html_description": "Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.", + "rst_description": "*Optional*. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.\n", + "name": "supergroup_chat_created", + "required": false + }, + { + "type": "True", + "description": "Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.", + "html_description": "Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.", + "rst_description": "*Optional*. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.\n", + "name": "channel_chat_created", + "required": false + }, + { + "type": "MessageAutoDeleteTimerChanged", + "description": "Service message: auto-delete timer settings changed in the chat", + "html_description": "Optional. Service message: auto-delete timer settings changed in the chat", + "rst_description": "*Optional*. Service message: auto-delete timer settings changed in the chat\n", + "name": "message_auto_delete_timer_changed", + "required": false + }, + { + "type": "Integer", + "description": "The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "migrate_from_chat_id", + "required": false + }, + { + "type": "Message", + "description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.", + "html_description": "Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.", + "rst_description": "*Optional*. Specified message was pinned. Note that the Message object in this field will not contain further *reply_to_message* fields even if it is itself a reply.\n", + "name": "pinned_message", + "required": false + }, + { + "type": "Invoice", + "description": "Message is an invoice for a payment, information about the invoice.", + "html_description": "Optional. Message is an invoice for a payment, information about the invoice. More about payments »", + "rst_description": "*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments ยป `_\n", + "name": "invoice", + "required": false + }, + { + "type": "SuccessfulPayment", + "description": "Message is a service message about a successful payment, information about the payment.", + "html_description": "Optional. Message is a service message about a successful payment, information about the payment. More about payments »", + "rst_description": "*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments ยป `_\n", + "name": "successful_payment", + "required": false + }, + { + "type": "String", + "description": "The domain name of the website on which the user has logged in.", + "html_description": "Optional. The domain name of the website on which the user has logged in. More about Telegram Login »", + "rst_description": "*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login ยป `_\n", + "name": "connected_website", + "required": false + }, + { + "type": "PassportData", + "description": "Telegram Passport data", + "html_description": "Optional. Telegram Passport data", + "rst_description": "*Optional*. Telegram Passport data\n", + "name": "passport_data", + "required": false + }, + { + "type": "ProximityAlertTriggered", + "description": "Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "html_description": "Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.", + "rst_description": "*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.\n", + "name": "proximity_alert_triggered", + "required": false + }, + { + "type": "ForumTopicCreated", + "description": "Service message: forum topic created", + "html_description": "Optional. Service message: forum topic created", + "rst_description": "*Optional*. Service message: forum topic created\n", + "name": "forum_topic_created", + "required": false + }, + { + "type": "ForumTopicClosed", + "description": "Service message: forum topic closed", + "html_description": "Optional. Service message: forum topic closed", + "rst_description": "*Optional*. Service message: forum topic closed\n", + "name": "forum_topic_closed", + "required": false + }, + { + "type": "ForumTopicReopened", + "description": "Service message: forum topic reopened", + "html_description": "Optional. Service message: forum topic reopened", + "rst_description": "*Optional*. Service message: forum topic reopened\n", + "name": "forum_topic_reopened", + "required": false + }, + { + "type": "VideoChatScheduled", + "description": "Service message: video chat scheduled", + "html_description": "Optional. Service message: video chat scheduled", + "rst_description": "*Optional*. Service message: video chat scheduled\n", + "name": "video_chat_scheduled", + "required": false + }, + { + "type": "VideoChatStarted", + "description": "Service message: video chat started", + "html_description": "Optional. Service message: video chat started", + "rst_description": "*Optional*. Service message: video chat started\n", + "name": "video_chat_started", + "required": false + }, + { + "type": "VideoChatEnded", + "description": "Service message: video chat ended", + "html_description": "Optional. Service message: video chat ended", + "rst_description": "*Optional*. Service message: video chat ended\n", + "name": "video_chat_ended", + "required": false + }, + { + "type": "VideoChatParticipantsInvited", + "description": "Service message: new participants invited to a video chat", + "html_description": "Optional. Service message: new participants invited to a video chat", + "rst_description": "*Optional*. Service message: new participants invited to a video chat\n", + "name": "video_chat_participants_invited", + "required": false + }, + { + "type": "WebAppData", + "description": "Service message: data sent by a Web App", + "html_description": "Optional. Service message: data sent by a Web App", + "rst_description": "*Optional*. Service message: data sent by a Web App\n", + "name": "web_app_data", + "required": false + }, + { + "type": "InlineKeyboardMarkup", + "description": "Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", + "html_description": "Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.", + "rst_description": "*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.\n", + "name": "reply_markup", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Message/replace.yml b/.butcher/types/Message/replace.yml new file mode 100644 index 00000000..9a3a2842 --- /dev/null +++ b/.butcher/types/Message/replace.yml @@ -0,0 +1,5 @@ +annotations: + date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/MessageAutoDeleteTimerChanged/entity.json b/.butcher/types/MessageAutoDeleteTimerChanged/entity.json new file mode 100644 index 00000000..5778e75a --- /dev/null +++ b/.butcher/types/MessageAutoDeleteTimerChanged/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageautodeletetimerchanged", + "name": "MessageAutoDeleteTimerChanged", + "description": "This object represents a service message about a change in auto-delete timer settings.", + "html_description": "

This object represents a service message about a change in auto-delete timer settings.

", + "rst_description": "This object represents a service message about a change in auto-delete timer settings.", + "annotations": [ + { + "type": "Integer", + "description": "New auto-delete time for messages in the chat; in seconds", + "html_description": "New auto-delete time for messages in the chat; in seconds", + "rst_description": "New auto-delete time for messages in the chat; in seconds\n", + "name": "message_auto_delete_time", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageEntity/entity.json b/.butcher/types/MessageEntity/entity.json new file mode 100644 index 00000000..fa01ab48 --- /dev/null +++ b/.butcher/types/MessageEntity/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageentity", + "name": "MessageEntity", + "description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "html_description": "

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

", + "rst_description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", + "annotations": [ + { + "type": "String", + "description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag), 'cashtag' ($USD), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers)", + "html_description": "Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)", + "rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers)\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Offset in UTF-16 code units to the start of the entity", + "html_description": "Offset in UTF-16 code units to the start of the entity", + "rst_description": "Offset in `UTF-16 code units `_ to the start of the entity\n", + "name": "offset", + "required": true + }, + { + "type": "Integer", + "description": "Length of the entity in UTF-16 code units", + "html_description": "Length of the entity in UTF-16 code units", + "rst_description": "Length of the entity in `UTF-16 code units `_\n", + "name": "length", + "required": true + }, + { + "type": "String", + "description": "For 'text_link' only, URL that will be opened after user taps on the text", + "html_description": "Optional. For “text_link” only, URL that will be opened after user taps on the text", + "rst_description": "*Optional*. For 'text_link' only, URL that will be opened after user taps on the text\n", + "name": "url", + "required": false + }, + { + "type": "User", + "description": "For 'text_mention' only, the mentioned user", + "html_description": "Optional. For “text_mention” only, the mentioned user", + "rst_description": "*Optional*. For 'text_mention' only, the mentioned user\n", + "name": "user", + "required": false + }, + { + "type": "String", + "description": "For 'pre' only, the programming language of the entity text", + "html_description": "Optional. For “pre” only, the programming language of the entity text", + "rst_description": "*Optional*. For 'pre' only, the programming language of the entity text\n", + "name": "language", + "required": false + }, + { + "type": "String", + "description": "For 'custom_emoji' only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "html_description": "Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker", + "rst_description": "*Optional*. For 'custom_emoji' only, unique identifier of the custom emoji. Use :class:`aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers` to get full information about the sticker\n", + "name": "custom_emoji_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/MessageEntity/replace.yml b/.butcher/types/MessageEntity/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/MessageEntity/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/MessageId/entity.json b/.butcher/types/MessageId/entity.json new file mode 100644 index 00000000..86e988bc --- /dev/null +++ b/.butcher/types/MessageId/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "messageid", + "name": "MessageId", + "description": "This object represents a unique message identifier.", + "html_description": "

This object represents a unique message identifier.

", + "rst_description": "This object represents a unique message identifier.", + "annotations": [ + { + "type": "Integer", + "description": "Unique message identifier", + "html_description": "Unique message identifier", + "rst_description": "Unique message identifier\n", + "name": "message_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/OrderInfo/entity.json b/.butcher/types/OrderInfo/entity.json new file mode 100644 index 00000000..868ed681 --- /dev/null +++ b/.butcher/types/OrderInfo/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "orderinfo", + "name": "OrderInfo", + "description": "This object represents information about an order.", + "html_description": "

This object represents information about an order.

", + "rst_description": "This object represents information about an order.", + "annotations": [ + { + "type": "String", + "description": "User name", + "html_description": "Optional. User name", + "rst_description": "*Optional*. User name\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "User's phone number", + "html_description": "Optional. User's phone number", + "rst_description": "*Optional*. User's phone number\n", + "name": "phone_number", + "required": false + }, + { + "type": "String", + "description": "User email", + "html_description": "Optional. User email", + "rst_description": "*Optional*. User email\n", + "name": "email", + "required": false + }, + { + "type": "ShippingAddress", + "description": "User shipping address", + "html_description": "Optional. User shipping address", + "rst_description": "*Optional*. User shipping address\n", + "name": "shipping_address", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportData/entity.json b/.butcher/types/PassportData/entity.json new file mode 100644 index 00000000..c00b6b06 --- /dev/null +++ b/.butcher/types/PassportData/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportdata", + "name": "PassportData", + "description": "Describes Telegram Passport data shared with the bot by the user.", + "html_description": "

Describes Telegram Passport data shared with the bot by the user.

", + "rst_description": "Describes Telegram Passport data shared with the bot by the user.", + "annotations": [ + { + "type": "Array of EncryptedPassportElement", + "description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "html_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot", + "rst_description": "Array with information about documents and other Telegram Passport elements that was shared with the bot\n", + "name": "data", + "required": true + }, + { + "type": "EncryptedCredentials", + "description": "Encrypted credentials required to decrypt the data", + "html_description": "Encrypted credentials required to decrypt the data", + "rst_description": "Encrypted credentials required to decrypt the data\n", + "name": "credentials", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementError/entity.json b/.butcher/types/PassportElementError/entity.json new file mode 100644 index 00000000..2a2403e0 --- /dev/null +++ b/.butcher/types/PassportElementError/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerror", + "name": "PassportElementError", + "description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n - PassportElementErrorDataField\n - PassportElementErrorFrontSide\n - PassportElementErrorReverseSide\n - PassportElementErrorSelfie\n - PassportElementErrorFile\n - PassportElementErrorFiles\n - PassportElementErrorTranslationFile\n - PassportElementErrorTranslationFiles\n - PassportElementErrorUnspecified", + "html_description": "

This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:

", + "rst_description": "This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:\n\n - :class:`aiogram.types.passport_element_error_data_field.PassportElementErrorDataField`\n - :class:`aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide`\n - :class:`aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide`\n - :class:`aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie`\n - :class:`aiogram.types.passport_element_error_file.PassportElementErrorFile`\n - :class:`aiogram.types.passport_element_error_files.PassportElementErrorFiles`\n - :class:`aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile`\n - :class:`aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles`\n - :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementError/replace.yml b/.butcher/types/PassportElementError/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/PassportElementError/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/PassportElementErrorDataField/entity.json b/.butcher/types/PassportElementErrorDataField/entity.json new file mode 100644 index 00000000..9eb32a87 --- /dev/null +++ b/.butcher/types/PassportElementErrorDataField/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrordatafield", + "name": "PassportElementErrorDataField", + "description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "html_description": "

Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.

", + "rst_description": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be data", + "html_description": "Error source, must be data", + "rst_description": "Error source, must be *data*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'", + "html_description": "The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”", + "rst_description": "The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Name of the data field which has the error", + "html_description": "Name of the data field which has the error", + "rst_description": "Name of the data field which has the error\n", + "name": "field_name", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded data hash", + "html_description": "Base64-encoded data hash", + "rst_description": "Base64-encoded data hash\n", + "name": "data_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorDataField/replace.yml b/.butcher/types/PassportElementErrorDataField/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorDataField/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorFile/entity.json b/.butcher/types/PassportElementErrorFile/entity.json new file mode 100644 index 00000000..71c1c10d --- /dev/null +++ b/.butcher/types/PassportElementErrorFile/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorfile", + "name": "PassportElementErrorFile", + "description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "html_description": "

Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.

", + "rst_description": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be file", + "html_description": "Error source, must be file", + "rst_description": "Error source, must be *file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorFile/replace.yml b/.butcher/types/PassportElementErrorFile/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorFile/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorFiles/entity.json b/.butcher/types/PassportElementErrorFiles/entity.json new file mode 100644 index 00000000..61fb2ab9 --- /dev/null +++ b/.butcher/types/PassportElementErrorFiles/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorfiles", + "name": "PassportElementErrorFiles", + "description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "html_description": "

Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.

", + "rst_description": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be files", + "html_description": "Error source, must be files", + "rst_description": "Error source, must be *files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorFiles/replace.yml b/.butcher/types/PassportElementErrorFiles/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorFiles/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorFrontSide/entity.json b/.butcher/types/PassportElementErrorFrontSide/entity.json new file mode 100644 index 00000000..c9bf175c --- /dev/null +++ b/.butcher/types/PassportElementErrorFrontSide/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorfrontside", + "name": "PassportElementErrorFrontSide", + "description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "html_description": "

Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.

", + "rst_description": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be front_side", + "html_description": "Error source, must be front_side", + "rst_description": "Error source, must be *front_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the front side of the document", + "html_description": "Base64-encoded hash of the file with the front side of the document", + "rst_description": "Base64-encoded hash of the file with the front side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorFrontSide/replace.yml b/.butcher/types/PassportElementErrorFrontSide/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorFrontSide/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorReverseSide/entity.json b/.butcher/types/PassportElementErrorReverseSide/entity.json new file mode 100644 index 00000000..8d659b16 --- /dev/null +++ b/.butcher/types/PassportElementErrorReverseSide/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorreverseside", + "name": "PassportElementErrorReverseSide", + "description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "html_description": "

Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.

", + "rst_description": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be reverse_side", + "html_description": "Error source, must be reverse_side", + "rst_description": "Error source, must be *reverse_side*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the reverse side of the document", + "html_description": "Base64-encoded hash of the file with the reverse side of the document", + "rst_description": "Base64-encoded hash of the file with the reverse side of the document\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorReverseSide/replace.yml b/.butcher/types/PassportElementErrorReverseSide/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorReverseSide/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorSelfie/entity.json b/.butcher/types/PassportElementErrorSelfie/entity.json new file mode 100644 index 00000000..f79db407 --- /dev/null +++ b/.butcher/types/PassportElementErrorSelfie/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorselfie", + "name": "PassportElementErrorSelfie", + "description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "html_description": "

Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.

", + "rst_description": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be selfie", + "html_description": "Error source, must be selfie", + "rst_description": "Error source, must be *selfie*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'", + "html_description": "The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”", + "rst_description": "The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded hash of the file with the selfie", + "html_description": "Base64-encoded hash of the file with the selfie", + "rst_description": "Base64-encoded hash of the file with the selfie\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorSelfie/replace.yml b/.butcher/types/PassportElementErrorSelfie/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorSelfie/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorTranslationFile/entity.json b/.butcher/types/PassportElementErrorTranslationFile/entity.json new file mode 100644 index 00000000..0b81d6fb --- /dev/null +++ b/.butcher/types/PassportElementErrorTranslationFile/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrortranslationfile", + "name": "PassportElementErrorTranslationFile", + "description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "html_description": "

Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.

", + "rst_description": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_file", + "html_description": "Error source, must be translation_file", + "rst_description": "Error source, must be *translation_file*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded file hash", + "html_description": "Base64-encoded file hash", + "rst_description": "Base64-encoded file hash\n", + "name": "file_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorTranslationFile/replace.yml b/.butcher/types/PassportElementErrorTranslationFile/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorTranslationFile/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorTranslationFiles/entity.json b/.butcher/types/PassportElementErrorTranslationFiles/entity.json new file mode 100644 index 00000000..15bd0a96 --- /dev/null +++ b/.butcher/types/PassportElementErrorTranslationFiles/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrortranslationfiles", + "name": "PassportElementErrorTranslationFiles", + "description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "html_description": "

Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.

", + "rst_description": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be translation_files", + "html_description": "Error source, must be translation_files", + "rst_description": "Error source, must be *translation_files*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'", + "html_description": "Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”", + "rst_description": "Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'\n", + "name": "type", + "required": true + }, + { + "type": "Array of String", + "description": "List of base64-encoded file hashes", + "html_description": "List of base64-encoded file hashes", + "rst_description": "List of base64-encoded file hashes\n", + "name": "file_hashes", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorTranslationFiles/replace.yml b/.butcher/types/PassportElementErrorTranslationFiles/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorTranslationFiles/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportElementErrorUnspecified/entity.json b/.butcher/types/PassportElementErrorUnspecified/entity.json new file mode 100644 index 00000000..f1a3c4d3 --- /dev/null +++ b/.butcher/types/PassportElementErrorUnspecified/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportelementerrorunspecified", + "name": "PassportElementErrorUnspecified", + "description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "html_description": "

Represents an issue in an unspecified place. The error is considered resolved when new data is added.

", + "rst_description": "Represents an issue in an unspecified place. The error is considered resolved when new data is added.", + "annotations": [ + { + "type": "String", + "description": "Error source, must be unspecified", + "html_description": "Error source, must be unspecified", + "rst_description": "Error source, must be *unspecified*\n", + "name": "source", + "required": true + }, + { + "type": "String", + "description": "Type of element of the user's Telegram Passport which has the issue", + "html_description": "Type of element of the user's Telegram Passport which has the issue", + "rst_description": "Type of element of the user's Telegram Passport which has the issue\n", + "name": "type", + "required": true + }, + { + "type": "String", + "description": "Base64-encoded element hash", + "html_description": "Base64-encoded element hash", + "rst_description": "Base64-encoded element hash\n", + "name": "element_hash", + "required": true + }, + { + "type": "String", + "description": "Error message", + "html_description": "Error message", + "rst_description": "Error message\n", + "name": "message", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PassportElementErrorUnspecified/replace.yml b/.butcher/types/PassportElementErrorUnspecified/replace.yml new file mode 100644 index 00000000..105b390f --- /dev/null +++ b/.butcher/types/PassportElementErrorUnspecified/replace.yml @@ -0,0 +1,2 @@ +bases: + - PassportElementError diff --git a/.butcher/types/PassportFile/entity.json b/.butcher/types/PassportFile/entity.json new file mode 100644 index 00000000..7c10c6cc --- /dev/null +++ b/.butcher/types/PassportFile/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Telegram Passport", + "anchor": "telegram-passport" + }, + "object": { + "anchor": "passportfile", + "name": "PassportFile", + "description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "html_description": "

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.

", + "rst_description": "This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "File size in bytes", + "rst_description": "File size in bytes\n", + "name": "file_size", + "required": true + }, + { + "type": "Integer", + "description": "Unix time when the file was uploaded", + "html_description": "Unix time when the file was uploaded", + "rst_description": "Unix time when the file was uploaded\n", + "name": "file_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PhotoSize/entity.json b/.butcher/types/PhotoSize/entity.json new file mode 100644 index 00000000..67882df0 --- /dev/null +++ b/.butcher/types/PhotoSize/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "photosize", + "name": "PhotoSize", + "description": "This object represents one size of a photo or a file / sticker thumbnail.", + "html_description": "

This object represents one size of a photo or a file / sticker thumbnail.

", + "rst_description": "This object represents one size of a photo or a `file `_ / :class:`aiogram.methods.sticker.Sticker` thumbnail.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Photo width", + "html_description": "Photo width", + "rst_description": "Photo width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Photo height", + "html_description": "Photo height", + "rst_description": "Photo height\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Poll/entity.json b/.butcher/types/Poll/entity.json new file mode 100644 index 00000000..131e96ea --- /dev/null +++ b/.butcher/types/Poll/entity.json @@ -0,0 +1,123 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "poll", + "name": "Poll", + "description": "This object contains information about a poll.", + "html_description": "

This object contains information about a poll.

", + "rst_description": "This object contains information about a poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Poll question, 1-300 characters", + "html_description": "Poll question, 1-300 characters", + "rst_description": "Poll question, 1-300 characters\n", + "name": "question", + "required": true + }, + { + "type": "Array of PollOption", + "description": "List of poll options", + "html_description": "List of poll options", + "rst_description": "List of poll options\n", + "name": "options", + "required": true + }, + { + "type": "Integer", + "description": "Total number of users that voted in the poll", + "html_description": "Total number of users that voted in the poll", + "rst_description": "Total number of users that voted in the poll\n", + "name": "total_voter_count", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is closed", + "html_description": "True, if the poll is closed", + "rst_description": ":code:`True`, if the poll is closed\n", + "name": "is_closed", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll is anonymous", + "html_description": "True, if the poll is anonymous", + "rst_description": ":code:`True`, if the poll is anonymous\n", + "name": "is_anonymous", + "required": true + }, + { + "type": "String", + "description": "Poll type, currently can be 'regular' or 'quiz'", + "html_description": "Poll type, currently can be “regular” or “quiz”", + "rst_description": "Poll type, currently can be 'regular' or 'quiz'\n", + "name": "type", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the poll allows multiple answers", + "html_description": "True, if the poll allows multiple answers", + "rst_description": ":code:`True`, if the poll allows multiple answers\n", + "name": "allows_multiple_answers", + "required": true + }, + { + "type": "Integer", + "description": "0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", + "html_description": "Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.", + "rst_description": "*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.\n", + "name": "correct_option_id", + "required": false + }, + { + "type": "String", + "description": "Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters", + "html_description": "Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters", + "rst_description": "*Optional*. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters\n", + "name": "explanation", + "required": false + }, + { + "type": "Array of MessageEntity", + "description": "Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "html_description": "Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation", + "rst_description": "*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*\n", + "name": "explanation_entities", + "required": false + }, + { + "type": "Integer", + "description": "Amount of time in seconds the poll will be active after creation", + "html_description": "Optional. Amount of time in seconds the poll will be active after creation", + "rst_description": "*Optional*. Amount of time in seconds the poll will be active after creation\n", + "name": "open_period", + "required": false + }, + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the poll will be automatically closed", + "html_description": "Optional. Point in time (Unix timestamp) when the poll will be automatically closed", + "rst_description": "*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed\n", + "name": "close_date", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Poll/replace.yml b/.butcher/types/Poll/replace.yml new file mode 100644 index 00000000..6cf9fbff --- /dev/null +++ b/.butcher/types/Poll/replace.yml @@ -0,0 +1,5 @@ +annotations: + close_date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/PollAnswer/entity.json b/.butcher/types/PollAnswer/entity.json new file mode 100644 index 00000000..323577b6 --- /dev/null +++ b/.butcher/types/PollAnswer/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "pollanswer", + "name": "PollAnswer", + "description": "This object represents an answer of a user in a non-anonymous poll.", + "html_description": "

This object represents an answer of a user in a non-anonymous poll.

", + "rst_description": "This object represents an answer of a user in a non-anonymous poll.", + "annotations": [ + { + "type": "String", + "description": "Unique poll identifier", + "html_description": "Unique poll identifier", + "rst_description": "Unique poll identifier\n", + "name": "poll_id", + "required": true + }, + { + "type": "User", + "description": "The user, who changed the answer to the poll", + "html_description": "The user, who changed the answer to the poll", + "rst_description": "The user, who changed the answer to the poll\n", + "name": "user", + "required": true + }, + { + "type": "Array of Integer", + "description": "0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.", + "html_description": "0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.", + "rst_description": "0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.\n", + "name": "option_ids", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PollOption/entity.json b/.butcher/types/PollOption/entity.json new file mode 100644 index 00000000..dfef5817 --- /dev/null +++ b/.butcher/types/PollOption/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "polloption", + "name": "PollOption", + "description": "This object contains information about one answer option in a poll.", + "html_description": "

This object contains information about one answer option in a poll.

", + "rst_description": "This object contains information about one answer option in a poll.", + "annotations": [ + { + "type": "String", + "description": "Option text, 1-100 characters", + "html_description": "Option text, 1-100 characters", + "rst_description": "Option text, 1-100 characters\n", + "name": "text", + "required": true + }, + { + "type": "Integer", + "description": "Number of users that voted for this option", + "html_description": "Number of users that voted for this option", + "rst_description": "Number of users that voted for this option\n", + "name": "voter_count", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/PreCheckoutQuery/entity.json b/.butcher/types/PreCheckoutQuery/entity.json new file mode 100644 index 00000000..349e8172 --- /dev/null +++ b/.butcher/types/PreCheckoutQuery/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "precheckoutquery", + "name": "PreCheckoutQuery", + "description": "This object contains information about an incoming pre-checkout query.", + "html_description": "

This object contains information about an incoming pre-checkout query.

", + "rst_description": "This object contains information about an incoming pre-checkout query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Three-letter ISO 4217 currency code", + "html_description": "Three-letter ISO 4217 currency code", + "rst_description": "Three-letter ISO 4217 `currency `_ code\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "total_amount", + "required": true + }, + { + "type": "String", + "description": "Bot specified invoice payload", + "html_description": "Bot specified invoice payload", + "rst_description": "Bot specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "String", + "description": "Identifier of the shipping option chosen by the user", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ProximityAlertTriggered/entity.json b/.butcher/types/ProximityAlertTriggered/entity.json new file mode 100644 index 00000000..d8dc1750 --- /dev/null +++ b/.butcher/types/ProximityAlertTriggered/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "proximityalerttriggered", + "name": "ProximityAlertTriggered", + "description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "html_description": "

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.

", + "rst_description": "This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.", + "annotations": [ + { + "type": "User", + "description": "User that triggered the alert", + "html_description": "User that triggered the alert", + "rst_description": "User that triggered the alert\n", + "name": "traveler", + "required": true + }, + { + "type": "User", + "description": "User that set the alert", + "html_description": "User that set the alert", + "rst_description": "User that set the alert\n", + "name": "watcher", + "required": true + }, + { + "type": "Integer", + "description": "The distance between the users", + "html_description": "The distance between the users", + "rst_description": "The distance between the users\n", + "name": "distance", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReplyKeyboardMarkup/entity.json b/.butcher/types/ReplyKeyboardMarkup/entity.json new file mode 100644 index 00000000..1ae025ff --- /dev/null +++ b/.butcher/types/ReplyKeyboardMarkup/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "replykeyboardmarkup", + "name": "ReplyKeyboardMarkup", + "description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).", + "html_description": "

This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).

", + "rst_description": "This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples).", + "annotations": [ + { + "type": "Array of Array of KeyboardButton", + "description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "html_description": "Array of button rows, each represented by an Array of KeyboardButton objects", + "rst_description": "Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects\n", + "name": "keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.", + "html_description": "Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.", + "rst_description": "*Optional*. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to *false*, in which case the custom keyboard is always of the same height as the app's standard keyboard.\n", + "name": "resize_keyboard", + "required": false + }, + { + "type": "Boolean", + "description": "Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false.", + "html_description": "Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false.", + "rst_description": "*Optional*. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to *false*.\n", + "name": "one_time_keyboard", + "required": false + }, + { + "type": "String", + "description": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "html_description": "Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters", + "rst_description": "*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters\n", + "name": "input_field_placeholder", + "required": false + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.\n\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "html_description": "Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
\n
\nExample: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", + "rst_description": "*Optional*. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.\n\n\n\n*Example:* A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReplyKeyboardMarkup/replace.yml b/.butcher/types/ReplyKeyboardMarkup/replace.yml new file mode 100644 index 00000000..b225ab12 --- /dev/null +++ b/.butcher/types/ReplyKeyboardMarkup/replace.yml @@ -0,0 +1,2 @@ +bases: + - MutableTelegramObject diff --git a/.butcher/types/ReplyKeyboardRemove/entity.json b/.butcher/types/ReplyKeyboardRemove/entity.json new file mode 100644 index 00000000..5ca28ce0 --- /dev/null +++ b/.butcher/types/ReplyKeyboardRemove/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "replykeyboardremove", + "name": "ReplyKeyboardRemove", + "description": "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).", + "html_description": "

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).

", + "rst_description": "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`).", + "annotations": [ + { + "type": "True", + "description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)", + "html_description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)", + "rst_description": "Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use *one_time_keyboard* in :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`)\n", + "name": "remove_keyboard", + "required": true + }, + { + "type": "Boolean", + "description": "Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.\n\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "html_description": "Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
\n
\nExample: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.", + "rst_description": "*Optional*. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply (has *reply_to_message_id*), sender of the original message.\n\n\n\n*Example:* A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.\n", + "name": "selective", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ReplyKeyboardRemove/replace.yml b/.butcher/types/ReplyKeyboardRemove/replace.yml new file mode 100644 index 00000000..9d23e3b1 --- /dev/null +++ b/.butcher/types/ReplyKeyboardRemove/replace.yml @@ -0,0 +1,5 @@ +bases: + - MutableTelegramObject +annotations: + remove_keyboard: + const: "True" diff --git a/.butcher/types/ResponseParameters/entity.json b/.butcher/types/ResponseParameters/entity.json new file mode 100644 index 00000000..3166f89d --- /dev/null +++ b/.butcher/types/ResponseParameters/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "responseparameters", + "name": "ResponseParameters", + "description": "Describes why a request was unsuccessful.", + "html_description": "

Describes why a request was unsuccessful.

", + "rst_description": "Describes why a request was unsuccessful.", + "annotations": [ + { + "type": "Integer", + "description": "The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "migrate_to_chat_id", + "required": false + }, + { + "type": "Integer", + "description": "In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "html_description": "Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated", + "rst_description": "*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated\n", + "name": "retry_after", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SentWebAppMessage/entity.json b/.butcher/types/SentWebAppMessage/entity.json new file mode 100644 index 00000000..4fbf67d3 --- /dev/null +++ b/.butcher/types/SentWebAppMessage/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Inline mode", + "anchor": "inline-mode" + }, + "object": { + "anchor": "sentwebappmessage", + "name": "SentWebAppMessage", + "description": "Describes an inline message sent by a Web App on behalf of a user.", + "html_description": "

Describes an inline message sent by a Web App on behalf of a user.

", + "rst_description": "Describes an inline message sent by a `Web App `_ on behalf of a user.", + "annotations": [ + { + "type": "String", + "description": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", + "html_description": "Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message.", + "rst_description": "*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message.\n", + "name": "inline_message_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ShippingAddress/entity.json b/.butcher/types/ShippingAddress/entity.json new file mode 100644 index 00000000..310cc037 --- /dev/null +++ b/.butcher/types/ShippingAddress/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "shippingaddress", + "name": "ShippingAddress", + "description": "This object represents a shipping address.", + "html_description": "

This object represents a shipping address.

", + "rst_description": "This object represents a shipping address.", + "annotations": [ + { + "type": "String", + "description": "Two-letter ISO 3166-1 alpha-2 country code", + "html_description": "Two-letter ISO 3166-1 alpha-2 country code", + "rst_description": "Two-letter ISO 3166-1 alpha-2 country code\n", + "name": "country_code", + "required": true + }, + { + "type": "String", + "description": "State, if applicable", + "html_description": "State, if applicable", + "rst_description": "State, if applicable\n", + "name": "state", + "required": true + }, + { + "type": "String", + "description": "City", + "html_description": "City", + "rst_description": "City\n", + "name": "city", + "required": true + }, + { + "type": "String", + "description": "First line for the address", + "html_description": "First line for the address", + "rst_description": "First line for the address\n", + "name": "street_line1", + "required": true + }, + { + "type": "String", + "description": "Second line for the address", + "html_description": "Second line for the address", + "rst_description": "Second line for the address\n", + "name": "street_line2", + "required": true + }, + { + "type": "String", + "description": "Address post code", + "html_description": "Address post code", + "rst_description": "Address post code\n", + "name": "post_code", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ShippingOption/entity.json b/.butcher/types/ShippingOption/entity.json new file mode 100644 index 00000000..37bc6f18 --- /dev/null +++ b/.butcher/types/ShippingOption/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "shippingoption", + "name": "ShippingOption", + "description": "This object represents one shipping option.", + "html_description": "

This object represents one shipping option.

", + "rst_description": "This object represents one shipping option.", + "annotations": [ + { + "type": "String", + "description": "Shipping option identifier", + "html_description": "Shipping option identifier", + "rst_description": "Shipping option identifier\n", + "name": "id", + "required": true + }, + { + "type": "String", + "description": "Option title", + "html_description": "Option title", + "rst_description": "Option title\n", + "name": "title", + "required": true + }, + { + "type": "Array of LabeledPrice", + "description": "List of price portions", + "html_description": "List of price portions", + "rst_description": "List of price portions\n", + "name": "prices", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/ShippingQuery/entity.json b/.butcher/types/ShippingQuery/entity.json new file mode 100644 index 00000000..d0c2d11d --- /dev/null +++ b/.butcher/types/ShippingQuery/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "shippingquery", + "name": "ShippingQuery", + "description": "This object contains information about an incoming shipping query.", + "html_description": "

This object contains information about an incoming shipping query.

", + "rst_description": "This object contains information about an incoming shipping query.", + "annotations": [ + { + "type": "String", + "description": "Unique query identifier", + "html_description": "Unique query identifier", + "rst_description": "Unique query identifier\n", + "name": "id", + "required": true + }, + { + "type": "User", + "description": "User who sent the query", + "html_description": "User who sent the query", + "rst_description": "User who sent the query\n", + "name": "from", + "required": true + }, + { + "type": "String", + "description": "Bot specified invoice payload", + "html_description": "Bot specified invoice payload", + "rst_description": "Bot specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "ShippingAddress", + "description": "User specified shipping address", + "html_description": "User specified shipping address", + "rst_description": "User specified shipping address\n", + "name": "shipping_address", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Sticker/entity.json b/.butcher/types/Sticker/entity.json new file mode 100644 index 00000000..8d0f1d88 --- /dev/null +++ b/.butcher/types/Sticker/entity.json @@ -0,0 +1,131 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "sticker", + "name": "Sticker", + "description": "This object represents a sticker.", + "html_description": "

This object represents a sticker.

", + "rst_description": "This object represents a sticker.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "String", + "description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "html_description": "Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "rst_description": "Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields *is_animated* and *is_video*.\n", + "name": "type", + "required": true + }, + { + "type": "Integer", + "description": "Sticker width", + "html_description": "Sticker width", + "rst_description": "Sticker width\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Sticker height", + "html_description": "Sticker height", + "rst_description": "Sticker height\n", + "name": "height", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is animated", + "html_description": "True, if the sticker is animated", + "rst_description": ":code:`True`, if the sticker is `animated `_\n", + "name": "is_animated", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker is a video sticker", + "html_description": "True, if the sticker is a video sticker", + "rst_description": ":code:`True`, if the sticker is a `video sticker `_\n", + "name": "is_video", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker thumbnail in the .WEBP or .JPG format", + "html_description": "Optional. Sticker thumbnail in the .WEBP or .JPG format", + "rst_description": "*Optional*. Sticker thumbnail in the .WEBP or .JPG format\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Emoji associated with the sticker", + "html_description": "Optional. Emoji associated with the sticker", + "rst_description": "*Optional*. Emoji associated with the sticker\n", + "name": "emoji", + "required": false + }, + { + "type": "String", + "description": "Name of the sticker set to which the sticker belongs", + "html_description": "Optional. Name of the sticker set to which the sticker belongs", + "rst_description": "*Optional*. Name of the sticker set to which the sticker belongs\n", + "name": "set_name", + "required": false + }, + { + "type": "File", + "description": "For premium regular stickers, premium animation for the sticker", + "html_description": "Optional. For premium regular stickers, premium animation for the sticker", + "rst_description": "*Optional*. For premium regular stickers, premium animation for the sticker\n", + "name": "premium_animation", + "required": false + }, + { + "type": "MaskPosition", + "description": "For mask stickers, the position where the mask should be placed", + "html_description": "Optional. For mask stickers, the position where the mask should be placed", + "rst_description": "*Optional*. For mask stickers, the position where the mask should be placed\n", + "name": "mask_position", + "required": false + }, + { + "type": "String", + "description": "For custom emoji stickers, unique identifier of the custom emoji", + "html_description": "Optional. For custom emoji stickers, unique identifier of the custom emoji", + "rst_description": "*Optional*. For custom emoji stickers, unique identifier of the custom emoji\n", + "name": "custom_emoji_id", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/StickerSet/entity.json b/.butcher/types/StickerSet/entity.json new file mode 100644 index 00000000..4e370e93 --- /dev/null +++ b/.butcher/types/StickerSet/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "stickerset", + "name": "StickerSet", + "description": "This object represents a sticker set.", + "html_description": "

This object represents a sticker set.

", + "rst_description": "This object represents a sticker set.", + "annotations": [ + { + "type": "String", + "description": "Sticker set name", + "html_description": "Sticker set name", + "rst_description": "Sticker set name\n", + "name": "name", + "required": true + }, + { + "type": "String", + "description": "Sticker set title", + "html_description": "Sticker set title", + "rst_description": "Sticker set title\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'", + "html_description": "Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”", + "rst_description": "Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'\n", + "name": "sticker_type", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker set contains animated stickers", + "html_description": "True, if the sticker set contains animated stickers", + "rst_description": ":code:`True`, if the sticker set contains `animated stickers `_\n", + "name": "is_animated", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the sticker set contains video stickers", + "html_description": "True, if the sticker set contains video stickers", + "rst_description": ":code:`True`, if the sticker set contains `video stickers `_\n", + "name": "is_video", + "required": true + }, + { + "type": "Array of Sticker", + "description": "List of all set stickers", + "html_description": "List of all set stickers", + "rst_description": "List of all set stickers\n", + "name": "stickers", + "required": true + }, + { + "type": "PhotoSize", + "description": "Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "html_description": "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format", + "rst_description": "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format\n", + "name": "thumb", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/SuccessfulPayment/entity.json b/.butcher/types/SuccessfulPayment/entity.json new file mode 100644 index 00000000..2d9fe818 --- /dev/null +++ b/.butcher/types/SuccessfulPayment/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Payments", + "anchor": "payments" + }, + "object": { + "anchor": "successfulpayment", + "name": "SuccessfulPayment", + "description": "This object contains basic information about a successful payment.", + "html_description": "

This object contains basic information about a successful payment.

", + "rst_description": "This object contains basic information about a successful payment.", + "annotations": [ + { + "type": "String", + "description": "Three-letter ISO 4217 currency code", + "html_description": "Three-letter ISO 4217 currency code", + "rst_description": "Three-letter ISO 4217 `currency `_ code\n", + "name": "currency", + "required": true + }, + { + "type": "Integer", + "description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "html_description": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "rst_description": "Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).\n", + "name": "total_amount", + "required": true + }, + { + "type": "String", + "description": "Bot specified invoice payload", + "html_description": "Bot specified invoice payload", + "rst_description": "Bot specified invoice payload\n", + "name": "invoice_payload", + "required": true + }, + { + "type": "String", + "description": "Identifier of the shipping option chosen by the user", + "html_description": "Optional. Identifier of the shipping option chosen by the user", + "rst_description": "*Optional*. Identifier of the shipping option chosen by the user\n", + "name": "shipping_option_id", + "required": false + }, + { + "type": "OrderInfo", + "description": "Order information provided by the user", + "html_description": "Optional. Order information provided by the user", + "rst_description": "*Optional*. Order information provided by the user\n", + "name": "order_info", + "required": false + }, + { + "type": "String", + "description": "Telegram payment identifier", + "html_description": "Telegram payment identifier", + "rst_description": "Telegram payment identifier\n", + "name": "telegram_payment_charge_id", + "required": true + }, + { + "type": "String", + "description": "Provider payment identifier", + "html_description": "Provider payment identifier", + "rst_description": "Provider payment identifier\n", + "name": "provider_payment_charge_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Update/entity.json b/.butcher/types/Update/entity.json new file mode 100644 index 00000000..32c7d35d --- /dev/null +++ b/.butcher/types/Update/entity.json @@ -0,0 +1,139 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "update", + "name": "Update", + "description": "This object represents an incoming update.\nAt most one of the optional parameters can be present in any given update.", + "html_description": "

This object represents an incoming update.
\nAt most one of the optional parameters can be present in any given update.

", + "rst_description": "This `object `_ represents an incoming update.\n\nAt most **one** of the optional parameters can be present in any given update.", + "annotations": [ + { + "type": "Integer", + "description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.", + "html_description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.", + "rst_description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using `webhooks `_, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.\n", + "name": "update_id", + "required": true + }, + { + "type": "Message", + "description": "New incoming message of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming message of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming message of any kind - text, photo, sticker, etc.\n", + "name": "message", + "required": false + }, + { + "type": "Message", + "description": "New version of a message that is known to the bot and was edited", + "html_description": "Optional. New version of a message that is known to the bot and was edited", + "rst_description": "*Optional*. New version of a message that is known to the bot and was edited\n", + "name": "edited_message", + "required": false + }, + { + "type": "Message", + "description": "New incoming channel post of any kind - text, photo, sticker, etc.", + "html_description": "Optional. New incoming channel post of any kind - text, photo, sticker, etc.", + "rst_description": "*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.\n", + "name": "channel_post", + "required": false + }, + { + "type": "Message", + "description": "New version of a channel post that is known to the bot and was edited", + "html_description": "Optional. New version of a channel post that is known to the bot and was edited", + "rst_description": "*Optional*. New version of a channel post that is known to the bot and was edited\n", + "name": "edited_channel_post", + "required": false + }, + { + "type": "InlineQuery", + "description": "New incoming inline query", + "html_description": "Optional. New incoming inline query", + "rst_description": "*Optional*. New incoming `inline `_ query\n", + "name": "inline_query", + "required": false + }, + { + "type": "ChosenInlineResult", + "description": "The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.", + "html_description": "Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.", + "rst_description": "*Optional*. The result of an `inline `_ query that was chosen by a user and sent to their chat partner. Please see our documentation on the `feedback collecting `_ for details on how to enable these updates for your bot.\n", + "name": "chosen_inline_result", + "required": false + }, + { + "type": "CallbackQuery", + "description": "New incoming callback query", + "html_description": "Optional. New incoming callback query", + "rst_description": "*Optional*. New incoming callback query\n", + "name": "callback_query", + "required": false + }, + { + "type": "ShippingQuery", + "description": "New incoming shipping query. Only for invoices with flexible price", + "html_description": "Optional. New incoming shipping query. Only for invoices with flexible price", + "rst_description": "*Optional*. New incoming shipping query. Only for invoices with flexible price\n", + "name": "shipping_query", + "required": false + }, + { + "type": "PreCheckoutQuery", + "description": "New incoming pre-checkout query. Contains full information about checkout", + "html_description": "Optional. New incoming pre-checkout query. Contains full information about checkout", + "rst_description": "*Optional*. New incoming pre-checkout query. Contains full information about checkout\n", + "name": "pre_checkout_query", + "required": false + }, + { + "type": "Poll", + "description": "New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot", + "html_description": "Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot", + "rst_description": "*Optional*. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot\n", + "name": "poll", + "required": false + }, + { + "type": "PollAnswer", + "description": "A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.", + "html_description": "Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.", + "rst_description": "*Optional*. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.\n", + "name": "poll_answer", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.", + "html_description": "Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.", + "rst_description": "*Optional*. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.\n", + "name": "my_chat_member", + "required": false + }, + { + "type": "ChatMemberUpdated", + "description": "A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of allowed_updates to receive these updates.", + "html_description": "Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.", + "rst_description": "*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of *allowed_updates* to receive these updates.\n", + "name": "chat_member", + "required": false + }, + { + "type": "ChatJoinRequest", + "description": "A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.", + "html_description": "Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.", + "rst_description": "*Optional*. A request to join the chat has been sent. The bot must have the *can_invite_users* administrator right in the chat to receive these updates.\n", + "name": "chat_join_request", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/User/entity.json b/.butcher/types/User/entity.json new file mode 100644 index 00000000..3b08c07e --- /dev/null +++ b/.butcher/types/User/entity.json @@ -0,0 +1,107 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "user", + "name": "User", + "description": "This object represents a Telegram user or bot.", + "html_description": "

This object represents a Telegram user or bot.

", + "rst_description": "This object represents a Telegram user or bot.", + "annotations": [ + { + "type": "Integer", + "description": "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "html_description": "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.", + "rst_description": "Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.\n", + "name": "id", + "required": true + }, + { + "type": "Boolean", + "description": "True, if this user is a bot", + "html_description": "True, if this user is a bot", + "rst_description": ":code:`True`, if this user is a bot\n", + "name": "is_bot", + "required": true + }, + { + "type": "String", + "description": "User's or bot's first name", + "html_description": "User's or bot's first name", + "rst_description": "User's or bot's first name\n", + "name": "first_name", + "required": true + }, + { + "type": "String", + "description": "User's or bot's last name", + "html_description": "Optional. User's or bot's last name", + "rst_description": "*Optional*. User's or bot's last name\n", + "name": "last_name", + "required": false + }, + { + "type": "String", + "description": "User's or bot's username", + "html_description": "Optional. User's or bot's username", + "rst_description": "*Optional*. User's or bot's username\n", + "name": "username", + "required": false + }, + { + "type": "String", + "description": "IETF language tag of the user's language", + "html_description": "Optional. IETF language tag of the user's language", + "rst_description": "*Optional*. `IETF language tag `_ of the user's language\n", + "name": "language_code", + "required": false + }, + { + "type": "True", + "description": "True, if this user is a Telegram Premium user", + "html_description": "Optional. True, if this user is a Telegram Premium user", + "rst_description": "*Optional*. :code:`True`, if this user is a Telegram Premium user\n", + "name": "is_premium", + "required": false + }, + { + "type": "True", + "description": "True, if this user added the bot to the attachment menu", + "html_description": "Optional. True, if this user added the bot to the attachment menu", + "rst_description": "*Optional*. :code:`True`, if this user added the bot to the attachment menu\n", + "name": "added_to_attachment_menu", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot can be invited to groups. Returned only in getMe.", + "html_description": "Optional. True, if the bot can be invited to groups. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot can be invited to groups. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_join_groups", + "required": false + }, + { + "type": "Boolean", + "description": "True, if privacy mode is disabled for the bot. Returned only in getMe.", + "html_description": "Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if `privacy mode `_ is disabled for the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "can_read_all_group_messages", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the bot supports inline queries. Returned only in getMe.", + "html_description": "Optional. True, if the bot supports inline queries. Returned only in getMe.", + "rst_description": "*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n", + "name": "supports_inline_queries", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/UserProfilePhotos/entity.json b/.butcher/types/UserProfilePhotos/entity.json new file mode 100644 index 00000000..4b09b777 --- /dev/null +++ b/.butcher/types/UserProfilePhotos/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "userprofilephotos", + "name": "UserProfilePhotos", + "description": "This object represent a user's profile pictures.", + "html_description": "

This object represent a user's profile pictures.

", + "rst_description": "This object represent a user's profile pictures.", + "annotations": [ + { + "type": "Integer", + "description": "Total number of profile pictures the target user has", + "html_description": "Total number of profile pictures the target user has", + "rst_description": "Total number of profile pictures the target user has\n", + "name": "total_count", + "required": true + }, + { + "type": "Array of Array of PhotoSize", + "description": "Requested profile pictures (in up to 4 sizes each)", + "html_description": "Requested profile pictures (in up to 4 sizes each)", + "rst_description": "Requested profile pictures (in up to 4 sizes each)\n", + "name": "photos", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Venue/entity.json b/.butcher/types/Venue/entity.json new file mode 100644 index 00000000..7ca5f295 --- /dev/null +++ b/.butcher/types/Venue/entity.json @@ -0,0 +1,75 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "venue", + "name": "Venue", + "description": "This object represents a venue.", + "html_description": "

This object represents a venue.

", + "rst_description": "This object represents a venue.", + "annotations": [ + { + "type": "Location", + "description": "Venue location. Can't be a live location", + "html_description": "Venue location. Can't be a live location", + "rst_description": "Venue location. Can't be a live location\n", + "name": "location", + "required": true + }, + { + "type": "String", + "description": "Name of the venue", + "html_description": "Name of the venue", + "rst_description": "Name of the venue\n", + "name": "title", + "required": true + }, + { + "type": "String", + "description": "Address of the venue", + "html_description": "Address of the venue", + "rst_description": "Address of the venue\n", + "name": "address", + "required": true + }, + { + "type": "String", + "description": "Foursquare identifier of the venue", + "html_description": "Optional. Foursquare identifier of the venue", + "rst_description": "*Optional*. Foursquare identifier of the venue\n", + "name": "foursquare_id", + "required": false + }, + { + "type": "String", + "description": "Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)", + "html_description": "Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)", + "rst_description": "*Optional*. Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)\n", + "name": "foursquare_type", + "required": false + }, + { + "type": "String", + "description": "Google Places identifier of the venue", + "html_description": "Optional. Google Places identifier of the venue", + "rst_description": "*Optional*. Google Places identifier of the venue\n", + "name": "google_place_id", + "required": false + }, + { + "type": "String", + "description": "Google Places type of the venue. (See supported types.)", + "html_description": "Optional. Google Places type of the venue. (See supported types.)", + "rst_description": "*Optional*. Google Places type of the venue. (See `supported types `_.)\n", + "name": "google_place_type", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Video/entity.json b/.butcher/types/Video/entity.json new file mode 100644 index 00000000..65c5594f --- /dev/null +++ b/.butcher/types/Video/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "video", + "name": "Video", + "description": "This object represents a video file.", + "html_description": "

This object represents a video file.

", + "rst_description": "This object represents a video file.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width as defined by sender", + "html_description": "Video width as defined by sender", + "rst_description": "Video width as defined by sender\n", + "name": "width", + "required": true + }, + { + "type": "Integer", + "description": "Video height as defined by sender", + "html_description": "Video height as defined by sender", + "rst_description": "Video height as defined by sender\n", + "name": "height", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by sender", + "html_description": "Duration of the video in seconds as defined by sender", + "rst_description": "Duration of the video in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "name": "thumb", + "required": false + }, + { + "type": "String", + "description": "Original filename as defined by sender", + "html_description": "Optional. Original filename as defined by sender", + "rst_description": "*Optional*. Original filename as defined by sender\n", + "name": "file_name", + "required": false + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/VideoChatEnded/entity.json b/.butcher/types/VideoChatEnded/entity.json new file mode 100644 index 00000000..58d88893 --- /dev/null +++ b/.butcher/types/VideoChatEnded/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatended", + "name": "VideoChatEnded", + "description": "This object represents a service message about a video chat ended in the chat.", + "html_description": "

This object represents a service message about a video chat ended in the chat.

", + "rst_description": "This object represents a service message about a video chat ended in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Video chat duration in seconds", + "html_description": "Video chat duration in seconds", + "rst_description": "Video chat duration in seconds\n", + "name": "duration", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/VideoChatParticipantsInvited/entity.json b/.butcher/types/VideoChatParticipantsInvited/entity.json new file mode 100644 index 00000000..27114659 --- /dev/null +++ b/.butcher/types/VideoChatParticipantsInvited/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatparticipantsinvited", + "name": "VideoChatParticipantsInvited", + "description": "This object represents a service message about new members invited to a video chat.", + "html_description": "

This object represents a service message about new members invited to a video chat.

", + "rst_description": "This object represents a service message about new members invited to a video chat.", + "annotations": [ + { + "type": "Array of User", + "description": "New members that were invited to the video chat", + "html_description": "New members that were invited to the video chat", + "rst_description": "New members that were invited to the video chat\n", + "name": "users", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/VideoChatScheduled/entity.json b/.butcher/types/VideoChatScheduled/entity.json new file mode 100644 index 00000000..c67f3af4 --- /dev/null +++ b/.butcher/types/VideoChatScheduled/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatscheduled", + "name": "VideoChatScheduled", + "description": "This object represents a service message about a video chat scheduled in the chat.", + "html_description": "

This object represents a service message about a video chat scheduled in the chat.

", + "rst_description": "This object represents a service message about a video chat scheduled in the chat.", + "annotations": [ + { + "type": "Integer", + "description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "html_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator", + "rst_description": "Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator\n", + "name": "start_date", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/VideoChatScheduled/replace.yml b/.butcher/types/VideoChatScheduled/replace.yml new file mode 100644 index 00000000..48d98bf6 --- /dev/null +++ b/.butcher/types/VideoChatScheduled/replace.yml @@ -0,0 +1,5 @@ +annotations: + start_date: + parsed_type: + type: std + name: datetime.datetime diff --git a/.butcher/types/VideoChatStarted/entity.json b/.butcher/types/VideoChatStarted/entity.json new file mode 100644 index 00000000..173e71e7 --- /dev/null +++ b/.butcher/types/VideoChatStarted/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videochatstarted", + "name": "VideoChatStarted", + "description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "html_description": "

This object represents a service message about a video chat started in the chat. Currently holds no information.

", + "rst_description": "This object represents a service message about a video chat started in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/VideoNote/entity.json b/.butcher/types/VideoNote/entity.json new file mode 100644 index 00000000..85dbf566 --- /dev/null +++ b/.butcher/types/VideoNote/entity.json @@ -0,0 +1,67 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "videonote", + "name": "VideoNote", + "description": "This object represents a video message (available in Telegram apps as of v.4.0).", + "html_description": "

This object represents a video message (available in Telegram apps as of v.4.0).

", + "rst_description": "This object represents a `video message `_ (available in Telegram apps as of `v.4.0 `_).", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Video width and height (diameter of the video message) as defined by sender", + "html_description": "Video width and height (diameter of the video message) as defined by sender", + "rst_description": "Video width and height (diameter of the video message) as defined by sender\n", + "name": "length", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the video in seconds as defined by sender", + "html_description": "Duration of the video in seconds as defined by sender", + "rst_description": "Duration of the video in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "PhotoSize", + "description": "Video thumbnail", + "html_description": "Optional. Video thumbnail", + "rst_description": "*Optional*. Video thumbnail\n", + "name": "thumb", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes", + "html_description": "Optional. File size in bytes", + "rst_description": "*Optional*. File size in bytes\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Voice/entity.json b/.butcher/types/Voice/entity.json new file mode 100644 index 00000000..2be67726 --- /dev/null +++ b/.butcher/types/Voice/entity.json @@ -0,0 +1,59 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "voice", + "name": "Voice", + "description": "This object represents a voice note.", + "html_description": "

This object represents a voice note.

", + "rst_description": "This object represents a voice note.", + "annotations": [ + { + "type": "String", + "description": "Identifier for this file, which can be used to download or reuse the file", + "html_description": "Identifier for this file, which can be used to download or reuse the file", + "rst_description": "Identifier for this file, which can be used to download or reuse the file\n", + "name": "file_id", + "required": true + }, + { + "type": "String", + "description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "html_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.", + "rst_description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.\n", + "name": "file_unique_id", + "required": true + }, + { + "type": "Integer", + "description": "Duration of the audio in seconds as defined by sender", + "html_description": "Duration of the audio in seconds as defined by sender", + "rst_description": "Duration of the audio in seconds as defined by sender\n", + "name": "duration", + "required": true + }, + { + "type": "String", + "description": "MIME type of the file as defined by sender", + "html_description": "Optional. MIME type of the file as defined by sender", + "rst_description": "*Optional*. MIME type of the file as defined by sender\n", + "name": "mime_type", + "required": false + }, + { + "type": "Integer", + "description": "File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "html_description": "Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.", + "rst_description": "*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.\n", + "name": "file_size", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WebAppData/entity.json b/.butcher/types/WebAppData/entity.json new file mode 100644 index 00000000..a625d7ca --- /dev/null +++ b/.butcher/types/WebAppData/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "webappdata", + "name": "WebAppData", + "description": "Describes data sent from a Web App to the bot.", + "html_description": "

Describes data sent from a Web App to the bot.

", + "rst_description": "Describes data sent from a `Web App `_ to the bot.", + "annotations": [ + { + "type": "String", + "description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "The data. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "The data. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "data", + "required": true + }, + { + "type": "String", + "description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "html_description": "Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.", + "rst_description": "Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.\n", + "name": "button_text", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WebAppInfo/entity.json b/.butcher/types/WebAppInfo/entity.json new file mode 100644 index 00000000..3a2e882d --- /dev/null +++ b/.butcher/types/WebAppInfo/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "webappinfo", + "name": "WebAppInfo", + "description": "Describes a Web App.", + "html_description": "

Describes a Web App.

", + "rst_description": "Describes a `Web App `_.", + "annotations": [ + { + "type": "String", + "description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "html_description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps", + "rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps `_\n", + "name": "url", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WebhookInfo/entity.json b/.butcher/types/WebhookInfo/entity.json new file mode 100644 index 00000000..0fbe1ee4 --- /dev/null +++ b/.butcher/types/WebhookInfo/entity.json @@ -0,0 +1,91 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Getting updates", + "anchor": "getting-updates" + }, + "object": { + "anchor": "webhookinfo", + "name": "WebhookInfo", + "description": "Describes the current status of a webhook.", + "html_description": "

Describes the current status of a webhook.

", + "rst_description": "Describes the current status of a webhook.", + "annotations": [ + { + "type": "String", + "description": "Webhook URL, may be empty if webhook is not set up", + "html_description": "Webhook URL, may be empty if webhook is not set up", + "rst_description": "Webhook URL, may be empty if webhook is not set up\n", + "name": "url", + "required": true + }, + { + "type": "Boolean", + "description": "True, if a custom certificate was provided for webhook certificate checks", + "html_description": "True, if a custom certificate was provided for webhook certificate checks", + "rst_description": ":code:`True`, if a custom certificate was provided for webhook certificate checks\n", + "name": "has_custom_certificate", + "required": true + }, + { + "type": "Integer", + "description": "Number of updates awaiting delivery", + "html_description": "Number of updates awaiting delivery", + "rst_description": "Number of updates awaiting delivery\n", + "name": "pending_update_count", + "required": true + }, + { + "type": "String", + "description": "Currently used webhook IP address", + "html_description": "Optional. Currently used webhook IP address", + "rst_description": "*Optional*. Currently used webhook IP address\n", + "name": "ip_address", + "required": false + }, + { + "type": "Integer", + "description": "Unix time for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_date", + "required": false + }, + { + "type": "String", + "description": "Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "html_description": "Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook", + "rst_description": "*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook\n", + "name": "last_error_message", + "required": false + }, + { + "type": "Integer", + "description": "Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "html_description": "Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters", + "rst_description": "*Optional*. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters\n", + "name": "last_synchronization_error_date", + "required": false + }, + { + "type": "Integer", + "description": "The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "html_description": "Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery", + "rst_description": "*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery\n", + "name": "max_connections", + "required": false + }, + { + "type": "Array of String", + "description": "A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "html_description": "Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member", + "rst_description": "*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*\n", + "name": "allowed_updates", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/WebhookInfo/replace.yml b/.butcher/types/WebhookInfo/replace.yml new file mode 100644 index 00000000..4b1a71f0 --- /dev/null +++ b/.butcher/types/WebhookInfo/replace.yml @@ -0,0 +1,6 @@ +annotations: + last_error_date: &date + parsed_type: + type: std + name: datetime.datetime + last_synchronization_error_date: *date diff --git a/.editorconfig b/.editorconfig index f519610f..f726e25b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,7 +9,7 @@ insert_final_newline = true trim_trailing_whitespace = true max_line_length = 99 -[**.{yml,yaml}] +[**.{yml,yaml,json}] indent_size = 2 [**.{md,txt,rst}] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 109dbdee..ffe7b117 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,9 +8,10 @@ repos: - id: "debug-statements" - id: "end-of-file-fixer" - id: "mixed-line-ending" - - id: "check-yaml" - id: "detect-private-key" + - id: "check-yaml" - id: "check-toml" + - id: "check-json" - repo: https://github.com/psf/black rev: 22.10.0 diff --git a/CHANGES/1069.misc.rst b/CHANGES/1069.misc.rst new file mode 100644 index 00000000..a5a1730b --- /dev/null +++ b/CHANGES/1069.misc.rst @@ -0,0 +1 @@ +Added integration with new code-generator named `Butcher `_ diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 843a3779..25f96bca 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -59,7 +59,6 @@ from ..methods import ( GetChatAdministrators, GetChatMember, GetChatMemberCount, - GetChatMembersCount, GetChatMenuButton, GetCustomEmojiStickers, GetFile, @@ -72,7 +71,6 @@ from ..methods import ( GetUpdates, GetUserProfilePhotos, GetWebhookInfo, - KickChatMember, LeaveChat, LogOut, PinChatMessage, @@ -382,160 +380,251 @@ class Bot(ContextInstanceMixin["Bot"]): return False return hash(self) == hash(other) - # ============================================================================================= - # Group: Getting updates - # Source: https://core.telegram.org/bots/api#getting-updates - # ============================================================================================= - - async def get_updates( + async def add_sticker_to_set( self, - offset: Optional[int] = None, - limit: Optional[int] = None, - timeout: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - request_timeout: Optional[int] = None, - ) -> List[Update]: - """ - Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects. - - **Notes** - - **1.** This method will not work if an outgoing webhook is set up. - - **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response. - - Source: https://core.telegram.org/bots/api#getupdates - - :param offset: Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten. - :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. - :param timeout: Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. - :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used. - :param request_timeout: Request timeout - :return: Returns an Array of Update objects. - """ - call = GetUpdates( - offset=offset, - limit=limit, - timeout=timeout, - allowed_updates=allowed_updates, - ) - return await self(call, request_timeout=request_timeout) - - async def set_webhook( - self, - url: str, - certificate: Optional[InputFile] = None, - ip_address: Optional[str] = None, - max_connections: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - drop_pending_updates: Optional[bool] = None, - secret_token: Optional[str] = None, + user_id: int, + name: str, + emojis: str, + png_sticker: Optional[Union[InputFile, str]] = None, + tgs_sticker: Optional[InputFile] = None, + webm_sticker: Optional[InputFile] = None, + mask_position: Optional[MaskPosition] = None, request_timeout: Optional[int] = None, ) -> bool: """ - Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. - If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. + Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success. - **Notes** - - **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up. - - **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work. - - **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. - If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. - - Source: https://core.telegram.org/bots/api#setwebhook - - :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration - :param certificate: Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details. - :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS - :param max_connections: The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. - :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used. - :param drop_pending_updates: Pass :code:`True` to drop all pending updates - :param secret_token: A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you. + :param user_id: User identifier of sticker set owner + :param name: Sticker set name + :param emojis: One or more emoji corresponding to the sticker + :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` + :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements + :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements + :param mask_position: A JSON-serialized object for position where the mask should be placed on faces :param request_timeout: Request timeout - :return: Returns True on success. + :return: Returns :code:`True` on success. """ - call = SetWebhook( + + call = AddStickerToSet( + user_id=user_id, + name=name, + emojis=emojis, + png_sticker=png_sticker, + tgs_sticker=tgs_sticker, + webm_sticker=webm_sticker, + mask_position=mask_position, + ) + return await self(call, request_timeout=request_timeout) + + async def answer_callback_query( + self, + callback_query_id: str, + text: Optional[str] = None, + show_alert: Optional[bool] = None, + url: Optional[str] = None, + cache_time: Optional[int] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. + + Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. + + :param callback_query_id: Unique identifier for the query to be answered + :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters + :param show_alert: If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*. + :param url: URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button. + :param cache_time: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. + :param request_timeout: Request timeout + :return: Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. + """ + + call = AnswerCallbackQuery( + callback_query_id=callback_query_id, + text=text, + show_alert=show_alert, url=url, - certificate=certificate, - ip_address=ip_address, - max_connections=max_connections, - allowed_updates=allowed_updates, - drop_pending_updates=drop_pending_updates, - secret_token=secret_token, + cache_time=cache_time, ) return await self(call, request_timeout=request_timeout) - async def delete_webhook( + async def answer_inline_query( self, - drop_pending_updates: Optional[bool] = None, + inline_query_id: str, + results: List[InlineQueryResult], + cache_time: Optional[int] = None, + is_personal: Optional[bool] = None, + next_offset: Optional[str] = None, + switch_pm_text: Optional[str] = None, + switch_pm_parameter: Optional[str] = None, request_timeout: Optional[int] = None, ) -> bool: """ - Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success. + Use this method to send answers to an inline query. On success, :code:`True` is returned. - Source: https://core.telegram.org/bots/api#deletewebhook + No more than **50** results per query are allowed. - :param drop_pending_updates: Pass :code:`True` to drop all pending updates + :param inline_query_id: Unique identifier for the answered query + :param results: A JSON-serialized array of results for the inline query + :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. + :param is_personal: Pass :code:`True` if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query + :param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. + :param switch_pm_text: If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter* + :param switch_pm_parameter: `Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. :param request_timeout: Request timeout - :return: Returns True on success. + :return: On success, :code:`True` is returned. """ - call = DeleteWebhook( - drop_pending_updates=drop_pending_updates, + + call = AnswerInlineQuery( + inline_query_id=inline_query_id, + results=results, + cache_time=cache_time, + is_personal=is_personal, + next_offset=next_offset, + switch_pm_text=switch_pm_text, + switch_pm_parameter=switch_pm_parameter, ) return await self(call, request_timeout=request_timeout) - async def get_webhook_info( - self, - request_timeout: Optional[int] = None, - ) -> WebhookInfo: - """ - Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. - - Source: https://core.telegram.org/bots/api#getwebhookinfo - - :param request_timeout: Request timeout - :return: On success, returns a WebhookInfo object. If the bot is using getUpdates, will - return an object with the url field empty. - """ - call = GetWebhookInfo() - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Available methods - # Source: https://core.telegram.org/bots/api#available-methods - # ============================================================================================= - - async def get_me( - self, - request_timeout: Optional[int] = None, - ) -> User: - """ - A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. - - Source: https://core.telegram.org/bots/api#getme - - :param request_timeout: Request timeout - :return: Returns basic information about the bot in form of a User object. - """ - call = GetMe() - return await self(call, request_timeout=request_timeout) - - async def log_out( + async def answer_pre_checkout_query( self, + pre_checkout_query_id: str, + ok: bool, + error_message: Optional[str] = None, request_timeout: Optional[int] = None, ) -> bool: """ - Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters. - - Source: https://core.telegram.org/bots/api#logout + Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. + :param pre_checkout_query_id: Unique identifier for the query to be answered + :param ok: Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems. + :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. :param request_timeout: Request timeout - :return: Returns True on success. + :return: **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. """ - call = LogOut() + + call = AnswerPreCheckoutQuery( + pre_checkout_query_id=pre_checkout_query_id, + ok=ok, + error_message=error_message, + ) + return await self(call, request_timeout=request_timeout) + + async def answer_shipping_query( + self, + shipping_query_id: str, + ok: bool, + shipping_options: Optional[List[ShippingOption]] = None, + error_message: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned. + + :param shipping_query_id: Unique identifier for the query to be answered + :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) + :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. + :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. + :param request_timeout: Request timeout + :return: On success, :code:`True` is returned. + """ + + call = AnswerShippingQuery( + shipping_query_id=shipping_query_id, + ok=ok, + shipping_options=shipping_options, + error_message=error_message, + ) + return await self(call, request_timeout=request_timeout) + + async def answer_web_app_query( + self, + web_app_query_id: str, + result: InlineQueryResult, + request_timeout: Optional[int] = None, + ) -> SentWebAppMessage: + """ + Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. + + :param web_app_query_id: Unique identifier for the query to be answered + :param result: A JSON-serialized object describing the message to be sent + :param request_timeout: Request timeout + :return: On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. + """ + + call = AnswerWebAppQuery( + web_app_query_id=web_app_query_id, + result=result, + ) + return await self(call, request_timeout=request_timeout) + + async def approve_chat_join_request( + self, + chat_id: Union[int, str], + user_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ApproveChatJoinRequest( + chat_id=chat_id, + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def ban_chat_member( + self, + chat_id: Union[int, str], + user_id: int, + until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + revoke_messages: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. + :param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = BanChatMember( + chat_id=chat_id, + user_id=user_id, + until_date=until_date, + revoke_messages=revoke_messages, + ) + return await self(call, request_timeout=request_timeout) + + async def ban_chat_sender_chat( + self, + chat_id: Union[int, str], + sender_chat_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param sender_chat_id: Unique identifier of the target sender chat + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = BanChatSenderChat( + chat_id=chat_id, + sender_chat_id=sender_chat_id, + ) return await self(call, request_timeout=request_timeout) async def close( @@ -545,97 +634,31 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters. - Source: https://core.telegram.org/bots/api#close - :param request_timeout: Request timeout - :return: The method will return error 429 in the first 10 minutes after the bot is - launched. Returns True on success. + :return: Requires no parameters. """ + call = Close() return await self(call, request_timeout=request_timeout) - async def send_message( + async def close_forum_topic( self, chat_id: Union[int, str], - text: str, - message_thread_id: Optional[int] = None, - parse_mode: Optional[str] = UNSET, - entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, + message_thread_id: int, request_timeout: Optional[int] = None, - ) -> Message: + ) -> bool: """ - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - Source: https://core.telegram.org/bots/api#sendmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param text: Text of the message to be sent, 1-4096 characters after entities parsing - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param disable_web_page_preview: Disables link previews for links in this message - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic :param request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: Returns :code:`True` on success. """ - call = SendMessage( + + call = CloseForumTopic( chat_id=chat_id, - text=text, message_thread_id=message_thread_id, - parse_mode=parse_mode, - entities=entities, - disable_web_page_preview=disable_web_page_preview, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def forward_message( - self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_id: int, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#forwardmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) - :param message_id: Message identifier in the chat specified in *from_chat_id* - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the forwarded message from forwarding and saving - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = ForwardMessage( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_id=message_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, ) return await self(call, request_timeout=request_timeout) @@ -660,8 +683,6 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. - Source: https://core.telegram.org/bots/api#copymessage - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) :param message_id: Message identifier in the chat specified in *from_chat_id* @@ -675,8 +696,9 @@ class Bot(ContextInstanceMixin["Bot"]): :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. :param request_timeout: Request timeout - :return: Returns the MessageId of the sent message on success. + :return: Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. """ + call = CopyMessage( chat_id=chat_id, from_chat_id=from_chat_id, @@ -693,11 +715,1163 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) - async def send_photo( + async def create_chat_invite_link( self, chat_id: Union[int, str], - photo: Union[InputFile, str], + name: Optional[str] = None, + expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + member_limit: Optional[int] = None, + creates_join_request: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> ChatInviteLink: + """ + Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param name: Invite link name; 0-32 characters + :param expire_date: Point in time (Unix timestamp) when the link will expire + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified + :param request_timeout: Request timeout + :return: Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = CreateChatInviteLink( + chat_id=chat_id, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + ) + return await self(call, request_timeout=request_timeout) + + async def create_forum_topic( + self, + chat_id: Union[int, str], + name: str, + icon_color: Optional[int] = None, + icon_custom_emoji_id: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> ForumTopic: + """ + Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param name: Topic name, 1-128 characters + :param icon_color: Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F) + :param icon_custom_emoji_id: Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. + :param request_timeout: Request timeout + :return: Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. + """ + + call = CreateForumTopic( + chat_id=chat_id, + name=name, + icon_color=icon_color, + icon_custom_emoji_id=icon_custom_emoji_id, + ) + return await self(call, request_timeout=request_timeout) + + async def create_invoice_link( + self, + title: str, + description: str, + payload: str, + provider_token: str, + currency: str, + prices: List[LabeledPrice], + max_tip_amount: Optional[int] = None, + suggested_tip_amounts: Optional[List[int]] = None, + provider_data: Optional[str] = None, + photo_url: Optional[str] = None, + photo_size: Optional[int] = None, + photo_width: Optional[int] = None, + photo_height: Optional[int] = None, + need_name: Optional[bool] = None, + need_phone_number: Optional[bool] = None, + need_email: Optional[bool] = None, + need_shipping_address: Optional[bool] = None, + send_phone_number_to_provider: Optional[bool] = None, + send_email_to_provider: Optional[bool] = None, + is_flexible: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> str: + """ + Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. + + :param title: Product name, 1-32 characters + :param description: Product description, 1-255 characters + :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + :param provider_token: Payment provider token, obtained via `BotFather `_ + :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_ + :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) + :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 + :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*. + :param provider_data: JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. + :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. + :param photo_size: Photo size in bytes + :param photo_width: Photo width + :param photo_height: Photo height + :param need_name: Pass :code:`True` if you require the user's full name to complete the order + :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order + :param need_email: Pass :code:`True` if you require the user's email address to complete the order + :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order + :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider + :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider + :param is_flexible: Pass :code:`True` if the final price depends on the shipping method + :param request_timeout: Request timeout + :return: Returns the created invoice link as *String* on success. + """ + + call = CreateInvoiceLink( + title=title, + description=description, + payload=payload, + provider_token=provider_token, + currency=currency, + prices=prices, + max_tip_amount=max_tip_amount, + suggested_tip_amounts=suggested_tip_amounts, + provider_data=provider_data, + photo_url=photo_url, + photo_size=photo_size, + photo_width=photo_width, + photo_height=photo_height, + need_name=need_name, + need_phone_number=need_phone_number, + need_email=need_email, + need_shipping_address=need_shipping_address, + send_phone_number_to_provider=send_phone_number_to_provider, + send_email_to_provider=send_email_to_provider, + is_flexible=is_flexible, + ) + return await self(call, request_timeout=request_timeout) + + async def create_new_sticker_set( + self, + user_id: int, + name: str, + title: str, + emojis: str, + png_sticker: Optional[Union[InputFile, str]] = None, + tgs_sticker: Optional[InputFile] = None, + webm_sticker: Optional[InputFile] = None, + sticker_type: Optional[str] = None, + mask_position: Optional[MaskPosition] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success. + + :param user_id: User identifier of created sticker set owner + :param name: Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters. + :param title: Sticker set title, 1-64 characters + :param emojis: One or more emoji corresponding to the sticker + :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` + :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements + :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements + :param sticker_type: Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created. + :param mask_position: A JSON-serialized object for position where the mask should be placed on faces + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = CreateNewStickerSet( + user_id=user_id, + name=name, + title=title, + emojis=emojis, + png_sticker=png_sticker, + tgs_sticker=tgs_sticker, + webm_sticker=webm_sticker, + sticker_type=sticker_type, + mask_position=mask_position, + ) + return await self(call, request_timeout=request_timeout) + + async def decline_chat_join_request( + self, + chat_id: Union[int, str], + user_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeclineChatJoinRequest( + chat_id=chat_id, + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_chat_photo( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteChatPhoto( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_chat_sticker_set( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteChatStickerSet( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_forum_topic( + self, + chat_id: Union[int, str], + message_thread_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteForumTopic( + chat_id=chat_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_message( + self, + chat_id: Union[int, str], + message_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to delete a message, including service messages, with the following limitations: + + - A message can only be deleted if it was sent less than 48 hours ago. + + - Service messages about a supergroup, channel, or forum topic creation can't be deleted. + + - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. + + - Bots can delete outgoing messages in private chats, groups, and supergroups. + + - Bots can delete incoming messages in private chats. + + - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. + + - If the bot is an administrator of a group, it can delete any message there. + + - If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. + + Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Identifier of the message to delete + :param request_timeout: Request timeout + :return: Use this method to delete a message, including service messages, with the following limitations: + """ + + call = DeleteMessage( + chat_id=chat_id, + message_id=message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_my_commands( + self, + scope: Optional[BotCommandScope] = None, + language_code: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands `_ will be shown to affected users. Returns :code:`True` on success. + + :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. + :param language_code: A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteMyCommands( + scope=scope, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_sticker_from_set( + self, + sticker: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. + + :param sticker: File identifier of the sticker + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteStickerFromSet( + sticker=sticker, + ) + return await self(call, request_timeout=request_timeout) + + async def delete_webhook( + self, + drop_pending_updates: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success. + + :param drop_pending_updates: Pass :code:`True` to drop all pending updates + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteWebhook( + drop_pending_updates=drop_pending_updates, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_chat_invite_link( + self, + chat_id: Union[int, str], + invite_link: str, + name: Optional[str] = None, + expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + member_limit: Optional[int] = None, + creates_join_request: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> ChatInviteLink: + """ + Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param invite_link: The invite link to edit + :param name: Invite link name; 0-32 characters + :param expire_date: Point in time (Unix timestamp) when the link will expire + :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 + :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified + :param request_timeout: Request timeout + :return: Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = EditChatInviteLink( + chat_id=chat_id, + invite_link=invite_link, + name=name, + expire_date=expire_date, + member_limit=member_limit, + creates_join_request=creates_join_request, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_forum_topic( + self, + chat_id: Union[int, str], + message_thread_id: int, + name: str, + icon_custom_emoji_id: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param name: New topic name, 1-128 characters + :param icon_custom_emoji_id: New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = EditForumTopic( + chat_id=chat_id, + message_thread_id=message_thread_id, + name=name, + icon_custom_emoji_id=icon_custom_emoji_id, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_caption( + self, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET, + caption_entities: Optional[List[MessageEntity]] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Union[Message, bool]: + """ + Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param caption: New caption of the message, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the message caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. + :param request_timeout: Request timeout + :return: On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + """ + + call = EditMessageCaption( + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_live_location( + self, + latitude: float, + longitude: float, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + horizontal_accuracy: Optional[float] = None, + heading: Optional[int] = None, + proximity_alert_radius: Optional[int] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Union[Message, bool]: + """ + Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + + :param latitude: Latitude of new location + :param longitude: Longitude of new location + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 + :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. + :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. + :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. + :param request_timeout: Request timeout + :return: On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + """ + + call = EditMessageLiveLocation( + latitude=latitude, + longitude=longitude, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + horizontal_accuracy=horizontal_accuracy, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_media( + self, + media: InputMedia, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Union[Message, bool]: + """ + Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + + :param media: A JSON-serialized object for a new media content of the message + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. + :param request_timeout: Request timeout + :return: On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + """ + + call = EditMessageMedia( + media=media, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_reply_markup( + self, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Union[Message, bool]: + """ + Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. + :param request_timeout: Request timeout + :return: On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + """ + + call = EditMessageReplyMarkup( + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_message_text( + self, + text: str, + chat_id: Optional[Union[int, str]] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + parse_mode: Optional[str] = UNSET, + entities: Optional[List[MessageEntity]] = None, + disable_web_page_preview: Optional[bool] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Union[Message, bool]: + """ + Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + + :param text: New text of the message, 1-4096 characters after entities parsing + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit + :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. + :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* + :param disable_web_page_preview: Disables link previews for links in this message + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. + :param request_timeout: Request timeout + :return: On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. + """ + + call = EditMessageText( + text=text, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + parse_mode=parse_mode, + entities=entities, + disable_web_page_preview=disable_web_page_preview, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def export_chat_invite_link( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> str: + """ + Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success. + + Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. + """ + + call = ExportChatInviteLink( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def forward_message( + self, + chat_id: Union[int, str], + from_chat_id: Union[int, str], + message_id: int, message_thread_id: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) + :param message_id: Message identifier in the chat specified in *from_chat_id* + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the forwarded message from forwarding and saving + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = ForwardMessage( + chat_id=chat_id, + from_chat_id=from_chat_id, + message_id=message_id, + message_thread_id=message_thread_id, + disable_notification=disable_notification, + protect_content=protect_content, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> Chat: + """ + Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a :class:`aiogram.types.chat.Chat` object on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.chat.Chat` object on success. + """ + + call = GetChat( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_administrators( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> List[ + Union[ + ChatMemberOwner, + ChatMemberAdministrator, + ChatMemberMember, + ChatMemberRestricted, + ChatMemberLeft, + ChatMemberBanned, + ] + ]: + """ + Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. + """ + + call = GetChatAdministrators( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_member( + self, + chat_id: Union[int, str], + user_id: int, + request_timeout: Optional[int] = None, + ) -> Union[ + ChatMemberOwner, + ChatMemberAdministrator, + ChatMemberMember, + ChatMemberRestricted, + ChatMemberLeft, + ChatMemberBanned, + ]: + """ + Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + """ + + call = GetChatMember( + chat_id=chat_id, + user_id=user_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_member_count( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> int: + """ + Use this method to get the number of members in a chat. Returns *Int* on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns *Int* on success. + """ + + call = GetChatMemberCount( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_chat_menu_button( + self, + chat_id: Optional[int] = None, + request_timeout: Optional[int] = None, + ) -> Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]: + """ + Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success. + + :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be returned + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.menu_button.MenuButton` on success. + """ + + call = GetChatMenuButton( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_custom_emoji_stickers( + self, + custom_emoji_ids: List[str], + request_timeout: Optional[int] = None, + ) -> List[Sticker]: + """ + Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. + + :param custom_emoji_ids: List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. + """ + + call = GetCustomEmojiStickers( + custom_emoji_ids=custom_emoji_ids, + ) + return await self(call, request_timeout=request_timeout) + + async def get_file( + self, + file_id: str, + request_timeout: Optional[int] = None, + ) -> File: + """ + Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. + **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. + + :param file_id: File identifier to get information about + :param request_timeout: Request timeout + :return: You should save the file's MIME type and name (if available) when the File object is received. + """ + + call = GetFile( + file_id=file_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_forum_topic_icon_stickers( + self, + request_timeout: Optional[int] = None, + ) -> List[Sticker]: + """ + Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. + + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. + """ + + call = GetForumTopicIconStickers() + return await self(call, request_timeout=request_timeout) + + async def get_game_high_scores( + self, + user_id: int, + chat_id: Optional[int] = None, + message_id: Optional[int] = None, + inline_message_id: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> List[GameHighScore]: + """ + Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects. + + This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. + + :param user_id: Target user id + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat + :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message + :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param request_timeout: Request timeout + :return: Please note that this behavior is subject to change. + """ + + call = GetGameHighScores( + user_id=user_id, + chat_id=chat_id, + message_id=message_id, + inline_message_id=inline_message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def get_me( + self, + request_timeout: Optional[int] = None, + ) -> User: + """ + A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. + + :param request_timeout: Request timeout + :return: Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. + """ + + call = GetMe() + return await self(call, request_timeout=request_timeout) + + async def get_my_commands( + self, + scope: Optional[BotCommandScope] = None, + language_code: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> List[BotCommand]: + """ + Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned. + + :param scope: A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. + :param language_code: A two-letter ISO 639-1 language code or an empty string + :param request_timeout: Request timeout + :return: If commands aren't set, an empty list is returned. + """ + + call = GetMyCommands( + scope=scope, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_default_administrator_rights( + self, + for_channels: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> ChatAdministratorRights: + """ + Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. + + :param for_channels: Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. + """ + + call = GetMyDefaultAdministratorRights( + for_channels=for_channels, + ) + return await self(call, request_timeout=request_timeout) + + async def get_sticker_set( + self, + name: str, + request_timeout: Optional[int] = None, + ) -> StickerSet: + """ + Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. + + :param name: Name of the sticker set + :param request_timeout: Request timeout + :return: On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. + """ + + call = GetStickerSet( + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def get_updates( + self, + offset: Optional[int] = None, + limit: Optional[int] = None, + timeout: Optional[int] = None, + allowed_updates: Optional[List[str]] = None, + request_timeout: Optional[int] = None, + ) -> List[Update]: + """ + Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects. + + **Notes** + + **1.** This method will not work if an outgoing webhook is set up. + + **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response. + + :param offset: Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will forgotten. + :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :param timeout: Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. + :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used. + :param request_timeout: Request timeout + :return: Returns an Array of :class:`aiogram.types.update.Update` objects. + """ + + call = GetUpdates( + offset=offset, + limit=limit, + timeout=timeout, + allowed_updates=allowed_updates, + ) + return await self(call, request_timeout=request_timeout) + + async def get_user_profile_photos( + self, + user_id: int, + offset: Optional[int] = None, + limit: Optional[int] = None, + request_timeout: Optional[int] = None, + ) -> UserProfilePhotos: + """ + Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. + + :param user_id: Unique identifier of the target user + :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. + :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. + :param request_timeout: Request timeout + :return: Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. + """ + + call = GetUserProfilePhotos( + user_id=user_id, + offset=offset, + limit=limit, + ) + return await self(call, request_timeout=request_timeout) + + async def get_webhook_info( + self, + request_timeout: Optional[int] = None, + ) -> WebhookInfo: + """ + Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. + + :param request_timeout: Request timeout + :return: If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. + """ + + call = GetWebhookInfo() + return await self(call, request_timeout=request_timeout) + + async def leave_chat( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = LeaveChat( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def log_out( + self, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters. + + :param request_timeout: Request timeout + :return: Requires no parameters. + """ + + call = LogOut() + return await self(call, request_timeout=request_timeout) + + async def pin_chat_message( + self, + chat_id: Union[int, str], + message_id: int, + disable_notification: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Identifier of a message to pin + :param disable_notification: Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = PinChatMessage( + chat_id=chat_id, + message_id=message_id, + disable_notification=disable_notification, + ) + return await self(call, request_timeout=request_timeout) + + async def promote_chat_member( + self, + chat_id: Union[int, str], + user_id: int, + is_anonymous: Optional[bool] = None, + can_manage_chat: Optional[bool] = None, + can_post_messages: Optional[bool] = None, + can_edit_messages: Optional[bool] = None, + can_delete_messages: Optional[bool] = None, + can_manage_video_chats: Optional[bool] = None, + can_restrict_members: Optional[bool] = None, + can_promote_members: Optional[bool] = None, + can_change_info: Optional[bool] = None, + can_invite_users: Optional[bool] = None, + can_pin_messages: Optional[bool] = None, + can_manage_topics: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden + :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege + :param can_post_messages: Pass :code:`True` if the administrator can create channel posts, channels only + :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages, channels only + :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users + :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats + :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members + :param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) + :param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings + :param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat + :param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only + :param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = PromoteChatMember( + chat_id=chat_id, + user_id=user_id, + is_anonymous=is_anonymous, + can_manage_chat=can_manage_chat, + can_post_messages=can_post_messages, + can_edit_messages=can_edit_messages, + can_delete_messages=can_delete_messages, + can_manage_video_chats=can_manage_video_chats, + can_restrict_members=can_restrict_members, + can_promote_members=can_promote_members, + can_change_info=can_change_info, + can_invite_users=can_invite_users, + can_pin_messages=can_pin_messages, + can_manage_topics=can_manage_topics, + ) + return await self(call, request_timeout=request_timeout) + + async def reopen_forum_topic( + self, + chat_id: Union[int, str], + message_thread_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = ReopenForumTopic( + chat_id=chat_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def restrict_chat_member( + self, + chat_id: Union[int, str], + user_id: int, + permissions: ChatPermissions, + until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param user_id: Unique identifier of the target user + :param permissions: A JSON-serialized object for new user permissions + :param until_date: Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = RestrictChatMember( + chat_id=chat_id, + user_id=user_id, + permissions=permissions, + until_date=until_date, + ) + return await self(call, request_timeout=request_timeout) + + async def revoke_chat_invite_link( + self, + chat_id: Union[int, str], + invite_link: str, + request_timeout: Optional[int] = None, + ) -> ChatInviteLink: + """ + Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + + :param chat_id: Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`) + :param invite_link: The invite link to revoke + :param request_timeout: Request timeout + :return: Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. + """ + + call = RevokeChatInviteLink( + chat_id=chat_id, + invite_link=invite_link, + ) + return await self(call, request_timeout=request_timeout) + + async def send_animation( + self, + chat_id: Union[int, str], + animation: Union[InputFile, str], + message_thread_id: Optional[int] = None, + duration: Optional[int] = None, + width: Optional[int] = None, + height: Optional[int] = None, + thumb: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -711,15 +1885,17 @@ class Bot(ContextInstanceMixin["Bot"]): request_timeout: Optional[int] = None, ) -> Message: """ - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto + Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป ` + :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป ` :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. + :param duration: Duration of sent animation in seconds + :param width: Animation width + :param height: Animation height + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป ` + :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving @@ -727,12 +1903,17 @@ class Bot(ContextInstanceMixin["Bot"]): :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. :param request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. """ - call = SendPhoto( + + call = SendAnimation( chat_id=chat_id, - photo=photo, + animation=animation, message_thread_id=message_thread_id, + duration=duration, + width=width, + height=height, + thumb=thumb, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -769,8 +1950,6 @@ class Bot(ContextInstanceMixin["Bot"]): Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - Source: https://core.telegram.org/bots/api#sendaudio - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only @@ -787,8 +1966,9 @@ class Bot(ContextInstanceMixin["Bot"]): :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. :param request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. """ + call = SendAudio( chat_id=chat_id, audio=audio, @@ -808,6 +1988,122 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) + async def send_chat_action( + self, + chat_id: Union[int, str], + action: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success. + + Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please waitโ€ฆ', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. + + We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_. + :param request_timeout: Request timeout + :return: The user will see a 'sending photo' status for the bot. + """ + + call = SendChatAction( + chat_id=chat_id, + action=action, + ) + return await self(call, request_timeout=request_timeout) + + async def send_contact( + self, + chat_id: Union[int, str], + phone_number: str, + first_name: str, + message_thread_id: Optional[int] = None, + last_name: Optional[str] = None, + vcard: Optional[str] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param phone_number: Contact's phone number + :param first_name: Contact's first name + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param last_name: Contact's last name + :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendContact( + chat_id=chat_id, + phone_number=phone_number, + first_name=first_name, + message_thread_id=message_thread_id, + last_name=last_name, + vcard=vcard, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def send_dice( + self, + chat_id: Union[int, str], + message_thread_id: Optional[int] = None, + emoji: Optional[str] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ŸŽฒ', '๐ŸŽฏ', '๐Ÿ€', 'โšฝ', '๐ŸŽณ', or '๐ŸŽฐ'. Dice can have values 1-6 for '๐ŸŽฒ', '๐ŸŽฏ' and '๐ŸŽณ', values 1-5 for '๐Ÿ€' and 'โšฝ', and values 1-64 for '๐ŸŽฐ'. Defaults to '๐ŸŽฒ' + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendDice( + chat_id=chat_id, + message_thread_id=message_thread_id, + emoji=emoji, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + async def send_document( self, chat_id: Union[int, str], @@ -830,8 +2126,6 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - Source: https://core.telegram.org/bots/api#senddocument - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only @@ -846,8 +2140,9 @@ class Bot(ContextInstanceMixin["Bot"]): :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. :param request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. """ + call = SendDocument( chat_id=chat_id, document=document, @@ -865,2051 +2160,36 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) - async def send_video( + async def send_game( self, - chat_id: Union[int, str], - video: Union[InputFile, str], - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป ` - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป ` - :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVideo( - chat_id=chat_id, - video=video, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumb=thumb, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_animation( - self, - chat_id: Union[int, str], - animation: Union[InputFile, str], - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files ยป ` - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป ` - :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendAnimation( - chat_id=chat_id, - animation=animation, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumb=thumb, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_voice( - self, - chat_id: Union[int, str], - voice: Union[InputFile, str], - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Voice message caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the voice message in seconds - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVoice( - chat_id=chat_id, - voice=voice, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_video_note( - self, - chat_id: Union[int, str], - video_note: Union[InputFile, str], - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVideoNote( - chat_id=chat_id, - video_note=video_note, - message_thread_id=message_thread_id, - duration=duration, - length=length, - thumb=thumb, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_media_group( - self, - chat_id: Union[int, str], - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], + chat_id: int, + game_short_name: str, message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> List[Message]: - """ - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param reply_to_message_id: If the messages are a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param request_timeout: Request timeout - :return: On success, an array of Messages that were sent is returned. - """ - call = SendMediaGroup( - chat_id=chat_id, - media=media, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - ) - return await self(call, request_timeout=request_timeout) - - async def send_location( - self, - chat_id: Union[int, str], - latitude: float, - longitude: float, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400. - :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendLocation( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - message_thread_id=message_thread_id, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_live_location( - self, - latitude: float, - longitude: float, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - horizontal_accuracy: Optional[float] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagelivelocation - - :param latitude: Latitude of new location - :param longitude: Longitude of new location - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageLiveLocation( - latitude=latitude, - longitude=longitude, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - horizontal_accuracy=horizontal_accuracy, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def stop_message_live_location( - self, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#stopmessagelivelocation - - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message with live location to stop - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = StopMessageLiveLocation( - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_venue( - self, - chat_id: Union[int, str], - latitude: float, - longitude: float, - title: str, - address: str, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, ) -> Message: """ - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. + Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - Source: https://core.telegram.org/bots/api#sendvenue - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param latitude: Latitude of the venue - :param longitude: Longitude of the venue - :param title: Name of the venue - :param address: Address of the venue - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param foursquare_id: Foursquare identifier of the venue - :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) - :param google_place_id: Google Places identifier of the venue - :param google_place_type: Google Places type of the venue. (See `supported types `_.) - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendVenue( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - message_thread_id=message_thread_id, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_contact( - self, - chat_id: Union[int, str], - phone_number: str, - first_name: str, - message_thread_id: Optional[int] = None, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param last_name: Contact's last name - :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendContact( - chat_id=chat_id, - phone_number=phone_number, - first_name=first_name, - message_thread_id=message_thread_id, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_poll( - self, - chat_id: Union[int, str], - question: str, - options: List[str], - message_thread_id: Optional[int] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[str] = UNSET, - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` - :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode - :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing - :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. - :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. - :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendPoll( - chat_id=chat_id, - question=question, - options=options, - message_thread_id=message_thread_id, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_dice( - self, - chat_id: Union[int, str], - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '๐ŸŽฒ', '๐ŸŽฏ', '๐Ÿ€', 'โšฝ', '๐ŸŽณ', or '๐ŸŽฐ'. Dice can have values 1-6 for '๐ŸŽฒ', '๐ŸŽฏ' and '๐ŸŽณ', values 1-5 for '๐Ÿ€' and 'โšฝ', and values 1-64 for '๐ŸŽฐ'. Defaults to '๐ŸŽฒ' - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding - :param reply_to_message_id: If the message is a reply, ID of the original message - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. - :param request_timeout: Request timeout - :return: On success, the sent Message is returned. - """ - call = SendDice( - chat_id=chat_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - reply_to_message_id=reply_to_message_id, - allow_sending_without_reply=allow_sending_without_reply, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def send_chat_action( - self, - chat_id: Union[int, str], - action: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success. - - Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please waitโ€ฆ', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. - - We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. - - Source: https://core.telegram.org/bots/api#sendchataction - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_. - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SendChatAction( - chat_id=chat_id, - action=action, - ) - return await self(call, request_timeout=request_timeout) - - async def get_user_profile_photos( - self, - user_id: int, - offset: Optional[int] = None, - limit: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> UserProfilePhotos: - """ - Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. - - Source: https://core.telegram.org/bots/api#getuserprofilephotos - - :param user_id: Unique identifier of the target user - :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. - :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. - :param request_timeout: Request timeout - :return: Returns a UserProfilePhotos object. - """ - call = GetUserProfilePhotos( - user_id=user_id, - offset=offset, - limit=limit, - ) - return await self(call, request_timeout=request_timeout) - - async def get_file( - self, - file_id: str, - request_timeout: Optional[int] = None, - ) -> File: - """ - Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. - **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. - - Source: https://core.telegram.org/bots/api#getfile - - :param file_id: File identifier to get information about - :param request_timeout: Request timeout - :return: On success, a File object is returned. - """ - call = GetFile( - file_id=file_id, - ) - return await self(call, request_timeout=request_timeout) - - async def ban_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. - :param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels. - :param request_timeout: Request timeout - :return: In the case of supergroups and channels, the user will not be able to return to - the chat on their own using invite links, etc. Returns True on success. - """ - call = BanChatMember( - chat_id=chat_id, - user_id=user_id, - until_date=until_date, - revoke_messages=revoke_messages, - ) - return await self(call, request_timeout=request_timeout) - - async def kick_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - .. warning: - - Renamed from :code:`kickChatMember` in 5.3 bot API version and can be removed in near future - - Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. - :param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels. - :param request_timeout: Request timeout - :return: In the case of supergroups and channels, the user will not be able to return to - the chat 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, - revoke_messages=revoke_messages, - ) - return await self(call, request_timeout=request_timeout) - - async def unban_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - only_if_banned: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param only_if_banned: Do nothing if the user is not banned - :param request_timeout: Request timeout - :return: The user will not return to the group or channel automatically, but will be able - to join via link, etc. Returns True on success. - """ - call = UnbanChatMember( - chat_id=chat_id, - user_id=user_id, - only_if_banned=only_if_banned, - ) - return await self(call, request_timeout=request_timeout) - - async def restrict_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - permissions: ChatPermissions, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#restrictchatmember - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param user_id: Unique identifier of the target user - :param permissions: A JSON-serialized object for new user permissions - :param until_date: Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = RestrictChatMember( - chat_id=chat_id, - user_id=user_id, - permissions=permissions, - until_date=until_date, - ) - return await self(call, request_timeout=request_timeout) - - async def promote_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_video_chats: Optional[bool] = None, - can_restrict_members: Optional[bool] = None, - can_promote_members: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#promotechatmember - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden - :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege - :param can_post_messages: Pass :code:`True` if the administrator can create channel posts, channels only - :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages, channels only - :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users - :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats - :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members - :param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) - :param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings - :param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat - :param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only - :param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = PromoteChatMember( - chat_id=chat_id, - user_id=user_id, - is_anonymous=is_anonymous, - can_manage_chat=can_manage_chat, - can_post_messages=can_post_messages, - can_edit_messages=can_edit_messages, - can_delete_messages=can_delete_messages, - can_manage_video_chats=can_manage_video_chats, - can_restrict_members=can_restrict_members, - can_promote_members=can_promote_members, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_administrator_custom_title( - self, - chat_id: Union[int, str], - user_id: int, - custom_title: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param user_id: Unique identifier of the target user - :param custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatAdministratorCustomTitle( - chat_id=chat_id, - user_id=user_id, - custom_title=custom_title, - ) - return await self(call, request_timeout=request_timeout) - - async def ban_chat_sender_chat( - self, - chat_id: Union[int, str], - sender_chat_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatsenderchat - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sender_chat_id: Unique identifier of the target sender chat - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = BanChatSenderChat( - chat_id=chat_id, - sender_chat_id=sender_chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unban_chat_sender_chat( - self, - chat_id: Union[int, str], - sender_chat_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatsenderchat - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sender_chat_id: Unique identifier of the target sender chat - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = UnbanChatSenderChat( - chat_id=chat_id, - sender_chat_id=sender_chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_permissions( - self, - chat_id: Union[int, str], - permissions: ChatPermissions, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatpermissions - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param permissions: A JSON-serialized object for new default chat permissions - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatPermissions( - chat_id=chat_id, - permissions=permissions, - ) - return await self(call, request_timeout=request_timeout) - - async def export_chat_invite_link( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> str: - """ - Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success. - - Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. - - Source: https://core.telegram.org/bots/api#exportchatinvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns the new invite link as String on success. - """ - call = ExportChatInviteLink( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def create_chat_invite_link( - self, - chat_id: Union[int, str], - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#createchatinvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param name: Invite link name; 0-32 characters - :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified - :param request_timeout: Request timeout - :return: Returns the new invite link as ChatInviteLink object. - """ - call = CreateChatInviteLink( - chat_id=chat_id, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_chat_invite_link( - self, - chat_id: Union[int, str], - invite_link: str, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#editchatinvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param invite_link: The invite link to edit - :param name: Invite link name; 0-32 characters - :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified - :param request_timeout: Request timeout - :return: Returns the edited invite link as a ChatInviteLink object. - """ - call = EditChatInviteLink( - chat_id=chat_id, - invite_link=invite_link, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - ) - return await self(call, request_timeout=request_timeout) - - async def revoke_chat_invite_link( - self, - chat_id: Union[int, str], - invite_link: str, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#revokechatinvitelink - - :param chat_id: Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`) - :param invite_link: The invite link to revoke - :param request_timeout: Request timeout - :return: Returns the revoked invite link as ChatInviteLink object. - """ - call = RevokeChatInviteLink( - chat_id=chat_id, - invite_link=invite_link, - ) - return await self(call, request_timeout=request_timeout) - - async def approve_chat_join_request( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#approvechatjoinrequest - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = ApproveChatJoinRequest( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def decline_chat_join_request( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#declinechatjoinrequest - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeclineChatJoinRequest( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_photo( - self, - chat_id: Union[int, str], - photo: InputFile, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatphoto - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param photo: New chat photo, uploaded using multipart/form-data - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatPhoto( - chat_id=chat_id, - photo=photo, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_chat_photo( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatphoto - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteChatPhoto( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_title( - self, - chat_id: Union[int, str], - title: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchattitle - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param title: New chat title, 1-128 characters - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatTitle( - chat_id=chat_id, - title=title, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_description( - self, - chat_id: Union[int, str], - description: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatdescription - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param description: New chat description, 0-255 characters - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatDescription( - chat_id=chat_id, - description=description, - ) - return await self(call, request_timeout=request_timeout) - - async def pin_chat_message( - self, - chat_id: Union[int, str], - message_id: int, - disable_notification: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#pinchatmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of a message to pin - :param disable_notification: Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = PinChatMessage( - chat_id=chat_id, - message_id=message_id, - disable_notification=disable_notification, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_chat_message( - self, - chat_id: Union[int, str], - message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinchatmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = UnpinChatMessage( - chat_id=chat_id, - message_id=message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_all_chat_messages( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallchatmessages - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = UnpinAllChatMessages( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def leave_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#leavechat - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = LeaveChat( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> Chat: - """ - Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a :class:`aiogram.types.chat.Chat` object on success. - - Source: https://core.telegram.org/bots/api#getchat - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns a Chat object on success. - """ - call = GetChat( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_administrators( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ]: - """ - Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. - - Source: https://core.telegram.org/bots/api#getchatadministrators - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns an Array of ChatMember objects. - """ - call = GetChatAdministrators( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_member_count( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> int: - """ - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns Int on success. - """ - call = GetChatMemberCount( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_members_count( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> int: - """ - .. warning: - - Renamed from :code:`getChatMembersCount` in 5.3 bot API version and can be removed in near future - - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns Int on success. - """ - call = GetChatMembersCount( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ]: - """ - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. - - Source: https://core.telegram.org/bots/api#getchatmember - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns a ChatMember object on success. - """ - call = GetChatMember( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_sticker_set( - self, - chat_id: Union[int, str], - sticker_set_name: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatstickerset - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param sticker_set_name: Name of the sticker set to be set as the group sticker set - :param request_timeout: Request timeout - :return: Use the field can_set_sticker_set optionally returned in getChat requests to - 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(call, request_timeout=request_timeout) - - async def delete_chat_sticker_set( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatstickerset - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Use the field can_set_sticker_set optionally returned in getChat requests to - check if the bot can use this method. Returns True on success. - """ - call = DeleteChatStickerSet( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_forum_topic_icon_stickers( - self, - request_timeout: Optional[int] = None, - ) -> List[Sticker]: - """ - Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - - Source: https://core.telegram.org/bots/api#getforumtopiciconstickers - - :param request_timeout: Request timeout - :return: Returns an Array of Sticker objects. - """ - call = GetForumTopicIconStickers() - return await self(call, request_timeout=request_timeout) - - async def create_forum_topic( - self, - chat_id: Union[int, str], - name: str, - icon_color: Optional[int] = None, - icon_custom_emoji_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> ForumTopic: - """ - Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. - - Source: https://core.telegram.org/bots/api#createforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param name: Topic name, 1-128 characters - :param icon_color: Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F - :param icon_custom_emoji_id: Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. - :param request_timeout: Request timeout - :return: Returns information about the created topic as a ForumTopic object. - """ - call = CreateForumTopic( - chat_id=chat_id, - name=name, - icon_color=icon_color, - icon_custom_emoji_id=icon_custom_emoji_id, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - name: str, - icon_custom_emoji_id: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#editforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param name: New topic name, 1-128 characters - :param icon_custom_emoji_id: New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = EditForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - name=name, - icon_custom_emoji_id=icon_custom_emoji_id, - ) - return await self(call, request_timeout=request_timeout) - - async def close_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#closeforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = CloseForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def reopen_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#reopenforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = ReopenForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deleteforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_all_forum_topic_messages( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = UnpinAllForumTopicMessages( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_callback_query( - self, - callback_query_id: str, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. - - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. - - Source: https://core.telegram.org/bots/api#answercallbackquery - - :param callback_query_id: Unique identifier for the query to be answered - :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters - :param show_alert: If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*. - :param url: URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button. - :param cache_time: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. - :param request_timeout: Request timeout - :return: On success, True is returned. - """ - call = AnswerCallbackQuery( - callback_query_id=callback_query_id, - text=text, - show_alert=show_alert, - url=url, - cache_time=cache_time, - ) - return await self(call, request_timeout=request_timeout) - - async def set_my_commands( - self, - commands: List[BotCommand], - scope: Optional[BotCommandScope] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the list of the bot's commands. See `this manual `_ for more details about bot commands. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmycommands - - :param commands: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. - :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetMyCommands( - commands=commands, - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_my_commands( - self, - scope: Optional[BotCommandScope] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands `_ will be shown to affected users. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemycommands - - :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteMyCommands( - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def get_my_commands( - self, - scope: Optional[BotCommandScope] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> List[BotCommand]: - """ - Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned. - - Source: https://core.telegram.org/bots/api#getmycommands - - :param scope: A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: A two-letter ISO 639-1 language code or an empty string - :param request_timeout: Request timeout - :return: Returns an Array of BotCommand objects. If commands aren't set, an empty list is - returned. - """ - call = GetMyCommands( - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_menu_button( - self, - chat_id: Optional[int] = None, - menu_button: Optional[ - Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands] - ] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatmenubutton - - :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be changed - :param menu_button: A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault` - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetChatMenuButton( - chat_id=chat_id, - menu_button=menu_button, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_menu_button( - self, - chat_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]: - """ - Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success. - - Source: https://core.telegram.org/bots/api#getchatmenubutton - - :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be returned - :param request_timeout: Request timeout - :return: Returns MenuButton on success. - """ - call = GetChatMenuButton( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_my_default_administrator_rights( - self, - rights: Optional[ChatAdministratorRights] = None, - for_channels: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights - - :param rights: A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared. - :param for_channels: Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetMyDefaultAdministratorRights( - rights=rights, - for_channels=for_channels, - ) - return await self(call, request_timeout=request_timeout) - - async def get_my_default_administrator_rights( - self, - for_channels: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> ChatAdministratorRights: - """ - Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. - - Source: https://core.telegram.org/bots/api#getmydefaultadministratorrights - - :param for_channels: Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. - :param request_timeout: Request timeout - :return: Returns ChatAdministratorRights on success. - """ - call = GetMyDefaultAdministratorRights( - for_channels=for_channels, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Updating messages - # Source: https://core.telegram.org/bots/api#updating-messages - # ============================================================================================= - - async def edit_message_text( - self, - text: str, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagetext - - :param text: New text of the message, 1-4096 characters after entities parsing - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param disable_web_page_preview: Disables link previews for links in this message - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageText( - text=text, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - parse_mode=parse_mode, - entities=entities, - disable_web_page_preview=disable_web_page_preview, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_caption( - self, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagecaption - - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param caption: New caption of the message, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageCaption( - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_media( - self, - media: InputMedia, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagemedia - - :param media: A JSON-serialized object for a new media content of the message - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageMedia( - media=media, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_reply_markup( - self, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagereplymarkup - - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited Message is - returned, otherwise True is returned. - """ - call = EditMessageReplyMarkup( - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def stop_poll( - self, - chat_id: Union[int, str], - message_id: int, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Poll: - """ - Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned. - - Source: https://core.telegram.org/bots/api#stoppoll - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of the original message with the poll - :param reply_markup: A JSON-serialized object for a new message `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, the stopped Poll is returned. - """ - call = StopPoll( - chat_id=chat_id, - message_id=message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_message( - self, - chat_id: Union[int, str], - message_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a message, including service messages, with the following limitations: - - - A message can only be deleted if it was sent less than 48 hours ago. - - - Service messages about a supergroup, channel, or forum topic creation can't be deleted. - - - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - - - Bots can delete outgoing messages in private chats, groups, and supergroups. - - - Bots can delete incoming messages in private chats. - - - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. - - - If the bot is an administrator of a group, it can delete any message there. - - - If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. - - Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of the message to delete - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteMessage( - chat_id=chat_id, - message_id=message_id, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Stickers - # Source: https://core.telegram.org/bots/api#stickers - # ============================================================================================= - - async def send_sticker( - self, - chat_id: Union[int, str], - sticker: Union[InputFile, str], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` + :param chat_id: Unique identifier for the target chat + :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. :param request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. """ - call = SendSticker( + + call = SendGame( chat_id=chat_id, - sticker=sticker, + game_short_name=game_short_name, message_thread_id=message_thread_id, disable_notification=disable_notification, protect_content=protect_content, @@ -2919,283 +2199,6 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) - async def get_sticker_set( - self, - name: str, - request_timeout: Optional[int] = None, - ) -> StickerSet: - """ - Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. - - Source: https://core.telegram.org/bots/api#getstickerset - - :param name: Name of the sticker set - :param request_timeout: Request timeout - :return: On success, a StickerSet object is returned. - """ - call = GetStickerSet( - name=name, - ) - return await self(call, request_timeout=request_timeout) - - async def get_custom_emoji_stickers( - self, - custom_emoji_ids: List[str], - request_timeout: Optional[int] = None, - ) -> List[Sticker]: - """ - Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - - Source: https://core.telegram.org/bots/api#getcustomemojistickers - - :param custom_emoji_ids: List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. - :param request_timeout: Request timeout - :return: Returns an Array of Sticker objects. - """ - call = GetCustomEmojiStickers( - custom_emoji_ids=custom_emoji_ids, - ) - return await self(call, request_timeout=request_timeout) - - async def upload_sticker_file( - self, - user_id: int, - png_sticker: InputFile, - request_timeout: Optional[int] = None, - ) -> File: - """ - Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. - - Source: https://core.telegram.org/bots/api#uploadstickerfile - - :param user_id: User identifier of sticker file owner - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files ยป ` - :param request_timeout: Request timeout - :return: Returns the uploaded File on success. - """ - call = UploadStickerFile( - user_id=user_id, - png_sticker=png_sticker, - ) - return await self(call, request_timeout=request_timeout) - - async def create_new_sticker_set( - self, - user_id: int, - name: str, - title: str, - emojis: str, - png_sticker: Optional[Union[InputFile, str]] = None, - tgs_sticker: Optional[InputFile] = None, - webm_sticker: Optional[InputFile] = None, - sticker_type: Optional[str] = None, - mask_position: Optional[MaskPosition] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#createnewstickerset - - :param user_id: User identifier of created sticker set owner - :param name: Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters. - :param title: Sticker set title, 1-64 characters - :param emojis: One or more emoji corresponding to the sticker - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` - :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements - :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements - :param sticker_type: Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created. - :param mask_position: A JSON-serialized object for position where the mask should be placed on faces - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = CreateNewStickerSet( - user_id=user_id, - name=name, - title=title, - emojis=emojis, - png_sticker=png_sticker, - tgs_sticker=tgs_sticker, - webm_sticker=webm_sticker, - sticker_type=sticker_type, - mask_position=mask_position, - ) - return await self(call, request_timeout=request_timeout) - - async def add_sticker_to_set( - self, - user_id: int, - name: str, - emojis: str, - png_sticker: Optional[Union[InputFile, str]] = None, - tgs_sticker: Optional[InputFile] = None, - webm_sticker: Optional[InputFile] = None, - mask_position: Optional[MaskPosition] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to add a new sticker to a set created by the bot. You **must** use exactly one of the fields *png_sticker*, *tgs_sticker*, or *webm_sticker*. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#addstickertoset - - :param user_id: User identifier of sticker set owner - :param name: Sticker set name - :param emojis: One or more emoji corresponding to the sticker - :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` - :param tgs_sticker: **TGS** animation with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for technical requirements - :param webm_sticker: **WEBM** video with the sticker, uploaded using multipart/form-data. See `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for technical requirements - :param mask_position: A JSON-serialized object for position where the mask should be placed on faces - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = AddStickerToSet( - user_id=user_id, - name=name, - emojis=emojis, - png_sticker=png_sticker, - tgs_sticker=tgs_sticker, - webm_sticker=webm_sticker, - mask_position=mask_position, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_position_in_set( - self, - sticker: str, - position: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickerpositioninset - - :param sticker: File identifier of the sticker - :param position: New sticker position in the set, zero-based - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetStickerPositionInSet( - sticker=sticker, - position=position, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_sticker_from_set( - self, - sticker: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletestickerfromset - - :param sticker: File identifier of the sticker - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = DeleteStickerFromSet( - sticker=sticker, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_set_thumb( - self, - name: str, - user_id: int, - thumb: Optional[Union[InputFile, str]] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickersetthumb - - :param name: Sticker set name - :param user_id: User identifier of the sticker set owner - :param thumb: A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `. Animated sticker set thumbnails can't be uploaded via HTTP URL. - :param request_timeout: Request timeout - :return: Returns True on success. - """ - call = SetStickerSetThumb( - name=name, - user_id=user_id, - thumb=thumb, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Inline mode - # Source: https://core.telegram.org/bots/api#inline-mode - # ============================================================================================= - - async def answer_inline_query( - self, - inline_query_id: str, - results: List[InlineQueryResult], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - switch_pm_text: Optional[str] = None, - switch_pm_parameter: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to send answers to an inline query. On success, :code:`True` is returned. - - No more than **50** results per query are allowed. - - Source: https://core.telegram.org/bots/api#answerinlinequery - - :param inline_query_id: Unique identifier for the answered query - :param results: A JSON-serialized array of results for the inline query - :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. - :param is_personal: Pass :code:`True` if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query - :param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. - :param switch_pm_text: If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter* - :param switch_pm_parameter: `Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. - :param request_timeout: Request timeout - :return: On success, True is returned. - """ - call = AnswerInlineQuery( - inline_query_id=inline_query_id, - results=results, - cache_time=cache_time, - is_personal=is_personal, - next_offset=next_offset, - switch_pm_text=switch_pm_text, - switch_pm_parameter=switch_pm_parameter, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_web_app_query( - self, - web_app_query_id: str, - result: InlineQueryResult, - request_timeout: Optional[int] = None, - ) -> SentWebAppMessage: - """ - Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. - - Source: https://core.telegram.org/bots/api#answerwebappquery - - :param web_app_query_id: Unique identifier for the query to be answered - :param result: A JSON-serialized object describing the message to be sent - :param request_timeout: Request timeout - :return: On success, a SentWebAppMessage object is returned. - """ - call = AnswerWebAppQuery( - web_app_query_id=web_app_query_id, - result=result, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Payments - # Source: https://core.telegram.org/bots/api#payments - # ============================================================================================= - async def send_invoice( self, chat_id: Union[int, str], @@ -3231,8 +2234,6 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - Source: https://core.telegram.org/bots/api#sendinvoice - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param title: Product name, 1-32 characters :param description: Product description, 1-255 characters @@ -3262,8 +2263,9 @@ class Bot(ContextInstanceMixin["Bot"]): :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. :param request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. """ + call = SendInvoice( chat_id=chat_id, title=title, @@ -3296,201 +2298,304 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) - async def create_invoice_link( + async def send_location( self, - title: str, - description: str, - payload: str, - provider_token: str, - currency: str, - prices: List[LabeledPrice], - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, + chat_id: Union[int, str], + latitude: float, + longitude: float, + message_thread_id: Optional[int] = None, + horizontal_accuracy: Optional[float] = None, + live_period: Optional[int] = None, + heading: Optional[int] = None, + proximity_alert_radius: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, request_timeout: Optional[int] = None, - ) -> str: + ) -> Message: """ - Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. + Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - Source: https://core.telegram.org/bots/api#createinvoicelink - - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param provider_token: Payment provider token, obtained via `BotFather `_ - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_ - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 - :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*. - :param provider_data: JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. - :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order - :param need_email: Pass :code:`True` if you require the user's email address to complete the order - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param latitude: Latitude of the location + :param longitude: Longitude of the location + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 + :param live_period: Period in seconds for which the location will be updated (see `Live Locations `_, should be between 60 and 86400. + :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. + :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. :param request_timeout: Request timeout - :return: Returns the created invoice link as String on success. + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. """ - call = CreateInvoiceLink( - title=title, - description=description, - payload=payload, - provider_token=provider_token, - currency=currency, - prices=prices, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, + + call = SendLocation( + chat_id=chat_id, + latitude=latitude, + longitude=longitude, + message_thread_id=message_thread_id, + horizontal_accuracy=horizontal_accuracy, + live_period=live_period, + heading=heading, + proximity_alert_radius=proximity_alert_radius, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, ) return await self(call, request_timeout=request_timeout) - async def answer_shipping_query( + async def send_media_group( self, - shipping_query_id: str, - ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#answershippingquery - - :param shipping_query_id: Unique identifier for the query to be answered - :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) - :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. - :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. - :param request_timeout: Request timeout - :return: On success, True is returned. - """ - call = AnswerShippingQuery( - shipping_query_id=shipping_query_id, - ok=ok, - shipping_options=shipping_options, - error_message=error_message, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_pre_checkout_query( - self, - pre_checkout_query_id: str, - ok: bool, - error_message: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. - - Source: https://core.telegram.org/bots/api#answerprecheckoutquery - - :param pre_checkout_query_id: Unique identifier for the query to be answered - :param ok: Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems. - :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. - :param request_timeout: Request timeout - :return: On success, True is returned. - """ - call = AnswerPreCheckoutQuery( - pre_checkout_query_id=pre_checkout_query_id, - ok=ok, - error_message=error_message, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Telegram Passport - # Source: https://core.telegram.org/bots/api#telegram-passport - # ============================================================================================= - - async def set_passport_data_errors( - self, - user_id: int, - errors: List[PassportElementError], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns :code:`True` on success. - Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. - - Source: https://core.telegram.org/bots/api#setpassportdataerrors - - :param user_id: User identifier - :param errors: A JSON-serialized array describing the errors - :param request_timeout: Request timeout - :return: The user will not be able to re-submit their Passport to you until the errors are - fixed (the contents of the field for which you returned the error must change). - Returns True on success. - """ - call = SetPassportDataErrors( - user_id=user_id, - errors=errors, - ) - return await self(call, request_timeout=request_timeout) - - # ============================================================================================= - # Group: Games - # Source: https://core.telegram.org/bots/api#games - # ============================================================================================= - - async def send_game( - self, - chat_id: int, - game_short_name: str, + chat_id: Union[int, str], + media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> List[Message]: + """ + Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent messages from forwarding and saving + :param reply_to_message_id: If the messages are a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param request_timeout: Request timeout + :return: On success, an array of `Messages `_ that were sent is returned. + """ + + call = SendMediaGroup( + chat_id=chat_id, + media=media, + message_thread_id=message_thread_id, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + ) + return await self(call, request_timeout=request_timeout) + + async def send_message( + self, + chat_id: Union[int, str], + text: str, + message_thread_id: Optional[int] = None, + parse_mode: Optional[str] = UNSET, + entities: Optional[List[MessageEntity]] = None, + disable_web_page_preview: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, request_timeout: Optional[int] = None, ) -> Message: """ - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. + Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - Source: https://core.telegram.org/bots/api#sendgame + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param text: Text of the message to be sent, 1-4096 characters after entities parsing + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. + :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* + :param disable_web_page_preview: Disables link previews for links in this message + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ - :param chat_id: Unique identifier for the target chat - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. + call = SendMessage( + chat_id=chat_id, + text=text, + message_thread_id=message_thread_id, + parse_mode=parse_mode, + entities=entities, + disable_web_page_preview=disable_web_page_preview, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def send_photo( + self, + chat_id: Union[int, str], + photo: Union[InputFile, str], + message_thread_id: Optional[int] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET, + caption_entities: Optional[List[MessageEntity]] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files ยป ` + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendPhoto( + chat_id=chat_id, + photo=photo, + message_thread_id=message_thread_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def send_poll( + self, + chat_id: Union[int, str], + question: str, + options: List[str], + message_thread_id: Optional[int] = None, + is_anonymous: Optional[bool] = None, + type: Optional[str] = None, + allows_multiple_answers: Optional[bool] = None, + correct_option_id: Optional[int] = None, + explanation: Optional[str] = None, + explanation_parse_mode: Optional[str] = UNSET, + explanation_entities: Optional[List[MessageEntity]] = None, + open_period: Optional[int] = None, + close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, + is_closed: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param question: Poll question, 1-300 characters + :param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` + :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' + :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` + :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode + :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing + :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. + :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode* + :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. + :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with *open_period*. + :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendPoll( + chat_id=chat_id, + question=question, + options=options, + message_thread_id=message_thread_id, + is_anonymous=is_anonymous, + type=type, + allows_multiple_answers=allows_multiple_answers, + correct_option_id=correct_option_id, + explanation=explanation, + explanation_parse_mode=explanation_parse_mode, + explanation_entities=explanation_entities, + open_period=open_period, + close_date=close_date, + is_closed=is_closed, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def send_sticker( + self, + chat_id: Union[int, str], + sticker: Union[InputFile, str], + message_thread_id: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param reply_to_message_id: If the message is a reply, ID of the original message :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. :param request_timeout: Request timeout - :return: On success, the sent Message is returned. + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. """ - call = SendGame( + + call = SendSticker( chat_id=chat_id, - game_short_name=game_short_name, + sticker=sticker, message_thread_id=message_thread_id, disable_notification=disable_notification, protect_content=protect_content, @@ -3500,6 +2605,388 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) + async def send_venue( + self, + chat_id: Union[int, str], + latitude: float, + longitude: float, + title: str, + address: str, + message_thread_id: Optional[int] = None, + foursquare_id: Optional[str] = None, + foursquare_type: Optional[str] = None, + google_place_id: Optional[str] = None, + google_place_type: Optional[str] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param latitude: Latitude of the venue + :param longitude: Longitude of the venue + :param title: Name of the venue + :param address: Address of the venue + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param foursquare_id: Foursquare identifier of the venue + :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) + :param google_place_id: Google Places identifier of the venue + :param google_place_type: Google Places type of the venue. (See `supported types `_.) + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendVenue( + chat_id=chat_id, + latitude=latitude, + longitude=longitude, + title=title, + address=address, + message_thread_id=message_thread_id, + foursquare_id=foursquare_id, + foursquare_type=foursquare_type, + google_place_id=google_place_id, + google_place_type=google_place_type, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def send_video( + self, + chat_id: Union[int, str], + video: Union[InputFile, str], + message_thread_id: Optional[int] = None, + duration: Optional[int] = None, + width: Optional[int] = None, + height: Optional[int] = None, + thumb: Optional[Union[InputFile, str]] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET, + caption_entities: Optional[List[MessageEntity]] = None, + supports_streaming: Optional[bool] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป ` + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param duration: Duration of sent video in seconds + :param width: Video width + :param height: Video height + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป ` + :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. + """ + + call = SendVideo( + chat_id=chat_id, + video=video, + message_thread_id=message_thread_id, + duration=duration, + width=width, + height=height, + thumb=thumb, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + supports_streaming=supports_streaming, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def send_video_note( + self, + chat_id: Union[int, str], + video_note: Union[InputFile, str], + message_thread_id: Optional[int] = None, + duration: Optional[int] = None, + length: Optional[int] = None, + thumb: Optional[Union[InputFile, str]] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files ยป `. Sending video notes by a URL is currently unsupported + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param duration: Duration of sent video in seconds + :param length: Video width and height, i.e. diameter of the video message + :param thumb: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files ยป ` + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: On success, the sent :class:`aiogram.types.message.Message` is returned. + """ + + call = SendVideoNote( + chat_id=chat_id, + video_note=video_note, + message_thread_id=message_thread_id, + duration=duration, + length=length, + thumb=thumb, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def send_voice( + self, + chat_id: Union[int, str], + voice: Union[InputFile, str], + message_thread_id: Optional[int] = None, + caption: Optional[str] = None, + parse_mode: Optional[str] = UNSET, + caption_entities: Optional[List[MessageEntity]] = None, + duration: Optional[int] = None, + disable_notification: Optional[bool] = None, + protect_content: Optional[bool] = None, + reply_to_message_id: Optional[int] = None, + allow_sending_without_reply: Optional[bool] = None, + reply_markup: Optional[ + Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] + ] = None, + request_timeout: Optional[int] = None, + ) -> Message: + """ + Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป ` + :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param caption: Voice message caption, 0-1024 characters after entities parsing + :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. + :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* + :param duration: Duration of the voice message in seconds + :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. + :param protect_content: Protects the contents of the sent message from forwarding and saving + :param reply_to_message_id: If the message is a reply, ID of the original message + :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found + :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove reply keyboard or to force a reply from the user. + :param request_timeout: Request timeout + :return: Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. + """ + + call = SendVoice( + chat_id=chat_id, + voice=voice, + message_thread_id=message_thread_id, + caption=caption, + parse_mode=parse_mode, + caption_entities=caption_entities, + duration=duration, + disable_notification=disable_notification, + protect_content=protect_content, + reply_to_message_id=reply_to_message_id, + allow_sending_without_reply=allow_sending_without_reply, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_administrator_custom_title( + self, + chat_id: Union[int, str], + user_id: int, + custom_title: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param user_id: Unique identifier of the target user + :param custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatAdministratorCustomTitle( + chat_id=chat_id, + user_id=user_id, + custom_title=custom_title, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_description( + self, + chat_id: Union[int, str], + description: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param description: New chat description, 0-255 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatDescription( + chat_id=chat_id, + description=description, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_menu_button( + self, + chat_id: Optional[int] = None, + menu_button: Optional[ + Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands] + ] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be changed + :param menu_button: A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault` + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatMenuButton( + chat_id=chat_id, + menu_button=menu_button, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_permissions( + self, + chat_id: Union[int, str], + permissions: ChatPermissions, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param permissions: A JSON-serialized object for new default chat permissions + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatPermissions( + chat_id=chat_id, + permissions=permissions, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_photo( + self, + chat_id: Union[int, str], + photo: InputFile, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param photo: New chat photo, uploaded using multipart/form-data + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatPhoto( + chat_id=chat_id, + photo=photo, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_sticker_set( + self, + chat_id: Union[int, str], + sticker_set_name: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param sticker_set_name: Name of the sticker set to be set as the group sticker set + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatStickerSet( + chat_id=chat_id, + sticker_set_name=sticker_set_name, + ) + return await self(call, request_timeout=request_timeout) + + async def set_chat_title( + self, + chat_id: Union[int, str], + title: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param title: New chat title, 1-128 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetChatTitle( + chat_id=chat_id, + title=title, + ) + return await self(call, request_timeout=request_timeout) + async def set_game_score( self, user_id: int, @@ -3514,8 +3001,6 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. - Source: https://core.telegram.org/bots/api#setgamescore - :param user_id: User identifier :param score: New score, must be non-negative :param force: Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters @@ -3524,10 +3009,9 @@ class Bot(ContextInstanceMixin["Bot"]): :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message :param request_timeout: Request timeout - :return: On success, if the message is not an inline message, the Message is returned, - otherwise True is returned. Returns an error, if the new score is not greater - than the user's current score in the chat and force is False. + :return: Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. """ + call = SetGameScore( user_id=user_id, score=score, @@ -3539,36 +3023,337 @@ class Bot(ContextInstanceMixin["Bot"]): ) return await self(call, request_timeout=request_timeout) - async def get_game_high_scores( + async def set_my_commands( + self, + commands: List[BotCommand], + scope: Optional[BotCommandScope] = None, + language_code: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the list of the bot's commands. See `this manual `_ for more details about bot commands. Returns :code:`True` on success. + + :param commands: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. + :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. + :param language_code: A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyCommands( + commands=commands, + scope=scope, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_my_default_administrator_rights( + self, + rights: Optional[ChatAdministratorRights] = None, + for_channels: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns :code:`True` on success. + + :param rights: A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared. + :param for_channels: Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyDefaultAdministratorRights( + rights=rights, + for_channels=for_channels, + ) + return await self(call, request_timeout=request_timeout) + + async def set_passport_data_errors( self, user_id: int, - chat_id: Optional[int] = None, + errors: List[PassportElementError], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns :code:`True` on success. + Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. + + :param user_id: User identifier + :param errors: A JSON-serialized array describing the errors + :param request_timeout: Request timeout + :return: Supply some details in the error message to make sure the user knows how to correct the issues. + """ + + call = SetPassportDataErrors( + user_id=user_id, + errors=errors, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_position_in_set( + self, + sticker: str, + position: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. + + :param sticker: File identifier of the sticker + :param position: New sticker position in the set, zero-based + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerPositionInSet( + sticker=sticker, + position=position, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_set_thumb( + self, + name: str, + user_id: int, + thumb: Optional[Union[InputFile, str]] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns :code:`True` on success. + + :param name: Sticker set name + :param user_id: User identifier of the sticker set owner + :param thumb: A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#animated-sticker-requirements `_`https://core.telegram.org/stickers#animated-sticker-requirements `_ for animated sticker technical requirements, or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements `_`https://core.telegram.org/stickers#video-sticker-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files ยป `. Animated sticker set thumbnails can't be uploaded via HTTP URL. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerSetThumb( + name=name, + user_id=user_id, + thumb=thumb, + ) + return await self(call, request_timeout=request_timeout) + + async def set_webhook( + self, + url: str, + certificate: Optional[InputFile] = None, + ip_address: Optional[str] = None, + max_connections: Optional[int] = None, + allowed_updates: Optional[List[str]] = None, + drop_pending_updates: Optional[bool] = None, + secret_token: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. + If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. + + **Notes** + + **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up. + + **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work. + + **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. + If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. + + :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration + :param certificate: Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details. + :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS + :param max_connections: The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. + :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used. + :param drop_pending_updates: Pass :code:`True` to drop all pending updates + :param secret_token: A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you. + :param request_timeout: Request timeout + :return: Please upload as InputFile, sending a String will not work. + """ + + call = SetWebhook( + url=url, + certificate=certificate, + ip_address=ip_address, + max_connections=max_connections, + allowed_updates=allowed_updates, + drop_pending_updates=drop_pending_updates, + secret_token=secret_token, + ) + return await self(call, request_timeout=request_timeout) + + async def stop_message_live_location( + self, + chat_id: Optional[Union[int, str]] = None, message_id: Optional[int] = None, inline_message_id: Optional[str] = None, + reply_markup: Optional[InlineKeyboardMarkup] = None, request_timeout: Optional[int] = None, - ) -> List[GameHighScore]: + ) -> Union[Message, bool]: """ - Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects. + Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. - - Source: https://core.telegram.org/bots/api#getgamehighscores - - :param user_id: Target user id - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat - :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message + :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Required if *inline_message_id* is not specified. Identifier of the message with live location to stop :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message + :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. :param request_timeout: Request timeout - :return: Will return the score of the specified user and several of their neighbors in a - game. Returns an Array of GameHighScore objects. This method will currently - return scores for the target user, plus two of their closest neighbors on each - side. Will also return the top three users if the user and their neighbors are - not among them. + :return: On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. """ - call = GetGameHighScores( - user_id=user_id, + + call = StopMessageLiveLocation( chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def stop_poll( + self, + chat_id: Union[int, str], + message_id: int, + reply_markup: Optional[InlineKeyboardMarkup] = None, + request_timeout: Optional[int] = None, + ) -> Poll: + """ + Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Identifier of the original message with the poll + :param reply_markup: A JSON-serialized object for a new message `inline keyboard `_. + :param request_timeout: Request timeout + :return: On success, the stopped :class:`aiogram.types.poll.Poll` is returned. + """ + + call = StopPoll( + chat_id=chat_id, + message_id=message_id, + reply_markup=reply_markup, + ) + return await self(call, request_timeout=request_timeout) + + async def unban_chat_member( + self, + chat_id: Union[int, str], + user_id: int, + only_if_banned: Optional[bool] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) + :param user_id: Unique identifier of the target user + :param only_if_banned: Do nothing if the user is not banned + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnbanChatMember( + chat_id=chat_id, + user_id=user_id, + only_if_banned=only_if_banned, + ) + return await self(call, request_timeout=request_timeout) + + async def unban_chat_sender_chat( + self, + chat_id: Union[int, str], + sender_chat_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param sender_chat_id: Unique identifier of the target sender chat + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnbanChatSenderChat( + chat_id=chat_id, + sender_chat_id=sender_chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unpin_all_chat_messages( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnpinAllChatMessages( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unpin_all_forum_topic_messages( + self, + chat_id: Union[int, str], + message_thread_id: int, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) + :param message_thread_id: Unique identifier for the target message thread of the forum topic + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnpinAllForumTopicMessages( + chat_id=chat_id, + message_thread_id=message_thread_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unpin_chat_message( + self, + chat_id: Union[int, str], + message_id: Optional[int] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. + + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) + :param message_id: Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = UnpinChatMessage( + chat_id=chat_id, + message_id=message_id, + ) + return await self(call, request_timeout=request_timeout) + + async def upload_sticker_file( + self, + user_id: int, + png_sticker: InputFile, + request_timeout: Optional[int] = None, + ) -> File: + """ + Use this method to upload a .PNG file with a sticker for later use in *createNewStickerSet* and *addStickerToSet* methods (can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. + + :param user_id: User identifier of sticker file owner + :param png_sticker: **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. :ref:`More information on Sending Files ยป ` + :param request_timeout: Request timeout + :return: Returns the uploaded :class:`aiogram.types.file.File` on success. + """ + + call = UploadStickerFile( + user_id=user_id, + png_sticker=png_sticker, ) return await self(call, request_timeout=request_timeout) diff --git a/aiogram/client/session/base.py b/aiogram/client/session/base.py index 6fa25dd5..0e74d700 100644 --- a/aiogram/client/session/base.py +++ b/aiogram/client/session/base.py @@ -3,6 +3,7 @@ from __future__ import annotations import abc import datetime import json +from enum import Enum from http import HTTPStatus from types import TracebackType from typing import TYPE_CHECKING, Any, AsyncGenerator, Callable, Final, Optional, Type, Union, cast @@ -162,6 +163,8 @@ class BaseSession(abc.ABC): return str(round((now + value).timestamp())) if isinstance(value, datetime.datetime): return str(round(value.timestamp())) + if isinstance(value, Enum): + return self.prepare_value(value.value) else: return str(value) diff --git a/aiogram/enums/__init__.py b/aiogram/enums/__init__.py new file mode 100644 index 00000000..7e3935fe --- /dev/null +++ b/aiogram/enums/__init__.py @@ -0,0 +1,13 @@ +from .chat_type import ChatType +from .content_type import ContentType +from .dice_emoji import DiceEmoji +from .topic_icon_color import TopicIconColor +from .update_type import UpdateType + +__all__ = ( + "ChatType", + "ContentType", + "DiceEmoji", + "TopicIconColor", + "UpdateType", +) diff --git a/aiogram/enums/chat_type.py b/aiogram/enums/chat_type.py new file mode 100644 index 00000000..d2e9794b --- /dev/null +++ b/aiogram/enums/chat_type.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class ChatType(str, Enum): + """ + Type of chat + """ + + PRIVATE = "private" + GROUP = "group" + SUPERGROUP = "supergroup" + CHANNEL = "channel" diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py new file mode 100644 index 00000000..d3d0de28 --- /dev/null +++ b/aiogram/enums/content_type.py @@ -0,0 +1,50 @@ +from enum import Enum + + +class ContentType(str, Enum): + """ + Message content type + """ + + UNKNOWN = "unknown" + ANY = "any" + TEXT = "text" + ANIMATION = "animation" + AUDIO = "audio" + DOCUMENT = "document" + PHOTO = "photo" + STICKER = "sticker" + VIDEO = "video" + VIDEO_NOTE = "video_note" + VOICE = "voice" + CONTACT = "contact" + DICE = "dice" + GAME = "game" + POLL = "poll" + VENUE = "venue" + LOCATION = "location" + NEW_CHAT_MEMBERS = "new_chat_members" + LEFT_CHAT_MEMBER = "left_chat_member" + NEW_CHAT_TITLE = "new_chat_title" + NEW_CHAT_PHOTO = "new_chat_photo" + DELETE_CHAT_PHOTO = "delete_chat_photo" + GROUP_CHAT_CREATED = "group_chat_created" + SUPERGROUP_CHAT_CREATED = "supergroup_chat_created" + CHANNEL_CHAT_CREATED = "channel_chat_created" + MESSAGE_AUTO_DELETE_TIMER_CHANGED = "message_auto_delete_timer_changed" + MIGRATE_TO_CHAT_ID = "migrate_to_chat_id" + MIGRATE_FROM_CHAT_ID = "migrate_from_chat_id" + PINNED_MESSAGE = "pinned_message" + INVOICE = "invoice" + SUCCESSFUL_PAYMENT = "successful_payment" + CONNECTED_WEBSITE = "connected_website" + PASSPORT_DATA = "passport_data" + PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered" + FORUM_TOPIC_CREATED = "forum_topic_created" + FORUM_TOPIC_CLOSED = "forum_topic_closed" + FORUM_TOPIC_REOPENED = "forum_topic_reopened" + VIDEO_CHAT_SCHEDULED = "video_chat_scheduled" + VIDEO_CHAT_STARTED = "video_chat_started" + VIDEO_CHAT_ENDED = "video_chat_ended" + VIDEO_CHAT_PARTICIPANTS_INVITED = "video_chat_participants_invited" + WEB_APP_DATA = "web_app_data" diff --git a/aiogram/enums/dice_emoji.py b/aiogram/enums/dice_emoji.py new file mode 100644 index 00000000..b9514cb0 --- /dev/null +++ b/aiogram/enums/dice_emoji.py @@ -0,0 +1,14 @@ +from enum import Enum + + +class DiceEmoji(str, Enum): + """ + Emoji on which the dice throw animation is based + """ + + DICE = "๐ŸŽฒ" + DART = "๐ŸŽฏ" + BASKETBALL = "๐Ÿ€" + FOOTBALL = "โšฝ" + SLOT_MACHINE = "๐ŸŽฐ" + BOWLING = "๐ŸŽณ" diff --git a/aiogram/enums/topic_icon_color.py b/aiogram/enums/topic_icon_color.py new file mode 100644 index 00000000..f40ee71f --- /dev/null +++ b/aiogram/enums/topic_icon_color.py @@ -0,0 +1,16 @@ +from enum import Enum + + +class TopicIconColor(int, Enum): + """ + Color of the topic icon in RGB format. + + Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56 + """ + + BLUE = 0x6FB9F0 + YELLOW = 0xFFD67E + VIOLET = 0xCB86DB + GREEN = 0x8EEE98 + ROSE = 0xFF93B2 + RED = 0xFB6F5F diff --git a/aiogram/enums/update_type.py b/aiogram/enums/update_type.py new file mode 100644 index 00000000..aaf0b970 --- /dev/null +++ b/aiogram/enums/update_type.py @@ -0,0 +1,22 @@ +from enum import Enum + + +class UpdateType(str, Enum): + """ + Known update types + """ + + MESSAGE = "message" + EDITED_MESSAGE = "edited_message" + CHANNEL_POST = "channel_post" + EDITED_CHANNEL_POST = "edited_channel_post" + INLINE_QUERY = "inline_query" + CHOSEN_INLINE_RESULT = "chosen_inline_result" + CALLBACK_QUERY = "callback_query" + SHIPPING_QUERY = "shipping_query" + PRE_CHECKOUT_QUERY = "pre_checkout_query" + POLL = "poll" + POLL_ANSWER = "poll_answer" + MY_CHAT_MEMBER = "my_chat_member" + CHAT_MEMBER = "chat_member" + CHAT_JOIN_REQUEST = "chat_join_request" diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index e5aac860..fdabfe8b 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -36,7 +36,6 @@ from .get_chat import GetChat from .get_chat_administrators import GetChatAdministrators from .get_chat_member import GetChatMember from .get_chat_member_count import GetChatMemberCount -from .get_chat_members_count import GetChatMembersCount from .get_chat_menu_button import GetChatMenuButton from .get_custom_emoji_stickers import GetCustomEmojiStickers from .get_file import GetFile @@ -49,7 +48,6 @@ from .get_sticker_set import GetStickerSet from .get_updates import GetUpdates from .get_user_profile_photos import GetUserProfilePhotos from .get_webhook_info import GetWebhookInfo -from .kick_chat_member import KickChatMember from .leave_chat import LeaveChat from .log_out import LogOut from .pin_chat_message import PinChatMessage @@ -131,7 +129,6 @@ __all__ = ( "GetUserProfilePhotos", "GetFile", "BanChatMember", - "KickChatMember", "UnbanChatMember", "RestrictChatMember", "PromoteChatMember", @@ -156,7 +153,6 @@ __all__ = ( "GetChat", "GetChatAdministrators", "GetChatMemberCount", - "GetChatMembersCount", "GetChatMember", "SetChatStickerSet", "DeleteChatStickerSet", diff --git a/aiogram/methods/create_forum_topic.py b/aiogram/methods/create_forum_topic.py index 13111873..bafd8ef4 100644 --- a/aiogram/methods/create_forum_topic.py +++ b/aiogram/methods/create_forum_topic.py @@ -23,7 +23,7 @@ class CreateForumTopic(TelegramMethod[ForumTopic]): name: str """Topic name, 1-128 characters""" icon_color: Optional[int] = None - """Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F""" + """Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)""" icon_custom_emoji_id: Optional[str] = None """Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.""" diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py index c10bb6fd..ed2f55dd 100644 --- a/aiogram/methods/edit_forum_topic.py +++ b/aiogram/methods/edit_forum_topic.py @@ -24,7 +24,7 @@ class EditForumTopic(TelegramMethod[bool]): name: str """New topic name, 1-128 characters""" icon_custom_emoji_id: str - """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers""" + """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/get_chat_members_count.py b/aiogram/methods/get_chat_members_count.py deleted file mode 100644 index 2eeadff8..00000000 --- a/aiogram/methods/get_chat_members_count.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Dict, Union - -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot - - -class GetChatMembersCount(TelegramMethod[int]): - """ - .. warning: - - Renamed from :code:`getChatMembersCount` in 5.3 bot API version and can be removed in near future - - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - """ - - __returning__ = int - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getChatMembersCount", data=data) diff --git a/aiogram/methods/kick_chat_member.py b/aiogram/methods/kick_chat_member.py deleted file mode 100644 index 13ab1931..00000000 --- a/aiogram/methods/kick_chat_member.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union - -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot - - -class KickChatMember(TelegramMethod[bool]): - """ - .. warning: - - Renamed from :code:`kickChatMember` in 5.3 bot API version and can be removed in near future - - Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatmember - """ - - __returning__ = bool - - chat_id: Union[int, str] - """Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.""" - revoke_messages: Optional[bool] = None - """Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="kickChatMember", data=data) diff --git a/aiogram/types/chat_invite_link.py b/aiogram/types/chat_invite_link.py index 33593c2d..7476f9dc 100644 --- a/aiogram/types/chat_invite_link.py +++ b/aiogram/types/chat_invite_link.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Optional, Union +from typing import TYPE_CHECKING, Optional from .base import TelegramObject @@ -28,7 +28,7 @@ class ChatInviteLink(TelegramObject): """:code:`True`, if the link is revoked""" name: Optional[str] = None """*Optional*. Invite link name""" - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + expire_date: Optional[datetime.datetime] = None """*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired""" member_limit: Optional[int] = None """*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" diff --git a/aiogram/types/chat_member.py b/aiogram/types/chat_member.py index 5d306177..4e8c38e7 100644 --- a/aiogram/types/chat_member.py +++ b/aiogram/types/chat_member.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Optional, Union +from typing import TYPE_CHECKING, Optional from .base import TelegramObject @@ -24,7 +24,7 @@ class ChatMember(TelegramObject): """ status: str - """...""" + """The member's status in the chat""" user: Optional[User] = None """*Optional*. Information about the user""" is_anonymous: Optional[bool] = None @@ -67,5 +67,5 @@ class ChatMember(TelegramObject): """*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" can_add_web_page_previews: Optional[bool] = None """*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + until_date: Optional[datetime.datetime] = None """*Optional*. Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever""" diff --git a/aiogram/types/chat_member_banned.py b/aiogram/types/chat_member_banned.py index 21b725e8..cbed5493 100644 --- a/aiogram/types/chat_member_banned.py +++ b/aiogram/types/chat_member_banned.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Union +from typing import TYPE_CHECKING from pydantic import Field @@ -22,5 +22,5 @@ class ChatMemberBanned(ChatMember): """The member's status in the chat, always 'kicked'""" user: User """Information about the user""" - until_date: Union[datetime.datetime, datetime.timedelta, int] + until_date: datetime.datetime """Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever""" diff --git a/aiogram/types/chat_member_restricted.py b/aiogram/types/chat_member_restricted.py index 6cff8f53..cc6fe679 100644 --- a/aiogram/types/chat_member_restricted.py +++ b/aiogram/types/chat_member_restricted.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Union +from typing import TYPE_CHECKING from pydantic import Field @@ -42,5 +42,5 @@ class ChatMemberRestricted(ChatMember): """:code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" can_add_web_page_previews: bool """:code:`True`, if the user is allowed to add web page previews to their messages""" - until_date: Union[datetime.datetime, datetime.timedelta, int] + until_date: datetime.datetime """Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever""" diff --git a/aiogram/types/input_message_content.py b/aiogram/types/input_message_content.py index 4d26d4f0..858524a5 100644 --- a/aiogram/types/input_message_content.py +++ b/aiogram/types/input_message_content.py @@ -1,9 +1,9 @@ from __future__ import annotations -from .base import TelegramObject +from .base import MutableTelegramObject -class InputMessageContent(TelegramObject): +class InputMessageContent(MutableTelegramObject): """ This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types: diff --git a/aiogram/types/menu_button.py b/aiogram/types/menu_button.py index 37707302..b37c2390 100644 --- a/aiogram/types/menu_button.py +++ b/aiogram/types/menu_button.py @@ -2,13 +2,13 @@ from __future__ import annotations from typing import TYPE_CHECKING, Optional -from .base import TelegramObject +from .base import MutableTelegramObject if TYPE_CHECKING: from .web_app_info import WebAppInfo -class MenuButton(TelegramObject): +class MenuButton(MutableTelegramObject): """ This object describes the bot's menu button in a private chat. It should be one of @@ -22,7 +22,7 @@ class MenuButton(TelegramObject): """ type: str - """...""" + """Type of the button""" text: Optional[str] = None """*Optional*. Text on the button""" web_app: Optional[WebAppInfo] = None diff --git a/aiogram/types/message_entity.py b/aiogram/types/message_entity.py index 6a7fb538..39773a66 100644 --- a/aiogram/types/message_entity.py +++ b/aiogram/types/message_entity.py @@ -19,9 +19,9 @@ class MessageEntity(MutableTelegramObject): type: str """Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers)""" offset: int - """Offset in UTF-16 code units to the start of the entity""" + """Offset in `UTF-16 code units `_ to the start of the entity""" length: int - """Length of the entity in UTF-16 code units""" + """Length of the entity in `UTF-16 code units `_""" url: Optional[str] = None """*Optional*. For 'text_link' only, URL that will be opened after user taps on the text""" user: Optional[User] = None diff --git a/aiogram/types/poll.py b/aiogram/types/poll.py index 2301235d..fb979a58 100644 --- a/aiogram/types/poll.py +++ b/aiogram/types/poll.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional from .base import TelegramObject @@ -41,5 +41,5 @@ class Poll(TelegramObject): """*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*""" open_period: Optional[int] = None """*Optional*. Amount of time in seconds the poll will be active after creation""" - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None + close_date: Optional[datetime.datetime] = None """*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed""" diff --git a/aiogram/types/reply_keyboard_markup.py b/aiogram/types/reply_keyboard_markup.py index 334168bd..ed64e660 100644 --- a/aiogram/types/reply_keyboard_markup.py +++ b/aiogram/types/reply_keyboard_markup.py @@ -10,7 +10,7 @@ if TYPE_CHECKING: class ReplyKeyboardMarkup(MutableTelegramObject): """ - This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples). + This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples). Source: https://core.telegram.org/bots/api#replykeyboardmarkup """ diff --git a/docs/api/enums/chat_type.rst b/docs/api/enums/chat_type.rst new file mode 100644 index 00000000..71f50f7b --- /dev/null +++ b/docs/api/enums/chat_type.rst @@ -0,0 +1,9 @@ +######## +ChatType +######## + + +.. automodule:: aiogram.enums.chat_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/content_type.rst b/docs/api/enums/content_type.rst new file mode 100644 index 00000000..148694ba --- /dev/null +++ b/docs/api/enums/content_type.rst @@ -0,0 +1,9 @@ +########### +ContentType +########### + + +.. automodule:: aiogram.enums.content_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/dice_emoji.rst b/docs/api/enums/dice_emoji.rst new file mode 100644 index 00000000..783c71bd --- /dev/null +++ b/docs/api/enums/dice_emoji.rst @@ -0,0 +1,9 @@ +######### +DiceEmoji +######### + + +.. automodule:: aiogram.enums.dice_emoji + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/index.rst b/docs/api/enums/index.rst new file mode 100644 index 00000000..d2cb7041 --- /dev/null +++ b/docs/api/enums/index.rst @@ -0,0 +1,15 @@ +##### +Types +##### + +Here is list of all available enums: + + +.. toctree:: + :maxdepth: 1 + + chat_type + content_type + dice_emoji + topic_icon_color + update_type diff --git a/docs/api/enums/topic_icon_color.rst b/docs/api/enums/topic_icon_color.rst new file mode 100644 index 00000000..974a26cf --- /dev/null +++ b/docs/api/enums/topic_icon_color.rst @@ -0,0 +1,9 @@ +############## +TopicIconColor +############## + + +.. automodule:: aiogram.enums.topic_icon_color + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/enums/update_type.rst b/docs/api/enums/update_type.rst new file mode 100644 index 00000000..8c81bb58 --- /dev/null +++ b/docs/api/enums/update_type.rst @@ -0,0 +1,9 @@ +########## +UpdateType +########## + + +.. automodule:: aiogram.enums.update_type + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/index.rst b/docs/api/index.rst index e82565a8..d323ecf0 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -11,5 +11,6 @@ All methods and types is fully autogenerated from Telegram Bot API docs by parse session/index types/index methods/index + enums/index download_file upload_file diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index a47ea7f6..691b928c 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -5,132 +5,79 @@ Methods Here is list of all available API methods: - -Getting updates -=============== - -.. toctree:: - :maxdepth: 1 - - get_updates - set_webhook - delete_webhook - get_webhook_info - - Available methods ================= .. toctree:: :maxdepth: 1 - get_me - log_out - close - send_message - forward_message - copy_message - send_photo - send_audio - send_document - send_video - send_animation - send_voice - send_video_note - send_media_group - send_location - edit_message_live_location - stop_message_live_location - send_venue - send_contact - send_poll - send_dice - send_chat_action - get_user_profile_photos - get_file - ban_chat_member - kick_chat_member - unban_chat_member - restrict_chat_member - promote_chat_member - set_chat_administrator_custom_title - ban_chat_sender_chat - unban_chat_sender_chat - set_chat_permissions - export_chat_invite_link - create_chat_invite_link - edit_chat_invite_link - revoke_chat_invite_link + answer_callback_query approve_chat_join_request + ban_chat_member + ban_chat_sender_chat + close + close_forum_topic + copy_message + create_chat_invite_link + create_forum_topic decline_chat_join_request - set_chat_photo delete_chat_photo - set_chat_title - set_chat_description - pin_chat_message - unpin_chat_message - unpin_all_chat_messages - leave_chat + delete_chat_sticker_set + delete_forum_topic + delete_my_commands + edit_chat_invite_link + edit_forum_topic + edit_message_live_location + export_chat_invite_link + forward_message get_chat get_chat_administrators - get_chat_member_count - get_chat_members_count get_chat_member - set_chat_sticker_set - delete_chat_sticker_set - get_forum_topic_icon_stickers - create_forum_topic - edit_forum_topic - close_forum_topic - reopen_forum_topic - delete_forum_topic - unpin_all_forum_topic_messages - answer_callback_query - set_my_commands - delete_my_commands - get_my_commands - set_chat_menu_button + get_chat_member_count get_chat_menu_button - set_my_default_administrator_rights + get_file + get_forum_topic_icon_stickers + get_me + get_my_commands get_my_default_administrator_rights - -Updating messages -================= - -.. toctree:: - :maxdepth: 1 - - edit_message_text - edit_message_caption - edit_message_media - edit_message_reply_markup - stop_poll - delete_message - -Stickers -======== - -.. toctree:: - :maxdepth: 1 - - send_sticker - get_sticker_set - get_custom_emoji_stickers - upload_sticker_file - create_new_sticker_set - add_sticker_to_set - set_sticker_position_in_set - delete_sticker_from_set - set_sticker_set_thumb - -Inline mode -=========== - -.. toctree:: - :maxdepth: 1 - - answer_inline_query - answer_web_app_query + get_user_profile_photos + leave_chat + log_out + pin_chat_message + promote_chat_member + reopen_forum_topic + restrict_chat_member + revoke_chat_invite_link + send_animation + send_audio + send_chat_action + send_contact + send_dice + send_document + send_location + send_media_group + send_message + send_photo + send_poll + send_venue + send_video + send_video_note + send_voice + set_chat_administrator_custom_title + set_chat_description + set_chat_menu_button + set_chat_permissions + set_chat_photo + set_chat_sticker_set + set_chat_title + set_my_commands + set_my_default_administrator_rights + stop_message_live_location + unban_chat_member + unban_chat_sender_chat + unpin_all_chat_messages + unpin_all_forum_topic_messages + unpin_chat_message Payments ======== @@ -138,10 +85,47 @@ Payments .. toctree:: :maxdepth: 1 - send_invoice - create_invoice_link - answer_shipping_query answer_pre_checkout_query + answer_shipping_query + create_invoice_link + send_invoice + +Stickers +======== + +.. toctree:: + :maxdepth: 1 + + add_sticker_to_set + create_new_sticker_set + delete_sticker_from_set + get_custom_emoji_stickers + get_sticker_set + send_sticker + set_sticker_position_in_set + set_sticker_set_thumb + upload_sticker_file + +Games +===== + +.. toctree:: + :maxdepth: 1 + + get_game_high_scores + send_game + set_game_score + +Getting updates +=============== + +.. toctree:: + :maxdepth: 1 + + delete_webhook + get_updates + get_webhook_info + set_webhook Telegram Passport ================= @@ -151,12 +135,24 @@ Telegram Passport set_passport_data_errors -Games -===== +Updating messages +================= .. toctree:: :maxdepth: 1 - send_game - set_game_score - get_game_high_scores + delete_message + edit_message_caption + edit_message_media + edit_message_reply_markup + edit_message_text + stop_poll + +Inline mode +=========== + +.. toctree:: + :maxdepth: 1 + + answer_inline_query + answer_web_app_query diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index 97a876e6..d3de3be6 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -5,6 +5,147 @@ Types Here is list of all available API types: +Inline mode +=========== + +.. toctree:: + :maxdepth: 1 + + chosen_inline_result + inline_query + inline_query_result + inline_query_result_article + inline_query_result_audio + inline_query_result_cached_audio + inline_query_result_cached_document + inline_query_result_cached_gif + inline_query_result_cached_mpeg4_gif + inline_query_result_cached_photo + inline_query_result_cached_sticker + inline_query_result_cached_video + inline_query_result_cached_voice + inline_query_result_contact + inline_query_result_document + inline_query_result_game + inline_query_result_gif + inline_query_result_location + inline_query_result_mpeg4_gif + inline_query_result_photo + inline_query_result_venue + inline_query_result_video + inline_query_result_voice + input_contact_message_content + input_invoice_message_content + input_location_message_content + input_message_content + input_text_message_content + input_venue_message_content + sent_web_app_message + +Available types +=============== + +.. toctree:: + :maxdepth: 1 + + animation + audio + bot_command + bot_command_scope + bot_command_scope_all_chat_administrators + bot_command_scope_all_group_chats + bot_command_scope_all_private_chats + bot_command_scope_chat + bot_command_scope_chat_administrators + bot_command_scope_chat_member + bot_command_scope_default + callback_query + chat + chat_administrator_rights + chat_invite_link + chat_join_request + chat_location + chat_member + chat_member_administrator + chat_member_banned + chat_member_left + chat_member_member + chat_member_owner + chat_member_restricted + chat_member_updated + chat_permissions + chat_photo + contact + dice + document + file + force_reply + forum_topic + forum_topic_closed + forum_topic_created + forum_topic_reopened + inline_keyboard_button + inline_keyboard_markup + input_file + input_media + input_media_animation + input_media_audio + input_media_document + input_media_photo + input_media_video + keyboard_button + keyboard_button_poll_type + location + login_url + menu_button + menu_button_commands + menu_button_default + menu_button_web_app + message + message_auto_delete_timer_changed + message_entity + message_id + photo_size + poll + poll_answer + poll_option + proximity_alert_triggered + reply_keyboard_markup + reply_keyboard_remove + response_parameters + user + user_profile_photos + venue + video + video_chat_ended + video_chat_participants_invited + video_chat_scheduled + video_chat_started + video_note + voice + web_app_data + web_app_info + +Telegram Passport +================= + +.. toctree:: + :maxdepth: 1 + + encrypted_credentials + encrypted_passport_element + passport_data + passport_element_error + passport_element_error_data_field + passport_element_error_file + passport_element_error_files + passport_element_error_front_side + passport_element_error_reverse_side + passport_element_error_selfie + passport_element_error_translation_file + passport_element_error_translation_files + passport_element_error_unspecified + passport_file Getting updates =============== @@ -15,138 +156,15 @@ Getting updates update webhook_info -Available types -=============== - -.. toctree:: - :maxdepth: 1 - - user - chat - message - message_id - message_entity - photo_size - animation - audio - document - video - video_note - voice - contact - dice - poll_option - poll_answer - poll - location - venue - web_app_data - proximity_alert_triggered - message_auto_delete_timer_changed - forum_topic_created - forum_topic_closed - forum_topic_reopened - video_chat_scheduled - video_chat_started - video_chat_ended - video_chat_participants_invited - user_profile_photos - file - web_app_info - reply_keyboard_markup - keyboard_button - keyboard_button_poll_type - reply_keyboard_remove - inline_keyboard_markup - inline_keyboard_button - login_url - callback_query - force_reply - chat_photo - chat_invite_link - chat_administrator_rights - chat_member - chat_member_owner - chat_member_administrator - chat_member_member - chat_member_restricted - chat_member_left - chat_member_banned - chat_member_updated - chat_join_request - chat_permissions - chat_location - forum_topic - bot_command - bot_command_scope - bot_command_scope_default - bot_command_scope_all_private_chats - bot_command_scope_all_group_chats - bot_command_scope_all_chat_administrators - bot_command_scope_chat - bot_command_scope_chat_administrators - bot_command_scope_chat_member - menu_button - menu_button_commands - menu_button_web_app - menu_button_default - response_parameters - input_media - input_media_photo - input_media_video - input_media_animation - input_media_audio - input_media_document - input_file - - - Stickers ======== .. toctree:: :maxdepth: 1 + mask_position sticker sticker_set - mask_position - -Inline mode -=========== - -.. toctree:: - :maxdepth: 1 - - inline_query - inline_query_result - inline_query_result_article - inline_query_result_photo - inline_query_result_gif - inline_query_result_mpeg4_gif - inline_query_result_video - inline_query_result_audio - inline_query_result_voice - inline_query_result_document - inline_query_result_location - inline_query_result_venue - inline_query_result_contact - inline_query_result_game - inline_query_result_cached_photo - inline_query_result_cached_gif - inline_query_result_cached_mpeg4_gif - inline_query_result_cached_sticker - inline_query_result_cached_document - inline_query_result_cached_video - inline_query_result_cached_voice - inline_query_result_cached_audio - input_message_content - input_text_message_content - input_location_message_content - input_venue_message_content - input_contact_message_content - input_invoice_message_content - chosen_inline_result - sent_web_app_message Payments ======== @@ -154,35 +172,14 @@ Payments .. toctree:: :maxdepth: 1 - labeled_price invoice - shipping_address + labeled_price order_info - shipping_option - successful_payment - shipping_query pre_checkout_query - -Telegram Passport -================= - -.. toctree:: - :maxdepth: 1 - - passport_data - passport_file - encrypted_passport_element - encrypted_credentials - passport_element_error - passport_element_error_data_field - passport_element_error_front_side - passport_element_error_reverse_side - passport_element_error_selfie - passport_element_error_file - passport_element_error_files - passport_element_error_translation_file - passport_element_error_translation_files - passport_element_error_unspecified + shipping_address + shipping_option + shipping_query + successful_payment Games ===== @@ -190,15 +187,6 @@ Games .. toctree:: :maxdepth: 1 - game callback_game + game game_high_score - - -Internal events -=============== - -.. toctree:: - :maxdepth: 1 - - error_event diff --git a/poetry.lock b/poetry.lock index 40476a51..00529647 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,3 +1,11 @@ +[[package]] +name = "about-time" +version = "3.1.1" +description = "Easily measure timing and throughput of code blocks, with beautiful human friendly representations." +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "aiofiles" version = "22.1.0" @@ -58,6 +66,18 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "alive-progress" +version = "2.4.1" +description = "A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!" +category = "dev" +optional = false +python-versions = ">=3.7, <4" + +[package.dependencies] +about-time = "3.1.1" +grapheme = "0.6.0" + [[package]] name = "aresponses" version = "2.1.6" @@ -70,6 +90,20 @@ python-versions = ">=3.6" aiohttp = ">=3.1.0,<4.0.0" pytest-asyncio = "*" +[[package]] +name = "asttokens" +version = "2.1.0" +description = "Annotate AST trees with source code positions" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +six = "*" + +[package.extras] +test = ["astroid (<=2.5.3)", "pytest"] + [[package]] name = "async-timeout" version = "4.0.2" @@ -140,6 +174,34 @@ d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] +[[package]] +name = "butcher" +version = "0.1.5" +description = "Code-generation utility for aiogram v3 core developers" +category = "dev" +optional = false +python-versions = "^3.10" +develop = false + +[package.dependencies] +alive-progress = "^2.4.1" +black = "^22.10.0" +click = "^8.1.3" +devtools = "^0.9.0" +isort = "^5.10.1" +Jinja2 = "^3.1.2" +libcst = "^0.4.9" +lxml = "^4.9.1" +orjson = "^3.8.1" +PyYAML = "^6.0" +requests = "^2.28.1" + +[package.source] +type = "git" +url = "https://github.com/aiogram/butcher.git" +reference = "v0.1.5" +resolved_reference = "2693f8559b9496974b48b3f6762f8acd0c666268" + [[package]] name = "certifi" version = "2022.9.24" @@ -225,6 +287,21 @@ wrapt = ">=1.10,<2" [package.extras] dev = ["PyTest", "PyTest (<5)", "PyTest-Cov", "PyTest-Cov (<2.6)", "bump2version (<1)", "configparser (<5)", "importlib-metadata (<3)", "importlib-resources (<4)", "sphinx (<2)", "sphinxcontrib-websupport (<2)", "tox", "zipp (<2)"] +[[package]] +name = "devtools" +version = "0.9.0" +description = "Python's missing debug print command, and more." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +asttokens = ">=2.0.0,<3.0.0" +executing = ">=0.8.0,<1.0.0" + +[package.extras] +pygments = ["pygments (>=2.2.0)"] + [[package]] name = "distlib" version = "0.3.6" @@ -252,6 +329,14 @@ python-versions = ">=3.7" [package.extras] test = ["pytest (>=6)"] +[[package]] +name = "executing" +version = "0.10.0" +description = "Get the currently executing AST node of a frame, and other information" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "filelock" version = "3.8.0" @@ -299,6 +384,17 @@ pygments = ">=2.7" sphinx = ">=4.0,<6.0" sphinx-basic-ng = "*" +[[package]] +name = "grapheme" +version = "0.6.0" +description = "Unicode grapheme helpers" +category = "dev" +optional = false +python-versions = "*" + +[package.extras] +test = ["pytest", "sphinx", "sphinx-autobuild", "twine", "wheel"] + [[package]] name = "identify" version = "2.5.7" @@ -390,6 +486,22 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "libcst" +version = "0.4.9" +description = "A concrete syntax tree with AST-like properties for Python 3.5, 3.6, 3.7, 3.8, 3.9, and 3.10 programs." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +pyyaml = ">=5.2" +typing-extensions = ">=3.7.4.2" +typing-inspect = ">=0.4.0" + +[package.extras] +dev = ["Sphinx (>=5.1.1)", "black (==22.10.0)", "coverage (>=4.5.4)", "fixit (==0.1.1)", "flake8 (>=3.7.8,<5)", "hypothesis (>=4.36.0)", "hypothesmith (>=0.0.4)", "jinja2 (==3.1.2)", "jupyter (>=1.0.0)", "maturin (>=0.8.3,<0.14)", "nbsphinx (>=0.4.2)", "prompt-toolkit (>=2.0.9)", "pyre-check (==0.9.9)", "setuptools-rust (>=1.5.2)", "setuptools-scm (>=6.0.1)", "slotscheck (>=0.7.1)", "sphinx-rtd-theme (>=0.4.3)", "ufmt (==2.0.1)", "usort (==1.0.5)"] + [[package]] name = "livereload" version = "2.6.3" @@ -402,6 +514,20 @@ python-versions = "*" six = "*" tornado = {version = "*", markers = "python_version > \"2.7\""} +[[package]] +name = "lxml" +version = "4.9.1" +description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" + +[package.extras] +cssselect = ["cssselect (>=0.7)"] +html5 = ["html5lib"] +htmlsoup = ["BeautifulSoup4"] +source = ["Cython (>=0.29.7)"] + [[package]] name = "magic-filter" version = "1.0.9" @@ -496,6 +622,14 @@ python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.* [package.dependencies] setuptools = "*" +[[package]] +name = "orjson" +version = "3.8.1" +description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" +category = "dev" +optional = false +python-versions = ">=3.7" + [[package]] name = "packaging" version = "21.3" @@ -1123,6 +1257,18 @@ category = "main" optional = false python-versions = ">=3.7" +[[package]] +name = "typing-inspect" +version = "0.8.0" +description = "Runtime inspection utilities for typing module." +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +mypy-extensions = ">=0.3.0" +typing-extensions = ">=3.7.4" + [[package]] name = "urllib3" version = "1.26.12" @@ -1207,9 +1353,13 @@ redis = ["redis"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "e991e2d07149ee26d0d46cf799de2b6dc35207dc462ef5b940badc7f26b65a1e" +content-hash = "234adf05496b157948ddafcd9cfefeee9b0c151a207bb0404c3db8f8dcb02f94" [metadata.files] +about-time = [ + {file = "about-time-3.1.1.tar.gz", hash = "sha256:586b329450c9387d1ae8c42d2db4f5b4c57a54508d0f1b7bb00322ffd5ce9f9b"}, + {file = "about_time-3.1.1-py3-none-any.whl", hash = "sha256:96841beb3f9b5de1cbb323d2bdb0fa9abdecbc46f2d546b9b3c2483d23daa17a"}, +] aiofiles = [ {file = "aiofiles-22.1.0-py3-none-any.whl", hash = "sha256:1142fa8e80dbae46bb6339573ad4c8c0841358f79c6eb50a493dceca14621bad"}, {file = "aiofiles-22.1.0.tar.gz", hash = "sha256:9107f1ca0b2a5553987a94a3c9959fe5b491fdf731389aa5b7b1bd0733e32de6"}, @@ -1315,10 +1465,18 @@ alabaster = [ {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] +alive-progress = [ + {file = "alive-progress-2.4.1.tar.gz", hash = "sha256:089757c8197f27ad972ba27e1060f6db92368d83c736884e159034fd74865323"}, + {file = "alive_progress-2.4.1-py3-none-any.whl", hash = "sha256:5503ffca0a0607d5f0d24d3b10a718fe50e375470fa07602b246333eb7ec88ee"}, +] aresponses = [ {file = "aresponses-2.1.6-py3-none-any.whl", hash = "sha256:06525f6911063f0f8d370cbc96bd273e6cddc89c7b5163ddf91e0c8abf148a32"}, {file = "aresponses-2.1.6.tar.gz", hash = "sha256:231dfa0756e39ca9f1e82212038f98e773d1ed9c0993caf2667e25ba535697ca"}, ] +asttokens = [ + {file = "asttokens-2.1.0-py2.py3-none-any.whl", hash = "sha256:1b28ed85e254b724439afc783d4bee767f780b936c3fe8b3275332f42cf5f561"}, + {file = "asttokens-2.1.0.tar.gz", hash = "sha256:4aa76401a151c8cc572d906aad7aea2a841780834a19d780f4321c0fe1b54635"}, +] async-timeout = [ {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, @@ -1358,6 +1516,7 @@ black = [ {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"}, {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"}, ] +butcher = [] certifi = [ {file = "certifi-2022.9.24-py3-none-any.whl", hash = "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"}, {file = "certifi-2022.9.24.tar.gz", hash = "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"}, @@ -1437,6 +1596,10 @@ Deprecated = [ {file = "Deprecated-1.2.13-py2.py3-none-any.whl", hash = "sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d"}, {file = "Deprecated-1.2.13.tar.gz", hash = "sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d"}, ] +devtools = [ + {file = "devtools-0.9.0-py3-none-any.whl", hash = "sha256:689cf4e7c75024237c42093ba19f4fa9cf15980269f02463aeab4d97d4b0a215"}, + {file = "devtools-0.9.0.tar.gz", hash = "sha256:86ede6e0273e023db766344d14098228785b48a80f31716f28e8b9453d52fa1e"}, +] distlib = [ {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, @@ -1449,6 +1612,10 @@ exceptiongroup = [ {file = "exceptiongroup-1.0.0rc9-py3-none-any.whl", hash = "sha256:2e3c3fc1538a094aab74fad52d6c33fc94de3dfee3ee01f187c0e0c72aec5337"}, {file = "exceptiongroup-1.0.0rc9.tar.gz", hash = "sha256:9086a4a21ef9b31c72181c77c040a074ba0889ee56a7b289ff0afb0d97655f96"}, ] +executing = [ + {file = "executing-0.10.0-py2.py3-none-any.whl", hash = "sha256:9c745f80cda11eb22b62cbecf21156491a794eb56ab06f9d286a44e62822b24e"}, + {file = "executing-0.10.0.tar.gz", hash = "sha256:d1cd87c2e371e9966261410c5b3769d6df2f9e4a79a83eebd2662dd3388f9833"}, +] filelock = [ {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, @@ -1522,6 +1689,9 @@ furo = [ {file = "furo-2022.9.29-py3-none-any.whl", hash = "sha256:559ee17999c0f52728481dcf6b1b0cf8c9743e68c5e3a18cb45a7992747869a9"}, {file = "furo-2022.9.29.tar.gz", hash = "sha256:d4238145629c623609c2deb5384f8d036e2a1ee2a101d64b67b4348112470dbd"}, ] +grapheme = [ + {file = "grapheme-0.6.0.tar.gz", hash = "sha256:44c2b9f21bbe77cfb05835fec230bd435954275267fea1858013b102f8603cca"}, +] identify = [ {file = "identify-2.5.7-py2.py3-none-any.whl", hash = "sha256:7a67b2a6208d390fd86fd04fb3def94a3a8b7f0bcbd1d1fcd6736f4defe26390"}, {file = "identify-2.5.7.tar.gz", hash = "sha256:5b8fd1e843a6d4bf10685dd31f4520a7f1c7d0e14e9bc5d34b1d6f111cabc011"}, @@ -1554,9 +1724,113 @@ Jinja2 = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] +libcst = [ + {file = "libcst-0.4.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4f9e42085c403e22201e5c41e707ef73e4ea910ad9fc67983ceee2368097f54e"}, + {file = "libcst-0.4.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1266530bf840cc40633a04feb578bb4cac1aa3aea058cc3729e24eab09a8e996"}, + {file = "libcst-0.4.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9679177391ccb9b0cdde3185c22bf366cb672457c4b7f4031fcb3b5e739fbd6"}, + {file = "libcst-0.4.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d67bc87e0d8db9434f2ea063734938a320f541f4c6da1074001e372f840f385d"}, + {file = "libcst-0.4.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e316da5a126f2a9e1d7680f95f907b575f082a35e2f8bd5620c59b2aaaebfe0a"}, + {file = "libcst-0.4.9-cp310-cp310-win_amd64.whl", hash = "sha256:7415569ab998a85b0fc9af3a204611ea7fadb2d719a12532c448f8fc98f5aca4"}, + {file = "libcst-0.4.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:15ded11ff7f4572f91635e02b519ae959f782689fdb4445bbebb7a3cc5c71d75"}, + {file = "libcst-0.4.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b266867b712a120fad93983de432ddb2ccb062eb5fd2bea748c9a94cb200c36"}, + {file = "libcst-0.4.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:045b3b0b06413cdae6e9751b5f417f789ffa410f2cb2815e3e0e0ea6bef10ec0"}, + {file = "libcst-0.4.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e799add8fba4976628b9c1a6768d73178bf898f0ed1bd1322930c2d3db9063ba"}, + {file = "libcst-0.4.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10479371d04ee8dc978c889c1774bbf6a83df88fa055fcb0159a606f6679c565"}, + {file = "libcst-0.4.9-cp311-cp311-win_amd64.whl", hash = "sha256:7a98286cbbfa90a42d376900c875161ad02a5a2a6b7c94c0f7afd9075e329ce4"}, + {file = "libcst-0.4.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:400166fc4efb9aa06ce44498d443aa78519082695b1894202dd73cd507d2d712"}, + {file = "libcst-0.4.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46123863fba35cc84f7b54dd68826419cabfd9504d8a101c7fe3313ea03776f9"}, + {file = "libcst-0.4.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27be8db54c0e5fe440021a771a38b81a7dbc23cd630eb8b0e9828b7717f9b702"}, + {file = "libcst-0.4.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:132bec627b064bd567e7e4cd6c89524d02842151eb0d8f5f3f7ffd2579ec1b09"}, + {file = "libcst-0.4.9-cp37-cp37m-win_amd64.whl", hash = "sha256:596860090aeed3ee6ad1e59c35c6c4110a57e4e896abf51b91cae003ec720a11"}, + {file = "libcst-0.4.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f4487608258109f774300466d4ca97353df29ae6ac23d1502e13e5509423c9d5"}, + {file = "libcst-0.4.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:aa53993e9a2853efb3ed3605da39f2e7125df6430f613eb67ef886c1ce4f94b5"}, + {file = "libcst-0.4.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6ce794483d4c605ef0f5b199a49fb6996f9586ca938b7bfef213bd13858d7ab"}, + {file = "libcst-0.4.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:786e562b54bbcd17a060d1244deeef466b7ee07fe544074c252c4a169e38f1ee"}, + {file = "libcst-0.4.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:794250d2359edd518fb698e5d21c38a5bdfc5e4a75d0407b4c19818271ce6742"}, + {file = "libcst-0.4.9-cp38-cp38-win_amd64.whl", hash = "sha256:76491f67431318c3145442e97dddcead7075b074c59eac51be7cc9e3fffec6ee"}, + {file = "libcst-0.4.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3cf48d7aec6dc54b02aec0b1bb413c5bb3b02d852fd6facf1f05c7213e61a176"}, + {file = "libcst-0.4.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9b3348c6b7711a5235b133bd8e11d22e903c388db42485b8ceb5f2aa0fae9b9f"}, + {file = "libcst-0.4.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7e33b66762efaa014c38819efae5d8f726dd823e32d5d691035484411d2a2a69"}, + {file = "libcst-0.4.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1350d375d3fb9b20a6cf10c09b2964baca9be753a033dde7c1aced49d8e58387"}, + {file = "libcst-0.4.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3822056dc13326082362db35b3f649e0f4a97e36ddb4e487441da8e0fb9db7b3"}, + {file = "libcst-0.4.9-cp39-cp39-win_amd64.whl", hash = "sha256:183636141b839aa35b639e100883813744523bc7c12528906621121731b28443"}, + {file = "libcst-0.4.9.tar.gz", hash = "sha256:01786c403348f76f274dbaf3888ae237ffb73e6ed6973e65eba5c1fc389861dd"}, +] livereload = [ {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, ] +lxml = [ + {file = "lxml-4.9.1-cp27-cp27m-macosx_10_15_x86_64.whl", hash = "sha256:98cafc618614d72b02185ac583c6f7796202062c41d2eeecdf07820bad3295ed"}, + {file = "lxml-4.9.1-cp27-cp27m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c62e8dd9754b7debda0c5ba59d34509c4688f853588d75b53c3791983faa96fc"}, + {file = "lxml-4.9.1-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:21fb3d24ab430fc538a96e9fbb9b150029914805d551deeac7d7822f64631dfc"}, + {file = "lxml-4.9.1-cp27-cp27m-win32.whl", hash = "sha256:86e92728ef3fc842c50a5cb1d5ba2bc66db7da08a7af53fb3da79e202d1b2cd3"}, + {file = "lxml-4.9.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4cfbe42c686f33944e12f45a27d25a492cc0e43e1dc1da5d6a87cbcaf2e95627"}, + {file = "lxml-4.9.1-cp27-cp27mu-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dad7b164905d3e534883281c050180afcf1e230c3d4a54e8038aa5cfcf312b84"}, + {file = "lxml-4.9.1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a614e4afed58c14254e67862456d212c4dcceebab2eaa44d627c2ca04bf86837"}, + {file = "lxml-4.9.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:f9ced82717c7ec65a67667bb05865ffe38af0e835cdd78728f1209c8fffe0cad"}, + {file = "lxml-4.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:d9fc0bf3ff86c17348dfc5d322f627d78273eba545db865c3cd14b3f19e57fa5"}, + {file = "lxml-4.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:e5f66bdf0976ec667fc4594d2812a00b07ed14d1b44259d19a41ae3fff99f2b8"}, + {file = "lxml-4.9.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:fe17d10b97fdf58155f858606bddb4e037b805a60ae023c009f760d8361a4eb8"}, + {file = "lxml-4.9.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8caf4d16b31961e964c62194ea3e26a0e9561cdf72eecb1781458b67ec83423d"}, + {file = "lxml-4.9.1-cp310-cp310-win32.whl", hash = "sha256:4780677767dd52b99f0af1f123bc2c22873d30b474aa0e2fc3fe5e02217687c7"}, + {file = "lxml-4.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:b122a188cd292c4d2fcd78d04f863b789ef43aa129b233d7c9004de08693728b"}, + {file = "lxml-4.9.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:be9eb06489bc975c38706902cbc6888f39e946b81383abc2838d186f0e8b6a9d"}, + {file = "lxml-4.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:f1be258c4d3dc609e654a1dc59d37b17d7fef05df912c01fc2e15eb43a9735f3"}, + {file = "lxml-4.9.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:927a9dd016d6033bc12e0bf5dee1dde140235fc8d0d51099353c76081c03dc29"}, + {file = "lxml-4.9.1-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9232b09f5efee6a495a99ae6824881940d6447debe272ea400c02e3b68aad85d"}, + {file = "lxml-4.9.1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:04da965dfebb5dac2619cb90fcf93efdb35b3c6994fea58a157a834f2f94b318"}, + {file = "lxml-4.9.1-cp35-cp35m-win32.whl", hash = "sha256:4d5bae0a37af799207140652a700f21a85946f107a199bcb06720b13a4f1f0b7"}, + {file = "lxml-4.9.1-cp35-cp35m-win_amd64.whl", hash = "sha256:4878e667ebabe9b65e785ac8da4d48886fe81193a84bbe49f12acff8f7a383a4"}, + {file = "lxml-4.9.1-cp36-cp36m-macosx_10_15_x86_64.whl", hash = "sha256:1355755b62c28950f9ce123c7a41460ed9743c699905cbe664a5bcc5c9c7c7fb"}, + {file = "lxml-4.9.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:bcaa1c495ce623966d9fc8a187da80082334236a2a1c7e141763ffaf7a405067"}, + {file = "lxml-4.9.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6eafc048ea3f1b3c136c71a86db393be36b5b3d9c87b1c25204e7d397cee9536"}, + {file = "lxml-4.9.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:13c90064b224e10c14dcdf8086688d3f0e612db53766e7478d7754703295c7c8"}, + {file = "lxml-4.9.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206a51077773c6c5d2ce1991327cda719063a47adc02bd703c56a662cdb6c58b"}, + {file = "lxml-4.9.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:e8f0c9d65da595cfe91713bc1222af9ecabd37971762cb830dea2fc3b3bb2acf"}, + {file = "lxml-4.9.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:8f0a4d179c9a941eb80c3a63cdb495e539e064f8054230844dcf2fcb812b71d3"}, + {file = "lxml-4.9.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:830c88747dce8a3e7525defa68afd742b4580df6aa2fdd6f0855481e3994d391"}, + {file = "lxml-4.9.1-cp36-cp36m-win32.whl", hash = "sha256:1e1cf47774373777936c5aabad489fef7b1c087dcd1f426b621fda9dcc12994e"}, + {file = "lxml-4.9.1-cp36-cp36m-win_amd64.whl", hash = "sha256:5974895115737a74a00b321e339b9c3f45c20275d226398ae79ac008d908bff7"}, + {file = "lxml-4.9.1-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:1423631e3d51008871299525b541413c9b6c6423593e89f9c4cfbe8460afc0a2"}, + {file = "lxml-4.9.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:2aaf6a0a6465d39b5ca69688fce82d20088c1838534982996ec46633dc7ad6cc"}, + {file = "lxml-4.9.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:9f36de4cd0c262dd9927886cc2305aa3f2210db437aa4fed3fb4940b8bf4592c"}, + {file = "lxml-4.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:ae06c1e4bc60ee076292e582a7512f304abdf6c70db59b56745cca1684f875a4"}, + {file = "lxml-4.9.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:57e4d637258703d14171b54203fd6822fda218c6c2658a7d30816b10995f29f3"}, + {file = "lxml-4.9.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6d279033bf614953c3fc4a0aa9ac33a21e8044ca72d4fa8b9273fe75359d5cca"}, + {file = "lxml-4.9.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:a60f90bba4c37962cbf210f0188ecca87daafdf60271f4c6948606e4dabf8785"}, + {file = "lxml-4.9.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6ca2264f341dd81e41f3fffecec6e446aa2121e0b8d026fb5130e02de1402785"}, + {file = "lxml-4.9.1-cp37-cp37m-win32.whl", hash = "sha256:27e590352c76156f50f538dbcebd1925317a0f70540f7dc8c97d2931c595783a"}, + {file = "lxml-4.9.1-cp37-cp37m-win_amd64.whl", hash = "sha256:eea5d6443b093e1545ad0210e6cf27f920482bfcf5c77cdc8596aec73523bb7e"}, + {file = "lxml-4.9.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:f05251bbc2145349b8d0b77c0d4e5f3b228418807b1ee27cefb11f69ed3d233b"}, + {file = "lxml-4.9.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:487c8e61d7acc50b8be82bda8c8d21d20e133c3cbf41bd8ad7eb1aaeb3f07c97"}, + {file = "lxml-4.9.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:8d1a92d8e90b286d491e5626af53afef2ba04da33e82e30744795c71880eaa21"}, + {file = "lxml-4.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:b570da8cd0012f4af9fa76a5635cd31f707473e65a5a335b186069d5c7121ff2"}, + {file = "lxml-4.9.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ef87fca280fb15342726bd5f980f6faf8b84a5287fcc2d4962ea8af88b35130"}, + {file = "lxml-4.9.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:93e414e3206779ef41e5ff2448067213febf260ba747fc65389a3ddaa3fb8715"}, + {file = "lxml-4.9.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6653071f4f9bac46fbc30f3c7838b0e9063ee335908c5d61fb7a4a86c8fd2036"}, + {file = "lxml-4.9.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:32a73c53783becdb7eaf75a2a1525ea8e49379fb7248c3eeefb9412123536387"}, + {file = "lxml-4.9.1-cp38-cp38-win32.whl", hash = "sha256:1a7c59c6ffd6ef5db362b798f350e24ab2cfa5700d53ac6681918f314a4d3b94"}, + {file = "lxml-4.9.1-cp38-cp38-win_amd64.whl", hash = "sha256:1436cf0063bba7888e43f1ba8d58824f085410ea2025befe81150aceb123e345"}, + {file = "lxml-4.9.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:4beea0f31491bc086991b97517b9683e5cfb369205dac0148ef685ac12a20a67"}, + {file = "lxml-4.9.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:41fb58868b816c202e8881fd0f179a4644ce6e7cbbb248ef0283a34b73ec73bb"}, + {file = "lxml-4.9.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:bd34f6d1810d9354dc7e35158aa6cc33456be7706df4420819af6ed966e85448"}, + {file = "lxml-4.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:edffbe3c510d8f4bf8640e02ca019e48a9b72357318383ca60e3330c23aaffc7"}, + {file = "lxml-4.9.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6d949f53ad4fc7cf02c44d6678e7ff05ec5f5552b235b9e136bd52e9bf730b91"}, + {file = "lxml-4.9.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:079b68f197c796e42aa80b1f739f058dcee796dc725cc9a1be0cdb08fc45b000"}, + {file = "lxml-4.9.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9c3a88d20e4fe4a2a4a84bf439a5ac9c9aba400b85244c63a1ab7088f85d9d25"}, + {file = "lxml-4.9.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4e285b5f2bf321fc0857b491b5028c5f276ec0c873b985d58d7748ece1d770dd"}, + {file = "lxml-4.9.1-cp39-cp39-win32.whl", hash = "sha256:ef72013e20dd5ba86a8ae1aed7f56f31d3374189aa8b433e7b12ad182c0d2dfb"}, + {file = "lxml-4.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:10d2017f9150248563bb579cd0d07c61c58da85c922b780060dcc9a3aa9f432d"}, + {file = "lxml-4.9.1-pp37-pypy37_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0538747a9d7827ce3e16a8fdd201a99e661c7dee3c96c885d8ecba3c35d1032c"}, + {file = "lxml-4.9.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:0645e934e940107e2fdbe7c5b6fb8ec6232444260752598bc4d09511bd056c0b"}, + {file = "lxml-4.9.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:6daa662aba22ef3258934105be2dd9afa5bb45748f4f702a3b39a5bf53a1f4dc"}, + {file = "lxml-4.9.1-pp38-pypy38_pp73-macosx_10_15_x86_64.whl", hash = "sha256:603a464c2e67d8a546ddaa206d98e3246e5db05594b97db844c2f0a1af37cf5b"}, + {file = "lxml-4.9.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:c4b2e0559b68455c085fb0f6178e9752c4be3bba104d6e881eb5573b399d1eb2"}, + {file = "lxml-4.9.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:0f3f0059891d3254c7b5fb935330d6db38d6519ecd238ca4fce93c234b4a0f73"}, + {file = "lxml-4.9.1-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:c852b1530083a620cb0de5f3cd6826f19862bafeaf77586f1aef326e49d95f0c"}, + {file = "lxml-4.9.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:287605bede6bd36e930577c5925fcea17cb30453d96a7b4c63c14a257118dbb9"}, + {file = "lxml-4.9.1.tar.gz", hash = "sha256:fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f"}, +] magic-filter = [ {file = "magic-filter-1.0.9.tar.gz", hash = "sha256:d0f1ffa5ff1fbe5105fd5f293c79b5d3795f336ea0f6129c636959a687bf422a"}, {file = "magic_filter-1.0.9-py3-none-any.whl", hash = "sha256:51002312a8972fa514b998b7ff89340c98be3fc499967c1f5f2af98d13baf8d5"}, @@ -1709,6 +1983,57 @@ nodeenv = [ {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, ] +orjson = [ + {file = "orjson-3.8.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:a70aaa2e56356e58c6e1b49f7b7f069df5b15e55db002a74db3ff3f7af67c7ff"}, + {file = "orjson-3.8.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:d45db052d01d0ab7579470141d5c3592f4402d43cfacb67f023bc1210a67b7bc"}, + {file = "orjson-3.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2aae92398c0023ac26a6cd026375f765ef5afe127eccabf563c78af7b572d59"}, + {file = "orjson-3.8.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0bd5b4e539db8a9635776bdf9a25c3db84e37165e65d45c8ca90437adc46d6d8"}, + {file = "orjson-3.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21efb87b168066201a120b0f54a2381f6f51ff3727e07b3908993732412b314a"}, + {file = "orjson-3.8.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:e073338e422f518c1d4d80efc713cd17f3ed6d37c8c7459af04a95459f3206d1"}, + {file = "orjson-3.8.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:8f672f3987f6424f60ab2e86ea7ed76dd2806b8e9b506a373fc8499aed85ddb5"}, + {file = "orjson-3.8.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:231c30958ed99c23128a21993c5ac0a70e1e568e6a898a47f70d5d37461ca47c"}, + {file = "orjson-3.8.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59b4baf71c9f39125d7e535974b146cc180926462969f6d8821b4c5e975e11b3"}, + {file = "orjson-3.8.1-cp310-none-win_amd64.whl", hash = "sha256:fe25f50dc3d45364428baa0dbe3f613a5171c64eb0286eb775136b74e61ba58a"}, + {file = "orjson-3.8.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:6802edf98f6918e89df355f56be6e7db369b31eed64ff2496324febb8b0aa43b"}, + {file = "orjson-3.8.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:a4244f4199a160717f0027e434abb886e322093ceadb2f790ff0c73ed3e17662"}, + {file = "orjson-3.8.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6956cf7a1ac97523e96f75b11534ff851df99a6474a561ad836b6e82004acbb8"}, + {file = "orjson-3.8.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0b4e3857dd2416b479f700e9bdf4fcec8c690d2716622397d2b7e848f9833e50"}, + {file = "orjson-3.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8873e490dea0f9cd975d66f84618b6fb57b1ba45ecb218313707a71173d764f"}, + {file = "orjson-3.8.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:124207d2cd04e845eaf2a6171933cde40aebcb8c2d7d3b081e01be066d3014b6"}, + {file = "orjson-3.8.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d8ed77098c2e22181fce971f49a34204c38b79ca91c01d515d07015339ae8165"}, + {file = "orjson-3.8.1-cp311-none-win_amd64.whl", hash = "sha256:8623ac25fa0850a44ac845e9333c4da9ae5707b7cec8ac87cbe9d4e41137180f"}, + {file = "orjson-3.8.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:d67a0bd0283a3b17ac43c5ab8e4a7e9d3aa758d6ec5d51c232343c408825a5ad"}, + {file = "orjson-3.8.1-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:d89ef8a4444d83e0a5171d14f2ab4895936ab1773165b020f97d29cf289a2d88"}, + {file = "orjson-3.8.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97839a6abbebb06099294e6057d5b3061721ada08b76ae792e7041b6cb54c97f"}, + {file = "orjson-3.8.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6071bcf51f0ae4d53b9d3e9164f7138164df4291c484a7b14562075aaa7a2b7b"}, + {file = "orjson-3.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c15e7d691cee75b5192fc1fa8487bf541d463246dc25c926b9b40f5b6ab56770"}, + {file = "orjson-3.8.1-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:b9abc49c014def1b832fcd53bdc670474b6fe41f373d16f40409882c0d0eccba"}, + {file = "orjson-3.8.1-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:3fd5472020042482d7da4c26a0ee65dbd931f691e1c838c6cf4232823179ecc1"}, + {file = "orjson-3.8.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:e399ed1b0d6f8089b9b6ff2cb3e71ba63a56d8ea88e1d95467949795cc74adfd"}, + {file = "orjson-3.8.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5e3db6496463c3000d15b7a712da5a9601c6c43682f23f81862fe1d2a338f295"}, + {file = "orjson-3.8.1-cp37-none-win_amd64.whl", hash = "sha256:0f21eed14697083c01f7e00a87e21056fc8fb5851e8a7bca98345189abcdb4d4"}, + {file = "orjson-3.8.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:5a9e324213220578d324e0858baeab47808a13d3c3fbc6ba55a3f4f069d757cf"}, + {file = "orjson-3.8.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:69097c50c3ccbcc61292192b045927f1688ca57ce80525dc5d120e0b91e19bb0"}, + {file = "orjson-3.8.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e7822cba140f7ca48ed0256229f422dbae69e3a3475176185db0c0538cfadb57"}, + {file = "orjson-3.8.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03389e3750c521a7f3d4837de23cfd21a7f24574b4b3985c9498f440d21adb03"}, + {file = "orjson-3.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0f9d9b5c6692097de07dd0b2d5ff20fd135bacd1b2fb7ea383ee717a4150c93"}, + {file = "orjson-3.8.1-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:c2c9ef10b6344465fd5ac002be2d34f818211274dd79b44c75b2c14a979f84f3"}, + {file = "orjson-3.8.1-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:7adaac93678ac61f5dc070f615b18639d16ee66f6a946d5221dbf315e8b74bec"}, + {file = "orjson-3.8.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b0c1750f73658906b82cabbf4be2f74300644c17cb037fbc8b48d746c3b90c76"}, + {file = "orjson-3.8.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:da6306e1f03e7085fe0db61d4a3377f70c6fd865118d0afe17f80ae9a8f6f124"}, + {file = "orjson-3.8.1-cp38-none-win_amd64.whl", hash = "sha256:f532c2cbe8c140faffaebcfb34d43c9946599ea8138971f181a399bec7d6b123"}, + {file = "orjson-3.8.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:6a7b76d4b44bca418f7797b1e157907b56b7d31caa9091db4e99ebee51c16933"}, + {file = "orjson-3.8.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:f850489d89ea12be486492e68f0fd63e402fa28e426d4f0b5fc1eec0595e6109"}, + {file = "orjson-3.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4449e70b98f3ad3e43958360e4be1189c549865c0a128e8629ec96ce92d251c3"}, + {file = "orjson-3.8.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:45357eea9114bd41ef19280066591e9069bb4f6f5bffd533e9bfc12a439d735f"}, + {file = "orjson-3.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f5a9bc5bc4d730153529cb0584c63ff286d50663ccd48c9435423660b1bb12d"}, + {file = "orjson-3.8.1-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:a806aca6b80fa1d996aa16593e4995a71126a085ee1a59fff19ccad29a4e47fd"}, + {file = "orjson-3.8.1-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:395d02fd6be45f960da014372e7ecefc9e5f8df57a0558b7111a5fa8423c0669"}, + {file = "orjson-3.8.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:caff3c1e964cfee044a03a46244ecf6373f3c56142ad16458a1446ac6d69824a"}, + {file = "orjson-3.8.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5ded261268d5dfd307078fe3370295e5eb15bdde838bbb882acf8538e061c451"}, + {file = "orjson-3.8.1-cp39-none-win_amd64.whl", hash = "sha256:45c1914795ffedb2970bfcd3ed83daf49124c7c37943ed0a7368971c6ea5e278"}, + {file = "orjson-3.8.1.tar.gz", hash = "sha256:07c42de52dfef56cdcaf2278f58e837b26f5b5af5f1fd133a68c4af203851fc7"}, +] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, @@ -1985,6 +2310,10 @@ typing-extensions = [ {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, ] +typing-inspect = [ + {file = "typing_inspect-0.8.0-py3-none-any.whl", hash = "sha256:5fbf9c1e65d4fa01e701fe12a5bca6c6e08a4ffd5bc60bfac028253a447c5188"}, + {file = "typing_inspect-0.8.0.tar.gz", hash = "sha256:8b1ff0c400943b6145df8119c41c244ca8207f1f10c9c057aeed1560e4806e3d"}, +] urllib3 = [ {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, diff --git a/pyproject.toml b/pyproject.toml index 9b86f3a4..a159311e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Communications :: Chat", - ] packages = [ { include = "aiogram" } @@ -98,6 +97,7 @@ toml = "^0.10.2" pre-commit = "^2.20.0" packaging = "^21.3" typing-extensions = "^4.3.0" +butcher = { git = "https://github.com/aiogram/butcher.git", rev = "v0.1.5", python = "3.10" } [tool.poetry.extras] diff --git a/tests/test_api/test_client/test_session/test_base_session.py b/tests/test_api/test_client/test_session/test_base_session.py index dbb578a1..51803094 100644 --- a/tests/test_api/test_client/test_session/test_base_session.py +++ b/tests/test_api/test_client/test_session/test_base_session.py @@ -8,6 +8,7 @@ import pytest from aiogram import Bot from aiogram.client.session.base import BaseSession, TelegramType from aiogram.client.telegram import PRODUCTION, TelegramAPIServer +from aiogram.enums import ChatType, TopicIconColor from aiogram.exceptions import ( ClientDecodeError, RestartingTelegram, @@ -91,6 +92,8 @@ class TestBaseSession: assert session.prepare_value(now) == str(round(now.timestamp())) assert isinstance(session.prepare_value(datetime.timedelta(minutes=2)), str) assert session.prepare_value(42) == "42" + assert session.prepare_value(ChatType.PRIVATE) == "private" + assert session.prepare_value(TopicIconColor.RED) == "16478047" def test_clean_json(self): session = CustomSession() diff --git a/tests/test_api/test_methods/test_get_chat_members_count.py b/tests/test_api/test_methods/test_get_chat_members_count.py deleted file mode 100644 index cd44a13a..00000000 --- a/tests/test_api/test_methods/test_get_chat_members_count.py +++ /dev/null @@ -1,24 +0,0 @@ -import pytest - -from aiogram.methods import GetChatMembersCount, Request -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -class TestGetChatMembersCount: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetChatMembersCount, ok=True, result=42) - - response: int = await GetChatMembersCount(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMembersCount" - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetChatMembersCount, ok=True, result=42) - - response: int = await bot.get_chat_members_count(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMembersCount" - assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_kick_chat_member.py b/tests/test_api/test_methods/test_kick_chat_member.py deleted file mode 100644 index 4aaa651b..00000000 --- a/tests/test_api/test_methods/test_kick_chat_member.py +++ /dev/null @@ -1,24 +0,0 @@ -import pytest - -from aiogram.methods import KickChatMember, Request -from tests.mocked_bot import MockedBot - -pytestmark = pytest.mark.asyncio - - -class TestKickChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(KickChatMember, ok=True, result=True) - - response: bool = await KickChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "kickChatMember" - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(KickChatMember, ok=True, result=True) - - response: bool = await bot.kick_chat_member(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "kickChatMember" - assert response == prepare_result.result