From 4497b629102d992615844b8838b92c6755eb7fc7 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 10 Dec 2022 21:10:16 +0200 Subject: [PATCH 01/42] Added lost files --- .butcher/types/ErrorEvent/entity.json | 36 +++++++++++++++++++ .../en/LC_MESSAGES/api/enums/sticker_type.po | 30 ++++++++++++++++ .../LC_MESSAGES/api/enums/sticker_type.po | 30 ++++++++++++++++ poetry.lock | 3 +- 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 .butcher/types/ErrorEvent/entity.json create mode 100644 docs/locale/en/LC_MESSAGES/api/enums/sticker_type.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po diff --git a/.butcher/types/ErrorEvent/entity.json b/.butcher/types/ErrorEvent/entity.json new file mode 100644 index 00000000..3eebe2fc --- /dev/null +++ b/.butcher/types/ErrorEvent/entity.json @@ -0,0 +1,36 @@ +{ + "meta": { + "deprecated": true, + "internal": true + }, + "group": { + "title": "Internals", + "anchor": "internals" + }, + "object": { + "anchor": "error-event", + "category": "types", + "name": "ErrorEvent", + "description": "Internal event, should be used to receive errors while processing Updates from Telegram", + "html_description": "Internal event, should be used to receive errors while processing Updates from Telegram", + "rst_description": "Internal event, should be used to receive errors while processing Updates from Telegram", + "annotations": [ + { + "type": "Update", + "description": "Received update", + "html_description": "Received update", + "rst_description": "Received update", + "name": "update", + "required": true + }, + { + "type": "Exception", + "description": "Exception", + "html_description": "Exception", + "rst_description": "Exception", + "name": "exception", + "required": true + } + ] + } +} diff --git a/docs/locale/en/LC_MESSAGES/api/enums/sticker_type.po b/docs/locale/en/LC_MESSAGES/api/enums/sticker_type.po new file mode 100644 index 00000000..41da8cbb --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/enums/sticker_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/enums/sticker_type.rst:3 +msgid "StickerType" +msgstr "" + +#: aiogram.enums.sticker_type.StickerType:1 of +msgid "The part of the face relative to which the mask should be placed." +msgstr "" + +#: aiogram.enums.sticker_type.StickerType:3 of +msgid "Source: https://core.telegram.org/bots/api#maskposition" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po new file mode 100644 index 00000000..41da8cbb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-23 23:19+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/enums/sticker_type.rst:3 +msgid "StickerType" +msgstr "" + +#: aiogram.enums.sticker_type.StickerType:1 of +msgid "The part of the face relative to which the mask should be placed." +msgstr "" + +#: aiogram.enums.sticker_type.StickerType:3 of +msgid "Source: https://core.telegram.org/bots/api#maskposition" +msgstr "" diff --git a/poetry.lock b/poetry.lock index b7dd6f4b..6ff1580f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -891,8 +891,8 @@ mypy = [ {version = ">=0.700", markers = "python_version >= \"3.8\" and python_version < \"3.9\""}, ] pytest = [ - {version = ">=4.6", markers = "python_version >= \"3.6\" and python_version < \"3.10\""}, {version = ">=6.2", markers = "python_version >= \"3.10\""}, + {version = ">=4.6", markers = "python_version >= \"3.6\" and python_version < \"3.10\""}, ] [[package]] @@ -2244,7 +2244,6 @@ sphinx-copybutton = [ ] sphinx-intl = [ {file = "sphinx-intl-2.0.1.tar.gz", hash = "sha256:b25a6ec169347909e8d983eefe2d8adecb3edc2f27760db79b965c69950638b4"}, - {file = "sphinx_intl-2.0.1-py3.8.egg", hash = "sha256:2ff97cba0e4e43249e339a3c29dd2f5b63c25ce794050aabca320ad95f5c5b55"}, ] sphinx-prompt = [ {file = "sphinx_prompt-1.5.0-py3-none-any.whl", hash = "sha256:fa4e90d8088b5a996c76087d701fc7e31175f8b9dc4aab03a507e45051067162"}, From a0dbbcfd5d4bb3a8f35b2b821f279e550f406e13 Mon Sep 17 00:00:00 2001 From: Daria Date: Sat, 10 Dec 2022 20:54:43 +0200 Subject: [PATCH 02/42] UA translation of router & dispatcher docs --- .../LC_MESSAGES/dispatcher/dispatcher.po | 78 ++++++----- .../uk_UA/LC_MESSAGES/dispatcher/router.po | 126 +++++++++++------- 2 files changed, 122 insertions(+), 82 deletions(-) diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po index 21372b3e..053c8cbd 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po @@ -3,48 +3,53 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-10 19:44+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/dispatcher.rst:3 msgid "Dispatcher" -msgstr "" +msgstr "Диспетчер" #: ../../dispatcher/dispatcher.rst:5 msgid "" "Dispatcher is root :obj:`Router` and in code Dispatcher can be used " "directly for routing updates or attach another routers into dispatcher." msgstr "" +"Диспетчер - це кореневий маршрутизатор, і в коді диспетчер може " +"використовуватися безпосередньо для маршрутизації подій або підключення " +"інших маршрутизаторів до диспетчера." #: ../../dispatcher/dispatcher.rst:7 msgid "" "Here is only listed base information about Dispatcher. All about writing " "handlers, filters and etc. you can found in next pages:" msgstr "" +"Тут наведена лише базова інформація про диспетчер. Усе про написання " +"обробників, фільтрів і т.п. ви можете знайти на наступних сторінках:" #: ../../dispatcher/dispatcher.rst:9 msgid "`Router `__" -msgstr "" +msgstr "`Router `__" #: ../../dispatcher/dispatcher.rst:10 msgid "`Observer `__" -msgstr "" +msgstr "`Observer `__" #: aiogram.dispatcher.dispatcher.Dispatcher:1 #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:1 of msgid "Root router" -msgstr "" +msgstr "Кореневий маршрутизатор" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__ #: aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update @@ -52,93 +57,100 @@ msgstr "" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling of msgid "Parameters" -msgstr "" +msgstr "Параметри" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:3 of msgid "Storage for FSM" -msgstr "" +msgstr "Сховище для кінцевого автомату (FSM)" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:4 of msgid "FSM strategy" -msgstr "" +msgstr "Стратегія кінцевого апарату" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:5 of msgid "Events isolation" -msgstr "" +msgstr "Ізоляція подій" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:6 of msgid "" -"Disable FSM, note that if you disable FSM then you should not use storage" -" and events isolation" +"Disable FSM, note that if you disable FSM then you should not use " +"storage and events isolation" msgstr "" +"Відключення кінцевого апарату, зауважте що при вимкненому кінцевому " +"апаратові вам не слід використовувати сховище (кінцевого апарату) та " +"ізоляцію подій" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:8 of msgid "Other arguments, will be passed as keyword arguments to handlers" -msgstr "" +msgstr "Інші аргументи будуть передані обробникам як іменовані аргументи" #: aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update:1 of msgid "" "Main entry point for incoming updates with automatic Dict->Update " "serializer" -msgstr "" +msgstr "Основна точка входу для подій" #: aiogram.dispatcher.dispatcher.Dispatcher.feed_update:1 of msgid "" -"Main entry point for incoming updates Response of this method can be used" -" as Webhook response" +"Main entry point for incoming updates Response of this method can be " +"used as Webhook response" msgstr "" +"Основна точка входу для подій. Відповідь цього метода може бути " +"використана для відповіді у Webhook" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:1 of msgid "Run many bots with polling" -msgstr "" +msgstr "Запуск кількох ботів з опитуванням" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 of msgid "Bot instances" -msgstr "" +msgstr "Екземпляри ботів" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 of msgid "Poling timeout" -msgstr "" +msgstr "Час очікування на відповідь" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 of msgid "Run task for each event and no wait result" -msgstr "" +msgstr "Запуск обробки без очікування результату" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 of msgid "List of the update types you want your bot to receive" -msgstr "" +msgstr "Список типів подій, які має опрацьовувати ваш бот" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 of msgid "contextual data" -msgstr "" +msgstr "контекстні дані" #: aiogram.dispatcher.dispatcher.Dispatcher.run_polling #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling of msgid "Returns" -msgstr "" +msgstr "Повертає" #: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:1 of msgid "Polling runner" -msgstr "" +msgstr "Запуск кількох ботів з опитуванням (асинхронно)" #: ../../dispatcher/dispatcher.rst:18 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/dispatcher.rst:20 ../../dispatcher/dispatcher.rst:33 msgid "Example:" -msgstr "" +msgstr "Наприклад:" #: ../../dispatcher/dispatcher.rst:31 msgid "Including routers" -msgstr "" +msgstr "Включаючи маршрутизатори" #: ../../dispatcher/dispatcher.rst:43 msgid "Handling updates" -msgstr "" +msgstr "Обробка подій" #: ../../dispatcher/dispatcher.rst:45 msgid "" -"All updates can be propagated to the dispatcher by " -":obj:`Dispatcher.feed_update(bot=..., update=...)` method:" +"All updates can be propagated to the dispatcher by :obj:`Dispatcher." +"feed_update(bot=..., update=...)` method:" msgstr "" +"Усі оновлення можна передати диспетчеру через :obj:`Dispatcher." +"feed_update(bot=..., update=...)` method:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/router.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/router.po index 1d194ac3..dfd25059 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/router.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/router.po @@ -3,220 +3,248 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"PO-Revision-Date: 2022-12-10 20:41+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/router.rst:3 msgid "Router" -msgstr "" +msgstr "Маршрутизатор" #: aiogram.dispatcher.router.Router:1 of msgid "Bases: :py:class:`object`" -msgstr "" +msgstr "Базується на :py:class:`object`" #: aiogram.dispatcher.router.Router:1 of msgid "" "Router can route update, and it nested update types like messages, " "callback query, polls and all other event types." msgstr "" +"Маршрутизатор може маршрутизувати події, а також вкладені типи оновлень, " +"такі як повідомлення, запит зворотного виклику, опитування та всі інші " +"типи подій." #: aiogram.dispatcher.router.Router:4 of msgid "Event handlers can be registered in observer by two ways:" msgstr "" +"Обробники подій можуть бути зареєстровані в обсервері двома шляхами:" #: aiogram.dispatcher.router.Router:6 of msgid "" "By observer method - :obj:`router..register(handler, " ")`" msgstr "" +"За допомогою методу обсервера - :obj:`router.." +"register(handler, )`" #: aiogram.dispatcher.router.Router:7 of msgid "By decorator - :obj:`@router.()`" msgstr "" +"За допомогою декоратора - :obj:`@router.()`" #: aiogram.dispatcher.router.Router.__init__ #: aiogram.dispatcher.router.Router.include_router of msgid "Parameters" -msgstr "" +msgstr "Параметри" #: aiogram.dispatcher.router.Router.__init__:1 of msgid "Optional router name, can be useful for debugging" msgstr "" +"Додаткова назва маршрутизатора, може бути корисною для відлагодження" #: aiogram.dispatcher.router.Router.include_router:1 of msgid "Attach another router." -msgstr "" +msgstr "Підключення маршрутизатора." #: aiogram.dispatcher.router.Router.include_router of msgid "Returns" -msgstr "" +msgstr "Повертає" #: ../../dispatcher/router.rst:11 msgid "Event observers" -msgstr "" +msgstr "Обсервери подій" #: ../../dispatcher/router.rst:15 msgid "" "All handlers always should be asynchronous. The name of the handler " "function is not important. The event argument name is also not important " -"but it is recommended to not overlap the name with contextual data in due" -" to function can not accept two arguments with the same name." +"but it is recommended to not overlap the name with contextual data in " +"due to function can not accept two arguments with the same name." msgstr "" +"Усі обробники завжди мають бути асинхронними. Ім'я функції обробки не " +"має значення. Назва аргументу події також не важлива, але рекомендується " +"не накладати назву на контекстні дані, оскільки функція не може прийняти " +"два аргументи з однаковою назвою." #: ../../dispatcher/router.rst:18 msgid "" "Here is the list of available observers and examples of how to register " "handlers" msgstr "" +"Ось список доступних обсерверів і приклади того, як зареєструвати " +"обробники" #: ../../dispatcher/router.rst:20 msgid "" -"In these examples only decorator-style registering handlers are used, but" -" if you don't like @decorators just use :obj:`.register(...)`" -" method instead." +"In these examples only decorator-style registering handlers are used, " +"but if you don't like @decorators just use :obj:`." +"register(...)` method instead." msgstr "" +"У цих прикладах використовуються лише обробники реєстрації у стилі " +"декоратора, але якщо вам не подобаються @decorators, просто " +"використовуйте :obj:`.register(...)` method instead." #: ../../dispatcher/router.rst:23 msgid "Update" -msgstr "" +msgstr "Оновлення" #: ../../dispatcher/router.rst:32 msgid "" "By default Router already has an update handler which route all event " "types to another observers." msgstr "" +"За замовчуванням маршрутизатор уже має обробник подій, який направляє " +"всі типи подій іншим обсерверам." #: ../../dispatcher/router.rst:36 msgid "Message" -msgstr "" +msgstr "Повідомлення" #: ../../dispatcher/router.rst:41 msgid "Be attentive with filtering this event" -msgstr "" +msgstr "Будьте уважні при фільтруванні цієї події" #: ../../dispatcher/router.rst:43 msgid "" "You should expect that this event can be with different sets of " "attributes in different cases" msgstr "" +"Вам слід очікувати, що ця подія може мати різні набори атрибутів у " +"різних випадках" #: ../../dispatcher/router.rst:45 msgid "" "(For example text, sticker and document are always of different content " "types of message)" msgstr "" +"(Наприклад, текст, стікер та документ завжди мають різні типи вмісту)" #: ../../dispatcher/router.rst:47 msgid "" -"Recommended way to check field availability before usage, for example via" -" :ref:`magic filter `: :code:`F.text` to handle text, " -":code:`F.sticker` to handle stickers only and etc." +"Recommended way to check field availability before usage, for example " +"via :ref:`magic filter `: :code:`F.text` to handle text, :" +"code:`F.sticker` to handle stickers only and etc." msgstr "" +"Рекомендований спосіб перевірити наявність полів перед використанням, " +"наприклад за допомогою :ref:`magic filter `: :code:`F." +"text` для обробки тексту, :code:`F.sticker` для обробки лише стікерів і " +"тощо." #: ../../dispatcher/router.rst:58 msgid "Edited message" -msgstr "" +msgstr "Відредаговане повідомлення" #: ../../dispatcher/router.rst:66 msgid "Channel post" -msgstr "" +msgstr "Пост на каналі" #: ../../dispatcher/router.rst:74 msgid "Edited channel post" -msgstr "" +msgstr "Відредагований пост на каналі" #: ../../dispatcher/router.rst:83 msgid "Inline query" -msgstr "" +msgstr "Inline запит" #: ../../dispatcher/router.rst:91 msgid "Chosen inline query" -msgstr "" +msgstr "Вибраний результат inline запиту" #: ../../dispatcher/router.rst:99 msgid "Callback query" -msgstr "" +msgstr "Запит зворотної відповіді" #: ../../dispatcher/router.rst:107 msgid "Shipping query" -msgstr "" +msgstr "Запит підтвердження доставки" #: ../../dispatcher/router.rst:115 msgid "Pre checkout query" -msgstr "" +msgstr "Запит перед оформленням замовлення" #: ../../dispatcher/router.rst:123 msgid "Poll" -msgstr "" +msgstr "Опитування" #: ../../dispatcher/router.rst:131 msgid "Poll answer" -msgstr "" +msgstr "Відповідь на опитування" #: ../../dispatcher/router.rst:139 msgid "Errors" -msgstr "" +msgstr "Помилки" #: ../../dispatcher/router.rst:146 msgid "Is useful for handling errors from other handlers" -msgstr "" +msgstr "Корисно для обробки помилок інших обробників" #: ../../dispatcher/router.rst:150 msgid "Nested routers" -msgstr "" +msgstr "Вкладені маршрутизатори" #: ../../dispatcher/router.rst:155 msgid "" "Routers by the way can be nested to an another routers with some " "limitations:" msgstr "" +"До речі, маршрутизатори можуть бути вкладеними в інші маршрутизатори з " +"деякими обмеженнями:" #: ../../dispatcher/router.rst:155 msgid "" "1. Router **CAN NOT** include itself 1. Routers **CAN NOT** be used for " -"circular including (router 1 include router 2, router 2 include router 3," -" router 3 include router 1)" +"circular including (router 1 include router 2, router 2 include router " +"3, router 3 include router 1)" msgstr "" +"1. Маршрутизатор **НЕ МОЖЕ** включити себе \n" +"2. Маршрутизатори **НЕ МОЖНА** використовувати для циклічного включення " +"(маршрутизатор 1 включає маршрутизатор 2, маршрутизатор 2 включає " +"маршрутизатор 3, маршрутизатор 3 включає маршрутизатор 1)" #: ../../dispatcher/router.rst:159 msgid "Example:" -msgstr "" +msgstr "Приклад:" #: ../../dispatcher/router.rst:161 ../../dispatcher/router.rst:171 msgid "module_2.py" -msgstr "" +msgstr "module_2.py" #: ../../dispatcher/router.rst:183 msgid "How it works?" -msgstr "" +msgstr "Як це працює?" #: ../../dispatcher/router.rst:185 msgid "" "For example, dispatcher has 2 routers, the last router also has one " "nested router:" msgstr "" +"Наприклад, диспетчер має 2 маршрутизатори, останній маршрутизатор також " +"має один вкладений маршрутизатор:" #: ../../dispatcher/router.rst:-1 msgid "Nested routers example" -msgstr "" +msgstr "Приклад вкладених маршрутизаторів" #: ../../dispatcher/router.rst:190 msgid "In this case update propagation flow will have form:" -msgstr "" - -#~ msgid "" -#~ "Can be attached directly or by " -#~ "import string in format " -#~ "\":\"" -#~ msgstr "" +msgstr "У цьому випадку потік розповсюдження оновлення матиме вигляд:" From 49f4c9d3bd8472f95694f3cde37f321f42bbc6e4 Mon Sep 17 00:00:00 2001 From: Daria Date: Thu, 15 Dec 2022 21:34:36 +0200 Subject: [PATCH 03/42] UA translation of class based handlers docs (#1076) --- .../dispatcher/class_based_handlers/base.po | 30 ++++++++++++------- .../class_based_handlers/callback_query.po | 22 +++++++------- .../class_based_handlers/chat_member.po | 22 +++++++------- .../chosen_inline_result.po | 23 +++++++------- .../dispatcher/class_based_handlers/error.po | 27 ++++++++++------- .../dispatcher/class_based_handlers/index.po | 24 ++++++++++----- .../class_based_handlers/inline_query.po | 24 ++++++++------- .../class_based_handlers/message.po | 23 +++++++------- .../dispatcher/class_based_handlers/poll.po | 23 +++++++------- .../pre_checkout_query.po | 21 ++++++++----- .../class_based_handlers/shipping_query.po | 20 ++++++++----- 11 files changed, 152 insertions(+), 107 deletions(-) diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po index 0237e667..40d8b4f5 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/base.po @@ -3,39 +3,43 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:34+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/base.rst:5 msgid "BaseHandler" -msgstr "" +msgstr "BaseHandler" #: ../../dispatcher/class_based_handlers/base.rst:7 msgid "" "Base handler is generic abstract class and should be used in all other " "class-based handlers." msgstr "" +"Базовий обробник є загальним абстрактним класом і повинен " +"використовуватися в усіх інших обробниках на основі класу." #: ../../dispatcher/class_based_handlers/base.rst:9 msgid "Import: :code:`from aiogram.handler import BaseHandler`" -msgstr "" +msgstr "Import: :code:`from aiogram.handler import BaseHandler`" #: ../../dispatcher/class_based_handlers/base.rst:11 msgid "" "By default you will need to override only method :code:`async def " "handle(self) -> Any: ...`" msgstr "" +"За замовчуванням вам потрібно буде перевизначити лише метод :code:`async " +"def handle(self) -> Any: ...`" #: ../../dispatcher/class_based_handlers/base.rst:13 msgid "" @@ -44,13 +48,19 @@ msgid "" "which can be accessed from the handler through attributes: :code:`event: " "TelegramEvent` and :code:`data: Dict[Any, str]`" msgstr "" +"Цей клас також має ініціалізатор за замовчуванням, і вам не потрібно " +"його змінювати. Ініціалізатор приймає поточну подію та всі контекстні " +"дані, доступ до яких можна отримати з обробника через атрибути: :code:" +"`event: TelegramEvent` and :code:`data: Dict[Any, str]`" #: ../../dispatcher/class_based_handlers/base.rst:17 msgid "" -"If instance of the bot is specified in context data or current context it" -" can be accessed through *bot* class attribute." +"If instance of the bot is specified in context data or current context " +"it can be accessed through *bot* class attribute." msgstr "" +"Якщо екземпляр бота вказано в контекстних даних або поточному контексті, " +"до нього можна отримати доступ через атрибут класу *bot*." #: ../../dispatcher/class_based_handlers/base.rst:20 msgid "Example" -msgstr "" +msgstr "Приклад" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/callback_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/callback_query.po index d7d31d0c..5a2b6566 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/callback_query.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/callback_query.po @@ -3,40 +3,40 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:37+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/callback_query.rst:3 msgid "CallbackQueryHandler" -msgstr "" +msgstr "CallbackQueryHandler" #: aiogram.handlers.callback_query.CallbackQueryHandler:1 of msgid "There is base class for callback query handlers." -msgstr "" +msgstr "Це базовий клас для обробників запитів зворотного виклику." #: aiogram.handlers.callback_query.CallbackQueryHandler:13 of msgid "Example:" -msgstr "" +msgstr "Приклад:" #: aiogram.handlers.callback_query.CallbackQueryHandler.from_user:1 of msgid "Is alias for `event.from_user`" -msgstr "" +msgstr "Псевдонім для `event.from_user`" #: aiogram.handlers.callback_query.CallbackQueryHandler.message:1 of msgid "Is alias for `event.message`" -msgstr "" +msgstr "Псевдонім для `event.message`" #: aiogram.handlers.callback_query.CallbackQueryHandler.callback_data:1 of msgid "Is alias for `event.data`" -msgstr "" +msgstr "Псевдонім для `event.data`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chat_member.po index 19d4b9b0..acbcac9b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chat_member.po @@ -3,42 +3,44 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 23:00+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/chat_member.rst:3 msgid "ChatMemberHandler" -msgstr "" +msgstr "ChatMemberHandler" #: ../../dispatcher/class_based_handlers/chat_member.rst:5 msgid "There is base class for chat member updated events." -msgstr "" +msgstr "Це базовий клас для подій оновлення статусу учасника чату." #: ../../dispatcher/class_based_handlers/chat_member.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/chat_member.rst:23 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/chat_member.rst:25 msgid "" "This base handler is subclass of :ref:`BaseHandler ` " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" #: ../../dispatcher/class_based_handlers/chat_member.rst:27 msgid ":code:`self.chat` is alias for :code:`self.event.chat`" -msgstr "" +msgstr ":code:`self.chat` псевдонім для :code:`self.event.chat`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chosen_inline_result.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chosen_inline_result.po index 558adf89..e77d99eb 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chosen_inline_result.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/chosen_inline_result.po @@ -3,46 +3,49 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:42+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:3 msgid "ChosenInlineResultHandler" -msgstr "" +msgstr "ChosenInlineResultHandler" #: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:5 msgid "There is base class for chosen inline result handlers." -msgstr "" +msgstr "Це базовий клас для обробників вибраних inline результатів." #: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:22 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:24 msgid "" "This base handler is subclass of :ref:`BaseHandler ` " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" #: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:26 msgid ":code:`self.chat` is alias for :code:`self.event.chat`" -msgstr "" +msgstr ":code:`self.chat` це псевдонім для :code:`self.event.chat`" #: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:27 msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" msgstr "" +":code:`self.from_user` це псевдонім для :code:`self.event.from_user`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/error.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/error.po index 0d6e9328..d9df2504 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/error.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/error.po @@ -3,48 +3,53 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:45+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/error.rst:3 msgid "ErrorHandler" -msgstr "" +msgstr "ErrorHandler" #: ../../dispatcher/class_based_handlers/error.rst:5 msgid "There is base class for error handlers." -msgstr "" +msgstr "Це базовий клас для обробників помилок." #: ../../dispatcher/class_based_handlers/error.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/error.rst:27 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/error.rst:29 msgid "" "This base handler is subclass of :ref:`BaseHandler ` " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` з " +"деякими розширеннями:" #: ../../dispatcher/class_based_handlers/error.rst:31 msgid "" -":code:`self.exception_name` is alias for " -":code:`self.event.__class__.__name__`" +":code:`self.exception_name` is alias for :code:`self.event.__class__." +"__name__`" msgstr "" +":code:`self.exception_name` це псевдонім для :code:`self.event.__class__." +"__name__`" #: ../../dispatcher/class_based_handlers/error.rst:32 msgid ":code:`self.exception_message` is alias for :code:`str(self.event)`" msgstr "" +":code:`self.exception_message` це псевдонім для :code:`str(self.event)`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/index.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/index.po index 780ca896..41100197 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/index.po @@ -3,29 +3,31 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:30+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/index.rst:3 msgid "Class based handlers" -msgstr "" +msgstr "Обробники на основі класів" #: ../../dispatcher/class_based_handlers/index.rst:5 msgid "" "A handler is a async callable which takes a event with contextual data " "and returns a response." msgstr "" +"Обробник (handler) — це корутина, яка приймає подію з контекстними " +"даними та повертає відповідь." #: ../../dispatcher/class_based_handlers/index.rst:7 msgid "" @@ -34,9 +36,15 @@ msgid "" "structure your event handlers and reuse code by harnessing inheritance " "and mixins." msgstr "" +"В **aiogram** це може бути більш, ніж просто асинхронна функція, це " +"дозволяє вам використовувати класи, які можна використовувати як " +"обробники подій Telegram для структурування ваших обробників подій і " +"повторного використання коду за допомогою унаслідування та розширення." #: ../../dispatcher/class_based_handlers/index.rst:10 msgid "" -"There are some base class based handlers what you need to use in your own" -" handlers:" +"There are some base class based handlers what you need to use in your " +"own handlers:" msgstr "" +"Нижче наведено кілька обробників на основі класів, які вам потрібно " +"використовувати у своїх власних обробниках:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/inline_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/inline_query.po index b8a5fdef..15b7e877 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/inline_query.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/inline_query.po @@ -3,46 +3,48 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:48+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/inline_query.rst:3 msgid "InlineQueryHandler" -msgstr "" +msgstr "InlineQueryHandler" #: ../../dispatcher/class_based_handlers/inline_query.rst:5 msgid "There is base class for inline query handlers." -msgstr "" +msgstr "Це базовий клас для обробників inline запитів." #: ../../dispatcher/class_based_handlers/inline_query.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/inline_query.rst:22 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/inline_query.rst:24 msgid "" "This base handler is subclass of :ref:`BaseHandler ` " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" #: ../../dispatcher/class_based_handlers/inline_query.rst:26 msgid ":code:`self.chat` is alias for :code:`self.event.chat`" -msgstr "" +msgstr ":code:`self.chat` це псевдонім для :code:`self.event.chat`" #: ../../dispatcher/class_based_handlers/inline_query.rst:27 msgid ":code:`self.query` is alias for :code:`self.event.query`" -msgstr "" +msgstr ":code:`self.query` це псевдонім для :code:`self.event.query`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/message.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/message.po index 247cd4de..0b0feb84 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/message.po @@ -3,46 +3,49 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:52+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/message.rst:3 msgid "MessageHandler" -msgstr "" +msgstr "MessageHandler" #: ../../dispatcher/class_based_handlers/message.rst:5 msgid "There is base class for message handlers." -msgstr "" +msgstr "Це базовий клас для обробників повідомлень." #: ../../dispatcher/class_based_handlers/message.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/message.rst:22 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/message.rst:24 msgid "" "This base handler is subclass of [BaseHandler](basics.md#basehandler) " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом [BaseHandler](basics.md#basehandler) " +"з деякими розширеннями:" #: ../../dispatcher/class_based_handlers/message.rst:26 msgid ":code:`self.chat` is alias for :code:`self.event.chat`" -msgstr "" +msgstr ":code:`self.chat` це псевдонім для :code:`self.event.chat`" #: ../../dispatcher/class_based_handlers/message.rst:27 msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" msgstr "" +":code:`self.from_user` це псевдонім для :code:`self.event.from_user`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/poll.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/poll.po index c8717a1d..a6e85eb2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/poll.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/poll.po @@ -3,46 +3,49 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:53+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/poll.rst:3 msgid "PollHandler" -msgstr "" +msgstr "PollHandler" #: ../../dispatcher/class_based_handlers/poll.rst:5 msgid "There is base class for poll handlers." -msgstr "" +msgstr "Це базовий клас для обробників опитувань." #: ../../dispatcher/class_based_handlers/poll.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/poll.rst:21 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/poll.rst:23 msgid "" "This base handler is subclass of :ref:`BaseHandler ` " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" #: ../../dispatcher/class_based_handlers/poll.rst:25 msgid ":code:`self.question` is alias for :code:`self.event.question`" msgstr "" +":code:`self.question` це псевдонім для :code:`self.event.question`" #: ../../dispatcher/class_based_handlers/poll.rst:26 msgid ":code:`self.options` is alias for :code:`self.event.options`" -msgstr "" +msgstr ":code:`self.options` це псевдонім для :code:`self.event.options`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/pre_checkout_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/pre_checkout_query.po index 2f868119..aa7b209d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/pre_checkout_query.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/pre_checkout_query.po @@ -3,42 +3,47 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:56+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:3 msgid "PreCheckoutQueryHandler" -msgstr "" +msgstr "PreCheckoutQueryHandler" #: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:5 msgid "There is base class for callback query handlers." msgstr "" +"!!! Це базовий клас для обробників запитів перед оформленням " +"замовлення." #: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:21 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:23 msgid "" "This base handler is subclass of :ref:`BaseHandler ` " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" #: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:25 msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" msgstr "" +":code:`self.from_user` псевдонім для :code:`self.event.from_user`" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/shipping_query.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/shipping_query.po index ccc60897..90c1aac4 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/shipping_query.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/class_based_handlers/shipping_query.po @@ -3,42 +3,46 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-11 22:58+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../dispatcher/class_based_handlers/shipping_query.rst:3 msgid "ShippingQueryHandler" -msgstr "" +msgstr "ShippingQueryHandler" #: ../../dispatcher/class_based_handlers/shipping_query.rst:5 msgid "There is base class for callback query handlers." msgstr "" +"!!! Це базовий клас для обробників запитів підтвердження доставки." #: ../../dispatcher/class_based_handlers/shipping_query.rst:8 msgid "Simple usage" -msgstr "" +msgstr "Просте застосування" #: ../../dispatcher/class_based_handlers/shipping_query.rst:21 msgid "Extension" -msgstr "" +msgstr "Розширення" #: ../../dispatcher/class_based_handlers/shipping_query.rst:23 msgid "" "This base handler is subclass of :ref:`BaseHandler ` " "with some extensions:" msgstr "" +"Цей базовий обробник є підкласом :ref:`BaseHandler ` " +"з деякими розширеннями:" #: ../../dispatcher/class_based_handlers/shipping_query.rst:25 msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`" msgstr "" +":code:`self.from_user` псевдонім для :code:`self.event.from_user`" From b93b75804c3ab28495d41839b5bf1ae20cff29de Mon Sep 17 00:00:00 2001 From: Daria Date: Thu, 15 Dec 2022 21:34:46 +0200 Subject: [PATCH 04/42] UA translation of index.po, download_file.po & upload_file.po from Bot API (#1080) --- .../uk_UA/LC_MESSAGES/api/download_file.po | 124 +++++++++++------- docs/locale/uk_UA/LC_MESSAGES/api/index.po | 20 +-- .../uk_UA/LC_MESSAGES/api/upload_file.po | 99 ++++++++------ 3 files changed, 150 insertions(+), 93 deletions(-) diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po index ac95e7e7..70760335 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po @@ -3,171 +3,201 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-13 23:33+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../api/download_file.rst:3 msgid "How to download file?" -msgstr "" +msgstr "Як завантажити файл?" #: ../../api/download_file.rst:6 msgid "Download file manually" -msgstr "" +msgstr "Завантаження файла вручну" #: ../../api/download_file.rst:8 msgid "" "First, you must get the `file_id` of the file you want to download. " -"Information about files sent to the bot is contained in `Message " -"`__." +"Information about files sent to the bot is contained in `Message `__." msgstr "" +"По-перше, ви повинні отримати `file_id` файлу, який ви хочете завантажити. " +"Інформація про файли, надіслані боту, міститься в `Message `__." #: ../../api/download_file.rst:11 msgid "For example, download the document that came to the bot." -msgstr "" +msgstr "Наприклад, завантажте документ, який прийшов боту." #: ../../api/download_file.rst:17 msgid "" -"Then use the `getFile `__ method to get " -"`file_path`." +"Then use the `getFile `__ method to get `file_path`." msgstr "" +"Потім скористайтеся методом `getFile `__, щоб " +"отримати `file_path`." #: ../../api/download_file.rst:24 msgid "" -"After that, use the `download_file <#download-file>`__ method from the " -"bot object." +"After that, use the `download_file <#download-file>`__ method from the bot " +"object." msgstr "" +"Після цього скористайтеся методом `download_file <#download-file>`__ з " +"об’єкта бота." #: ../../api/download_file.rst:27 msgid "download_file(...)" -msgstr "" +msgstr "download_file(...)" #: ../../api/download_file.rst:29 msgid "Download file by `file_path` to destination." -msgstr "" +msgstr "Завантажує файл за `file_path` у вказане місце." #: ../../api/download_file.rst:31 ../../api/download_file.rst:81 msgid "" "If you want to automatically create destination (:obj:`io.BytesIO`) use " "default value of destination and handle result of this method." msgstr "" +"Якщо ви хочете автоматично створити місце призначення (io.BytesIO), " +"використовуйте значення призначення за замовчуванням і обробіть результат " +"цього методу." #: aiogram.client.bot.Bot:1 of msgid "Bot class" -msgstr "" +msgstr "Bot class" #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." -msgstr "" +msgstr "Завантажує файл з file_path у вказане місце." #: aiogram.client.bot.Bot.download:3 aiogram.client.bot.Bot.download_file:3 of msgid "" -"If you want to automatically create destination (:class:`io.BytesIO`) use" -" default value of destination and handle result of this method." +"If you want to automatically create destination (:class:`io.BytesIO`) use " +"default value of destination and handle result of this method." msgstr "" +"Якщо ви хочете автоматично створити місце призначення (io.BytesIO), " +"використовуйте значення призначення за замовчуванням і обробіть результат " +"цього методу." #: aiogram.client.bot.Bot.download aiogram.client.bot.Bot.download_file of msgid "Parameters" -msgstr "" +msgstr "Параметри" #: aiogram.client.bot.Bot.download_file:6 of msgid "" -"File path on Telegram server (You can get it from " -":obj:`aiogram.types.File`)" +"File path on Telegram server (You can get it from :obj:`aiogram.types.File`)" msgstr "" +"Шлях до файлу на сервері Telegram (Ви можете отримати його з :obj:`aiogram." +"types.File`)" #: aiogram.client.bot.Bot.download:7 aiogram.client.bot.Bot.download_file:7 of msgid "" -"Filename, file path or instance of :class:`io.IOBase`. For e.g. " -":class:`io.BytesIO`, defaults to None" +"Filename, file path or instance of :class:`io.IOBase`. For e.g. :class:`io." +"BytesIO`, defaults to None" msgstr "" +"Ім’я файлу, шлях до файлу або екземпляр :class:`io.IOBase`. Для напр. :" +"class:`io.BytesIO`, за замовчуванням немає" #: aiogram.client.bot.Bot.download:8 aiogram.client.bot.Bot.download_file:8 of msgid "Total timeout in seconds, defaults to 30" -msgstr "" +msgstr "Загальний час очікування в секундах, за замовчуванням 30" #: aiogram.client.bot.Bot.download:9 aiogram.client.bot.Bot.download_file:9 of msgid "File chunks size, defaults to 64 kb" -msgstr "" +msgstr "Розмір фрагментів файлу, за замовчуванням 64 Кб" #: aiogram.client.bot.Bot.download:10 aiogram.client.bot.Bot.download_file:10 #: of msgid "" -"Go to start of file when downloading is finished. Used only for " -"destination with :class:`typing.BinaryIO` type, defaults to True" +"Go to start of file when downloading is finished. Used only for destination " +"with :class:`typing.BinaryIO` type, defaults to True" msgstr "" +"Перейти до початку файлу, коли завантаження завершиться. Використовується " +"лише для призначення з типом :class:`typing.BinaryIO`, за замовчуванням " +"значення True" #: ../../api/download_file.rst:38 msgid "" "There are two options where you can download the file: to **disk** or to " "**binary I/O object**." msgstr "" +"Існує два варіанти завантаження файлу: на **disk** або на **binary I/O " +"object**." #: ../../api/download_file.rst:41 msgid "Download file to disk" -msgstr "" +msgstr "Завантаження файлу на диск" #: ../../api/download_file.rst:43 msgid "" -"To download file to disk, you must specify the file name or path where to" -" download the file. In this case, the function will return nothing." +"To download file to disk, you must specify the file name or path where to " +"download the file. In this case, the function will return nothing." msgstr "" +"Щоб завантажити файл на диск, необхідно вказати ім'я файлу або шлях, куди " +"його завантажити. У цьому випадку функція нічого не поверне." #: ../../api/download_file.rst:51 msgid "Download file to binary I/O object" -msgstr "" +msgstr "Завантаження файлу в оперативну пам'ять" #: ../../api/download_file.rst:53 msgid "" -"To download file to binary I/O object, you must specify an object with " -"the :obj:`typing.BinaryIO` type or use the default (:obj:`None`) value." +"To download file to binary I/O object, you must specify an object with the :" +"obj:`typing.BinaryIO` type or use the default (:obj:`None`) value." msgstr "" +"Щоб завантажити файл до оперативної пам'яті, ви повинні вказати об’єкт із " +"типом :obj:`typing.BinaryIO` або використати значення за замовчуванням (:" +"obj:`None`)." #: ../../api/download_file.rst:56 msgid "In the first case, the function will return your object:" -msgstr "" +msgstr "У першому випадку функція поверне ваш об’єкт:" #: ../../api/download_file.rst:64 msgid "" -"If you leave the default value, an :obj:`io.BytesIO` object will be " -"created and returned." +"If you leave the default value, an :obj:`io.BytesIO` object will be created " +"and returned." msgstr "" +"Якщо залишити значення за замовчуванням, буде створено та повернено об’єкт :" +"obj:`io.BytesIO`." #: ../../api/download_file.rst:72 msgid "Download file in short way" -msgstr "" +msgstr "Завантаження файла коротким шляхом" #: ../../api/download_file.rst:74 msgid "" "Getting `file_path` manually every time is boring, so you should use the " "`download <#download>`__ method." msgstr "" +"Щоразу добувати `file_path` вручну нудно, тому вам слід використовувати " +"метод `download <#download>`__." #: ../../api/download_file.rst:77 msgid "download(...)" -msgstr "" +msgstr "download(...)" #: ../../api/download_file.rst:79 msgid "Download file by `file_id` or `Downloadable` object to destination." msgstr "" +"Завантажує файл за `file_id` або `Downloadable` об’єктом у вказане місце." #: aiogram.client.bot.Bot.download:1 of msgid "Download file by file_id or Downloadable object to destination." -msgstr "" +msgstr "Завантажує файл за file_id або Downloadable об’єктом у вказане місце." #: aiogram.client.bot.Bot.download:6 of msgid "file_id or Downloadable object" -msgstr "" +msgstr "file_id або Downloadable об’єкт" #: ../../api/download_file.rst:88 msgid "" @@ -175,14 +205,18 @@ msgid "" "accepts `file_id` or an `Downloadable` object (object that contains the " "`file_id` attribute) instead of `file_path`." msgstr "" +"Він відрізняється від `download_file <#download-file>`__ **лише** тим, що " +"приймає `file_id` або `Downloadable` об’єкт (об’єкт, який містить атрибут " +"`file_id`) замість `file_path`." #: ../../api/download_file.rst:91 msgid "" "You can download a file to `disk <#download-file-to-disk>`__ or to a " -"`binary I/O <#download-file-to-binary-io-object>`__ object in the same " -"way." +"`binary I/O <#download-file-to-binary-io-object>`__ object in the same way." msgstr "" +"Ви можете завантажити файл на `disk <#download-file-to-disk>`__ або в " +"`binary I/O object <#download-file-to-binary-io-object>`__ так само." #: ../../api/download_file.rst:93 msgid "Example:" -msgstr "" +msgstr "Приклад:" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/index.po index 25f384d5..6e2cb17f 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/index.po @@ -3,32 +3,36 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-01 22:51+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-13 18:47+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../api/index.rst:3 msgid "Bot API" -msgstr "" +msgstr "Бот API" #: ../../api/index.rst:5 msgid "" -"**aiogram** now is fully support of `Telegram Bot API " -"`_" +"**aiogram** now is fully support of `Telegram Bot API `_" msgstr "" +"**aiogram** наразі повністю підтримує `Telegram Bot API `_" #: ../../api/index.rst:7 msgid "" "All methods and types is fully autogenerated from Telegram Bot API docs " "by parser with code-generator." msgstr "" +"Усі методи та типи повністю автоматично згенеровані з документації " +"Telegram Bot API за допомогою парсера з генератором коду." diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po index 3d0bea45..9b0c2440 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po @@ -3,158 +3,177 @@ # This file is distributed under the same license as the aiogram package. # FIRST AUTHOR , 2022. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: aiogram \n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-03 01:03+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-12-13 21:40+0200\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 3.2.2\n" #: ../../api/upload_file.rst:5 msgid "How to upload file?" -msgstr "" +msgstr "Як відвантажити файл?" #: ../../api/upload_file.rst:7 msgid "" -"As says `official Telegram Bot API documentation " -"`_ there are three ways" -" to send files (photos, stickers, audio, media, etc.):" +"As says `official Telegram Bot API documentation `_ there are three ways to send files " +"(photos, stickers, audio, media, etc.):" msgstr "" +"Як стверджує `official Telegram Bot API documentation `_ існує три способа надіслати файл " +"(фото, наклейки, аудіо, медіа тощо):" #: ../../api/upload_file.rst:10 msgid "" "If the file is already stored somewhere on the Telegram servers or file " "is available by the URL, you don't need to reupload it." msgstr "" +"Якщо файл уже зберігається десь на серверах Telegram або файл доступний " +"за URL-адресою, вам не потрібно його повторно завантажувати." #: ../../api/upload_file.rst:13 msgid "" "But if you need to upload new file just use subclasses of `InputFile " "`__." msgstr "" +"Але якщо вам потрібно завантажити новий файл, просто використовуйте " +"підкласи `InputFile `__." #: ../../api/upload_file.rst:15 msgid "Here is available three different builtin types of input file:" -msgstr "" +msgstr "Тут доступні три різні типи вхідних файлів:" #: ../../api/upload_file.rst:17 msgid "" ":class:`aiogram.types.input_file.FSInputFile` - `uploading from file " "system <#upload-from-file-system>`__" msgstr "" +":class:`aiogram.types.input_file.FSInputFile` - `відвантажений з " +"файлової системи <#upload-from-file-system>`__" #: ../../api/upload_file.rst:18 msgid "" ":class:`aiogram.types.input_file.BufferedInputFile` - `uploading from " "buffer <#upload-from-buffer>`__" msgstr "" +":class:`aiogram.types.input_file.BufferedInputFile` - `відвантажений з " +"буферу <#upload-from-buffer>`__" #: ../../api/upload_file.rst:19 msgid "" ":class:`aiogram.types.input_file.URLInputFile` - `uploading from URL " "<#upload-from-url>`__" msgstr "" +":class:`aiogram.types.input_file.URLInputFile` - `відвантажений з URL " +"<#upload-from-url>`__" #: ../../api/upload_file.rst:23 msgid "**Be respectful with Telegram**" -msgstr "" +msgstr "**Поважайте Telegram**" #: ../../api/upload_file.rst:25 msgid "" -"Instances of `InputFile` is reusable. That's mean you can create instance" -" of InputFile and sent this file multiple times but Telegram is not " -"recommend to do that and when you upload file once just save their " +"Instances of `InputFile` is reusable. That's mean you can create " +"instance of InputFile and sent this file multiple times but Telegram is " +"not recommend to do that and when you upload file once just save their " "`file_id` and use it in next times." msgstr "" +"Екземпляри `InputFile` можна використовувати повторно. Це означає, що ви " +"можете створити екземпляр InputFile і надіслати цей файл кілька разів, " +"але Telegram не рекомендує цього робити, і коли ви завантажуєте файл " +"один раз, просто збережіть його `file_id` і використовуйте його " +"наступного разу." #: ../../api/upload_file.rst:31 msgid "Upload from file system" -msgstr "" +msgstr "Відвантаження з файлової системи" #: ../../api/upload_file.rst:33 msgid "By first step you will need to import InputFile wrapper:" -msgstr "" +msgstr "Перш за все, вам потрібно буде імпортувати обгортку InputFile:" #: ../../api/upload_file.rst:39 msgid "Then you can use it:" -msgstr "" +msgstr "Тепер ви можете використовувати її:" #: aiogram.types.input_file.BufferedInputFile.__init__:1 #: aiogram.types.input_file.FSInputFile.__init__:1 of msgid "Represents object for uploading files from filesystem" -msgstr "" +msgstr "Об’єкт для відвантаження файлів із файлової системи" #: aiogram.types.input_file.BufferedInputFile.__init__ #: aiogram.types.input_file.FSInputFile.__init__ of msgid "Parameters" -msgstr "" +msgstr "Параметри" #: aiogram.types.input_file.FSInputFile.__init__:3 of msgid "Path to file" -msgstr "" +msgstr "Шлях до файлу" #: aiogram.types.input_file.FSInputFile.__init__:4 of msgid "" "Filename to be propagated to telegram. By default, will be parsed from " "path" msgstr "" +"Ім'я файлу, яке буде передано в telegram. За замовчуванням, буде взято " +"зі шляху" #: aiogram.types.input_file.BufferedInputFile.__init__:5 #: aiogram.types.input_file.FSInputFile.__init__:6 of msgid "Uploading chunk size" -msgstr "" +msgstr "Розмір фрагмента відвантаження" #: ../../api/upload_file.rst:52 msgid "Upload from buffer" -msgstr "" +msgstr "Відвантаження з буферу" #: ../../api/upload_file.rst:54 msgid "" "Files can be also passed from buffer (For example you generate image " -"using `Pillow `_ and the want's" -" to sent it to the Telegram):" +"using `Pillow `_ and the " +"want's to sent it to the Telegram):" msgstr "" +"Файли також можна передавати з буфера (наприклад, ви створюєте " +"зображення за допомогою `Pillow `_ і хочете надіслати його в Telegram):" #: ../../api/upload_file.rst:58 ../../api/upload_file.rst:80 msgid "Import wrapper:" -msgstr "" +msgstr "Імпорт обгортки:" #: ../../api/upload_file.rst:64 ../../api/upload_file.rst:86 msgid "And then you can use it:" -msgstr "" +msgstr "Тепер ви можете використовувати її:" #: aiogram.types.input_file.BufferedInputFile.__init__:3 of msgid "Bytes" -msgstr "" +msgstr "Байти" #: aiogram.types.input_file.BufferedInputFile.__init__:4 of msgid "Filename to be propagated to telegram." -msgstr "" +msgstr "Ім'я файлу, яке буде передано в telegram." #: ../../api/upload_file.rst:74 msgid "Upload from url" -msgstr "" +msgstr "Відвантаження з URL" #: ../../api/upload_file.rst:76 msgid "" "If you need to upload a file from another server, but the direct link is " "bound to your server's IP, or you want to bypass native `upload limits " -"`_ by URL, you can use " -":obj:`aiogram.types.input_file.URLInputFile`." +"`_ by URL, you can " +"use :obj:`aiogram.types.input_file.URLInputFile`." msgstr "" - -#~ msgid "Create buffer from file" -#~ msgstr "" - -#~ msgid "Returns" -#~ msgstr "" - -#~ msgid "instance of :obj:`BufferedInputFile`" -#~ msgstr "" +"Якщо вам потрібно відвантажити файл з іншого сервера, але пряме " +"посилання прив’язано до IP-адреси вашого сервера, або ви хочете обійти " +"власні `обмеження на завантаження `_ за URL-адресою, ви можете використовувати :obj:" +"`aiogram.types.input_file.URLInputFile`." From 655b3a2d48d14b8a69906e5d3fc24430a86135c3 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Fri, 30 Dec 2022 16:10:06 +0200 Subject: [PATCH 05/42] Remove warnings about pytest asyncio mode --- tests/test_api/test_client/test_bot.py | 2 - .../test_session/test_aiohttp_session.py | 2 - .../test_session/test_base_session.py | 2 - .../test_middlewares/test_request_logging.py | 4 -- .../test_methods/test_add_sticker_to_set.py | 4 -- .../test_answer_callback_query.py | 4 -- .../test_methods/test_answer_inline_query.py | 4 -- .../test_answer_pre_checkout_query.py | 4 -- .../test_answer_shipping_query.py | 4 -- .../test_methods/test_answer_web_app_query.py | 4 -- .../test_approve_chat_join_request.py | 4 -- .../test_methods/test_ban_chat_member.py | 4 -- .../test_methods/test_ban_chat_sender_chat.py | 4 -- tests/test_api/test_methods/test_base.py | 2 - tests/test_api/test_methods/test_close.py | 4 -- .../test_methods/test_close_forum_topic.py | 4 -- .../test_methods/test_copy_message.py | 4 -- .../test_create_chat_invite_link.py | 4 -- .../test_methods/test_create_forum_topic.py | 4 -- .../test_methods/test_create_invoice_link.py | 4 -- .../test_create_new_sticker_set.py | 4 -- .../test_decline_chat_join_request.py | 4 -- .../test_methods/test_delete_chat_photo.py | 4 -- .../test_delete_chat_sticker_set.py | 4 -- .../test_methods/test_delete_forum_topic.py | 4 -- .../test_methods/test_delete_message.py | 4 -- .../test_methods/test_delete_my_commands.py | 4 -- .../test_delete_sticker_from_set.py | 4 -- .../test_methods/test_delete_webhook.py | 4 -- .../test_edit_chat_invite_link.py | 4 -- .../test_methods/test_edit_forum_topic.py | 4 -- .../test_methods/test_edit_message_caption.py | 4 -- .../test_edit_message_live_location.py | 4 -- .../test_methods/test_edit_message_media.py | 4 -- .../test_edit_message_reply_markup.py | 4 -- .../test_methods/test_edit_message_text.py | 4 -- .../test_export_chat_invite_link.py | 4 -- .../test_methods/test_forward_message.py | 4 -- tests/test_api/test_methods/test_get_chat.py | 4 -- .../test_get_chat_administrators.py | 4 -- .../test_methods/test_get_chat_member.py | 4 -- .../test_get_chat_member_count.py | 4 -- .../test_methods/test_get_chat_menu_button.py | 4 -- .../test_get_custom_emoji_stickers.py | 4 -- tests/test_api/test_methods/test_get_file.py | 4 -- .../test_get_forum_topic_icon_stickers.py | 4 -- .../test_methods/test_get_game_high_scores.py | 4 -- tests/test_api/test_methods/test_get_me.py | 4 -- .../test_methods/test_get_my_commands.py | 4 -- ...est_get_my_default_administrator_rights.py | 4 -- .../test_methods/test_get_sticker_set.py | 4 -- .../test_api/test_methods/test_get_updates.py | 4 -- .../test_get_user_profile_photos.py | 4 -- .../test_methods/test_get_webhook_info.py | 4 -- .../test_api/test_methods/test_leave_chat.py | 4 -- tests/test_api/test_methods/test_log_out.py | 4 -- .../test_methods/test_pin_chat_message.py | 4 -- .../test_methods/test_promote_chat_member.py | 4 -- .../test_methods/test_reopen_forum_topic.py | 4 -- .../test_methods/test_restrict_chat_member.py | 4 -- .../test_revoke_chat_invite_link.py | 4 -- .../test_methods/test_send_animation.py | 4 -- .../test_api/test_methods/test_send_audio.py | 4 -- .../test_methods/test_send_chat_action.py | 4 -- .../test_methods/test_send_contact.py | 4 -- tests/test_api/test_methods/test_send_dice.py | 4 -- .../test_methods/test_send_document.py | 4 -- tests/test_api/test_methods/test_send_game.py | 4 -- .../test_methods/test_send_invoice.py | 4 -- .../test_methods/test_send_location.py | 4 -- .../test_methods/test_send_media_group.py | 4 -- .../test_methods/test_send_message.py | 4 -- .../test_api/test_methods/test_send_photo.py | 4 -- tests/test_api/test_methods/test_send_poll.py | 4 -- .../test_methods/test_send_sticker.py | 4 -- .../test_api/test_methods/test_send_venue.py | 4 -- .../test_api/test_methods/test_send_video.py | 4 -- .../test_methods/test_send_video_note.py | 4 -- .../test_api/test_methods/test_send_voice.py | 4 -- ...est_set_chat_administrator_custom_title.py | 4 -- .../test_methods/test_set_chat_description.py | 4 -- .../test_methods/test_set_chat_menu_button.py | 4 -- .../test_methods/test_set_chat_permissions.py | 4 -- .../test_methods/test_set_chat_photo.py | 4 -- .../test_methods/test_set_chat_sticker_set.py | 4 -- .../test_methods/test_set_chat_title.py | 4 -- .../test_methods/test_set_game_score.py | 4 -- .../test_methods/test_set_my_commands.py | 4 -- ...est_set_my_default_administrator_rights.py | 4 -- .../test_set_passport_data_errors.py | 4 -- .../test_set_sticker_position_in_set.py | 4 -- .../test_set_sticker_set_thumb.py | 4 -- .../test_api/test_methods/test_set_webhook.py | 4 -- .../test_stop_message_live_location.py | 4 -- tests/test_api/test_methods/test_stop_poll.py | 4 -- .../test_methods/test_unban_chat_member.py | 4 -- .../test_unban_chat_sender_chat.py | 4 -- .../test_unpin_all_chat_messages.py | 4 -- .../test_unpin_all_forum_topic_messages.py | 4 -- .../test_methods/test_unpin_chat_message.py | 4 -- .../test_methods/test_upload_sticker_file.py | 4 -- tests/test_api/test_types/test_input_file.py | 3 - tests/test_dispatcher/test_dispatcher.py | 2 - .../test_dispatcher/test_event/test_event.py | 2 - .../test_event/test_handler.py | 2 - .../test_event/test_telegram.py | 3 - .../test_middlewares/test_user_context.py | 1 - tests/test_dispatcher/test_router.py | 2 - tests/test_filters/test_base.py | 4 -- tests/test_filters/test_callback_data.py | 64 +++++++++---------- .../test_filters/test_chat_member_updated.py | 1 - tests/test_filters/test_command.py | 2 - tests/test_filters/test_exception.py | 2 - tests/test_filters/test_magic_data.py | 2 - tests/test_filters/test_state.py | 5 -- tests/test_filters/test_text.py | 2 - tests/test_fsm/storage/test_isolation.py | 2 - tests/test_fsm/storage/test_redis.py | 2 - tests/test_fsm/storage/test_storages.py | 2 - tests/test_fsm/test_context.py | 2 - tests/test_handler/test_base.py | 2 - tests/test_handler/test_callback_query.py | 4 -- tests/test_handler/test_chat_member.py | 4 -- .../test_handler/test_chosen_inline_result.py | 4 -- tests/test_handler/test_error.py | 4 -- tests/test_handler/test_inline_query.py | 4 -- tests/test_handler/test_message.py | 4 -- tests/test_handler/test_poll.py | 4 -- tests/test_handler/test_pre_checkout_query.py | 4 -- tests/test_handler/test_shipping_query.py | 4 -- tests/test_utils/test_backoff.py | 1 - tests/test_utils/test_chat_action.py | 2 - tests/test_utils/test_deep_linking.py | 2 - tests/test_utils/test_i18n.py | 3 - 134 files changed, 30 insertions(+), 517 deletions(-) diff --git a/tests/test_api/test_client/test_bot.py b/tests/test_api/test_client/test_bot.py index 7266bdcd..1cf94238 100644 --- a/tests/test_api/test_client/test_bot.py +++ b/tests/test_api/test_client/test_bot.py @@ -14,8 +14,6 @@ from aiogram.methods import GetFile, GetMe from aiogram.types import File, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestBot: def test_init(self): diff --git a/tests/test_api/test_client/test_session/test_aiohttp_session.py b/tests/test_api/test_client/test_session/test_aiohttp_session.py index 6dbf213c..14c25ad3 100644 --- a/tests/test_api/test_client/test_session/test_aiohttp_session.py +++ b/tests/test_api/test_client/test_session/test_aiohttp_session.py @@ -15,8 +15,6 @@ from aiogram.methods import Request, TelegramMethod from aiogram.types import UNSET, InputFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class BareInputFile(InputFile): async def read(self, chunk_size: int): 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 51803094..e46981f6 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 @@ -27,8 +27,6 @@ from aiogram.methods import DeleteMessage, GetMe, TelegramMethod from aiogram.types import UNSET, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class CustomSession(BaseSession): async def close(self): diff --git a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py index 33e40992..9772bf2b 100644 --- a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py +++ b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py @@ -1,15 +1,11 @@ import datetime import logging -import pytest - from aiogram.client.session.middlewares.request_logging import RequestLogging from aiogram.methods import GetMe, SendMessage from aiogram.types import Chat, Message, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRequestLogging: async def test_use_middleware(self, bot: MockedBot, caplog): diff --git a/tests/test_api/test_methods/test_add_sticker_to_set.py b/tests/test_api/test_methods/test_add_sticker_to_set.py index 35a08f75..0bc6472c 100644 --- a/tests/test_api/test_methods/test_add_sticker_to_set.py +++ b/tests/test_api/test_methods/test_add_sticker_to_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AddStickerToSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAddStickerToSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_callback_query.py b/tests/test_api/test_methods/test_answer_callback_query.py index f157e86f..54f9e640 100644 --- a/tests/test_api/test_methods/test_answer_callback_query.py +++ b/tests/test_api/test_methods/test_answer_callback_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerCallbackQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerCallbackQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_inline_query.py b/tests/test_api/test_methods/test_answer_inline_query.py index 98227b57..ba7cc938 100644 --- a/tests/test_api/test_methods/test_answer_inline_query.py +++ b/tests/test_api/test_methods/test_answer_inline_query.py @@ -1,12 +1,8 @@ -import pytest - from aiogram import Bot from aiogram.methods import AnswerInlineQuery, Request from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerInlineQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_pre_checkout_query.py b/tests/test_api/test_methods/test_answer_pre_checkout_query.py index 7d0077c7..f15f5beb 100644 --- a/tests/test_api/test_methods/test_answer_pre_checkout_query.py +++ b/tests/test_api/test_methods/test_answer_pre_checkout_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerPreCheckoutQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerPreCheckoutQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_shipping_query.py b/tests/test_api/test_methods/test_answer_shipping_query.py index 1374543e..8a2b5f89 100644 --- a/tests/test_api/test_methods/test_answer_shipping_query.py +++ b/tests/test_api/test_methods/test_answer_shipping_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerShippingQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerShippingQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_web_app_query.py b/tests/test_api/test_methods/test_answer_web_app_query.py index 8d9848da..713653f1 100644 --- a/tests/test_api/test_methods/test_answer_web_app_query.py +++ b/tests/test_api/test_methods/test_answer_web_app_query.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import AnswerWebAppQuery, Request from aiogram.types import InlineQueryResult, SentWebAppMessage from tests.mocked_bot import MockedBot class TestAnswerWebAppQuery: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) @@ -19,7 +16,6 @@ class TestAnswerWebAppQuery: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) diff --git a/tests/test_api/test_methods/test_approve_chat_join_request.py b/tests/test_api/test_methods/test_approve_chat_join_request.py index 52d6554a..ea81c4ac 100755 --- a/tests/test_api/test_methods/test_approve_chat_join_request.py +++ b/tests/test_api/test_methods/test_approve_chat_join_request.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import ApproveChatJoinRequest, Request from tests.mocked_bot import MockedBot class TestApproveChatJoinRequest: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=True) @@ -17,7 +14,6 @@ class TestApproveChatJoinRequest: assert request.method == "approveChatJoinRequest" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=None) diff --git a/tests/test_api/test_methods/test_ban_chat_member.py b/tests/test_api/test_methods/test_ban_chat_member.py index 73090f40..10464737 100644 --- a/tests/test_api/test_methods/test_ban_chat_member.py +++ b/tests/test_api/test_methods/test_ban_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import BanChatMember, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_ban_chat_sender_chat.py b/tests/test_api/test_methods/test_ban_chat_sender_chat.py index 1d832e87..b93f27a5 100755 --- a/tests/test_api/test_methods/test_ban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_ban_chat_sender_chat.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import BanChatSenderChat, Request from tests.mocked_bot import MockedBot class TestBanChatSenderChat: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) @@ -18,7 +15,6 @@ class TestBanChatSenderChat: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_base.py b/tests/test_api/test_methods/test_base.py index 4dc39946..38306db1 100644 --- a/tests/test_api/test_methods/test_base.py +++ b/tests/test_api/test_methods/test_base.py @@ -6,8 +6,6 @@ from aiogram import Bot from aiogram.methods.base import prepare_parse_mode from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPrepareFile: # TODO: Add tests diff --git a/tests/test_api/test_methods/test_close.py b/tests/test_api/test_methods/test_close.py index c6a84e31..f8f8956b 100644 --- a/tests/test_api/test_methods/test_close.py +++ b/tests/test_api/test_methods/test_close.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Close, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestClose: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_close_forum_topic.py b/tests/test_api/test_methods/test_close_forum_topic.py index a9fa87b3..4857e7a4 100644 --- a/tests/test_api/test_methods/test_close_forum_topic.py +++ b/tests/test_api/test_methods/test_close_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import CloseForumTopic, Request from tests.mocked_bot import MockedBot class TestCloseForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) @@ -18,7 +15,6 @@ class TestCloseForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_copy_message.py b/tests/test_api/test_methods/test_copy_message.py index e844cede..38419c6b 100644 --- a/tests/test_api/test_methods/test_copy_message.py +++ b/tests/test_api/test_methods/test_copy_message.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import CopyMessage, Request from aiogram.types import MessageId from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCopyMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_create_chat_invite_link.py b/tests/test_api/test_methods/test_create_chat_invite_link.py index c07c55bc..cfdca233 100644 --- a/tests/test_api/test_methods/test_create_chat_invite_link.py +++ b/tests/test_api/test_methods/test_create_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import CreateChatInviteLink, Request from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_create_forum_topic.py b/tests/test_api/test_methods/test_create_forum_topic.py index 69f5ff3d..84eaf02e 100644 --- a/tests/test_api/test_methods/test_create_forum_topic.py +++ b/tests/test_api/test_methods/test_create_forum_topic.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import CreateForumTopic, Request from aiogram.types import ForumTopic from tests.mocked_bot import MockedBot class TestCreateForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateForumTopic, @@ -23,7 +20,6 @@ class TestCreateForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateForumTopic, diff --git a/tests/test_api/test_methods/test_create_invoice_link.py b/tests/test_api/test_methods/test_create_invoice_link.py index 2a3e16ac..7909fac9 100644 --- a/tests/test_api/test_methods/test_create_invoice_link.py +++ b/tests/test_api/test_methods/test_create_invoice_link.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import CreateInvoiceLink, Request from aiogram.types import LabeledPrice from tests.mocked_bot import MockedBot class TestCreateInvoiceLink: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" @@ -24,7 +21,6 @@ class TestCreateInvoiceLink: assert request.method == "createInvoiceLink" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" diff --git a/tests/test_api/test_methods/test_create_new_sticker_set.py b/tests/test_api/test_methods/test_create_new_sticker_set.py index 4c927b77..b82b1974 100644 --- a/tests/test_api/test_methods/test_create_new_sticker_set.py +++ b/tests/test_api/test_methods/test_create_new_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import CreateNewStickerSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateNewStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_decline_chat_join_request.py b/tests/test_api/test_methods/test_decline_chat_join_request.py index e6e60ca5..549f43d1 100755 --- a/tests/test_api/test_methods/test_decline_chat_join_request.py +++ b/tests/test_api/test_methods/test_decline_chat_join_request.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import DeclineChatJoinRequest, Request from tests.mocked_bot import MockedBot class TestDeclineChatJoinRequest: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) @@ -17,7 +14,6 @@ class TestDeclineChatJoinRequest: assert request.method == "declineChatJoinRequest" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_delete_chat_photo.py b/tests/test_api/test_methods/test_delete_chat_photo.py index 0f528775..9faaa8bf 100644 --- a/tests/test_api/test_methods/test_delete_chat_photo.py +++ b/tests/test_api/test_methods/test_delete_chat_photo.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteChatPhoto, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_chat_sticker_set.py b/tests/test_api/test_methods/test_delete_chat_sticker_set.py index 8fdb7b84..ae6af449 100644 --- a/tests/test_api/test_methods/test_delete_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_delete_chat_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteChatStickerSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_forum_topic.py b/tests/test_api/test_methods/test_delete_forum_topic.py index 773627fe..e0ad6bfd 100644 --- a/tests/test_api/test_methods/test_delete_forum_topic.py +++ b/tests/test_api/test_methods/test_delete_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import DeleteForumTopic, Request from tests.mocked_bot import MockedBot class TestDeleteForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) @@ -18,7 +15,6 @@ class TestDeleteForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_delete_message.py b/tests/test_api/test_methods/test_delete_message.py index ecceb6dd..097496a2 100644 --- a/tests/test_api/test_methods/test_delete_message.py +++ b/tests/test_api/test_methods/test_delete_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteMessage, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_my_commands.py b/tests/test_api/test_methods/test_delete_my_commands.py index 14d36381..c4902ec4 100644 --- a/tests/test_api/test_methods/test_delete_my_commands.py +++ b/tests/test_api/test_methods/test_delete_my_commands.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteMyCommands, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_sticker_from_set.py b/tests/test_api/test_methods/test_delete_sticker_from_set.py index c17a5493..bc2a8e79 100644 --- a/tests/test_api/test_methods/test_delete_sticker_from_set.py +++ b/tests/test_api/test_methods/test_delete_sticker_from_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteStickerFromSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteStickerFromSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_webhook.py b/tests/test_api/test_methods/test_delete_webhook.py index 21c0fcf7..76591a8a 100644 --- a/tests/test_api/test_methods/test_delete_webhook.py +++ b/tests/test_api/test_methods/test_delete_webhook.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteWebhook, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteWebhook: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_chat_invite_link.py b/tests/test_api/test_methods/test_edit_chat_invite_link.py index a1fd6a10..ab71c3ae 100644 --- a/tests/test_api/test_methods/test_edit_chat_invite_link.py +++ b/tests/test_api/test_methods/test_edit_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import EditChatInviteLink, Request from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_forum_topic.py b/tests/test_api/test_methods/test_edit_forum_topic.py index 5441bd9b..98e30166 100644 --- a/tests/test_api/test_methods/test_edit_forum_topic.py +++ b/tests/test_api/test_methods/test_edit_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import EditForumTopic, Request from tests.mocked_bot import MockedBot class TestEditForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) @@ -21,7 +18,6 @@ class TestEditForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_edit_message_caption.py b/tests/test_api/test_methods/test_edit_message_caption.py index a3afef46..71a7784e 100644 --- a/tests/test_api/test_methods/test_edit_message_caption.py +++ b/tests/test_api/test_methods/test_edit_message_caption.py @@ -1,14 +1,10 @@ import datetime from typing import Union -import pytest - from aiogram.methods import EditMessageCaption, Request from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageCaption: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_live_location.py b/tests/test_api/test_methods/test_edit_message_live_location.py index 32f19b2f..7a2c2f7d 100644 --- a/tests/test_api/test_methods/test_edit_message_live_location.py +++ b/tests/test_api/test_methods/test_edit_message_live_location.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageLiveLocation, Request from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageLiveLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_media.py b/tests/test_api/test_methods/test_edit_message_media.py index bc60e4d5..15594aff 100644 --- a/tests/test_api/test_methods/test_edit_message_media.py +++ b/tests/test_api/test_methods/test_edit_message_media.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageMedia, Request from aiogram.types import BufferedInputFile, InputMediaPhoto, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageMedia: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_reply_markup.py b/tests/test_api/test_methods/test_edit_message_reply_markup.py index 71a1f823..38baa76f 100644 --- a/tests/test_api/test_methods/test_edit_message_reply_markup.py +++ b/tests/test_api/test_methods/test_edit_message_reply_markup.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageReplyMarkup, Request from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageReplyMarkup: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_text.py b/tests/test_api/test_methods/test_edit_message_text.py index 5543f62c..1cdfcfe0 100644 --- a/tests/test_api/test_methods/test_edit_message_text.py +++ b/tests/test_api/test_methods/test_edit_message_text.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageText, Request from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageText: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_export_chat_invite_link.py b/tests/test_api/test_methods/test_export_chat_invite_link.py index fc8b4f13..7e3901a0 100644 --- a/tests/test_api/test_methods/test_export_chat_invite_link.py +++ b/tests/test_api/test_methods/test_export_chat_invite_link.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import ExportChatInviteLink, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestExportChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_forward_message.py b/tests/test_api/test_methods/test_forward_message.py index 94dfdf60..955b6456 100644 --- a/tests/test_api/test_methods/test_forward_message.py +++ b/tests/test_api/test_methods/test_forward_message.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import ForwardMessage, Request from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestForwardMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat.py b/tests/test_api/test_methods/test_get_chat.py index f5117d11..c5d4bfcd 100644 --- a/tests/test_api/test_methods/test_get_chat.py +++ b/tests/test_api/test_methods/test_get_chat.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetChat, Request from aiogram.types import Chat from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChat: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_administrators.py b/tests/test_api/test_methods/test_get_chat_administrators.py index e254d34e..945b2e02 100644 --- a/tests/test_api/test_methods/test_get_chat_administrators.py +++ b/tests/test_api/test_methods/test_get_chat_administrators.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetChatAdministrators, Request from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatAdministrators: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_member.py b/tests/test_api/test_methods/test_get_chat_member.py index 35dc98bd..e2fd2a75 100644 --- a/tests/test_api/test_methods/test_get_chat_member.py +++ b/tests/test_api/test_methods/test_get_chat_member.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetChatMember, Request from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_member_count.py b/tests/test_api/test_methods/test_get_chat_member_count.py index e0fd1a4a..91a7c514 100644 --- a/tests/test_api/test_methods/test_get_chat_member_count.py +++ b/tests/test_api/test_methods/test_get_chat_member_count.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import GetChatMemberCount, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatMembersCount: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_menu_button.py b/tests/test_api/test_methods/test_get_chat_menu_button.py index a7c2fd37..89181d3f 100644 --- a/tests/test_api/test_methods/test_get_chat_menu_button.py +++ b/tests/test_api/test_methods/test_get_chat_menu_button.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import GetChatMenuButton, Request from aiogram.types import MenuButton, MenuButtonDefault from tests.mocked_bot import MockedBot class TestGetChatMenuButton: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) @@ -16,7 +13,6 @@ class TestGetChatMenuButton: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) diff --git a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py index b47bc4c5..fd3ea8ff 100644 --- a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py +++ b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py @@ -1,14 +1,11 @@ from typing import List -import pytest - from aiogram.methods import GetCustomEmojiStickers, Request from aiogram.types import Sticker from tests.mocked_bot import MockedBot class TestGetCustomEmojiStickers: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetCustomEmojiStickers, @@ -35,7 +32,6 @@ class TestGetCustomEmojiStickers: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetCustomEmojiStickers, diff --git a/tests/test_api/test_methods/test_get_file.py b/tests/test_api/test_methods/test_get_file.py index 38923a6e..eb95cd20 100644 --- a/tests/test_api/test_methods/test_get_file.py +++ b/tests/test_api/test_methods/test_get_file.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetFile, Request from aiogram.types import File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetFile: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py index d8233eea..c9a1455a 100644 --- a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py +++ b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py @@ -1,14 +1,11 @@ from typing import List -import pytest - from aiogram.methods import GetForumTopicIconStickers, Request from aiogram.types import Sticker from tests.mocked_bot import MockedBot class TestGetForumTopicIconStickers: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) @@ -18,7 +15,6 @@ class TestGetForumTopicIconStickers: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) diff --git a/tests/test_api/test_methods/test_get_game_high_scores.py b/tests/test_api/test_methods/test_get_game_high_scores.py index bc2c7116..fe84d21d 100644 --- a/tests/test_api/test_methods/test_get_game_high_scores.py +++ b/tests/test_api/test_methods/test_get_game_high_scores.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetGameHighScores, Request from aiogram.types import GameHighScore, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetGameHighScores: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_me.py b/tests/test_api/test_methods/test_get_me.py index ba51e6a6..70f274ec 100644 --- a/tests/test_api/test_methods/test_get_me.py +++ b/tests/test_api/test_methods/test_get_me.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetMe, Request from aiogram.types import User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMe: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_commands.py b/tests/test_api/test_methods/test_get_my_commands.py index a28ef026..c627ff11 100644 --- a/tests/test_api/test_methods/test_get_my_commands.py +++ b/tests/test_api/test_methods/test_get_my_commands.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetMyCommands, Request from aiogram.types import BotCommand from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMyCommands: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py index 179b468d..7e843686 100644 --- a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import GetMyDefaultAdministratorRights, Request from aiogram.types import ChatAdministratorRights from tests.mocked_bot import MockedBot class TestGetMyDefaultAdministratorRights: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDefaultAdministratorRights, @@ -29,7 +26,6 @@ class TestGetMyDefaultAdministratorRights: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDefaultAdministratorRights, diff --git a/tests/test_api/test_methods/test_get_sticker_set.py b/tests/test_api/test_methods/test_get_sticker_set.py index 377a81c0..d8e7ca45 100644 --- a/tests/test_api/test_methods/test_get_sticker_set.py +++ b/tests/test_api/test_methods/test_get_sticker_set.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetStickerSet, Request from aiogram.types import Sticker, StickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_updates.py b/tests/test_api/test_methods/test_get_updates.py index 8f8dfa87..b4cd11b9 100644 --- a/tests/test_api/test_methods/test_get_updates.py +++ b/tests/test_api/test_methods/test_get_updates.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetUpdates, Request from aiogram.types import Update from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUpdates: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_user_profile_photos.py b/tests/test_api/test_methods/test_get_user_profile_photos.py index d6094eb9..cbfd0dbc 100644 --- a/tests/test_api/test_methods/test_get_user_profile_photos.py +++ b/tests/test_api/test_methods/test_get_user_profile_photos.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetUserProfilePhotos, Request from aiogram.types import PhotoSize, UserProfilePhotos from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUserProfilePhotos: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_webhook_info.py b/tests/test_api/test_methods/test_get_webhook_info.py index f50213cb..06d11dbc 100644 --- a/tests/test_api/test_methods/test_get_webhook_info.py +++ b/tests/test_api/test_methods/test_get_webhook_info.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetWebhookInfo, Request from aiogram.types import WebhookInfo from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetWebhookInfo: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_leave_chat.py b/tests/test_api/test_methods/test_leave_chat.py index 77bf739f..db771a7d 100644 --- a/tests/test_api/test_methods/test_leave_chat.py +++ b/tests/test_api/test_methods/test_leave_chat.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import LeaveChat, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLeaveChat: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_log_out.py b/tests/test_api/test_methods/test_log_out.py index b472da50..fd09d116 100644 --- a/tests/test_api/test_methods/test_log_out.py +++ b/tests/test_api/test_methods/test_log_out.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import LogOut, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLogOut: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_pin_chat_message.py b/tests/test_api/test_methods/test_pin_chat_message.py index 59a2bf91..f74cd4cd 100644 --- a/tests/test_api/test_methods/test_pin_chat_message.py +++ b/tests/test_api/test_methods/test_pin_chat_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import PinChatMessage, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPinChatMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_promote_chat_member.py b/tests/test_api/test_methods/test_promote_chat_member.py index 20c796bd..6721eb1f 100644 --- a/tests/test_api/test_methods/test_promote_chat_member.py +++ b/tests/test_api/test_methods/test_promote_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import PromoteChatMember, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPromoteChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_reopen_forum_topic.py b/tests/test_api/test_methods/test_reopen_forum_topic.py index 9fe47eac..2c4a33b2 100644 --- a/tests/test_api/test_methods/test_reopen_forum_topic.py +++ b/tests/test_api/test_methods/test_reopen_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import ReopenForumTopic, Request from tests.mocked_bot import MockedBot class TestReopenForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) @@ -18,7 +15,6 @@ class TestReopenForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) diff --git a/tests/test_api/test_methods/test_restrict_chat_member.py b/tests/test_api/test_methods/test_restrict_chat_member.py index 715d0c28..ca9ee4c8 100644 --- a/tests/test_api/test_methods/test_restrict_chat_member.py +++ b/tests/test_api/test_methods/test_restrict_chat_member.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, RestrictChatMember from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRestrictChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_revoke_chat_invite_link.py b/tests/test_api/test_methods/test_revoke_chat_invite_link.py index b26b5d11..84ca46b5 100644 --- a/tests/test_api/test_methods/test_revoke_chat_invite_link.py +++ b/tests/test_api/test_methods/test_revoke_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, RevokeChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRevokeChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_animation.py b/tests/test_api/test_methods/test_send_animation.py index 9a123f1a..5ec7f52a 100644 --- a/tests/test_api/test_methods/test_send_animation.py +++ b/tests/test_api/test_methods/test_send_animation.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendAnimation from aiogram.types import Animation, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAnimation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_audio.py b/tests/test_api/test_methods/test_send_audio.py index 77ad22f7..95621f10 100644 --- a/tests/test_api/test_methods/test_send_audio.py +++ b/tests/test_api/test_methods/test_send_audio.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendAudio from aiogram.types import Audio, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAudio: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_chat_action.py b/tests/test_api/test_methods/test_send_chat_action.py index 41f9e3e4..a37568fe 100644 --- a/tests/test_api/test_methods/test_send_chat_action.py +++ b/tests/test_api/test_methods/test_send_chat_action.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.enums import ChatAction from aiogram.methods import Request, SendChatAction from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendChatAction: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_contact.py b/tests/test_api/test_methods/test_send_contact.py index adfb697e..97f6981c 100644 --- a/tests/test_api/test_methods/test_send_contact.py +++ b/tests/test_api/test_methods/test_send_contact.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendContact from aiogram.types import Chat, Contact, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendContact: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_dice.py b/tests/test_api/test_methods/test_send_dice.py index 80e618ac..3dea06c4 100644 --- a/tests/test_api/test_methods/test_send_dice.py +++ b/tests/test_api/test_methods/test_send_dice.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SendDice from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_document.py b/tests/test_api/test_methods/test_send_document.py index 106e1737..cf758815 100644 --- a/tests/test_api/test_methods/test_send_document.py +++ b/tests/test_api/test_methods/test_send_document.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendDocument from aiogram.types import Chat, Document, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDocument: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_game.py b/tests/test_api/test_methods/test_send_game.py index fca6753c..57ab645f 100644 --- a/tests/test_api/test_methods/test_send_game.py +++ b/tests/test_api/test_methods/test_send_game.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendGame from aiogram.types import Chat, Game, Message, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendGame: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_invoice.py b/tests/test_api/test_methods/test_send_invoice.py index 6915fcc5..e88d9acf 100644 --- a/tests/test_api/test_methods/test_send_invoice.py +++ b/tests/test_api/test_methods/test_send_invoice.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendInvoice from aiogram.types import Chat, Invoice, LabeledPrice, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendInvoice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_location.py b/tests/test_api/test_methods/test_send_location.py index 0f42cf74..7429f0b8 100644 --- a/tests/test_api/test_methods/test_send_location.py +++ b/tests/test_api/test_methods/test_send_location.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendLocation from aiogram.types import Chat, Location, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_media_group.py b/tests/test_api/test_methods/test_send_media_group.py index 5b6dc3e1..149937d4 100644 --- a/tests/test_api/test_methods/test_send_media_group.py +++ b/tests/test_api/test_methods/test_send_media_group.py @@ -1,8 +1,6 @@ import datetime from typing import List -import pytest - from aiogram.methods import Request, SendMediaGroup from aiogram.types import ( BufferedInputFile, @@ -15,8 +13,6 @@ from aiogram.types import ( ) from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMediaGroup: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_message.py b/tests/test_api/test_methods/test_send_message.py index 35324f34..5ebe604a 100644 --- a/tests/test_api/test_methods/test_send_message.py +++ b/tests/test_api/test_methods/test_send_message.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendMessage from aiogram.types import Chat, ForceReply, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_photo.py b/tests/test_api/test_methods/test_send_photo.py index c55565f3..0e955dd1 100644 --- a/tests/test_api/test_methods/test_send_photo.py +++ b/tests/test_api/test_methods/test_send_photo.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendPhoto from aiogram.types import Chat, Message, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_poll.py b/tests/test_api/test_methods/test_send_poll.py index 5cbb3c75..9f67af14 100644 --- a/tests/test_api/test_methods/test_send_poll.py +++ b/tests/test_api/test_methods/test_send_poll.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendPoll from aiogram.types import Chat, Message, Poll, PollOption from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendPoll: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_sticker.py b/tests/test_api/test_methods/test_send_sticker.py index 33bce785..b19313fc 100644 --- a/tests/test_api/test_methods/test_send_sticker.py +++ b/tests/test_api/test_methods/test_send_sticker.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendSticker from aiogram.types import Chat, Message, Sticker from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendSticker: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_venue.py b/tests/test_api/test_methods/test_send_venue.py index 2f046196..6a529fcb 100644 --- a/tests/test_api/test_methods/test_send_venue.py +++ b/tests/test_api/test_methods/test_send_venue.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVenue from aiogram.types import Chat, Location, Message, Venue from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVenue: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_video.py b/tests/test_api/test_methods/test_send_video.py index cb1c1222..86e3c413 100644 --- a/tests/test_api/test_methods/test_send_video.py +++ b/tests/test_api/test_methods/test_send_video.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVideo from aiogram.types import Chat, Message, Video from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVideo: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_video_note.py b/tests/test_api/test_methods/test_send_video_note.py index 63c5bd84..e9afee41 100644 --- a/tests/test_api/test_methods/test_send_video_note.py +++ b/tests/test_api/test_methods/test_send_video_note.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVideoNote from aiogram.types import BufferedInputFile, Chat, Message, VideoNote from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVideoNote: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_voice.py b/tests/test_api/test_methods/test_send_voice.py index ee3894cd..917a645b 100644 --- a/tests/test_api/test_methods/test_send_voice.py +++ b/tests/test_api/test_methods/test_send_voice.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVoice from aiogram.types import Chat, Message, Voice from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVoice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py index 968c805b..7581e37d 100644 --- a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py +++ b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatAdministratorCustomTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_description.py b/tests/test_api/test_methods/test_set_chat_description.py index 36d05cec..0a11d7e3 100644 --- a/tests/test_api/test_methods/test_set_chat_description.py +++ b/tests/test_api/test_methods/test_set_chat_description.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatDescription from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatDescription: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_menu_button.py b/tests/test_api/test_methods/test_set_chat_menu_button.py index 97e2fa90..74923a5f 100644 --- a/tests/test_api/test_methods/test_set_chat_menu_button.py +++ b/tests/test_api/test_methods/test_set_chat_menu_button.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, SetChatMenuButton from tests.mocked_bot import MockedBot class TestSetChatMenuButton: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) @@ -15,7 +12,6 @@ class TestSetChatMenuButton: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_set_chat_permissions.py b/tests/test_api/test_methods/test_set_chat_permissions.py index a0278b80..73f488c1 100644 --- a/tests/test_api/test_methods/test_set_chat_permissions.py +++ b/tests/test_api/test_methods/test_set_chat_permissions.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetChatPermissions from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPermissions: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_photo.py b/tests/test_api/test_methods/test_set_chat_photo.py index 268f668b..e17126f6 100644 --- a/tests/test_api/test_methods/test_set_chat_photo.py +++ b/tests/test_api/test_methods/test_set_chat_photo.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetChatPhoto from aiogram.types import BufferedInputFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_sticker_set.py b/tests/test_api/test_methods/test_set_chat_sticker_set.py index 311b2dd8..cba3ba1f 100644 --- a/tests/test_api/test_methods/test_set_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_set_chat_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatStickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_title.py b/tests/test_api/test_methods/test_set_chat_title.py index 01558d84..03f37b15 100644 --- a/tests/test_api/test_methods/test_set_chat_title.py +++ b/tests/test_api/test_methods/test_set_chat_title.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_game_score.py b/tests/test_api/test_methods/test_set_game_score.py index c8177625..4e739a89 100644 --- a/tests/test_api/test_methods/test_set_game_score.py +++ b/tests/test_api/test_methods/test_set_game_score.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import Request, SetGameScore from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetGameScore: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_my_commands.py b/tests/test_api/test_methods/test_set_my_commands.py index ec08bbc3..35f62e0c 100644 --- a/tests/test_api/test_methods/test_set_my_commands.py +++ b/tests/test_api/test_methods/test_set_my_commands.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetMyCommands from aiogram.types import BotCommand from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetMyCommands: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py index 4bd08822..eb24a531 100644 --- a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, SetMyDefaultAdministratorRights from tests.mocked_bot import MockedBot class TestSetMyDefaultAdministratorRights: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) @@ -15,7 +12,6 @@ class TestSetMyDefaultAdministratorRights: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_set_passport_data_errors.py b/tests/test_api/test_methods/test_set_passport_data_errors.py index fba464f7..cdc77778 100644 --- a/tests/test_api/test_methods/test_set_passport_data_errors.py +++ b/tests/test_api/test_methods/test_set_passport_data_errors.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetPassportDataErrors from aiogram.types import PassportElementError from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetPassportDataErrors: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_sticker_position_in_set.py b/tests/test_api/test_methods/test_set_sticker_position_in_set.py index 4de83feb..c67c7be5 100644 --- a/tests/test_api/test_methods/test_set_sticker_position_in_set.py +++ b/tests/test_api/test_methods/test_set_sticker_position_in_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetStickerPositionInSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetStickerPositionInSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumb.py b/tests/test_api/test_methods/test_set_sticker_set_thumb.py index 2ded22ee..ca1b596a 100644 --- a/tests/test_api/test_methods/test_set_sticker_set_thumb.py +++ b/tests/test_api/test_methods/test_set_sticker_set_thumb.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetStickerSetThumb from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetStickerSetThumb: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_webhook.py b/tests/test_api/test_methods/test_set_webhook.py index 48a67c73..cfa291c3 100644 --- a/tests/test_api/test_methods/test_set_webhook.py +++ b/tests/test_api/test_methods/test_set_webhook.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetWebhook from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetWebhook: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_stop_message_live_location.py b/tests/test_api/test_methods/test_stop_message_live_location.py index 4d34795b..2c1168f1 100644 --- a/tests/test_api/test_methods/test_stop_message_live_location.py +++ b/tests/test_api/test_methods/test_stop_message_live_location.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import Request, StopMessageLiveLocation from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopMessageLiveLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_stop_poll.py b/tests/test_api/test_methods/test_stop_poll.py index e3b83bc1..7601c771 100644 --- a/tests/test_api/test_methods/test_stop_poll.py +++ b/tests/test_api/test_methods/test_stop_poll.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, StopPoll from aiogram.types import Poll, PollOption from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopPoll: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unban_chat_member.py b/tests/test_api/test_methods/test_unban_chat_member.py index 0139b9de..72ba662c 100644 --- a/tests/test_api/test_methods/test_unban_chat_member.py +++ b/tests/test_api/test_methods/test_unban_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnbanChatMember from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnbanChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unban_chat_sender_chat.py b/tests/test_api/test_methods/test_unban_chat_sender_chat.py index 4f80a5e1..4a259c62 100755 --- a/tests/test_api/test_methods/test_unban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_unban_chat_sender_chat.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, UnbanChatSenderChat from tests.mocked_bot import MockedBot class TestUnbanChatSenderChat: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) @@ -18,7 +15,6 @@ class TestUnbanChatSenderChat: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_unpin_all_chat_messages.py b/tests/test_api/test_methods/test_unpin_all_chat_messages.py index 24d90171..82202742 100644 --- a/tests/test_api/test_methods/test_unpin_all_chat_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_chat_messages.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnpinAllChatMessages from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinAllChatMessages: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py index eaf64b69..445f2b4c 100644 --- a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, UnpinAllForumTopicMessages from tests.mocked_bot import MockedBot class TestUnpinAllForumTopicMessages: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) @@ -18,7 +15,6 @@ class TestUnpinAllForumTopicMessages: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_unpin_chat_message.py b/tests/test_api/test_methods/test_unpin_chat_message.py index 7a0bca41..52f8765a 100644 --- a/tests/test_api/test_methods/test_unpin_chat_message.py +++ b/tests/test_api/test_methods/test_unpin_chat_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnpinChatMessage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinChatMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_upload_sticker_file.py b/tests/test_api/test_methods/test_upload_sticker_file.py index 2a7b14ea..f8332815 100644 --- a/tests/test_api/test_methods/test_upload_sticker_file.py +++ b/tests/test_api/test_methods/test_upload_sticker_file.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, UploadStickerFile from aiogram.types import BufferedInputFile, File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUploadStickerFile: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_types/test_input_file.py b/tests/test_api/test_types/test_input_file.py index 9317158e..05391a8e 100644 --- a/tests/test_api/test_types/test_input_file.py +++ b/tests/test_api/test_types/test_input_file.py @@ -1,13 +1,10 @@ from typing import AsyncIterable -import pytest from aresponses import ResponsesMockServer from aiogram import Bot from aiogram.types import BufferedInputFile, FSInputFile, InputFile, URLInputFile -pytestmark = pytest.mark.asyncio - class TestInputFile: def test_fs_input_file(self): diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 5f06ef52..7c70ef68 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -34,8 +34,6 @@ from aiogram.types import ( from aiogram.types.error_event import ErrorEvent from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - async def simple_message_handler(message: Message): await asyncio.sleep(0.2) diff --git a/tests/test_dispatcher/test_event/test_event.py b/tests/test_dispatcher/test_event/test_event.py index c8f32212..3b35579c 100644 --- a/tests/test_dispatcher/test_event/test_event.py +++ b/tests/test_dispatcher/test_event/test_event.py @@ -7,8 +7,6 @@ import pytest from aiogram.dispatcher.event.event import EventObserver from aiogram.dispatcher.event.handler import HandlerObject -pytestmark = pytest.mark.asyncio - async def my_handler(value: str, index: int = 0) -> Any: return value diff --git a/tests/test_dispatcher/test_event/test_handler.py b/tests/test_dispatcher/test_event/test_handler.py index 1c787b3c..f7000d8e 100644 --- a/tests/test_dispatcher/test_event/test_handler.py +++ b/tests/test_dispatcher/test_event/test_handler.py @@ -11,8 +11,6 @@ from aiogram.handlers import BaseHandler from aiogram.types import Update from aiogram.utils.warnings import Recommendation -pytestmark = pytest.mark.asyncio - def callback1(foo: int, bar: int, baz: int): return locals() diff --git a/tests/test_dispatcher/test_event/test_telegram.py b/tests/test_dispatcher/test_event/test_telegram.py index 004cfa06..37f66357 100644 --- a/tests/test_dispatcher/test_event/test_telegram.py +++ b/tests/test_dispatcher/test_event/test_telegram.py @@ -12,9 +12,6 @@ from aiogram.dispatcher.router import Router from aiogram.filters import Filter from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - - # TODO: Test middlewares in routers tree diff --git a/tests/test_dispatcher/test_middlewares/test_user_context.py b/tests/test_dispatcher/test_middlewares/test_user_context.py index 8d289c2b..ca2abb2d 100644 --- a/tests/test_dispatcher/test_middlewares/test_user_context.py +++ b/tests/test_dispatcher/test_middlewares/test_user_context.py @@ -8,7 +8,6 @@ async def next_handler(*args, **kwargs): class TestUserContextMiddleware: - @pytest.mark.asyncio async def test_unexpected_event_type(self): with pytest.raises(RuntimeError): await UserContextMiddleware()(next_handler, object(), {}) diff --git a/tests/test_dispatcher/test_router.py b/tests/test_dispatcher/test_router.py index 66fac6c1..673bb46d 100644 --- a/tests/test_dispatcher/test_router.py +++ b/tests/test_dispatcher/test_router.py @@ -3,8 +3,6 @@ import pytest from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler, skip from aiogram.dispatcher.router import Router -pytestmark = pytest.mark.asyncio - class TestRouter: def test_including_routers(self): diff --git a/tests/test_filters/test_base.py b/tests/test_filters/test_base.py index 82780c56..36d5bbee 100644 --- a/tests/test_filters/test_base.py +++ b/tests/test_filters/test_base.py @@ -1,12 +1,8 @@ from typing import Awaitable from unittest.mock import AsyncMock, patch -import pytest - from aiogram.filters import Filter -pytestmark = pytest.mark.asyncio - class MyFilter(Filter): async def __call__(self, event: str): diff --git a/tests/test_filters/test_callback_data.py b/tests/test_filters/test_callback_data.py index 98e11357..e2f1f1fc 100644 --- a/tests/test_filters/test_callback_data.py +++ b/tests/test_filters/test_callback_data.py @@ -1,8 +1,5 @@ -from decimal import Decimal from enum import Enum, auto -from fractions import Fraction from typing import Optional -from uuid import UUID import pytest from magic_filter import MagicFilter @@ -12,8 +9,6 @@ from aiogram import F from aiogram.filters.callback_data import CallbackData from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class MyIntEnum(Enum): FOO = auto() @@ -50,35 +45,36 @@ class TestCallbackData: class MyInvalidCallback(CallbackData, prefix="sp@m", sep="@"): pass - @pytest.mark.parametrize( - "value,success,expected", - [ - [None, True, ""], - [42, True, "42"], - ["test", True, "test"], - [9.99, True, "9.99"], - [Decimal("9.99"), True, "9.99"], - [Fraction("3/2"), True, "3/2"], - [ - UUID("123e4567-e89b-12d3-a456-426655440000"), - True, - "123e4567-e89b-12d3-a456-426655440000", - ], - [MyIntEnum.FOO, True, "1"], - [MyStringEnum.FOO, True, "FOO"], - [..., False, "..."], - [object, False, "..."], - [object(), False, "..."], - [User(id=42, is_bot=False, first_name="test"), False, "..."], - ], - ) - def test_encode_value(self, value, success, expected): - callback = MyCallback(foo="test", bar=42) - if success: - assert callback._encode_value("test", value) == expected - else: - with pytest.raises(ValueError): - assert callback._encode_value("test", value) == expected + # + # @pytest.mark.parametrize( + # "value,success,expected", + # [ + # [None, True, ""], + # [42, True, "42"], + # ["test", True, "test"], + # [9.99, True, "9.99"], + # [Decimal("9.99"), True, "9.99"], + # [Fraction("3/2"), True, "3/2"], + # [ + # UUID("123e4567-e89b-12d3-a456-426655440000"), + # True, + # "123e4567-e89b-12d3-a456-426655440000", + # ], + # [MyIntEnum.FOO, True, "1"], + # [MyStringEnum.FOO, True, "FOO"], + # [..., False, "..."], + # [object, False, "..."], + # [object(), False, "..."], + # [User(id=42, is_bot=False, first_name="test"), False, "..."], + # ], + # ) + # def test_encode_value(self, value, success, expected): + # callback = MyCallback(foo="test", bar=42) + # if success: + # assert callback._encode_value("test", value) == expected + # else: + # with pytest.raises(ValueError): + # assert callback._encode_value("test", value) == expected def test_pack(self): with pytest.raises(ValueError, match="Separator symbol .+"): diff --git a/tests/test_filters/test_chat_member_updated.py b/tests/test_filters/test_chat_member_updated.py index 42386a55..17b38762 100644 --- a/tests/test_filters/test_chat_member_updated.py +++ b/tests/test_filters/test_chat_member_updated.py @@ -267,7 +267,6 @@ class TestMemberStatusTransition: class TestChatMemberUpdatedStatusFilter: - @pytest.mark.asyncio @pytest.mark.parametrize( "transition,old,new,result", [ diff --git a/tests/test_filters/test_command.py b/tests/test_filters/test_command.py index d5301e33..1bb7d0a4 100644 --- a/tests/test_filters/test_command.py +++ b/tests/test_filters/test_command.py @@ -9,8 +9,6 @@ from aiogram.filters.command import CommandStart from aiogram.types import BotCommand, Chat, Message, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCommandFilter: def test_commands_not_iterable(self): diff --git a/tests/test_filters/test_exception.py b/tests/test_filters/test_exception.py index 2480e76c..be056b72 100644 --- a/tests/test_filters/test_exception.py +++ b/tests/test_filters/test_exception.py @@ -7,8 +7,6 @@ from aiogram.filters import ExceptionMessageFilter, ExceptionTypeFilter from aiogram.types import Update from aiogram.types.error_event import ErrorEvent -pytestmark = pytest.mark.asyncio - class TestExceptionMessageFilter: @pytest.mark.parametrize("value", ["value", re.compile("value")]) diff --git a/tests/test_filters/test_magic_data.py b/tests/test_filters/test_magic_data.py index 1cf538c2..efc12a5f 100644 --- a/tests/test_filters/test_magic_data.py +++ b/tests/test_filters/test_magic_data.py @@ -1,4 +1,3 @@ -import pytest from magic_filter import AttrDict from aiogram import F @@ -7,7 +6,6 @@ from aiogram.types import Update class TestMagicDataFilter: - @pytest.mark.asyncio async def test_call(self): called = False diff --git a/tests/test_filters/test_state.py b/tests/test_filters/test_state.py index 2d14ab35..16124ef9 100644 --- a/tests/test_filters/test_state.py +++ b/tests/test_filters/test_state.py @@ -8,8 +8,6 @@ from aiogram.filters import StateFilter from aiogram.fsm.state import State, StatesGroup from aiogram.types import Update -pytestmark = pytest.mark.asyncio - class MyGroup(StatesGroup): state = State() @@ -40,7 +38,6 @@ class TestStateFilter: [[MyGroup, State("state")], "state", False], ], ) - @pytestmark async def test_filter(self, state, current_state, result): f = StateFilter(*state) assert bool(await f(obj=Update(update_id=42), raw_state=current_state)) is result @@ -49,11 +46,9 @@ class TestStateFilter: with pytest.raises(ValueError): StateFilter() - @pytestmark async def test_create_filter_from_state(self): FilterObject(callback=State(state="state")) - @pytestmark async def test_state_copy(self): class SG(StatesGroup): state = State() diff --git a/tests/test_filters/test_text.py b/tests/test_filters/test_text.py index fd33b02e..5d84081a 100644 --- a/tests/test_filters/test_text.py +++ b/tests/test_filters/test_text.py @@ -7,8 +7,6 @@ import pytest from aiogram.filters import Text from aiogram.types import CallbackQuery, Chat, InlineQuery, Message, Poll, PollOption, User -pytestmark = pytest.mark.asyncio - class TestText: @pytest.mark.parametrize( diff --git a/tests/test_fsm/storage/test_isolation.py b/tests/test_fsm/storage/test_isolation.py index 5f20a3c9..042cc305 100644 --- a/tests/test_fsm/storage/test_isolation.py +++ b/tests/test_fsm/storage/test_isolation.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import BaseEventIsolation, StorageKey from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture(name="storage_key") def create_storate_key(bot: MockedBot): diff --git a/tests/test_fsm/storage/test_redis.py b/tests/test_fsm/storage/test_redis.py index 9d10e295..8d320e27 100644 --- a/tests/test_fsm/storage/test_redis.py +++ b/tests/test_fsm/storage/test_redis.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import DEFAULT_DESTINY, StorageKey from aiogram.fsm.storage.redis import DefaultKeyBuilder, RedisEventIsolation, RedisStorage -pytestmark = pytest.mark.asyncio - PREFIX = "test" BOT_ID = 42 CHAT_ID = -1 diff --git a/tests/test_fsm/storage/test_storages.py b/tests/test_fsm/storage/test_storages.py index ac456251..83871722 100644 --- a/tests/test_fsm/storage/test_storages.py +++ b/tests/test_fsm/storage/test_storages.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import BaseStorage, StorageKey from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture(name="storage_key") def create_storate_key(bot: MockedBot): diff --git a/tests/test_fsm/test_context.py b/tests/test_fsm/test_context.py index 836c2081..5c31373c 100644 --- a/tests/test_fsm/test_context.py +++ b/tests/test_fsm/test_context.py @@ -5,8 +5,6 @@ from aiogram.fsm.storage.base import StorageKey from aiogram.fsm.storage.memory import MemoryStorage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture() def state(bot: MockedBot): diff --git a/tests/test_handler/test_base.py b/tests/test_handler/test_base.py index 96cdea00..f79a6a6b 100644 --- a/tests/test_handler/test_base.py +++ b/tests/test_handler/test_base.py @@ -10,8 +10,6 @@ from aiogram.dispatcher.event.handler import HandlerObject from aiogram.handlers import BaseHandler from aiogram.types import Chat, Message, Update -pytestmark = pytest.mark.asyncio - class MyHandler(BaseHandler): async def handle(self) -> Any: diff --git a/tests/test_handler/test_callback_query.py b/tests/test_handler/test_callback_query.py index 345d098f..93ac9498 100644 --- a/tests/test_handler/test_callback_query.py +++ b/tests/test_handler/test_callback_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import CallbackQueryHandler from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_chat_member.py b/tests/test_handler/test_chat_member.py index 85562c7c..f343b247 100644 --- a/tests/test_handler/test_chat_member.py +++ b/tests/test_handler/test_chat_member.py @@ -1,13 +1,9 @@ import datetime from typing import Any -import pytest - from aiogram.handlers import ChatMemberHandler from aiogram.types import Chat, ChatMemberMember, ChatMemberUpdated, User -pytestmark = pytest.mark.asyncio - class TestChatMemberUpdated: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_chosen_inline_result.py b/tests/test_handler/test_chosen_inline_result.py index 3e1c09bc..62ac8aa7 100644 --- a/tests/test_handler/test_chosen_inline_result.py +++ b/tests/test_handler/test_chosen_inline_result.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import ChosenInlineResultHandler from aiogram.types import ChosenInlineResult, User -pytestmark = pytest.mark.asyncio - class TestChosenInlineResultHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_error.py b/tests/test_handler/test_error.py index 4d1dc3aa..fb9d88bf 100644 --- a/tests/test_handler/test_error.py +++ b/tests/test_handler/test_error.py @@ -1,11 +1,7 @@ from typing import Any -import pytest - from aiogram.handlers import ErrorHandler -pytestmark = pytest.mark.asyncio - class TestErrorHandler: async def test_extensions(self): diff --git a/tests/test_handler/test_inline_query.py b/tests/test_handler/test_inline_query.py index 8201db33..d1bb7037 100644 --- a/tests/test_handler/test_inline_query.py +++ b/tests/test_handler/test_inline_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import InlineQueryHandler from aiogram.types import InlineQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_message.py b/tests/test_handler/test_message.py index eef3be01..7b5581a4 100644 --- a/tests/test_handler/test_message.py +++ b/tests/test_handler/test_message.py @@ -1,14 +1,10 @@ import datetime from typing import Any -import pytest - from aiogram.filters import CommandObject from aiogram.handlers import MessageHandler, MessageHandlerCommandMixin from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - class MyHandler(MessageHandler): async def handle(self) -> Any: diff --git a/tests/test_handler/test_poll.py b/tests/test_handler/test_poll.py index 4d4c2835..b070874d 100644 --- a/tests/test_handler/test_poll.py +++ b/tests/test_handler/test_poll.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import PollHandler from aiogram.types import Poll, PollOption -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_pre_checkout_query.py b/tests/test_handler/test_pre_checkout_query.py index 26b26f81..c764bf91 100644 --- a/tests/test_handler/test_pre_checkout_query.py +++ b/tests/test_handler/test_pre_checkout_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import PreCheckoutQueryHandler from aiogram.types import PreCheckoutQuery, User -pytestmark = pytest.mark.asyncio - class TestPreCheckoutQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_shipping_query.py b/tests/test_handler/test_shipping_query.py index 7113cdef..51ba6b96 100644 --- a/tests/test_handler/test_shipping_query.py +++ b/tests/test_handler/test_shipping_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import ShippingQueryHandler from aiogram.types import ShippingAddress, ShippingQuery, User -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_utils/test_backoff.py b/tests/test_utils/test_backoff.py index b409e22a..57e7269f 100644 --- a/tests/test_utils/test_backoff.py +++ b/tests/test_utils/test_backoff.py @@ -3,7 +3,6 @@ import pytest from aiogram.utils.backoff import Backoff, BackoffConfig BACKOFF_CONFIG = BackoffConfig(min_delay=0.1, max_delay=1.0, factor=2.0, jitter=0.0) -pytestmark = pytest.mark.asyncio class TestBackoffConfig: diff --git a/tests/test_utils/test_chat_action.py b/tests/test_utils/test_chat_action.py index 21182968..517b8e90 100644 --- a/tests/test_utils/test_chat_action.py +++ b/tests/test_utils/test_chat_action.py @@ -11,8 +11,6 @@ from aiogram.types import Chat, Message, User from aiogram.utils.chat_action import ChatActionMiddleware, ChatActionSender from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestChatActionSender: async def test_wait(self, bot: Bot, loop: asyncio.BaseEventLoop): diff --git a/tests/test_utils/test_deep_linking.py b/tests/test_utils/test_deep_linking.py index 78dce6a3..3c1dbec2 100644 --- a/tests/test_utils/test_deep_linking.py +++ b/tests/test_utils/test_deep_linking.py @@ -22,8 +22,6 @@ WRONG_PAYLOADS = [ 1234567890123456789.0, ] -pytestmark = pytest.mark.asyncio - @pytest.fixture(params=PAYLOADS, name="payload") def payload_fixture(request): diff --git a/tests/test_utils/test_i18n.py b/tests/test_utils/test_i18n.py index aa6f9516..d31dac9e 100644 --- a/tests/test_utils/test_i18n.py +++ b/tests/test_utils/test_i18n.py @@ -87,7 +87,6 @@ async def next_call(event, data): return gettext("test") -@pytest.mark.asyncio class TestSimpleI18nMiddleware: @pytest.mark.parametrize( "event_from_user,result", @@ -133,7 +132,6 @@ class TestSimpleI18nMiddleware: assert locale == i18n.default_locale -@pytest.mark.asyncio class TestConstI18nMiddleware: async def test_middleware(self, i18n: I18n): middleware = ConstI18nMiddleware(i18n=i18n, locale="uk") @@ -145,7 +143,6 @@ class TestConstI18nMiddleware: assert result == "тест" -@pytest.mark.asyncio class TestFSMI18nMiddleware: async def test_middleware(self, i18n: I18n, bot: MockedBot): middleware = FSMI18nMiddleware(i18n=i18n) From 730485e43afd1ec0b513dea214b5027bc328da14 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Fri, 30 Dec 2022 22:44:25 +0200 Subject: [PATCH 06/42] Added full support of Bot API 6.4 (#1088) * Remove warnings about pytest asyncio mode * Update Bot API to 6.4 * Bump version * Added changelog * Update translations --- .apiversion | 2 +- .../closeGeneralForumTopic/entity.json | 27 ++ .butcher/methods/editForumTopic/entity.json | 16 +- .../methods/editGeneralForumTopic/entity.json | 35 +++ .butcher/methods/getChatMember/entity.json | 6 +- .../methods/hideGeneralForumTopic/entity.json | 27 ++ .../reopenGeneralForumTopic/entity.json | 27 ++ .butcher/methods/sendAnimation/entity.json | 8 + .butcher/methods/sendChatAction/entity.json | 8 + .butcher/methods/sendPhoto/entity.json | 8 + .butcher/methods/sendVideo/entity.json | 8 + .../unhideGeneralForumTopic/entity.json | 27 ++ .butcher/schema/schema.json | 297 +++++++++++++++++- .butcher/types/Chat/entity.json | 16 + .butcher/types/ForumTopicEdited/entity.json | 35 +++ .../types/GeneralForumTopicHidden/entity.json | 18 ++ .../GeneralForumTopicUnhidden/entity.json | 18 ++ .../types/InputMediaAnimation/entity.json | 8 + .butcher/types/InputMediaPhoto/entity.json | 8 + .butcher/types/InputMediaVideo/entity.json | 8 + .butcher/types/Message/entity.json | 40 +++ .../types/ReplyKeyboardMarkup/entity.json | 8 + .butcher/types/WriteAccessAllowed/entity.json | 18 ++ CHANGES/1088.feature.rst | 1 + README.rst | 4 +- aiogram/__init__.py | 2 +- aiogram/client/bot.py | 120 ++++++- aiogram/enums/content_type.py | 5 + aiogram/methods/__init__.py | 194 ++++++------ aiogram/methods/close_general_forum_topic.py | 26 ++ aiogram/methods/edit_forum_topic.py | 10 +- aiogram/methods/edit_general_forum_topic.py | 28 ++ aiogram/methods/get_chat_member.py | 2 +- aiogram/methods/hide_general_forum_topic.py | 26 ++ aiogram/methods/reopen_general_forum_topic.py | 26 ++ aiogram/methods/send_animation.py | 2 + aiogram/methods/send_chat_action.py | 4 +- aiogram/methods/send_photo.py | 2 + aiogram/methods/send_video.py | 2 + aiogram/methods/unhide_general_forum_topic.py | 26 ++ aiogram/types/__init__.py | 8 + aiogram/types/chat.py | 9 +- aiogram/types/forum_topic_edited.py | 16 + aiogram/types/general_forum_topic_hidden.py | 9 + aiogram/types/general_forum_topic_unhidden.py | 9 + aiogram/types/input_media_animation.py | 2 + aiogram/types/input_media_photo.py | 2 + aiogram/types/input_media_video.py | 2 + aiogram/types/message.py | 32 ++ aiogram/types/reply_keyboard_markup.py | 2 + aiogram/types/write_access_allowed.py | 9 + .../api/methods/close_general_forum_topic.rst | 44 +++ docs/api/methods/edit_general_forum_topic.rst | 44 +++ docs/api/methods/hide_general_forum_topic.rst | 44 +++ docs/api/methods/index.rst | 5 + .../methods/reopen_general_forum_topic.rst | 44 +++ .../methods/unhide_general_forum_topic.rst | 44 +++ docs/api/types/forum_topic_edited.rst | 9 + docs/api/types/general_forum_topic_hidden.rst | 9 + .../types/general_forum_topic_unhidden.rst | 9 + docs/api/types/index.rst | 4 + docs/api/types/write_access_allowed.rst | 9 + docs/locale/en/LC_MESSAGES/api/bot.po | 200 +++++++++--- .../en/LC_MESSAGES/api/download_file.po | 9 +- docs/locale/en/LC_MESSAGES/api/enums/index.po | 7 +- .../api/methods/edit_forum_topic.po | 21 +- .../api/methods/get_chat_member.po | 15 +- .../LC_MESSAGES/api/methods/send_animation.po | 9 +- .../api/methods/send_chat_action.po | 7 +- .../en/LC_MESSAGES/api/methods/send_photo.po | 8 +- .../en/LC_MESSAGES/api/methods/send_video.po | 8 +- docs/locale/en/LC_MESSAGES/api/types/chat.po | 34 +- .../en/LC_MESSAGES/api/types/error_event.po | 6 +- docs/locale/en/LC_MESSAGES/api/types/index.po | 16 +- .../api/types/input_media_animation.po | 9 +- .../api/types/input_media_photo.po | 9 +- .../api/types/input_media_video.po | 9 +- .../en/LC_MESSAGES/api/types/message.po | 115 +++++-- .../api/types/reply_keyboard_markup.po | 10 +- docs/locale/en/LC_MESSAGES/changelog.po | 109 ++++++- docs/locale/en/LC_MESSAGES/index.po | 11 +- docs/locale/uk_UA/LC_MESSAGES/api/bot.po | 200 +++++++++--- .../uk_UA/LC_MESSAGES/api/download_file.po | 102 +++--- .../uk_UA/LC_MESSAGES/api/enums/index.po | 7 +- .../api/methods/edit_forum_topic.po | 21 +- .../api/methods/get_chat_member.po | 15 +- .../LC_MESSAGES/api/methods/send_animation.po | 9 +- .../api/methods/send_chat_action.po | 7 +- .../LC_MESSAGES/api/methods/send_photo.po | 8 +- .../LC_MESSAGES/api/methods/send_video.po | 8 +- .../uk_UA/LC_MESSAGES/api/types/chat.po | 34 +- .../LC_MESSAGES/api/types/error_event.po | 6 +- .../uk_UA/LC_MESSAGES/api/types/index.po | 16 +- .../api/types/input_media_animation.po | 9 +- .../api/types/input_media_photo.po | 9 +- .../api/types/input_media_video.po | 9 +- .../uk_UA/LC_MESSAGES/api/types/message.po | 115 +++++-- .../api/types/reply_keyboard_markup.po | 10 +- docs/locale/uk_UA/LC_MESSAGES/changelog.po | 109 ++++++- docs/locale/uk_UA/LC_MESSAGES/index.po | 5 +- tests/test_api/test_client/test_bot.py | 2 - .../test_session/test_aiohttp_session.py | 2 - .../test_session/test_base_session.py | 2 - .../test_middlewares/test_request_logging.py | 4 - .../test_methods/test_add_sticker_to_set.py | 4 - .../test_answer_callback_query.py | 4 - .../test_methods/test_answer_inline_query.py | 4 - .../test_answer_pre_checkout_query.py | 4 - .../test_answer_shipping_query.py | 4 - .../test_methods/test_answer_web_app_query.py | 4 - .../test_approve_chat_join_request.py | 4 - .../test_methods/test_ban_chat_member.py | 4 - .../test_methods/test_ban_chat_sender_chat.py | 4 - tests/test_api/test_methods/test_base.py | 2 - tests/test_api/test_methods/test_close.py | 4 - .../test_methods/test_close_forum_topic.py | 4 - .../test_close_general_forum_topic.py | 20 ++ .../test_methods/test_copy_message.py | 4 - .../test_create_chat_invite_link.py | 4 - .../test_methods/test_create_forum_topic.py | 4 - .../test_methods/test_create_invoice_link.py | 4 - .../test_create_new_sticker_set.py | 4 - .../test_decline_chat_join_request.py | 4 - .../test_methods/test_delete_chat_photo.py | 4 - .../test_delete_chat_sticker_set.py | 4 - .../test_methods/test_delete_forum_topic.py | 4 - .../test_methods/test_delete_message.py | 4 - .../test_methods/test_delete_my_commands.py | 4 - .../test_delete_sticker_from_set.py | 4 - .../test_methods/test_delete_webhook.py | 4 - .../test_edit_chat_invite_link.py | 4 - .../test_methods/test_edit_forum_topic.py | 4 - .../test_edit_general_forum_topic.py | 20 ++ .../test_methods/test_edit_message_caption.py | 4 - .../test_edit_message_live_location.py | 4 - .../test_methods/test_edit_message_media.py | 4 - .../test_edit_message_reply_markup.py | 4 - .../test_methods/test_edit_message_text.py | 4 - .../test_export_chat_invite_link.py | 4 - .../test_methods/test_forward_message.py | 4 - tests/test_api/test_methods/test_get_chat.py | 4 - .../test_get_chat_administrators.py | 4 - .../test_methods/test_get_chat_member.py | 4 - .../test_get_chat_member_count.py | 4 - .../test_methods/test_get_chat_menu_button.py | 4 - .../test_get_custom_emoji_stickers.py | 4 - tests/test_api/test_methods/test_get_file.py | 4 - .../test_get_forum_topic_icon_stickers.py | 4 - .../test_methods/test_get_game_high_scores.py | 4 - tests/test_api/test_methods/test_get_me.py | 4 - .../test_methods/test_get_my_commands.py | 4 - ...est_get_my_default_administrator_rights.py | 4 - .../test_methods/test_get_sticker_set.py | 4 - .../test_api/test_methods/test_get_updates.py | 4 - .../test_get_user_profile_photos.py | 4 - .../test_methods/test_get_webhook_info.py | 4 - .../test_hide_general_forum_topic.py | 20 ++ .../test_api/test_methods/test_leave_chat.py | 4 - tests/test_api/test_methods/test_log_out.py | 4 - .../test_methods/test_pin_chat_message.py | 4 - .../test_methods/test_promote_chat_member.py | 4 - .../test_methods/test_reopen_forum_topic.py | 4 - .../test_reopen_general_forum_topic.py | 20 ++ .../test_methods/test_restrict_chat_member.py | 4 - .../test_revoke_chat_invite_link.py | 4 - .../test_methods/test_send_animation.py | 4 - .../test_api/test_methods/test_send_audio.py | 4 - .../test_methods/test_send_chat_action.py | 4 - .../test_methods/test_send_contact.py | 4 - tests/test_api/test_methods/test_send_dice.py | 4 - .../test_methods/test_send_document.py | 4 - tests/test_api/test_methods/test_send_game.py | 4 - .../test_methods/test_send_invoice.py | 4 - .../test_methods/test_send_location.py | 4 - .../test_methods/test_send_media_group.py | 4 - .../test_methods/test_send_message.py | 4 - .../test_api/test_methods/test_send_photo.py | 4 - tests/test_api/test_methods/test_send_poll.py | 4 - .../test_methods/test_send_sticker.py | 4 - .../test_api/test_methods/test_send_venue.py | 4 - .../test_api/test_methods/test_send_video.py | 4 - .../test_methods/test_send_video_note.py | 4 - .../test_api/test_methods/test_send_voice.py | 4 - ...est_set_chat_administrator_custom_title.py | 4 - .../test_methods/test_set_chat_description.py | 4 - .../test_methods/test_set_chat_menu_button.py | 4 - .../test_methods/test_set_chat_permissions.py | 4 - .../test_methods/test_set_chat_photo.py | 4 - .../test_methods/test_set_chat_sticker_set.py | 4 - .../test_methods/test_set_chat_title.py | 4 - .../test_methods/test_set_game_score.py | 4 - .../test_methods/test_set_my_commands.py | 4 - ...est_set_my_default_administrator_rights.py | 4 - .../test_set_passport_data_errors.py | 4 - .../test_set_sticker_position_in_set.py | 4 - .../test_set_sticker_set_thumb.py | 4 - .../test_api/test_methods/test_set_webhook.py | 4 - .../test_stop_message_live_location.py | 4 - tests/test_api/test_methods/test_stop_poll.py | 4 - .../test_methods/test_unban_chat_member.py | 4 - .../test_unban_chat_sender_chat.py | 4 - .../test_unhide_general_forum_topic.py | 20 ++ .../test_unpin_all_chat_messages.py | 4 - .../test_unpin_all_forum_topic_messages.py | 4 - .../test_methods/test_unpin_chat_message.py | 4 - .../test_methods/test_upload_sticker_file.py | 4 - tests/test_api/test_types/test_input_file.py | 3 - tests/test_dispatcher/test_dispatcher.py | 2 - .../test_dispatcher/test_event/test_event.py | 2 - .../test_event/test_handler.py | 2 - .../test_event/test_telegram.py | 3 - .../test_middlewares/test_user_context.py | 1 - tests/test_dispatcher/test_router.py | 2 - tests/test_filters/test_base.py | 4 - tests/test_filters/test_callback_data.py | 2 - .../test_filters/test_chat_member_updated.py | 1 - tests/test_filters/test_command.py | 2 - tests/test_filters/test_exception.py | 2 - tests/test_filters/test_magic_data.py | 2 - tests/test_filters/test_state.py | 5 - tests/test_filters/test_text.py | 2 - tests/test_fsm/storage/test_isolation.py | 2 - tests/test_fsm/storage/test_redis.py | 2 - tests/test_fsm/storage/test_storages.py | 2 - tests/test_fsm/test_context.py | 2 - tests/test_handler/test_base.py | 2 - tests/test_handler/test_callback_query.py | 4 - tests/test_handler/test_chat_member.py | 4 - .../test_handler/test_chosen_inline_result.py | 4 - tests/test_handler/test_error.py | 4 - tests/test_handler/test_inline_query.py | 4 - tests/test_handler/test_message.py | 4 - tests/test_handler/test_poll.py | 4 - tests/test_handler/test_pre_checkout_query.py | 4 - tests/test_handler/test_shipping_query.py | 4 - tests/test_utils/test_backoff.py | 1 - tests/test_utils/test_chat_action.py | 2 - tests/test_utils/test_deep_linking.py | 2 - tests/test_utils/test_i18n.py | 3 - 239 files changed, 2522 insertions(+), 892 deletions(-) create mode 100644 .butcher/methods/closeGeneralForumTopic/entity.json create mode 100644 .butcher/methods/editGeneralForumTopic/entity.json create mode 100644 .butcher/methods/hideGeneralForumTopic/entity.json create mode 100644 .butcher/methods/reopenGeneralForumTopic/entity.json create mode 100644 .butcher/methods/unhideGeneralForumTopic/entity.json create mode 100644 .butcher/types/ForumTopicEdited/entity.json create mode 100644 .butcher/types/GeneralForumTopicHidden/entity.json create mode 100644 .butcher/types/GeneralForumTopicUnhidden/entity.json create mode 100644 .butcher/types/WriteAccessAllowed/entity.json create mode 100644 CHANGES/1088.feature.rst create mode 100644 aiogram/methods/close_general_forum_topic.py create mode 100644 aiogram/methods/edit_general_forum_topic.py create mode 100644 aiogram/methods/hide_general_forum_topic.py create mode 100644 aiogram/methods/reopen_general_forum_topic.py create mode 100644 aiogram/methods/unhide_general_forum_topic.py create mode 100644 aiogram/types/forum_topic_edited.py create mode 100644 aiogram/types/general_forum_topic_hidden.py create mode 100644 aiogram/types/general_forum_topic_unhidden.py create mode 100644 aiogram/types/write_access_allowed.py create mode 100644 docs/api/methods/close_general_forum_topic.rst create mode 100644 docs/api/methods/edit_general_forum_topic.rst create mode 100644 docs/api/methods/hide_general_forum_topic.rst create mode 100644 docs/api/methods/reopen_general_forum_topic.rst create mode 100644 docs/api/methods/unhide_general_forum_topic.rst create mode 100644 docs/api/types/forum_topic_edited.rst create mode 100644 docs/api/types/general_forum_topic_hidden.rst create mode 100644 docs/api/types/general_forum_topic_unhidden.rst create mode 100644 docs/api/types/write_access_allowed.rst create mode 100644 tests/test_api/test_methods/test_close_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_edit_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_hide_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_reopen_general_forum_topic.py create mode 100644 tests/test_api/test_methods/test_unhide_general_forum_topic.py diff --git a/.apiversion b/.apiversion index 0faee7d9..c596943a 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -6.3 +6.4 diff --git a/.butcher/methods/closeGeneralForumTopic/entity.json b/.butcher/methods/closeGeneralForumTopic/entity.json new file mode 100644 index 00000000..9fcbc4fe --- /dev/null +++ b/.butcher/methods/closeGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "closegeneralforumtopic", + "name": "closeGeneralForumTopic", + "description": "Use this method to close an open 'General' 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 True on success.", + "html_description": "

Use this method to close an open 'General' 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 True on success.

", + "rst_description": "Use this method to close an open 'General' 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 :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/editForumTopic/entity.json b/.butcher/methods/editForumTopic/entity.json index 8afac424..57bd3d5b 100644 --- a/.butcher/methods/editForumTopic/entity.json +++ b/.butcher/methods/editForumTopic/entity.json @@ -31,18 +31,18 @@ }, { "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", + "required": false, + "description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept\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", + "required": false, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "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. Pass an empty string to remove the icon. If not specified, the current icon will be kept\n", "name": "icon_custom_emoji_id" } ], diff --git a/.butcher/methods/editGeneralForumTopic/entity.json b/.butcher/methods/editGeneralForumTopic/entity.json new file mode 100644 index 00000000..af18e846 --- /dev/null +++ b/.butcher/methods/editGeneralForumTopic/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "editgeneralforumtopic", + "name": "editGeneralForumTopic", + "description": "Use this method to edit the name of the 'General' 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. Returns True on success.", + "html_description": "

Use this method to edit the name of the 'General' 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. Returns True on success.

", + "rst_description": "Use this method to edit the name of the 'General' 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. 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": "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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/getChatMember/entity.json b/.butcher/methods/getChatMember/entity.json index 4888f3b3..b33af127 100644 --- a/.butcher/methods/getChatMember/entity.json +++ b/.butcher/methods/getChatMember/entity.json @@ -9,9 +9,9 @@ "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.", + "description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/hideGeneralForumTopic/entity.json b/.butcher/methods/hideGeneralForumTopic/entity.json new file mode 100644 index 00000000..f75c012a --- /dev/null +++ b/.butcher/methods/hideGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "hidegeneralforumtopic", + "name": "hideGeneralForumTopic", + "description": "Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns True on success.", + "html_description": "

Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns True on success.

", + "rst_description": "Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. 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/reopenGeneralForumTopic/entity.json b/.butcher/methods/reopenGeneralForumTopic/entity.json new file mode 100644 index 00000000..c6efec74 --- /dev/null +++ b/.butcher/methods/reopenGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "reopengeneralforumtopic", + "name": "reopenGeneralForumTopic", + "description": "Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns True on success.", + "html_description": "

Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns True on success.

", + "rst_description": "Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. 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/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json index aea0f674..92ebaa2d 100644 --- a/.butcher/methods/sendAnimation/entity.json +++ b/.butcher/methods/sendAnimation/entity.json @@ -93,6 +93,14 @@ "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 animation needs to be covered with a spoiler animation", + "html_description": "Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, diff --git a/.butcher/methods/sendChatAction/entity.json b/.butcher/methods/sendChatAction/entity.json index ac43f7b8..cda25c18 100644 --- a/.butcher/methods/sendChatAction/entity.json +++ b/.butcher/methods/sendChatAction/entity.json @@ -21,6 +21,14 @@ "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; supergroups only", + "html_description": "Unique identifier for the target message thread; supergroups only", + "rst_description": "Unique identifier for the target message thread; supergroups only\n", + "name": "message_thread_id" + }, { "type": "String", "required": true, diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json index 05dea124..2cc2639f 100644 --- a/.butcher/methods/sendPhoto/entity.json +++ b/.butcher/methods/sendPhoto/entity.json @@ -61,6 +61,14 @@ "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 photo needs to be covered with a spoiler animation", + "html_description": "Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json index 8f25a6d9..9343c43f 100644 --- a/.butcher/methods/sendVideo/entity.json +++ b/.butcher/methods/sendVideo/entity.json @@ -93,6 +93,14 @@ "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 video needs to be covered with a spoiler animation", + "html_description": "Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, diff --git a/.butcher/methods/unhideGeneralForumTopic/entity.json b/.butcher/methods/unhideGeneralForumTopic/entity.json new file mode 100644 index 00000000..962e0473 --- /dev/null +++ b/.butcher/methods/unhideGeneralForumTopic/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "unhidegeneralforumtopic", + "name": "unhideGeneralForumTopic", + "description": "Use this method to unhide the 'General' 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 True on success.", + "html_description": "

Use this method to unhide the 'General' 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 True on success.

", + "rst_description": "Use this method to unhide the 'General' 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 :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/schema/schema.json b/.butcher/schema/schema.json index 5a184105..b79d08ae 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "6.3", - "release_date": "2022-11-05" + "version": "6.4", + "release_date": "2022-12-30" }, "items": [ { @@ -635,6 +635,22 @@ "name": "message_auto_delete_time", "required": false }, + { + "type": "True", + "description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "html_description": "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_aggressive_anti_spam_enabled", + "required": false + }, + { + "type": "True", + "description": "True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "html_description": "Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_hidden_members", + "required": false + }, { "type": "True", "description": "True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", @@ -941,6 +957,14 @@ "name": "caption_entities", "required": false }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "name": "has_media_spoiler", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -1109,6 +1133,14 @@ "name": "connected_website", "required": false }, + { + "type": "WriteAccessAllowed", + "description": "Service message: the user allowed the bot added to the attachment menu to write messages", + "html_description": "Optional. Service message: the user allowed the bot added to the attachment menu to write messages", + "rst_description": "*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages\n", + "name": "write_access_allowed", + "required": false + }, { "type": "PassportData", "description": "Telegram Passport data", @@ -1133,6 +1165,14 @@ "name": "forum_topic_created", "required": false }, + { + "type": "ForumTopicEdited", + "description": "Service message: forum topic edited", + "html_description": "Optional. Service message: forum topic edited", + "rst_description": "*Optional*. Service message: forum topic edited\n", + "name": "forum_topic_edited", + "required": false + }, { "type": "ForumTopicClosed", "description": "Service message: forum topic closed", @@ -1149,6 +1189,22 @@ "name": "forum_topic_reopened", "required": false }, + { + "type": "GeneralForumTopicHidden", + "description": "Service message: the 'General' forum topic hidden", + "html_description": "Optional. Service message: the 'General' forum topic hidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic hidden\n", + "name": "general_forum_topic_hidden", + "required": false + }, + { + "type": "GeneralForumTopicUnhidden", + "description": "Service message: the 'General' forum topic unhidden", + "html_description": "Optional. Service message: the 'General' forum topic unhidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic unhidden\n", + "name": "general_forum_topic_unhidden", + "required": false + }, { "type": "VideoChatScheduled", "description": "Service message: video chat scheduled", @@ -2241,6 +2297,32 @@ "annotations": [], "category": "types" }, + { + "anchor": "forumtopicedited", + "name": "ForumTopicEdited", + "description": "This object represents a service message about an edited forum topic.", + "html_description": "

This object represents a service message about an edited forum topic.

", + "rst_description": "This object represents a service message about an edited forum topic.", + "annotations": [ + { + "type": "String", + "description": "New name of the topic, if it was edited", + "html_description": "Optional. New name of the topic, if it was edited", + "rst_description": "*Optional*. New name of the topic, if it was edited\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "html_description": "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "rst_description": "*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + }, { "anchor": "forumtopicreopened", "name": "ForumTopicReopened", @@ -2250,6 +2332,33 @@ "annotations": [], "category": "types" }, + { + "anchor": "generalforumtopichidden", + "name": "GeneralForumTopicHidden", + "description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "html_description": "

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

", + "rst_description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "generalforumtopicunhidden", + "name": "GeneralForumTopicUnhidden", + "description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "html_description": "

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

", + "rst_description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + }, + { + "anchor": "writeaccessallowed", + "name": "WriteAccessAllowed", + "description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "html_description": "

This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.

", + "rst_description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "annotations": [], + "category": "types" + }, { "anchor": "videochatscheduled", "name": "VideoChatScheduled", @@ -2414,6 +2523,14 @@ "name": "keyboard", "required": true }, + { + "type": "Boolean", + "description": "Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "html_description": "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "rst_description": "*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.\n", + "name": "is_persistent", + "required": false + }, { "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.", @@ -4015,6 +4132,14 @@ "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": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" @@ -4105,6 +4230,14 @@ "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", "name": "supports_streaming", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" @@ -4187,6 +4320,14 @@ "rst_description": "*Optional*. Animation duration in seconds\n", "name": "duration", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" @@ -4699,6 +4840,14 @@ "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 photo needs to be covered with a spoiler animation", + "html_description": "Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, @@ -5073,6 +5222,14 @@ "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 video needs to be covered with a spoiler animation", + "html_description": "Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, @@ -5211,6 +5368,14 @@ "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 animation needs to be covered with a spoiler animation", + "html_description": "Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler" + }, { "type": "Boolean", "required": false, @@ -6241,6 +6406,14 @@ "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; supergroups only", + "html_description": "Unique identifier for the target message thread; supergroups only", + "rst_description": "Unique identifier for the target message thread; supergroups only\n", + "name": "message_thread_id" + }, { "type": "String", "required": true, @@ -7109,9 +7282,9 @@ { "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.", + "description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", @@ -7252,18 +7425,18 @@ }, { "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", + "required": false, + "description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept\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", + "required": false, + "description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "html_description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept", + "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. Pass an empty string to remove the icon. If not specified, the current icon will be kept\n", "name": "icon_custom_emoji_id" } ], @@ -7373,6 +7546,104 @@ ], "category": "methods" }, + { + "anchor": "editgeneralforumtopic", + "name": "editGeneralForumTopic", + "description": "Use this method to edit the name of the 'General' 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. Returns True on success.", + "html_description": "

Use this method to edit the name of the 'General' 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. Returns True on success.

", + "rst_description": "Use this method to edit the name of the 'General' 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. 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": "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" + } + ], + "category": "methods" + }, + { + "anchor": "closegeneralforumtopic", + "name": "closeGeneralForumTopic", + "description": "Use this method to close an open 'General' 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 True on success.", + "html_description": "

Use this method to close an open 'General' 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 True on success.

", + "rst_description": "Use this method to close an open 'General' 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 :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": "reopengeneralforumtopic", + "name": "reopenGeneralForumTopic", + "description": "Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns True on success.", + "html_description": "

Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns True on success.

", + "rst_description": "Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. 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": "hidegeneralforumtopic", + "name": "hideGeneralForumTopic", + "description": "Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns True on success.", + "html_description": "

Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns True on success.

", + "rst_description": "Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. 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": "unhidegeneralforumtopic", + "name": "unhideGeneralForumTopic", + "description": "Use this method to unhide the 'General' 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 True on success.", + "html_description": "

Use this method to unhide the 'General' 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 True on success.

", + "rst_description": "Use this method to unhide the 'General' 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 :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": "answercallbackquery", "name": "answerCallbackQuery", diff --git a/.butcher/types/Chat/entity.json b/.butcher/types/Chat/entity.json index 49660a75..5ba08c1d 100644 --- a/.butcher/types/Chat/entity.json +++ b/.butcher/types/Chat/entity.json @@ -181,6 +181,22 @@ "name": "message_auto_delete_time", "required": false }, + { + "type": "True", + "description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "html_description": "Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_aggressive_anti_spam_enabled", + "required": false + }, + { + "type": "True", + "description": "True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "html_description": "Optional. True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "rst_description": "*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n", + "name": "has_hidden_members", + "required": false + }, { "type": "True", "description": "True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.", diff --git a/.butcher/types/ForumTopicEdited/entity.json b/.butcher/types/ForumTopicEdited/entity.json new file mode 100644 index 00000000..0adc5fdd --- /dev/null +++ b/.butcher/types/ForumTopicEdited/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "forumtopicedited", + "name": "ForumTopicEdited", + "description": "This object represents a service message about an edited forum topic.", + "html_description": "

This object represents a service message about an edited forum topic.

", + "rst_description": "This object represents a service message about an edited forum topic.", + "annotations": [ + { + "type": "String", + "description": "New name of the topic, if it was edited", + "html_description": "Optional. New name of the topic, if it was edited", + "rst_description": "*Optional*. New name of the topic, if it was edited\n", + "name": "name", + "required": false + }, + { + "type": "String", + "description": "New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "html_description": "Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed", + "rst_description": "*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed\n", + "name": "icon_custom_emoji_id", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/GeneralForumTopicHidden/entity.json b/.butcher/types/GeneralForumTopicHidden/entity.json new file mode 100644 index 00000000..de94d519 --- /dev/null +++ b/.butcher/types/GeneralForumTopicHidden/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "generalforumtopichidden", + "name": "GeneralForumTopicHidden", + "description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "html_description": "

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

", + "rst_description": "This object represents a service message about General forum topic hidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/GeneralForumTopicUnhidden/entity.json b/.butcher/types/GeneralForumTopicUnhidden/entity.json new file mode 100644 index 00000000..4c3d2287 --- /dev/null +++ b/.butcher/types/GeneralForumTopicUnhidden/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "generalforumtopicunhidden", + "name": "GeneralForumTopicUnhidden", + "description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "html_description": "

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

", + "rst_description": "This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/.butcher/types/InputMediaAnimation/entity.json b/.butcher/types/InputMediaAnimation/entity.json index a106d803..80dd5629 100644 --- a/.butcher/types/InputMediaAnimation/entity.json +++ b/.butcher/types/InputMediaAnimation/entity.json @@ -84,6 +84,14 @@ "rst_description": "*Optional*. Animation duration in seconds\n", "name": "duration", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the animation needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the animation needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" diff --git a/.butcher/types/InputMediaPhoto/entity.json b/.butcher/types/InputMediaPhoto/entity.json index 792f2cd1..091db974 100644 --- a/.butcher/types/InputMediaPhoto/entity.json +++ b/.butcher/types/InputMediaPhoto/entity.json @@ -52,6 +52,14 @@ "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": "Pass True if the photo needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the photo needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" diff --git a/.butcher/types/InputMediaVideo/entity.json b/.butcher/types/InputMediaVideo/entity.json index 2f200b46..97ceb6b7 100644 --- a/.butcher/types/InputMediaVideo/entity.json +++ b/.butcher/types/InputMediaVideo/entity.json @@ -92,6 +92,14 @@ "rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n", "name": "supports_streaming", "required": false + }, + { + "type": "Boolean", + "description": "Pass True if the video needs to be covered with a spoiler animation", + "html_description": "Optional. Pass True if the video needs to be covered with a spoiler animation", + "rst_description": "*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation\n", + "name": "has_spoiler", + "required": false } ], "category": "types" diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json index 8ebf773a..4613ecb7 100644 --- a/.butcher/types/Message/entity.json +++ b/.butcher/types/Message/entity.json @@ -269,6 +269,14 @@ "name": "caption_entities", "required": false }, + { + "type": "True", + "description": "True, if the message media is covered by a spoiler animation", + "html_description": "Optional. True, if the message media is covered by a spoiler animation", + "rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n", + "name": "has_media_spoiler", + "required": false + }, { "type": "Contact", "description": "Message is a shared contact, information about the contact", @@ -437,6 +445,14 @@ "name": "connected_website", "required": false }, + { + "type": "WriteAccessAllowed", + "description": "Service message: the user allowed the bot added to the attachment menu to write messages", + "html_description": "Optional. Service message: the user allowed the bot added to the attachment menu to write messages", + "rst_description": "*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages\n", + "name": "write_access_allowed", + "required": false + }, { "type": "PassportData", "description": "Telegram Passport data", @@ -461,6 +477,14 @@ "name": "forum_topic_created", "required": false }, + { + "type": "ForumTopicEdited", + "description": "Service message: forum topic edited", + "html_description": "Optional. Service message: forum topic edited", + "rst_description": "*Optional*. Service message: forum topic edited\n", + "name": "forum_topic_edited", + "required": false + }, { "type": "ForumTopicClosed", "description": "Service message: forum topic closed", @@ -477,6 +501,22 @@ "name": "forum_topic_reopened", "required": false }, + { + "type": "GeneralForumTopicHidden", + "description": "Service message: the 'General' forum topic hidden", + "html_description": "Optional. Service message: the 'General' forum topic hidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic hidden\n", + "name": "general_forum_topic_hidden", + "required": false + }, + { + "type": "GeneralForumTopicUnhidden", + "description": "Service message: the 'General' forum topic unhidden", + "html_description": "Optional. Service message: the 'General' forum topic unhidden", + "rst_description": "*Optional*. Service message: the 'General' forum topic unhidden\n", + "name": "general_forum_topic_unhidden", + "required": false + }, { "type": "VideoChatScheduled", "description": "Service message: video chat scheduled", diff --git a/.butcher/types/ReplyKeyboardMarkup/entity.json b/.butcher/types/ReplyKeyboardMarkup/entity.json index 1ae025ff..586bf507 100644 --- a/.butcher/types/ReplyKeyboardMarkup/entity.json +++ b/.butcher/types/ReplyKeyboardMarkup/entity.json @@ -21,6 +21,14 @@ "name": "keyboard", "required": true }, + { + "type": "Boolean", + "description": "Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "html_description": "Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.", + "rst_description": "*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.\n", + "name": "is_persistent", + "required": false + }, { "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.", diff --git a/.butcher/types/WriteAccessAllowed/entity.json b/.butcher/types/WriteAccessAllowed/entity.json new file mode 100644 index 00000000..f9a0d1ed --- /dev/null +++ b/.butcher/types/WriteAccessAllowed/entity.json @@ -0,0 +1,18 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "writeaccessallowed", + "name": "WriteAccessAllowed", + "description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "html_description": "

This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.

", + "rst_description": "This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.", + "annotations": [], + "category": "types" + } +} diff --git a/CHANGES/1088.feature.rst b/CHANGES/1088.feature.rst new file mode 100644 index 00000000..2671fbed --- /dev/null +++ b/CHANGES/1088.feature.rst @@ -0,0 +1 @@ +Added full support of `Bot API 6.4 `_ diff --git a/README.rst b/README.rst index dce1339f..a5257566 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ aiogram |beta badge| :target: https://pypi.python.org/pypi/aiogram :alt: Supported python versions -.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.3-blue.svg?logo=telegram +.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.4-blue.svg?logo=telegram :target: https://core.telegram.org/bots/api :alt: Telegram Bot API @@ -67,7 +67,7 @@ Features - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ - Supports `PyPy `_ -- Supports `Telegram Bot API 6.3 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 6.4 `_ and gets fast updates to the latest versions of the Bot API - Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated - Updates router (Blueprints) - Has Finite State Machine diff --git a/aiogram/__init__.py b/aiogram/__init__.py index b74395a8..42fb50f4 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -36,4 +36,4 @@ __all__ = ( ) __version__ = "3.0.0b7" -__api_version__ = "6.3" +__api_version__ = "6.4" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index ca06a62d..f293da9f 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -33,6 +33,7 @@ from ..methods import ( BanChatSenderChat, Close, CloseForumTopic, + CloseGeneralForumTopic, CopyMessage, CreateChatInviteLink, CreateForumTopic, @@ -48,6 +49,7 @@ from ..methods import ( DeleteWebhook, EditChatInviteLink, EditForumTopic, + EditGeneralForumTopic, EditMessageCaption, EditMessageLiveLocation, EditMessageMedia, @@ -71,11 +73,13 @@ from ..methods import ( GetUpdates, GetUserProfilePhotos, GetWebhookInfo, + HideGeneralForumTopic, LeaveChat, LogOut, PinChatMessage, PromoteChatMember, ReopenForumTopic, + ReopenGeneralForumTopic, RestrictChatMember, RevokeChatInviteLink, SendAnimation, @@ -115,6 +119,7 @@ from ..methods import ( TelegramMethod, UnbanChatMember, UnbanChatSenderChat, + UnhideGeneralForumTopic, UnpinAllChatMessages, UnpinAllForumTopicMessages, UnpinChatMessage, @@ -1103,8 +1108,8 @@ class Bot(ContextInstanceMixin["Bot"]): self, chat_id: Union[int, str], message_thread_id: int, - name: str, - icon_custom_emoji_id: str, + name: Optional[str] = None, + icon_custom_emoji_id: Optional[str] = None, request_timeout: Optional[int] = None, ) -> bool: """ @@ -1112,8 +1117,8 @@ class Bot(ContextInstanceMixin["Bot"]): :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 name: New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept + :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. Pass an empty string to remove the icon. If not specified, the current icon will be kept :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -1412,7 +1417,7 @@ class Bot(ContextInstanceMixin["Bot"]): ChatMemberBanned, ]: """ - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the 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 @@ -1878,6 +1883,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -1900,6 +1906,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 @@ -1920,6 +1927,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -1995,6 +2003,7 @@ class Bot(ContextInstanceMixin["Bot"]): self, chat_id: Union[int, str], action: str, + message_thread_id: Optional[int] = None, request_timeout: Optional[int] = None, ) -> bool: """ @@ -2006,6 +2015,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 message_thread_id: Unique identifier for the target message thread; supergroups only :param request_timeout: Request timeout :return: The user will see a 'sending photo' status for the bot. """ @@ -2013,6 +2023,7 @@ class Bot(ContextInstanceMixin["Bot"]): call = SendChatAction( chat_id=chat_id, action=action, + message_thread_id=message_thread_id, ) return await self(call, request_timeout=request_timeout) @@ -2451,6 +2462,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -2469,6 +2481,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 @@ -2485,6 +2498,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -2682,6 +2696,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, @@ -2705,6 +2720,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation :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 @@ -2726,6 +2742,7 @@ class Bot(ContextInstanceMixin["Bot"]): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, supports_streaming=supports_streaming, disable_notification=disable_notification, protect_content=protect_content, @@ -3360,3 +3377,96 @@ class Bot(ContextInstanceMixin["Bot"]): png_sticker=png_sticker, ) return await self(call, request_timeout=request_timeout) + + async def close_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to close an open 'General' 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 :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 = CloseGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def edit_general_forum_topic( + self, + chat_id: Union[int, str], + name: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to edit the name of the 'General' 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. 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 name: New topic name, 1-128 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = EditGeneralForumTopic( + chat_id=chat_id, + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def hide_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. 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 = HideGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def reopen_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. 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 = ReopenGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) + + async def unhide_general_forum_topic( + self, + chat_id: Union[int, str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to unhide the 'General' 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 :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 = UnhideGeneralForumTopic( + chat_id=chat_id, + ) + return await self(call, request_timeout=request_timeout) diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py index 18fa3484..854fda85 100644 --- a/aiogram/enums/content_type.py +++ b/aiogram/enums/content_type.py @@ -17,6 +17,7 @@ class ContentType(str, Enum): VIDEO = "video" VIDEO_NOTE = "video_note" VOICE = "voice" + HAS_MEDIA_SPOILER = "has_media_spoiler" CONTACT = "contact" DICE = "dice" GAME = "game" @@ -38,11 +39,15 @@ class ContentType(str, Enum): INVOICE = "invoice" SUCCESSFUL_PAYMENT = "successful_payment" CONNECTED_WEBSITE = "connected_website" + WRITE_ACCESS_ALLOWED = "write_access_allowed" PASSPORT_DATA = "passport_data" PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered" FORUM_TOPIC_CREATED = "forum_topic_created" + FORUM_TOPIC_EDITED = "forum_topic_edited" FORUM_TOPIC_CLOSED = "forum_topic_closed" FORUM_TOPIC_REOPENED = "forum_topic_reopened" + GENERAL_FORUM_TOPIC_HIDDEN = "general_forum_topic_hidden" + GENERAL_FORUM_TOPIC_UNHIDDEN = "general_forum_topic_unhidden" VIDEO_CHAT_SCHEDULED = "video_chat_scheduled" VIDEO_CHAT_STARTED = "video_chat_started" VIDEO_CHAT_ENDED = "video_chat_ended" diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index fdabfe8b..d50e99a0 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -10,6 +10,7 @@ from .ban_chat_sender_chat import BanChatSenderChat from .base import Request, Response, TelegramMethod from .close import Close from .close_forum_topic import CloseForumTopic +from .close_general_forum_topic import CloseGeneralForumTopic from .copy_message import CopyMessage from .create_chat_invite_link import CreateChatInviteLink from .create_forum_topic import CreateForumTopic @@ -25,6 +26,7 @@ from .delete_sticker_from_set import DeleteStickerFromSet from .delete_webhook import DeleteWebhook from .edit_chat_invite_link import EditChatInviteLink from .edit_forum_topic import EditForumTopic +from .edit_general_forum_topic import EditGeneralForumTopic from .edit_message_caption import EditMessageCaption from .edit_message_live_location import EditMessageLiveLocation from .edit_message_media import EditMessageMedia @@ -48,11 +50,13 @@ 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 .hide_general_forum_topic import HideGeneralForumTopic from .leave_chat import LeaveChat from .log_out import LogOut from .pin_chat_message import PinChatMessage from .promote_chat_member import PromoteChatMember from .reopen_forum_topic import ReopenForumTopic +from .reopen_general_forum_topic import ReopenGeneralForumTopic from .restrict_chat_member import RestrictChatMember from .revoke_chat_invite_link import RevokeChatInviteLink from .send_animation import SendAnimation @@ -91,109 +95,115 @@ from .stop_message_live_location import StopMessageLiveLocation from .stop_poll import StopPoll from .unban_chat_member import UnbanChatMember from .unban_chat_sender_chat import UnbanChatSenderChat +from .unhide_general_forum_topic import UnhideGeneralForumTopic from .unpin_all_chat_messages import UnpinAllChatMessages from .unpin_all_forum_topic_messages import UnpinAllForumTopicMessages from .unpin_chat_message import UnpinChatMessage from .upload_sticker_file import UploadStickerFile __all__ = ( - "TelegramMethod", - "Request", - "Response", - "GetUpdates", - "SetWebhook", - "DeleteWebhook", - "GetWebhookInfo", - "GetMe", - "LogOut", - "Close", - "SendMessage", - "ForwardMessage", - "CopyMessage", - "SendPhoto", - "SendAudio", - "SendDocument", - "SendVideo", - "SendAnimation", - "SendVoice", - "SendVideoNote", - "SendMediaGroup", - "SendLocation", - "EditMessageLiveLocation", - "StopMessageLiveLocation", - "SendVenue", - "SendContact", - "SendPoll", - "SendDice", - "SendChatAction", - "GetUserProfilePhotos", - "GetFile", - "BanChatMember", - "UnbanChatMember", - "RestrictChatMember", - "PromoteChatMember", - "SetChatAdministratorCustomTitle", - "BanChatSenderChat", - "UnbanChatSenderChat", - "SetChatPermissions", - "ExportChatInviteLink", - "CreateChatInviteLink", - "EditChatInviteLink", - "RevokeChatInviteLink", - "ApproveChatJoinRequest", - "DeclineChatJoinRequest", - "SetChatPhoto", - "DeleteChatPhoto", - "SetChatTitle", - "SetChatDescription", - "PinChatMessage", - "UnpinChatMessage", - "UnpinAllChatMessages", - "LeaveChat", - "GetChat", - "GetChatAdministrators", - "GetChatMemberCount", - "GetChatMember", - "SetChatStickerSet", - "DeleteChatStickerSet", - "GetForumTopicIconStickers", - "CreateForumTopic", - "EditForumTopic", - "CloseForumTopic", - "ReopenForumTopic", - "DeleteForumTopic", - "UnpinAllForumTopicMessages", + "AddStickerToSet", "AnswerCallbackQuery", - "SetMyCommands", + "AnswerInlineQuery", + "AnswerPreCheckoutQuery", + "AnswerShippingQuery", + "AnswerWebAppQuery", + "ApproveChatJoinRequest", + "BanChatMember", + "BanChatSenderChat", + "Close", + "CloseForumTopic", + "CloseGeneralForumTopic", + "CopyMessage", + "CreateChatInviteLink", + "CreateForumTopic", + "CreateInvoiceLink", + "CreateNewStickerSet", + "DeclineChatJoinRequest", + "DeleteChatPhoto", + "DeleteChatStickerSet", + "DeleteForumTopic", + "DeleteMessage", "DeleteMyCommands", - "GetMyCommands", - "SetChatMenuButton", - "GetChatMenuButton", - "SetMyDefaultAdministratorRights", - "GetMyDefaultAdministratorRights", - "EditMessageText", + "DeleteStickerFromSet", + "DeleteWebhook", + "EditChatInviteLink", + "EditForumTopic", + "EditGeneralForumTopic", "EditMessageCaption", + "EditMessageLiveLocation", "EditMessageMedia", "EditMessageReplyMarkup", - "StopPoll", - "DeleteMessage", - "SendSticker", - "GetStickerSet", + "EditMessageText", + "ExportChatInviteLink", + "ForwardMessage", + "GetChat", + "GetChatAdministrators", + "GetChatMember", + "GetChatMemberCount", + "GetChatMenuButton", "GetCustomEmojiStickers", - "UploadStickerFile", - "CreateNewStickerSet", - "AddStickerToSet", - "SetStickerPositionInSet", - "DeleteStickerFromSet", - "SetStickerSetThumb", - "AnswerInlineQuery", - "AnswerWebAppQuery", - "SendInvoice", - "CreateInvoiceLink", - "AnswerShippingQuery", - "AnswerPreCheckoutQuery", - "SetPassportDataErrors", - "SendGame", - "SetGameScore", + "GetFile", + "GetForumTopicIconStickers", "GetGameHighScores", + "GetMe", + "GetMyCommands", + "GetMyDefaultAdministratorRights", + "GetStickerSet", + "GetUpdates", + "GetUserProfilePhotos", + "GetWebhookInfo", + "HideGeneralForumTopic", + "LeaveChat", + "LogOut", + "PinChatMessage", + "PromoteChatMember", + "ReopenForumTopic", + "ReopenGeneralForumTopic", + "Request", + "Response", + "RestrictChatMember", + "RevokeChatInviteLink", + "SendAnimation", + "SendAudio", + "SendChatAction", + "SendContact", + "SendDice", + "SendDocument", + "SendGame", + "SendInvoice", + "SendLocation", + "SendMediaGroup", + "SendMessage", + "SendPhoto", + "SendPoll", + "SendSticker", + "SendVenue", + "SendVideo", + "SendVideoNote", + "SendVoice", + "SetChatAdministratorCustomTitle", + "SetChatDescription", + "SetChatMenuButton", + "SetChatPermissions", + "SetChatPhoto", + "SetChatStickerSet", + "SetChatTitle", + "SetGameScore", + "SetMyCommands", + "SetMyDefaultAdministratorRights", + "SetPassportDataErrors", + "SetStickerPositionInSet", + "SetStickerSetThumb", + "SetWebhook", + "StopMessageLiveLocation", + "StopPoll", + "TelegramMethod", + "UnbanChatMember", + "UnbanChatSenderChat", + "UnhideGeneralForumTopic", + "UnpinAllChatMessages", + "UnpinAllForumTopicMessages", + "UnpinChatMessage", + "UploadStickerFile", ) diff --git a/aiogram/methods/close_general_forum_topic.py b/aiogram/methods/close_general_forum_topic.py new file mode 100644 index 00000000..1dea28c4 --- /dev/null +++ b/aiogram/methods/close_general_forum_topic.py @@ -0,0 +1,26 @@ +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 CloseGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to close an open 'General' 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 :code:`True` on success. + + Source: https://core.telegram.org/bots/api#closegeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="closeGeneralForumTopic", data=data) diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py index ed2f55dd..64a78558 100644 --- a/aiogram/methods/edit_forum_topic.py +++ b/aiogram/methods/edit_forum_topic.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any, Dict, Optional, Union from .base import Request, TelegramMethod @@ -21,10 +21,10 @@ class EditForumTopic(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" - 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.""" + name: Optional[str] = None + """New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept""" + icon_custom_emoji_id: Optional[str] = None + """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. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/edit_general_forum_topic.py b/aiogram/methods/edit_general_forum_topic.py new file mode 100644 index 00000000..532e05b7 --- /dev/null +++ b/aiogram/methods/edit_general_forum_topic.py @@ -0,0 +1,28 @@ +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 EditGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to edit the name of the 'General' 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. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#editgeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + name: str + """New topic name, 1-128 characters""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="editGeneralForumTopic", data=data) diff --git a/aiogram/methods/get_chat_member.py b/aiogram/methods/get_chat_member.py index faf5dece..29d264ab 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -29,7 +29,7 @@ class GetChatMember( ] ): """ - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember """ diff --git a/aiogram/methods/hide_general_forum_topic.py b/aiogram/methods/hide_general_forum_topic.py new file mode 100644 index 00000000..6e20a6bd --- /dev/null +++ b/aiogram/methods/hide_general_forum_topic.py @@ -0,0 +1,26 @@ +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 HideGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#hidegeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="hideGeneralForumTopic", data=data) diff --git a/aiogram/methods/reopen_general_forum_topic.py b/aiogram/methods/reopen_general_forum_topic.py new file mode 100644 index 00000000..1d27ca2d --- /dev/null +++ b/aiogram/methods/reopen_general_forum_topic.py @@ -0,0 +1,26 @@ +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 ReopenGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#reopengeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="reopenGeneralForumTopic", data=data) diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 18533414..3bebdc78 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -47,6 +47,8 @@ class SendAnimation(TelegramMethod[Message]): """Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """Pass :code:`True` if the animation needs to be covered with a spoiler animation""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = None diff --git a/aiogram/methods/send_chat_action.py b/aiogram/methods/send_chat_action.py index 9eb22413..538300b2 100644 --- a/aiogram/methods/send_chat_action.py +++ b/aiogram/methods/send_chat_action.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any, Dict, Optional, Union from .base import Request, TelegramMethod @@ -25,6 +25,8 @@ class SendChatAction(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" action: str """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 `_.""" + message_thread_id: Optional[int] = None + """Unique identifier for the target message thread; supergroups only""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py index 0534c841..43a4c65a 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -39,6 +39,8 @@ class SendPhoto(TelegramMethod[Message]): """Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """Pass :code:`True` if the photo needs to be covered with a spoiler animation""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = None diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py index d30f5fed..b144d090 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -47,6 +47,8 @@ class SendVideo(TelegramMethod[Message]): """Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """Pass :code:`True` if the video needs to be covered with a spoiler animation""" supports_streaming: Optional[bool] = None """Pass :code:`True` if the uploaded video is suitable for streaming""" disable_notification: Optional[bool] = None diff --git a/aiogram/methods/unhide_general_forum_topic.py b/aiogram/methods/unhide_general_forum_topic.py new file mode 100644 index 00000000..2ee341aa --- /dev/null +++ b/aiogram/methods/unhide_general_forum_topic.py @@ -0,0 +1,26 @@ +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 UnhideGeneralForumTopic(TelegramMethod[bool]): + """ + Use this method to unhide the 'General' 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 :code:`True` on success. + + Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic + """ + + __returning__ = bool + + chat_id: Union[int, str] + """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="unhideGeneralForumTopic", data=data) diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 91d19870..b38ec2c3 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -42,9 +42,12 @@ from .force_reply import ForceReply from .forum_topic import ForumTopic from .forum_topic_closed import ForumTopicClosed from .forum_topic_created import ForumTopicCreated +from .forum_topic_edited import ForumTopicEdited from .forum_topic_reopened import ForumTopicReopened from .game import Game from .game_high_score import GameHighScore +from .general_forum_topic_hidden import GeneralForumTopicHidden +from .general_forum_topic_unhidden import GeneralForumTopicUnhidden from .inline_keyboard_button import InlineKeyboardButton from .inline_keyboard_markup import InlineKeyboardMarkup from .inline_query import InlineQuery @@ -140,6 +143,7 @@ from .voice import Voice from .web_app_data import WebAppData from .web_app_info import WebAppInfo from .webhook_info import WebhookInfo +from .write_access_allowed import WriteAccessAllowed __all__ = ( "Animation", @@ -186,9 +190,12 @@ __all__ = ( "ForumTopic", "ForumTopicClosed", "ForumTopicCreated", + "ForumTopicEdited", "ForumTopicReopened", "Game", "GameHighScore", + "GeneralForumTopicHidden", + "GeneralForumTopicUnhidden", "InlineKeyboardButton", "InlineKeyboardMarkup", "InlineQuery", @@ -287,6 +294,7 @@ __all__ = ( "WebAppData", "WebAppInfo", "WebhookInfo", + "WriteAccessAllowed", ) # Load typing forward refs for every TelegramObject diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index a5b08173..78e7c301 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -91,6 +91,10 @@ class Chat(TelegramObject): """*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`.""" message_auto_delete_time: Optional[int] = None """*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`.""" + has_aggressive_anti_spam_enabled: Optional[bool] = None + """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" + has_hidden_members: Optional[bool] = None + """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" has_protected_content: Optional[bool] = None """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`.""" sticker_set_name: Optional[str] = None @@ -403,6 +407,7 @@ class Chat(TelegramObject): def do( self, action: str, + message_thread_id: Optional[int] = None, **kwargs: Any, ) -> SendChatAction: """ @@ -420,6 +425,7 @@ class Chat(TelegramObject): Source: https://core.telegram.org/bots/api#sendchataction :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *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 message_thread_id: Unique identifier for the target message thread; supergroups only :return: instance of method :class:`aiogram.methods.send_chat_action.SendChatAction` """ # DO NOT EDIT MANUALLY!!! @@ -430,6 +436,7 @@ class Chat(TelegramObject): return SendChatAction( chat_id=self.id, action=action, + message_thread_id=message_thread_id, **kwargs, ) @@ -499,7 +506,7 @@ class Chat(TelegramObject): - :code:`chat_id` - Use this method to get information about a member of a chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember diff --git a/aiogram/types/forum_topic_edited.py b/aiogram/types/forum_topic_edited.py new file mode 100644 index 00000000..52b4f893 --- /dev/null +++ b/aiogram/types/forum_topic_edited.py @@ -0,0 +1,16 @@ +from typing import Optional + +from aiogram.types import TelegramObject + + +class ForumTopicEdited(TelegramObject): + """ + This object represents a service message about an edited forum topic. + + Source: https://core.telegram.org/bots/api#forumtopicedited + """ + + name: Optional[str] = None + """*Optional*. New name of the topic, if it was edited""" + icon_custom_emoji_id: Optional[str] = None + """*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed""" diff --git a/aiogram/types/general_forum_topic_hidden.py b/aiogram/types/general_forum_topic_hidden.py new file mode 100644 index 00000000..136a2753 --- /dev/null +++ b/aiogram/types/general_forum_topic_hidden.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class GeneralForumTopicHidden(TelegramObject): + """ + This object represents a service message about General forum topic hidden in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#generalforumtopichidden + """ diff --git a/aiogram/types/general_forum_topic_unhidden.py b/aiogram/types/general_forum_topic_unhidden.py new file mode 100644 index 00000000..9637a023 --- /dev/null +++ b/aiogram/types/general_forum_topic_unhidden.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class GeneralForumTopicUnhidden(TelegramObject): + """ + This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. + + Source: https://core.telegram.org/bots/api#generalforumtopicunhidden + """ diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index 194428ec..326438d5 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -38,3 +38,5 @@ class InputMediaAnimation(InputMedia): """*Optional*. Animation height""" duration: Optional[int] = None """*Optional*. Animation duration in seconds""" + has_spoiler: Optional[bool] = None + """*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation""" diff --git a/aiogram/types/input_media_photo.py b/aiogram/types/input_media_photo.py index d3eb85d1..1b6f70dd 100644 --- a/aiogram/types/input_media_photo.py +++ b/aiogram/types/input_media_photo.py @@ -30,3 +30,5 @@ class InputMediaPhoto(InputMedia): """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" + has_spoiler: Optional[bool] = None + """*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation""" diff --git a/aiogram/types/input_media_video.py b/aiogram/types/input_media_video.py index eb9dd4dd..bf701d9c 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -40,3 +40,5 @@ class InputMediaVideo(InputMedia): """*Optional*. Video duration in seconds""" supports_streaming: Optional[bool] = None """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" + has_spoiler: Optional[bool] = None + """*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation""" diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 34a96a63..e22b16c9 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -50,8 +50,11 @@ if TYPE_CHECKING: from .force_reply import ForceReply from .forum_topic_closed import ForumTopicClosed from .forum_topic_created import ForumTopicCreated + from .forum_topic_edited import ForumTopicEdited from .forum_topic_reopened import ForumTopicReopened from .game import Game + from .general_forum_topic_hidden import GeneralForumTopicHidden + from .general_forum_topic_unhidden import GeneralForumTopicUnhidden from .inline_keyboard_markup import InlineKeyboardMarkup from .input_file import InputFile from .input_media import InputMedia @@ -82,6 +85,7 @@ if TYPE_CHECKING: from .video_note import VideoNote from .voice import Voice from .web_app_data import WebAppData + from .write_access_allowed import WriteAccessAllowed class Message(TelegramObject): @@ -155,6 +159,8 @@ class Message(TelegramObject): """*Optional*. Caption for the animation, audio, document, photo, video or voice""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption""" + has_media_spoiler: Optional[bool] = None + """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" contact: Optional[Contact] = None """*Optional*. Message is a shared contact, information about the contact""" dice: Optional[Dice] = None @@ -197,16 +203,24 @@ class Message(TelegramObject): """*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments » `_""" connected_website: Optional[str] = None """*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login » `_""" + write_access_allowed: Optional[WriteAccessAllowed] = None + """*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages""" passport_data: Optional[PassportData] = None """*Optional*. Telegram Passport data""" proximity_alert_triggered: Optional[ProximityAlertTriggered] = None """*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.""" forum_topic_created: Optional[ForumTopicCreated] = None """*Optional*. Service message: forum topic created""" + forum_topic_edited: Optional[ForumTopicEdited] = None + """*Optional*. Service message: forum topic edited""" forum_topic_closed: Optional[ForumTopicClosed] = None """*Optional*. Service message: forum topic closed""" forum_topic_reopened: Optional[ForumTopicReopened] = None """*Optional*. Service message: forum topic reopened""" + general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None + """*Optional*. Service message: the 'General' forum topic hidden""" + general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None + """*Optional*. Service message: the 'General' forum topic unhidden""" video_chat_scheduled: Optional[VideoChatScheduled] = None """*Optional*. Service message: video chat scheduled""" video_chat_started: Optional[VideoChatStarted] = None @@ -328,6 +342,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None, @@ -356,6 +371,7 @@ class Message(TelegramObject): :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 has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -379,6 +395,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, allow_sending_without_reply=allow_sending_without_reply, @@ -396,6 +413,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -424,6 +442,7 @@ class Message(TelegramObject): :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 has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation :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 @@ -447,6 +466,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -1463,6 +1483,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None, @@ -1487,6 +1508,7 @@ class Message(TelegramObject): :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 has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -1506,6 +1528,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, allow_sending_without_reply=allow_sending_without_reply, @@ -1519,6 +1542,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -1543,6 +1567,7 @@ class Message(TelegramObject): :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 has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation :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 @@ -1562,6 +1587,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -2068,6 +2094,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, @@ -2097,6 +2124,7 @@ class Message(TelegramObject): :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 has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation :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 @@ -2121,6 +2149,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, supports_streaming=supports_streaming, disable_notification=disable_notification, protect_content=protect_content, @@ -2139,6 +2168,7 @@ class Message(TelegramObject): caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, + has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, @@ -2168,6 +2198,7 @@ class Message(TelegramObject): :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 has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation :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 @@ -2192,6 +2223,7 @@ class Message(TelegramObject): caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, + has_spoiler=has_spoiler, supports_streaming=supports_streaming, disable_notification=disable_notification, protect_content=protect_content, diff --git a/aiogram/types/reply_keyboard_markup.py b/aiogram/types/reply_keyboard_markup.py index ed64e660..da2f6214 100644 --- a/aiogram/types/reply_keyboard_markup.py +++ b/aiogram/types/reply_keyboard_markup.py @@ -17,6 +17,8 @@ class ReplyKeyboardMarkup(MutableTelegramObject): keyboard: List[List[KeyboardButton]] """Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects""" + is_persistent: Optional[bool] = None + """*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.""" resize_keyboard: Optional[bool] = None """*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.""" one_time_keyboard: Optional[bool] = None diff --git a/aiogram/types/write_access_allowed.py b/aiogram/types/write_access_allowed.py new file mode 100644 index 00000000..859280db --- /dev/null +++ b/aiogram/types/write_access_allowed.py @@ -0,0 +1,9 @@ +from aiogram.types import TelegramObject + + +class WriteAccessAllowed(TelegramObject): + """ + This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information. + + Source: https://core.telegram.org/bots/api#writeaccessallowed + """ diff --git a/docs/api/methods/close_general_forum_topic.rst b/docs/api/methods/close_general_forum_topic.rst new file mode 100644 index 00000000..1f2bfe2c --- /dev/null +++ b/docs/api/methods/close_general_forum_topic.rst @@ -0,0 +1,44 @@ +###################### +closeGeneralForumTopic +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.close_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.close_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.close_general_forum_topic import CloseGeneralForumTopic` +- alias: :code:`from aiogram.methods import CloseGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(CloseGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return CloseGeneralForumTopic(...) diff --git a/docs/api/methods/edit_general_forum_topic.rst b/docs/api/methods/edit_general_forum_topic.rst new file mode 100644 index 00000000..b038c9d3 --- /dev/null +++ b/docs/api/methods/edit_general_forum_topic.rst @@ -0,0 +1,44 @@ +##################### +editGeneralForumTopic +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.edit_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.edit_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.edit_general_forum_topic import EditGeneralForumTopic` +- alias: :code:`from aiogram.methods import EditGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(EditGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return EditGeneralForumTopic(...) diff --git a/docs/api/methods/hide_general_forum_topic.rst b/docs/api/methods/hide_general_forum_topic.rst new file mode 100644 index 00000000..df36474e --- /dev/null +++ b/docs/api/methods/hide_general_forum_topic.rst @@ -0,0 +1,44 @@ +##################### +hideGeneralForumTopic +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.hide_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.hide_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.hide_general_forum_topic import HideGeneralForumTopic` +- alias: :code:`from aiogram.methods import HideGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(HideGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return HideGeneralForumTopic(...) diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index 691b928c..7bb7d2b8 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -17,6 +17,7 @@ Available methods ban_chat_sender_chat close close_forum_topic + close_general_forum_topic copy_message create_chat_invite_link create_forum_topic @@ -27,6 +28,7 @@ Available methods delete_my_commands edit_chat_invite_link edit_forum_topic + edit_general_forum_topic edit_message_live_location export_chat_invite_link forward_message @@ -41,11 +43,13 @@ Available methods get_my_commands get_my_default_administrator_rights get_user_profile_photos + hide_general_forum_topic leave_chat log_out pin_chat_message promote_chat_member reopen_forum_topic + reopen_general_forum_topic restrict_chat_member revoke_chat_invite_link send_animation @@ -75,6 +79,7 @@ Available methods stop_message_live_location unban_chat_member unban_chat_sender_chat + unhide_general_forum_topic unpin_all_chat_messages unpin_all_forum_topic_messages unpin_chat_message diff --git a/docs/api/methods/reopen_general_forum_topic.rst b/docs/api/methods/reopen_general_forum_topic.rst new file mode 100644 index 00000000..ec217d9c --- /dev/null +++ b/docs/api/methods/reopen_general_forum_topic.rst @@ -0,0 +1,44 @@ +####################### +reopenGeneralForumTopic +####################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.reopen_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.reopen_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.reopen_general_forum_topic import ReopenGeneralForumTopic` +- alias: :code:`from aiogram.methods import ReopenGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(ReopenGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return ReopenGeneralForumTopic(...) diff --git a/docs/api/methods/unhide_general_forum_topic.rst b/docs/api/methods/unhide_general_forum_topic.rst new file mode 100644 index 00000000..e2601df8 --- /dev/null +++ b/docs/api/methods/unhide_general_forum_topic.rst @@ -0,0 +1,44 @@ +####################### +unhideGeneralForumTopic +####################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.unhide_general_forum_topic + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.unhide_general_forum_topic(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.unhide_general_forum_topic import UnhideGeneralForumTopic` +- alias: :code:`from aiogram.methods import UnhideGeneralForumTopic` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(UnhideGeneralForumTopic(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return UnhideGeneralForumTopic(...) diff --git a/docs/api/types/forum_topic_edited.rst b/docs/api/types/forum_topic_edited.rst new file mode 100644 index 00000000..6909332f --- /dev/null +++ b/docs/api/types/forum_topic_edited.rst @@ -0,0 +1,9 @@ +################ +ForumTopicEdited +################ + + +.. automodule:: aiogram.types.forum_topic_edited + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/general_forum_topic_hidden.rst b/docs/api/types/general_forum_topic_hidden.rst new file mode 100644 index 00000000..f83b143a --- /dev/null +++ b/docs/api/types/general_forum_topic_hidden.rst @@ -0,0 +1,9 @@ +####################### +GeneralForumTopicHidden +####################### + + +.. automodule:: aiogram.types.general_forum_topic_hidden + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/general_forum_topic_unhidden.rst b/docs/api/types/general_forum_topic_unhidden.rst new file mode 100644 index 00000000..9dee46cb --- /dev/null +++ b/docs/api/types/general_forum_topic_unhidden.rst @@ -0,0 +1,9 @@ +######################### +GeneralForumTopicUnhidden +######################### + + +.. automodule:: aiogram.types.general_forum_topic_unhidden + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index a5615062..c3b365a9 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -83,7 +83,10 @@ Available types forum_topic forum_topic_closed forum_topic_created + forum_topic_edited forum_topic_reopened + general_forum_topic_hidden + general_forum_topic_unhidden inline_keyboard_button inline_keyboard_markup input_file @@ -125,6 +128,7 @@ Available types voice web_app_data web_app_info + write_access_allowed Telegram Passport ================= diff --git a/docs/api/types/write_access_allowed.rst b/docs/api/types/write_access_allowed.rst new file mode 100644 index 00000000..d2afa3bc --- /dev/null +++ b/docs/api/types/write_access_allowed.rst @@ -0,0 +1,9 @@ +################## +WriteAccessAllowed +################## + + +.. automodule:: aiogram.types.write_access_allowed + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/locale/en/LC_MESSAGES/api/bot.po b/docs/locale/en/LC_MESSAGES/api/bot.po index 8c5c3fc9..6fe7be8c 100644 --- a/docs/locale/en/LC_MESSAGES/api/bot.po +++ b/docs/locale/en/LC_MESSAGES/api/bot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,7 +46,7 @@ msgid "" "[:py:class:`Bot`]" msgstr "" -#: aiogram.client.bot.Bot:1 of +#: aiogram.client.bot.Bot.__init__:1 of msgid "Bot class" msgstr "" @@ -59,8 +59,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -76,6 +77,7 @@ msgstr "" #: aiogram.client.bot.Bot.download_file #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -95,10 +97,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.leave_chat -#: aiogram.client.bot.Bot.log_out aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic +#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out +#: aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -126,6 +131,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -133,17 +139,17 @@ msgstr "" msgid "Parameters" msgstr "" -#: aiogram.client.bot.Bot.__init__:1 of +#: aiogram.client.bot.Bot.__init__:3 of msgid "Telegram Bot token `Obtained from @BotFather `_" msgstr "" -#: aiogram.client.bot.Bot.__init__:2 of +#: aiogram.client.bot.Bot.__init__:4 of msgid "" "HTTP Client session (For example AiohttpSession). If not specified it " "will be automatically created." msgstr "" -#: aiogram.client.bot.Bot.__init__:4 of +#: aiogram.client.bot.Bot.__init__:6 of msgid "" "Default parse mode. If specified it will be propagated into the API " "methods at runtime." @@ -153,7 +159,7 @@ msgstr "" msgid "Raises" msgstr "" -#: aiogram.client.bot.Bot.__init__:6 of +#: aiogram.client.bot.Bot.__init__:8 of msgid "When token has invalid format this exception will be raised" msgstr "" @@ -170,8 +176,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -186,6 +193,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -205,11 +213,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.id +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic aiogram.client.bot.Bot.id #: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.me aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -237,6 +247,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -248,6 +259,10 @@ msgstr "" msgid "Generate bot context" msgstr "" +#: aiogram.client.bot.Bot.me:1 of +msgid "Cached alias for getMe method" +msgstr "" + #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." msgstr "" @@ -367,6 +382,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:7 #: aiogram.client.bot.Bot.ban_chat_sender_chat:5 aiogram.client.bot.Bot.close:3 #: aiogram.client.bot.Bot.close_forum_topic:5 +#: aiogram.client.bot.Bot.close_general_forum_topic:4 #: aiogram.client.bot.Bot.copy_message:15 #: aiogram.client.bot.Bot.create_chat_invite_link:8 #: aiogram.client.bot.Bot.create_forum_topic:7 @@ -382,6 +398,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook:4 #: aiogram.client.bot.Bot.edit_chat_invite_link:9 #: aiogram.client.bot.Bot.edit_forum_topic:7 +#: aiogram.client.bot.Bot.edit_general_forum_topic:5 #: aiogram.client.bot.Bot.edit_message_caption:10 #: aiogram.client.bot.Bot.edit_message_live_location:12 #: aiogram.client.bot.Bot.edit_message_media:8 @@ -403,23 +420,25 @@ msgstr "" #: aiogram.client.bot.Bot.get_updates:13 #: aiogram.client.bot.Bot.get_user_profile_photos:6 #: aiogram.client.bot.Bot.get_webhook_info:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:4 #: aiogram.client.bot.Bot.leave_chat:4 aiogram.client.bot.Bot.log_out:3 #: aiogram.client.bot.Bot.pin_chat_message:6 #: aiogram.client.bot.Bot.promote_chat_member:17 #: aiogram.client.bot.Bot.reopen_forum_topic:5 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:4 #: aiogram.client.bot.Bot.restrict_chat_member:7 #: aiogram.client.bot.Bot.revoke_chat_invite_link:5 -#: aiogram.client.bot.Bot.send_animation:18 +#: aiogram.client.bot.Bot.send_animation:19 #: aiogram.client.bot.Bot.send_audio:19 -#: aiogram.client.bot.Bot.send_chat_action:9 +#: aiogram.client.bot.Bot.send_chat_action:10 #: aiogram.client.bot.Bot.send_contact:14 aiogram.client.bot.Bot.send_dice:11 #: aiogram.client.bot.Bot.send_document:16 aiogram.client.bot.Bot.send_game:11 #: aiogram.client.bot.Bot.send_invoice:31 #: aiogram.client.bot.Bot.send_location:16 #: aiogram.client.bot.Bot.send_media_group:10 -#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:14 +#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:15 #: aiogram.client.bot.Bot.send_poll:22 aiogram.client.bot.Bot.send_sticker:11 -#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:19 +#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:20 #: aiogram.client.bot.Bot.send_video_note:14 #: aiogram.client.bot.Bot.send_voice:15 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:6 @@ -440,6 +459,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_poll:6 #: aiogram.client.bot.Bot.unban_chat_member:6 #: aiogram.client.bot.Bot.unban_chat_sender_chat:5 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:4 #: aiogram.client.bot.Bot.unpin_all_chat_messages:4 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:5 #: aiogram.client.bot.Bot.unpin_chat_message:5 @@ -452,6 +472,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:8 #: aiogram.client.bot.Bot.ban_chat_sender_chat:6 #: aiogram.client.bot.Bot.close_forum_topic:6 +#: aiogram.client.bot.Bot.close_general_forum_topic:5 #: aiogram.client.bot.Bot.create_new_sticker_set:13 #: aiogram.client.bot.Bot.decline_chat_join_request:6 #: aiogram.client.bot.Bot.delete_chat_photo:5 @@ -462,10 +483,13 @@ msgstr "" #: aiogram.client.bot.Bot.delete_sticker_from_set:5 #: aiogram.client.bot.Bot.delete_webhook:5 #: aiogram.client.bot.Bot.edit_forum_topic:8 +#: aiogram.client.bot.Bot.edit_general_forum_topic:6 +#: aiogram.client.bot.Bot.hide_general_forum_topic:5 #: aiogram.client.bot.Bot.leave_chat:5 #: aiogram.client.bot.Bot.pin_chat_message:7 #: aiogram.client.bot.Bot.promote_chat_member:18 #: aiogram.client.bot.Bot.reopen_forum_topic:6 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:5 #: aiogram.client.bot.Bot.restrict_chat_member:8 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:7 #: aiogram.client.bot.Bot.set_chat_description:6 @@ -480,6 +504,7 @@ msgstr "" #: aiogram.client.bot.Bot.set_sticker_set_thumb:7 #: aiogram.client.bot.Bot.unban_chat_member:7 #: aiogram.client.bot.Bot.unban_chat_sender_chat:6 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:5 #: aiogram.client.bot.Bot.unpin_all_chat_messages:5 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:6 #: aiogram.client.bot.Bot.unpin_chat_message:6 of @@ -812,15 +837,20 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.close_forum_topic:3 +#: aiogram.client.bot.Bot.close_general_forum_topic:3 #: aiogram.client.bot.Bot.create_forum_topic:3 #: aiogram.client.bot.Bot.delete_chat_sticker_set:3 #: aiogram.client.bot.Bot.delete_forum_topic:3 #: aiogram.client.bot.Bot.edit_forum_topic:3 +#: aiogram.client.bot.Bot.edit_general_forum_topic:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:3 #: aiogram.client.bot.Bot.reopen_forum_topic:3 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:3 #: aiogram.client.bot.Bot.restrict_chat_member:3 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:3 #: aiogram.client.bot.Bot.set_chat_permissions:3 #: aiogram.client.bot.Bot.set_chat_sticker_set:3 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:3 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:3 of msgid "" "Unique identifier for the target chat or username of the target " @@ -898,14 +928,14 @@ msgstr "" #: aiogram.client.bot.Bot.copy_message:10 #: aiogram.client.bot.Bot.forward_message:7 -#: aiogram.client.bot.Bot.send_animation:13 +#: aiogram.client.bot.Bot.send_animation:14 #: aiogram.client.bot.Bot.send_audio:14 aiogram.client.bot.Bot.send_contact:9 #: aiogram.client.bot.Bot.send_dice:6 aiogram.client.bot.Bot.send_document:11 #: aiogram.client.bot.Bot.send_game:6 aiogram.client.bot.Bot.send_invoice:26 #: aiogram.client.bot.Bot.send_location:11 -#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:9 +#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:10 #: aiogram.client.bot.Bot.send_poll:17 aiogram.client.bot.Bot.send_sticker:6 -#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:14 +#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:15 #: aiogram.client.bot.Bot.send_video_note:9 #: aiogram.client.bot.Bot.send_voice:10 of msgid "" @@ -914,43 +944,43 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:11 -#: aiogram.client.bot.Bot.send_animation:14 +#: aiogram.client.bot.Bot.send_animation:15 #: aiogram.client.bot.Bot.send_audio:15 aiogram.client.bot.Bot.send_contact:10 #: aiogram.client.bot.Bot.send_document:12 aiogram.client.bot.Bot.send_game:7 #: aiogram.client.bot.Bot.send_invoice:27 #: aiogram.client.bot.Bot.send_location:12 -#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:10 +#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:11 #: aiogram.client.bot.Bot.send_poll:18 aiogram.client.bot.Bot.send_sticker:7 -#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:15 +#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:16 #: aiogram.client.bot.Bot.send_video_note:10 #: aiogram.client.bot.Bot.send_voice:11 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.client.bot.Bot.copy_message:12 -#: aiogram.client.bot.Bot.send_animation:15 +#: aiogram.client.bot.Bot.send_animation:16 #: aiogram.client.bot.Bot.send_audio:16 aiogram.client.bot.Bot.send_contact:11 #: aiogram.client.bot.Bot.send_dice:8 aiogram.client.bot.Bot.send_document:13 #: aiogram.client.bot.Bot.send_game:8 aiogram.client.bot.Bot.send_invoice:28 #: aiogram.client.bot.Bot.send_location:13 -#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:11 +#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:12 #: aiogram.client.bot.Bot.send_poll:19 aiogram.client.bot.Bot.send_sticker:8 -#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:16 +#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:17 #: aiogram.client.bot.Bot.send_video_note:11 #: aiogram.client.bot.Bot.send_voice:12 of msgid "If the message is a reply, ID of the original message" msgstr "" #: aiogram.client.bot.Bot.copy_message:13 -#: aiogram.client.bot.Bot.send_animation:16 +#: aiogram.client.bot.Bot.send_animation:17 #: aiogram.client.bot.Bot.send_audio:17 aiogram.client.bot.Bot.send_contact:12 #: aiogram.client.bot.Bot.send_dice:9 aiogram.client.bot.Bot.send_document:14 #: aiogram.client.bot.Bot.send_game:9 aiogram.client.bot.Bot.send_invoice:29 #: aiogram.client.bot.Bot.send_location:14 #: aiogram.client.bot.Bot.send_media_group:9 -#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:12 +#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:13 #: aiogram.client.bot.Bot.send_poll:20 aiogram.client.bot.Bot.send_sticker:9 -#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:17 +#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:18 #: aiogram.client.bot.Bot.send_video_note:12 #: aiogram.client.bot.Bot.send_voice:13 of msgid "" @@ -959,13 +989,13 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:14 -#: aiogram.client.bot.Bot.send_animation:17 +#: aiogram.client.bot.Bot.send_animation:18 #: aiogram.client.bot.Bot.send_audio:18 aiogram.client.bot.Bot.send_contact:13 #: aiogram.client.bot.Bot.send_dice:10 aiogram.client.bot.Bot.send_document:15 #: aiogram.client.bot.Bot.send_location:15 -#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:13 +#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:14 #: aiogram.client.bot.Bot.send_poll:21 aiogram.client.bot.Bot.send_sticker:10 -#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:18 +#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:19 #: aiogram.client.bot.Bot.send_video_note:13 #: aiogram.client.bot.Bot.send_voice:14 of msgid "" @@ -1391,14 +1421,17 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:5 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:6 of msgid "" "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." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_message_caption:1 of @@ -1629,7 +1662,7 @@ msgstr "" #: aiogram.client.bot.Bot.send_contact:15 aiogram.client.bot.Bot.send_dice:12 #: aiogram.client.bot.Bot.send_game:12 aiogram.client.bot.Bot.send_invoice:32 #: aiogram.client.bot.Bot.send_location:17 -#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:15 +#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:16 #: aiogram.client.bot.Bot.send_poll:23 aiogram.client.bot.Bot.send_sticker:12 #: aiogram.client.bot.Bot.send_venue:19 #: aiogram.client.bot.Bot.send_video_note:15 of @@ -1671,8 +1704,10 @@ msgstr "" #: aiogram.client.bot.Bot.get_chat_member:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.client.bot.Bot.get_chat_member:6 of @@ -2186,7 +2221,13 @@ msgid "" "more details." msgstr "" -#: aiogram.client.bot.Bot.send_animation:19 of +#: aiogram.client.bot.Bot.send_animation:13 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_animation:20 of msgid "" "Bots can currently send animation files of up to 50 MB in size, this " "limit may be changed in the future." @@ -2281,7 +2322,11 @@ msgid "" "`_." msgstr "" -#: aiogram.client.bot.Bot.send_chat_action:10 of +#: aiogram.client.bot.Bot.send_chat_action:9 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.client.bot.Bot.send_chat_action:11 of msgid "The user will see a 'sending photo' status for the bot." msgstr "" @@ -2548,6 +2593,12 @@ msgid "" "details." msgstr "" +#: aiogram.client.bot.Bot.send_photo:9 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: aiogram.client.bot.Bot.send_poll:1 of msgid "" "Use this method to send a native poll. On success, the sent " @@ -2730,10 +2781,16 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.send_video:13 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_video:14 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.client.bot.Bot.send_video:20 of +#: aiogram.client.bot.Bot.send_video:21 of msgid "" "Bots can currently send video files of up to 50 MB in size, this limit " "may be changed in the future." @@ -3227,6 +3284,51 @@ msgstr "" msgid "Returns the uploaded :class:`aiogram.types.file.File` on success." msgstr "" +#: aiogram.client.bot.Bot.close_general_forum_topic:1 of +msgid "" +"Use this method to close an open 'General' 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 " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:1 of +msgid "" +"Use this method to edit the name of the 'General' 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. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:4 of +msgid "New topic name, 1-128 characters" +msgstr "" + +#: aiogram.client.bot.Bot.hide_general_forum_topic:1 of +msgid "" +"Use this method to hide the 'General' 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. The topic will be " +"automatically closed if it was open. Returns :code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.reopen_general_forum_topic:1 of +msgid "" +"Use this method to reopen a closed 'General' 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. The topic will be" +" automatically unhidden if it was hidden. Returns :code:`True` on " +"success." +msgstr "" + +#: aiogram.client.bot.Bot.unhide_general_forum_topic:1 of +msgid "" +"Use this method to unhide the 'General' 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 :code:`True` " +"on success." +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -3800,3 +3902,19 @@ msgstr "" #~ "users if the user and their " #~ "neighbors are not among them." #~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/download_file.po b/docs/locale/en/LC_MESSAGES/api/download_file.po index ac95e7e7..bcd3ec0f 100644 --- a/docs/locale/en/LC_MESSAGES/api/download_file.po +++ b/docs/locale/en/LC_MESSAGES/api/download_file.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,10 +62,6 @@ msgid "" "default value of destination and handle result of this method." msgstr "" -#: aiogram.client.bot.Bot:1 of -msgid "Bot class" -msgstr "" - #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." msgstr "" @@ -186,3 +182,6 @@ msgstr "" #: ../../api/download_file.rst:93 msgid "Example:" msgstr "" + +#~ msgid "Bot class" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/enums/index.po b/docs/locale/en/LC_MESSAGES/api/enums/index.po index 04fcc637..ad64f7f1 100644 --- a/docs/locale/en/LC_MESSAGES/api/enums/index.po +++ b/docs/locale/en/LC_MESSAGES/api/enums/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,9 +18,12 @@ msgstr "" "Generated-By: Babel 2.10.3\n" #: ../../api/enums/index.rst:3 -msgid "Types" +msgid "Enums" msgstr "" #: ../../api/enums/index.rst:5 msgid "Here is list of all available enums:" msgstr "" + +#~ msgid "Types" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po index b79ff4c7..711dcfaa 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,7 +49,9 @@ msgid "Unique identifier for the target message thread of the forum topic" msgstr "" #: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.name:1 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: ../../docstring @@ -57,7 +59,8 @@ msgstr "" msgid "" "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." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: ../../api/methods/edit_forum_topic.rst:14 @@ -100,3 +103,15 @@ msgstr "" #~ " to get all allowed custom emoji " #~ "identifiers" #~ msgstr "" + +#~ msgid "New topic name, 1-128 characters" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po index 56aedd83..ae8994c9 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,8 +30,10 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -83,3 +85,10 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po b/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po index d84eff42..57619de4 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -104,6 +104,13 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_animation.SendAnimation.has_spoiler:1 +#: of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring #: aiogram.methods.send_animation.SendAnimation.disable_notification:1 of msgid "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po b/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po index e69951eb..b379f03c 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_chat_action.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -76,6 +76,11 @@ msgid "" "`_." msgstr "" +#: ../../docstring +#: aiogram.methods.send_chat_action.SendChatAction.message_thread_id:1 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + #: ../../api/methods/send_chat_action.rst:14 msgid "Usage" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po b/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po index 496a13a5..440f3fb0 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,6 +77,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_photo.SendPhoto.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_photo.SendPhoto.disable_notification:1 #: of msgid "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_video.po b/docs/locale/en/LC_MESSAGES/api/methods/send_video.po index 55651775..5a575db2 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_video.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,6 +103,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_video.SendVideo.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.supports_streaming:1 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat.po b/docs/locale/en/LC_MESSAGES/api/types/chat.po index 802289d3..13a50fa1 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -162,6 +162,21 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring aiogram.types.chat.Chat.has_aggressive_anti_spam_enabled:1 +#: of +msgid "" +"*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in " +"the supergroup. The field is only available to chat administrators. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.has_hidden_members:1 of +msgid "" +"*Optional*. :code:`True`, if non-administrators can only get the list of " +"bots and administrators in the chat. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: ../../docstring aiogram.types.chat.Chat.has_protected_content:1 of msgid "" "*Optional*. :code:`True`, if messages from the chat can't be forwarded to" @@ -641,6 +656,10 @@ msgid "" msgstr "" #: aiogram.types.chat.Chat.do:15 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.types.chat.Chat.do:16 of msgid "" "instance of method " ":class:`aiogram.methods.send_chat_action.SendChatAction`" @@ -713,8 +732,10 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -1235,3 +1256,10 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/error_event.po b/docs/locale/en/LC_MESSAGES/api/types/error_event.po index 6cf3b36c..fbaceb09 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/error_event.po +++ b/docs/locale/en/LC_MESSAGES/api/types/error_event.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,6 +27,10 @@ msgid "" " from Telegram" msgstr "" +#: aiogram.types.error_event.ErrorEvent:3 of +msgid "Source: https://core.telegram.org/bots/api#error-event" +msgstr "" + #: ../../docstring aiogram.types.error_event.ErrorEvent.update:1 of msgid "Received update" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/index.po b/docs/locale/en/LC_MESSAGES/api/types/index.po index c7493068..8ee34c1a 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/index.po +++ b/docs/locale/en/LC_MESSAGES/api/types/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,25 +33,29 @@ msgstr "" msgid "Available types" msgstr "" -#: ../../api/types/index.rst:130 +#: ../../api/types/index.rst:134 msgid "Telegram Passport" msgstr "" -#: ../../api/types/index.rst:151 +#: ../../api/types/index.rst:155 msgid "Getting updates" msgstr "" -#: ../../api/types/index.rst:160 +#: ../../api/types/index.rst:164 msgid "Stickers" msgstr "" -#: ../../api/types/index.rst:170 +#: ../../api/types/index.rst:174 msgid "Payments" msgstr "" -#: ../../api/types/index.rst:185 +#: ../../api/types/index.rst:189 msgid "Games" msgstr "" +#: ../../api/types/index.rst:199 +msgid "Internals" +msgstr "" + #~ msgid "Internal events" #~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po b/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po index 3a0bffbb..e19c352d 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po +++ b/docs/locale/en/LC_MESSAGES/api/types/input_media_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -97,3 +97,10 @@ msgstr "" #: aiogram.types.input_media_animation.InputMediaAnimation.duration:1 of msgid "*Optional*. Animation duration in seconds" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the animation needs to be covered with a" +" spoiler animation" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po b/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po index 5d6f0814..10a634e9 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po +++ b/docs/locale/en/LC_MESSAGES/api/types/input_media_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,3 +62,10 @@ msgid "" "*Optional*. List of special entities that appear in the caption, which " "can be specified instead of *parse_mode*" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_photo.InputMediaPhoto.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the photo needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po b/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po index fc4f2e44..eef2e134 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po +++ b/docs/locale/en/LC_MESSAGES/api/types/input_media_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,3 +95,10 @@ msgid "" "*Optional*. Pass :code:`True` if the uploaded video is suitable for " "streaming" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the video needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/message.po b/docs/locale/en/LC_MESSAGES/api/types/message.po index b51e09c8..516aa013 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/message.po +++ b/docs/locale/en/LC_MESSAGES/api/types/message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -199,6 +199,12 @@ msgid "" " URLs, bot commands, etc. that appear in the caption" msgstr "" +#: ../../docstring aiogram.types.message.Message.has_media_spoiler:1 of +msgid "" +"*Optional*. :code:`True`, if the message media is covered by a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.types.message.Message.contact:1 of msgid "*Optional*. Message is a shared contact, information about the contact" msgstr "" @@ -329,6 +335,12 @@ msgid "" "`_" msgstr "" +#: ../../docstring aiogram.types.message.Message.write_access_allowed:1 of +msgid "" +"*Optional*. Service message: the user allowed the bot added to the " +"attachment menu to write messages" +msgstr "" + #: ../../docstring aiogram.types.message.Message.passport_data:1 of msgid "*Optional*. Telegram Passport data" msgstr "" @@ -343,6 +355,10 @@ msgstr "" msgid "*Optional*. Service message: forum topic created" msgstr "" +#: ../../docstring aiogram.types.message.Message.forum_topic_edited:1 of +msgid "*Optional*. Service message: forum topic edited" +msgstr "" + #: ../../docstring aiogram.types.message.Message.forum_topic_closed:1 of msgid "*Optional*. Service message: forum topic closed" msgstr "" @@ -351,6 +367,16 @@ msgstr "" msgid "*Optional*. Service message: forum topic reopened" msgstr "" +#: ../../docstring aiogram.types.message.Message.general_forum_topic_hidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic hidden" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.general_forum_topic_unhidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic unhidden" +msgstr "" + #: ../../docstring aiogram.types.message.Message.video_chat_scheduled:1 of msgid "*Optional*. Service message: video chat scheduled" msgstr "" @@ -627,8 +653,15 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.message.Message.answer:15 #: aiogram.types.message.Message.answer_animation:19 +#: aiogram.types.message.Message.reply_animation:20 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer:15 +#: aiogram.types.message.Message.answer_animation:20 #: aiogram.types.message.Message.answer_audio:20 #: aiogram.types.message.Message.answer_contact:15 #: aiogram.types.message.Message.answer_dice:12 @@ -636,17 +669,17 @@ msgstr "" #: aiogram.types.message.Message.answer_game:12 #: aiogram.types.message.Message.answer_invoice:32 #: aiogram.types.message.Message.answer_location:17 -#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.answer_photo:16 #: aiogram.types.message.Message.answer_poll:23 #: aiogram.types.message.Message.answer_sticker:12 #: aiogram.types.message.Message.answer_venue:19 -#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.answer_video:21 #: aiogram.types.message.Message.answer_video_note:15 #: aiogram.types.message.Message.answer_voice:16 #: aiogram.types.message.Message.copy_to:16 #: aiogram.types.message.Message.forward:13 #: aiogram.types.message.Message.reply:16 -#: aiogram.types.message.Message.reply_animation:20 +#: aiogram.types.message.Message.reply_animation:21 #: aiogram.types.message.Message.reply_audio:21 #: aiogram.types.message.Message.reply_contact:16 #: aiogram.types.message.Message.reply_dice:13 @@ -654,11 +687,11 @@ msgstr "" #: aiogram.types.message.Message.reply_game:13 #: aiogram.types.message.Message.reply_invoice:33 #: aiogram.types.message.Message.reply_location:18 -#: aiogram.types.message.Message.reply_photo:16 +#: aiogram.types.message.Message.reply_photo:17 #: aiogram.types.message.Message.reply_poll:24 #: aiogram.types.message.Message.reply_sticker:13 #: aiogram.types.message.Message.reply_venue:20 -#: aiogram.types.message.Message.reply_video:21 +#: aiogram.types.message.Message.reply_video:22 #: aiogram.types.message.Message.reply_video_note:16 #: aiogram.types.message.Message.reply_voice:17 of msgid "" @@ -667,41 +700,41 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:16 -#: aiogram.types.message.Message.answer_animation:20 +#: aiogram.types.message.Message.answer_animation:21 #: aiogram.types.message.Message.answer_audio:21 #: aiogram.types.message.Message.answer_contact:16 #: aiogram.types.message.Message.answer_document:18 #: aiogram.types.message.Message.answer_game:13 #: aiogram.types.message.Message.answer_invoice:33 #: aiogram.types.message.Message.answer_location:18 -#: aiogram.types.message.Message.answer_photo:16 +#: aiogram.types.message.Message.answer_photo:17 #: aiogram.types.message.Message.answer_poll:24 #: aiogram.types.message.Message.answer_sticker:13 #: aiogram.types.message.Message.answer_venue:20 -#: aiogram.types.message.Message.answer_video:21 +#: aiogram.types.message.Message.answer_video:22 #: aiogram.types.message.Message.answer_video_note:16 #: aiogram.types.message.Message.answer_voice:17 #: aiogram.types.message.Message.copy_to:17 #: aiogram.types.message.Message.reply:17 -#: aiogram.types.message.Message.reply_animation:21 +#: aiogram.types.message.Message.reply_animation:22 #: aiogram.types.message.Message.reply_audio:22 #: aiogram.types.message.Message.reply_contact:17 #: aiogram.types.message.Message.reply_document:19 #: aiogram.types.message.Message.reply_game:14 #: aiogram.types.message.Message.reply_invoice:34 #: aiogram.types.message.Message.reply_location:19 -#: aiogram.types.message.Message.reply_photo:17 +#: aiogram.types.message.Message.reply_photo:18 #: aiogram.types.message.Message.reply_poll:25 #: aiogram.types.message.Message.reply_sticker:14 #: aiogram.types.message.Message.reply_venue:21 -#: aiogram.types.message.Message.reply_video:22 +#: aiogram.types.message.Message.reply_video:23 #: aiogram.types.message.Message.reply_video_note:17 #: aiogram.types.message.Message.reply_voice:18 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.types.message.Message.answer:18 -#: aiogram.types.message.Message.answer_animation:22 +#: aiogram.types.message.Message.answer_animation:23 #: aiogram.types.message.Message.answer_audio:23 #: aiogram.types.message.Message.answer_contact:18 #: aiogram.types.message.Message.answer_dice:15 @@ -710,16 +743,16 @@ msgstr "" #: aiogram.types.message.Message.answer_invoice:35 #: aiogram.types.message.Message.answer_location:20 #: aiogram.types.message.Message.answer_media_group:15 -#: aiogram.types.message.Message.answer_photo:18 +#: aiogram.types.message.Message.answer_photo:19 #: aiogram.types.message.Message.answer_poll:26 #: aiogram.types.message.Message.answer_sticker:15 #: aiogram.types.message.Message.answer_venue:22 -#: aiogram.types.message.Message.answer_video:23 +#: aiogram.types.message.Message.answer_video:24 #: aiogram.types.message.Message.answer_video_note:18 #: aiogram.types.message.Message.answer_voice:19 #: aiogram.types.message.Message.copy_to:19 #: aiogram.types.message.Message.reply:18 -#: aiogram.types.message.Message.reply_animation:22 +#: aiogram.types.message.Message.reply_animation:23 #: aiogram.types.message.Message.reply_audio:23 #: aiogram.types.message.Message.reply_contact:18 #: aiogram.types.message.Message.reply_dice:15 @@ -728,11 +761,11 @@ msgstr "" #: aiogram.types.message.Message.reply_invoice:35 #: aiogram.types.message.Message.reply_location:20 #: aiogram.types.message.Message.reply_media_group:15 -#: aiogram.types.message.Message.reply_photo:18 +#: aiogram.types.message.Message.reply_photo:19 #: aiogram.types.message.Message.reply_poll:26 #: aiogram.types.message.Message.reply_sticker:15 #: aiogram.types.message.Message.reply_venue:22 -#: aiogram.types.message.Message.reply_video:23 +#: aiogram.types.message.Message.reply_video:24 #: aiogram.types.message.Message.reply_video_note:18 #: aiogram.types.message.Message.reply_voice:19 of msgid "" @@ -741,32 +774,32 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:19 -#: aiogram.types.message.Message.answer_animation:23 +#: aiogram.types.message.Message.answer_animation:24 #: aiogram.types.message.Message.answer_audio:24 #: aiogram.types.message.Message.answer_contact:19 #: aiogram.types.message.Message.answer_dice:16 #: aiogram.types.message.Message.answer_document:21 #: aiogram.types.message.Message.answer_location:21 -#: aiogram.types.message.Message.answer_photo:19 +#: aiogram.types.message.Message.answer_photo:20 #: aiogram.types.message.Message.answer_poll:27 #: aiogram.types.message.Message.answer_sticker:16 #: aiogram.types.message.Message.answer_venue:23 -#: aiogram.types.message.Message.answer_video:24 +#: aiogram.types.message.Message.answer_video:25 #: aiogram.types.message.Message.answer_video_note:19 #: aiogram.types.message.Message.answer_voice:20 #: aiogram.types.message.Message.copy_to:20 #: aiogram.types.message.Message.reply:19 -#: aiogram.types.message.Message.reply_animation:23 +#: aiogram.types.message.Message.reply_animation:24 #: aiogram.types.message.Message.reply_audio:24 #: aiogram.types.message.Message.reply_contact:19 #: aiogram.types.message.Message.reply_dice:16 #: aiogram.types.message.Message.reply_document:21 #: aiogram.types.message.Message.reply_location:21 -#: aiogram.types.message.Message.reply_photo:19 +#: aiogram.types.message.Message.reply_photo:20 #: aiogram.types.message.Message.reply_poll:27 #: aiogram.types.message.Message.reply_sticker:16 #: aiogram.types.message.Message.reply_venue:23 -#: aiogram.types.message.Message.reply_video:24 +#: aiogram.types.message.Message.reply_video:25 #: aiogram.types.message.Message.reply_video_note:19 #: aiogram.types.message.Message.reply_voice:20 of msgid "" @@ -824,13 +857,13 @@ msgstr "" msgid "Returns" msgstr "" -#: aiogram.types.message.Message.answer_animation:24 -#: aiogram.types.message.Message.reply_animation:24 of +#: aiogram.types.message.Message.answer_animation:25 +#: aiogram.types.message.Message.reply_animation:25 of msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" msgstr "" #: aiogram.types.message.Message.answer:17 -#: aiogram.types.message.Message.answer_animation:21 +#: aiogram.types.message.Message.answer_animation:22 #: aiogram.types.message.Message.answer_audio:22 #: aiogram.types.message.Message.answer_contact:17 #: aiogram.types.message.Message.answer_dice:14 @@ -838,11 +871,11 @@ msgstr "" #: aiogram.types.message.Message.answer_game:14 #: aiogram.types.message.Message.answer_invoice:34 #: aiogram.types.message.Message.answer_location:19 -#: aiogram.types.message.Message.answer_photo:17 +#: aiogram.types.message.Message.answer_photo:18 #: aiogram.types.message.Message.answer_poll:25 #: aiogram.types.message.Message.answer_sticker:14 #: aiogram.types.message.Message.answer_venue:21 -#: aiogram.types.message.Message.answer_video:22 +#: aiogram.types.message.Message.answer_video:23 #: aiogram.types.message.Message.answer_video_note:17 #: aiogram.types.message.Message.answer_voice:18 #: aiogram.types.message.Message.copy_to:18 of @@ -1450,8 +1483,15 @@ msgid "" "details." msgstr "" -#: aiogram.types.message.Message.answer_photo:20 -#: aiogram.types.message.Message.reply_photo:20 of +#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.reply_photo:16 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_photo:21 +#: aiogram.types.message.Message.reply_photo:21 of msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" msgstr "" @@ -1772,11 +1812,18 @@ msgstr "" #: aiogram.types.message.Message.answer_video:19 #: aiogram.types.message.Message.reply_video:20 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.reply_video:21 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.types.message.Message.answer_video:25 -#: aiogram.types.message.Message.reply_video:25 of +#: aiogram.types.message.Message.answer_video:26 +#: aiogram.types.message.Message.reply_video:26 of msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po b/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po index 43841e57..4f2b1f86 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po +++ b/docs/locale/en/LC_MESSAGES/api/types/reply_keyboard_markup.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,6 +41,14 @@ msgid "" ":class:`aiogram.types.keyboard_button.KeyboardButton` objects" msgstr "" +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.is_persistent:1 of +msgid "" +"*Optional*. Requests clients to always show the keyboard when the regular" +" keyboard is hidden. Defaults to *false*, in which case the custom " +"keyboard can be hidden and opened with a keyboard icon." +msgstr "" + #: ../../docstring #: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.resize_keyboard:1 of msgid "" diff --git a/docs/locale/en/LC_MESSAGES/changelog.po b/docs/locale/en/LC_MESSAGES/changelog.po index 7aa01990..6f0f541b 100644 --- a/docs/locale/en/LC_MESSAGES/changelog.po +++ b/docs/locale/en/LC_MESSAGES/changelog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +msgid "\\ |release| [UNRELEASED DRAFT] (2022-12-30)" msgstr "" #: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 @@ -33,20 +33,108 @@ msgid "Features" msgstr "" #: ../../[towncrier-fragments]:7 +msgid "Added missing shortcuts, new enums, reworked old stuff" +msgstr "" + +#: ../../[towncrier-fragments]:9 msgid "" -"Added missing shortcuts, new enums, reworked old stuff `#952 " -"`_" +"**Breaking** All previously added enums is re-generated in new place - " +"`aiogram.enums` instead of `aiogram.types`" +msgstr "" + +#: ../../[towncrier-fragments]:27 +msgid "" +"**Added enums:** " +":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," +msgstr "" + +#: ../../[towncrier-fragments]:13 +msgid "" +":class:`aiogram.enums.chat_action.ChatActions`, " +":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " +":class:`aiogram.enums.chat_type.ChatType`, " +":class:`aiogram.enums.content_type.ContentType`, " +":class:`aiogram.enums.dice_emoji.DiceEmoji`, " +":class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, " +":class:`aiogram.enums.input_media_type.InputMediaType`, " +":class:`aiogram.enums.mask_position_point.MaskPositionPoint`, " +":class:`aiogram.enums.menu_button_type.MenuButtonType`, " +":class:`aiogram.enums.message_entity_type.MessageEntityType`, " +":class:`aiogram.enums.parse_mode.ParseMode`, " +":class:`aiogram.enums.poll_type.PollType`, " +":class:`aiogram.enums.sticker_type.StickerType`, " +":class:`aiogram.enums.topic_icon_color.TopicIconColor`, " +":class:`aiogram.enums.update_type.UpdateType`," +msgstr "" + +#: ../../[towncrier-fragments]:29 +msgid "**Added shortcuts**:" +msgstr "" + +#: ../../[towncrier-fragments]:54 +msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," +msgstr "" + +#: ../../[towncrier-fragments]:32 +msgid "" +":meth:`aiogram.types.chat.Chat.delete_message`, " +":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " +":meth:`aiogram.types.chat.Chat.edit_invite_link`, " +":meth:`aiogram.types.chat.Chat.create_invite_link`, " +":meth:`aiogram.types.chat.Chat.export_invite_link`, " +":meth:`aiogram.types.chat.Chat.do`, " +":meth:`aiogram.types.chat.Chat.delete_sticker_set`, " +":meth:`aiogram.types.chat.Chat.set_sticker_set`, " +":meth:`aiogram.types.chat.Chat.get_member`, " +":meth:`aiogram.types.chat.Chat.get_member_count`, " +":meth:`aiogram.types.chat.Chat.leave`, " +":meth:`aiogram.types.chat.Chat.unpin_all_messages`, " +":meth:`aiogram.types.chat.Chat.unpin_message`, " +":meth:`aiogram.types.chat.Chat.pin_message`, " +":meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, " +":meth:`aiogram.types.chat.Chat.set_permissions`, " +":meth:`aiogram.types.chat.Chat.promote`, " +":meth:`aiogram.types.chat.Chat.restrict`, " +":meth:`aiogram.types.chat.Chat.unban`, " +":meth:`aiogram.types.chat.Chat.ban`, " +":meth:`aiogram.types.chat.Chat.set_description`, " +":meth:`aiogram.types.chat.Chat.set_title`, " +":meth:`aiogram.types.chat.Chat.delete_photo`, " +":meth:`aiogram.types.chat.Chat.set_photo`," +msgstr "" + +#: ../../[towncrier-fragments]:56 +msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," +msgstr "" + +#: ../../[towncrier-fragments]:57 +msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," +msgstr "" + +#: ../../[towncrier-fragments]:58 +msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" +msgstr "" + +#: ../../[towncrier-fragments]:59 +msgid "`#952 `_" +msgstr "" + +#: ../../[towncrier-fragments]:60 +msgid "" +"Added full support of `Bot API 6.4 `_ `#1088 " +"`_" msgstr "" #: ../../../CHANGES.rst:71 ../../../CHANGES.rst:124 ../../../CHANGES.rst:175 #: ../../../CHANGES.rst:229 ../../../CHANGES.rst:271 ../../../CHANGES.rst:317 #: ../../../CHANGES.rst:377 ../../../CHANGES.rst:398 ../../../CHANGES.rst:421 #: ../../../CHANGES.rst:458 ../../../CHANGES.rst:497 -#: ../../[towncrier-fragments]:12 +#: ../../[towncrier-fragments]:65 msgid "Misc" msgstr "" -#: ../../[towncrier-fragments]:14 +#: ../../[towncrier-fragments]:67 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " @@ -2405,3 +2493,12 @@ msgstr "" #~ ":code:`ChatMemberStatus.yml` was renamed to " #~ ":code:`is_chat_member` and :code:`is_chat_admin`" #~ msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +#~ msgstr "" + +#~ msgid "" +#~ "Added missing shortcuts, new enums, " +#~ "reworked old stuff `#952 " +#~ "`_" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/index.po b/docs/locale/en/LC_MESSAGES/index.po index 7bc19d51..5ac82a19 100644 --- a/docs/locale/en/LC_MESSAGES/index.po +++ b/docs/locale/en/LC_MESSAGES/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-03 01:03+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -123,7 +123,7 @@ msgstr "" #: ../../../README.rst:70 msgid "" -"Supports `Telegram Bot API 6.3 `_ and" +"Supports `Telegram Bot API 6.4 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" @@ -216,3 +216,10 @@ msgstr "" #~ msgid "Uses powerful :ref:`magic filters `" #~ msgstr "" + +#~ msgid "" +#~ "Supports `Telegram Bot API 6.3 " +#~ "`_ and gets fast" +#~ " updates to the latest versions of" +#~ " the Bot API" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po index 8c5c3fc9..6fe7be8c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,7 +46,7 @@ msgid "" "[:py:class:`Bot`]" msgstr "" -#: aiogram.client.bot.Bot:1 of +#: aiogram.client.bot.Bot.__init__:1 of msgid "Bot class" msgstr "" @@ -59,8 +59,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -76,6 +77,7 @@ msgstr "" #: aiogram.client.bot.Bot.download_file #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -95,10 +97,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.leave_chat -#: aiogram.client.bot.Bot.log_out aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic +#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out +#: aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -126,6 +131,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -133,17 +139,17 @@ msgstr "" msgid "Parameters" msgstr "" -#: aiogram.client.bot.Bot.__init__:1 of +#: aiogram.client.bot.Bot.__init__:3 of msgid "Telegram Bot token `Obtained from @BotFather `_" msgstr "" -#: aiogram.client.bot.Bot.__init__:2 of +#: aiogram.client.bot.Bot.__init__:4 of msgid "" "HTTP Client session (For example AiohttpSession). If not specified it " "will be automatically created." msgstr "" -#: aiogram.client.bot.Bot.__init__:4 of +#: aiogram.client.bot.Bot.__init__:6 of msgid "" "Default parse mode. If specified it will be propagated into the API " "methods at runtime." @@ -153,7 +159,7 @@ msgstr "" msgid "Raises" msgstr "" -#: aiogram.client.bot.Bot.__init__:6 of +#: aiogram.client.bot.Bot.__init__:8 of msgid "When token has invalid format this exception will be raised" msgstr "" @@ -170,8 +176,9 @@ msgstr "" #: aiogram.client.bot.Bot.approve_chat_join_request #: aiogram.client.bot.Bot.ban_chat_member #: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic aiogram.client.bot.Bot.context -#: aiogram.client.bot.Bot.copy_message +#: aiogram.client.bot.Bot.close_forum_topic +#: aiogram.client.bot.Bot.close_general_forum_topic +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message #: aiogram.client.bot.Bot.create_chat_invite_link #: aiogram.client.bot.Bot.create_forum_topic #: aiogram.client.bot.Bot.create_invoice_link @@ -186,6 +193,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook #: aiogram.client.bot.Bot.edit_chat_invite_link #: aiogram.client.bot.Bot.edit_forum_topic +#: aiogram.client.bot.Bot.edit_general_forum_topic #: aiogram.client.bot.Bot.edit_message_caption #: aiogram.client.bot.Bot.edit_message_live_location #: aiogram.client.bot.Bot.edit_message_media @@ -205,11 +213,13 @@ msgstr "" #: aiogram.client.bot.Bot.get_my_default_administrator_rights #: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates #: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info aiogram.client.bot.Bot.id +#: aiogram.client.bot.Bot.get_webhook_info +#: aiogram.client.bot.Bot.hide_general_forum_topic aiogram.client.bot.Bot.id #: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.pin_chat_message +#: aiogram.client.bot.Bot.me aiogram.client.bot.Bot.pin_chat_message #: aiogram.client.bot.Bot.promote_chat_member #: aiogram.client.bot.Bot.reopen_forum_topic +#: aiogram.client.bot.Bot.reopen_general_forum_topic #: aiogram.client.bot.Bot.restrict_chat_member #: aiogram.client.bot.Bot.revoke_chat_invite_link #: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio @@ -237,6 +247,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_message_live_location #: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member #: aiogram.client.bot.Bot.unban_chat_sender_chat +#: aiogram.client.bot.Bot.unhide_general_forum_topic #: aiogram.client.bot.Bot.unpin_all_chat_messages #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages #: aiogram.client.bot.Bot.unpin_chat_message @@ -248,6 +259,10 @@ msgstr "" msgid "Generate bot context" msgstr "" +#: aiogram.client.bot.Bot.me:1 of +msgid "Cached alias for getMe method" +msgstr "" + #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." msgstr "" @@ -367,6 +382,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:7 #: aiogram.client.bot.Bot.ban_chat_sender_chat:5 aiogram.client.bot.Bot.close:3 #: aiogram.client.bot.Bot.close_forum_topic:5 +#: aiogram.client.bot.Bot.close_general_forum_topic:4 #: aiogram.client.bot.Bot.copy_message:15 #: aiogram.client.bot.Bot.create_chat_invite_link:8 #: aiogram.client.bot.Bot.create_forum_topic:7 @@ -382,6 +398,7 @@ msgstr "" #: aiogram.client.bot.Bot.delete_webhook:4 #: aiogram.client.bot.Bot.edit_chat_invite_link:9 #: aiogram.client.bot.Bot.edit_forum_topic:7 +#: aiogram.client.bot.Bot.edit_general_forum_topic:5 #: aiogram.client.bot.Bot.edit_message_caption:10 #: aiogram.client.bot.Bot.edit_message_live_location:12 #: aiogram.client.bot.Bot.edit_message_media:8 @@ -403,23 +420,25 @@ msgstr "" #: aiogram.client.bot.Bot.get_updates:13 #: aiogram.client.bot.Bot.get_user_profile_photos:6 #: aiogram.client.bot.Bot.get_webhook_info:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:4 #: aiogram.client.bot.Bot.leave_chat:4 aiogram.client.bot.Bot.log_out:3 #: aiogram.client.bot.Bot.pin_chat_message:6 #: aiogram.client.bot.Bot.promote_chat_member:17 #: aiogram.client.bot.Bot.reopen_forum_topic:5 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:4 #: aiogram.client.bot.Bot.restrict_chat_member:7 #: aiogram.client.bot.Bot.revoke_chat_invite_link:5 -#: aiogram.client.bot.Bot.send_animation:18 +#: aiogram.client.bot.Bot.send_animation:19 #: aiogram.client.bot.Bot.send_audio:19 -#: aiogram.client.bot.Bot.send_chat_action:9 +#: aiogram.client.bot.Bot.send_chat_action:10 #: aiogram.client.bot.Bot.send_contact:14 aiogram.client.bot.Bot.send_dice:11 #: aiogram.client.bot.Bot.send_document:16 aiogram.client.bot.Bot.send_game:11 #: aiogram.client.bot.Bot.send_invoice:31 #: aiogram.client.bot.Bot.send_location:16 #: aiogram.client.bot.Bot.send_media_group:10 -#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:14 +#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:15 #: aiogram.client.bot.Bot.send_poll:22 aiogram.client.bot.Bot.send_sticker:11 -#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:19 +#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:20 #: aiogram.client.bot.Bot.send_video_note:14 #: aiogram.client.bot.Bot.send_voice:15 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:6 @@ -440,6 +459,7 @@ msgstr "" #: aiogram.client.bot.Bot.stop_poll:6 #: aiogram.client.bot.Bot.unban_chat_member:6 #: aiogram.client.bot.Bot.unban_chat_sender_chat:5 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:4 #: aiogram.client.bot.Bot.unpin_all_chat_messages:4 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:5 #: aiogram.client.bot.Bot.unpin_chat_message:5 @@ -452,6 +472,7 @@ msgstr "" #: aiogram.client.bot.Bot.ban_chat_member:8 #: aiogram.client.bot.Bot.ban_chat_sender_chat:6 #: aiogram.client.bot.Bot.close_forum_topic:6 +#: aiogram.client.bot.Bot.close_general_forum_topic:5 #: aiogram.client.bot.Bot.create_new_sticker_set:13 #: aiogram.client.bot.Bot.decline_chat_join_request:6 #: aiogram.client.bot.Bot.delete_chat_photo:5 @@ -462,10 +483,13 @@ msgstr "" #: aiogram.client.bot.Bot.delete_sticker_from_set:5 #: aiogram.client.bot.Bot.delete_webhook:5 #: aiogram.client.bot.Bot.edit_forum_topic:8 +#: aiogram.client.bot.Bot.edit_general_forum_topic:6 +#: aiogram.client.bot.Bot.hide_general_forum_topic:5 #: aiogram.client.bot.Bot.leave_chat:5 #: aiogram.client.bot.Bot.pin_chat_message:7 #: aiogram.client.bot.Bot.promote_chat_member:18 #: aiogram.client.bot.Bot.reopen_forum_topic:6 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:5 #: aiogram.client.bot.Bot.restrict_chat_member:8 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:7 #: aiogram.client.bot.Bot.set_chat_description:6 @@ -480,6 +504,7 @@ msgstr "" #: aiogram.client.bot.Bot.set_sticker_set_thumb:7 #: aiogram.client.bot.Bot.unban_chat_member:7 #: aiogram.client.bot.Bot.unban_chat_sender_chat:6 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:5 #: aiogram.client.bot.Bot.unpin_all_chat_messages:5 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:6 #: aiogram.client.bot.Bot.unpin_chat_message:6 of @@ -812,15 +837,20 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.close_forum_topic:3 +#: aiogram.client.bot.Bot.close_general_forum_topic:3 #: aiogram.client.bot.Bot.create_forum_topic:3 #: aiogram.client.bot.Bot.delete_chat_sticker_set:3 #: aiogram.client.bot.Bot.delete_forum_topic:3 #: aiogram.client.bot.Bot.edit_forum_topic:3 +#: aiogram.client.bot.Bot.edit_general_forum_topic:3 +#: aiogram.client.bot.Bot.hide_general_forum_topic:3 #: aiogram.client.bot.Bot.reopen_forum_topic:3 +#: aiogram.client.bot.Bot.reopen_general_forum_topic:3 #: aiogram.client.bot.Bot.restrict_chat_member:3 #: aiogram.client.bot.Bot.set_chat_administrator_custom_title:3 #: aiogram.client.bot.Bot.set_chat_permissions:3 #: aiogram.client.bot.Bot.set_chat_sticker_set:3 +#: aiogram.client.bot.Bot.unhide_general_forum_topic:3 #: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:3 of msgid "" "Unique identifier for the target chat or username of the target " @@ -898,14 +928,14 @@ msgstr "" #: aiogram.client.bot.Bot.copy_message:10 #: aiogram.client.bot.Bot.forward_message:7 -#: aiogram.client.bot.Bot.send_animation:13 +#: aiogram.client.bot.Bot.send_animation:14 #: aiogram.client.bot.Bot.send_audio:14 aiogram.client.bot.Bot.send_contact:9 #: aiogram.client.bot.Bot.send_dice:6 aiogram.client.bot.Bot.send_document:11 #: aiogram.client.bot.Bot.send_game:6 aiogram.client.bot.Bot.send_invoice:26 #: aiogram.client.bot.Bot.send_location:11 -#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:9 +#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:10 #: aiogram.client.bot.Bot.send_poll:17 aiogram.client.bot.Bot.send_sticker:6 -#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:14 +#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:15 #: aiogram.client.bot.Bot.send_video_note:9 #: aiogram.client.bot.Bot.send_voice:10 of msgid "" @@ -914,43 +944,43 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:11 -#: aiogram.client.bot.Bot.send_animation:14 +#: aiogram.client.bot.Bot.send_animation:15 #: aiogram.client.bot.Bot.send_audio:15 aiogram.client.bot.Bot.send_contact:10 #: aiogram.client.bot.Bot.send_document:12 aiogram.client.bot.Bot.send_game:7 #: aiogram.client.bot.Bot.send_invoice:27 #: aiogram.client.bot.Bot.send_location:12 -#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:10 +#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:11 #: aiogram.client.bot.Bot.send_poll:18 aiogram.client.bot.Bot.send_sticker:7 -#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:15 +#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:16 #: aiogram.client.bot.Bot.send_video_note:10 #: aiogram.client.bot.Bot.send_voice:11 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.client.bot.Bot.copy_message:12 -#: aiogram.client.bot.Bot.send_animation:15 +#: aiogram.client.bot.Bot.send_animation:16 #: aiogram.client.bot.Bot.send_audio:16 aiogram.client.bot.Bot.send_contact:11 #: aiogram.client.bot.Bot.send_dice:8 aiogram.client.bot.Bot.send_document:13 #: aiogram.client.bot.Bot.send_game:8 aiogram.client.bot.Bot.send_invoice:28 #: aiogram.client.bot.Bot.send_location:13 -#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:11 +#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:12 #: aiogram.client.bot.Bot.send_poll:19 aiogram.client.bot.Bot.send_sticker:8 -#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:16 +#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:17 #: aiogram.client.bot.Bot.send_video_note:11 #: aiogram.client.bot.Bot.send_voice:12 of msgid "If the message is a reply, ID of the original message" msgstr "" #: aiogram.client.bot.Bot.copy_message:13 -#: aiogram.client.bot.Bot.send_animation:16 +#: aiogram.client.bot.Bot.send_animation:17 #: aiogram.client.bot.Bot.send_audio:17 aiogram.client.bot.Bot.send_contact:12 #: aiogram.client.bot.Bot.send_dice:9 aiogram.client.bot.Bot.send_document:14 #: aiogram.client.bot.Bot.send_game:9 aiogram.client.bot.Bot.send_invoice:29 #: aiogram.client.bot.Bot.send_location:14 #: aiogram.client.bot.Bot.send_media_group:9 -#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:12 +#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:13 #: aiogram.client.bot.Bot.send_poll:20 aiogram.client.bot.Bot.send_sticker:9 -#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:17 +#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:18 #: aiogram.client.bot.Bot.send_video_note:12 #: aiogram.client.bot.Bot.send_voice:13 of msgid "" @@ -959,13 +989,13 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.copy_message:14 -#: aiogram.client.bot.Bot.send_animation:17 +#: aiogram.client.bot.Bot.send_animation:18 #: aiogram.client.bot.Bot.send_audio:18 aiogram.client.bot.Bot.send_contact:13 #: aiogram.client.bot.Bot.send_dice:10 aiogram.client.bot.Bot.send_document:15 #: aiogram.client.bot.Bot.send_location:15 -#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:13 +#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:14 #: aiogram.client.bot.Bot.send_poll:21 aiogram.client.bot.Bot.send_sticker:10 -#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:18 +#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:19 #: aiogram.client.bot.Bot.send_video_note:13 #: aiogram.client.bot.Bot.send_voice:14 of msgid "" @@ -1391,14 +1421,17 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:5 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_forum_topic:6 of msgid "" "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." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: aiogram.client.bot.Bot.edit_message_caption:1 of @@ -1629,7 +1662,7 @@ msgstr "" #: aiogram.client.bot.Bot.send_contact:15 aiogram.client.bot.Bot.send_dice:12 #: aiogram.client.bot.Bot.send_game:12 aiogram.client.bot.Bot.send_invoice:32 #: aiogram.client.bot.Bot.send_location:17 -#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:15 +#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:16 #: aiogram.client.bot.Bot.send_poll:23 aiogram.client.bot.Bot.send_sticker:12 #: aiogram.client.bot.Bot.send_venue:19 #: aiogram.client.bot.Bot.send_video_note:15 of @@ -1671,8 +1704,10 @@ msgstr "" #: aiogram.client.bot.Bot.get_chat_member:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.client.bot.Bot.get_chat_member:6 of @@ -2186,7 +2221,13 @@ msgid "" "more details." msgstr "" -#: aiogram.client.bot.Bot.send_animation:19 of +#: aiogram.client.bot.Bot.send_animation:13 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_animation:20 of msgid "" "Bots can currently send animation files of up to 50 MB in size, this " "limit may be changed in the future." @@ -2281,7 +2322,11 @@ msgid "" "`_." msgstr "" -#: aiogram.client.bot.Bot.send_chat_action:10 of +#: aiogram.client.bot.Bot.send_chat_action:9 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.client.bot.Bot.send_chat_action:11 of msgid "The user will see a 'sending photo' status for the bot." msgstr "" @@ -2548,6 +2593,12 @@ msgid "" "details." msgstr "" +#: aiogram.client.bot.Bot.send_photo:9 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: aiogram.client.bot.Bot.send_poll:1 of msgid "" "Use this method to send a native poll. On success, the sent " @@ -2730,10 +2781,16 @@ msgid "" msgstr "" #: aiogram.client.bot.Bot.send_video:13 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.client.bot.Bot.send_video:14 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.client.bot.Bot.send_video:20 of +#: aiogram.client.bot.Bot.send_video:21 of msgid "" "Bots can currently send video files of up to 50 MB in size, this limit " "may be changed in the future." @@ -3227,6 +3284,51 @@ msgstr "" msgid "Returns the uploaded :class:`aiogram.types.file.File` on success." msgstr "" +#: aiogram.client.bot.Bot.close_general_forum_topic:1 of +msgid "" +"Use this method to close an open 'General' 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 " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:1 of +msgid "" +"Use this method to edit the name of the 'General' 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. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.edit_general_forum_topic:4 of +msgid "New topic name, 1-128 characters" +msgstr "" + +#: aiogram.client.bot.Bot.hide_general_forum_topic:1 of +msgid "" +"Use this method to hide the 'General' 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. The topic will be " +"automatically closed if it was open. Returns :code:`True` on success." +msgstr "" + +#: aiogram.client.bot.Bot.reopen_general_forum_topic:1 of +msgid "" +"Use this method to reopen a closed 'General' 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. The topic will be" +" automatically unhidden if it was hidden. Returns :code:`True` on " +"success." +msgstr "" + +#: aiogram.client.bot.Bot.unhide_general_forum_topic:1 of +msgid "" +"Use this method to unhide the 'General' 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 :code:`True` " +"on success." +msgstr "" + #~ msgid "" #~ "Additional interface options. A JSON-" #~ "serialized object for an `inline " @@ -3800,3 +3902,19 @@ msgstr "" #~ "users if the user and their " #~ "neighbors are not among them." #~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po index 70760335..11675c94 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/download_file.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: aiogram\n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: 2022-12-13 23:33+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -15,7 +15,6 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -"X-Generator: Poedit 3.2.2\n" #: ../../api/download_file.rst:3 msgid "How to download file?" @@ -28,12 +27,12 @@ msgstr "Завантаження файла вручну" #: ../../api/download_file.rst:8 msgid "" "First, you must get the `file_id` of the file you want to download. " -"Information about files sent to the bot is contained in `Message `__." +"Information about files sent to the bot is contained in `Message " +"`__." msgstr "" -"По-перше, ви повинні отримати `file_id` файлу, який ви хочете завантажити. " -"Інформація про файли, надіслані боту, міститься в `Message `__." +"По-перше, ви повинні отримати `file_id` файлу, який ви хочете " +"завантажити. Інформація про файли, надіслані боту, міститься в `Message " +"`__." #: ../../api/download_file.rst:11 msgid "For example, download the document that came to the bot." @@ -41,15 +40,16 @@ msgstr "Наприклад, завантажте документ, який пр #: ../../api/download_file.rst:17 msgid "" -"Then use the `getFile `__ method to get `file_path`." +"Then use the `getFile `__ method to get " +"`file_path`." msgstr "" "Потім скористайтеся методом `getFile `__, щоб " "отримати `file_path`." #: ../../api/download_file.rst:24 msgid "" -"After that, use the `download_file <#download-file>`__ method from the bot " -"object." +"After that, use the `download_file <#download-file>`__ method from the " +"bot object." msgstr "" "Після цього скористайтеся методом `download_file <#download-file>`__ з " "об’єкта бота." @@ -68,12 +68,8 @@ msgid "" "default value of destination and handle result of this method." msgstr "" "Якщо ви хочете автоматично створити місце призначення (io.BytesIO), " -"використовуйте значення призначення за замовчуванням і обробіть результат " -"цього методу." - -#: aiogram.client.bot.Bot:1 of -msgid "Bot class" -msgstr "Bot class" +"використовуйте значення призначення за замовчуванням і обробіть результат" +" цього методу." #: aiogram.client.bot.Bot.download_file:1 of msgid "Download file by file_path to destination." @@ -81,12 +77,12 @@ msgstr "Завантажує файл з file_path у вказане місце. #: aiogram.client.bot.Bot.download:3 aiogram.client.bot.Bot.download_file:3 of msgid "" -"If you want to automatically create destination (:class:`io.BytesIO`) use " -"default value of destination and handle result of this method." +"If you want to automatically create destination (:class:`io.BytesIO`) use" +" default value of destination and handle result of this method." msgstr "" "Якщо ви хочете автоматично створити місце призначення (io.BytesIO), " -"використовуйте значення призначення за замовчуванням і обробіть результат " -"цього методу." +"використовуйте значення призначення за замовчуванням і обробіть результат" +" цього методу." #: aiogram.client.bot.Bot.download aiogram.client.bot.Bot.download_file of msgid "Parameters" @@ -94,18 +90,19 @@ msgstr "Параметри" #: aiogram.client.bot.Bot.download_file:6 of msgid "" -"File path on Telegram server (You can get it from :obj:`aiogram.types.File`)" +"File path on Telegram server (You can get it from " +":obj:`aiogram.types.File`)" msgstr "" -"Шлях до файлу на сервері Telegram (Ви можете отримати його з :obj:`aiogram." -"types.File`)" +"Шлях до файлу на сервері Telegram (Ви можете отримати його з " +":obj:`aiogram.types.File`)" #: aiogram.client.bot.Bot.download:7 aiogram.client.bot.Bot.download_file:7 of msgid "" -"Filename, file path or instance of :class:`io.IOBase`. For e.g. :class:`io." -"BytesIO`, defaults to None" +"Filename, file path or instance of :class:`io.IOBase`. For e.g. " +":class:`io.BytesIO`, defaults to None" msgstr "" -"Ім’я файлу, шлях до файлу або екземпляр :class:`io.IOBase`. Для напр. :" -"class:`io.BytesIO`, за замовчуванням немає" +"Ім’я файлу, шлях до файлу або екземпляр :class:`io.IOBase`. Для напр. " +":class:`io.BytesIO`, за замовчуванням немає" #: aiogram.client.bot.Bot.download:8 aiogram.client.bot.Bot.download_file:8 of msgid "Total timeout in seconds, defaults to 30" @@ -118,11 +115,11 @@ msgstr "Розмір фрагментів файлу, за замовчуван #: aiogram.client.bot.Bot.download:10 aiogram.client.bot.Bot.download_file:10 #: of msgid "" -"Go to start of file when downloading is finished. Used only for destination " -"with :class:`typing.BinaryIO` type, defaults to True" +"Go to start of file when downloading is finished. Used only for " +"destination with :class:`typing.BinaryIO` type, defaults to True" msgstr "" -"Перейти до початку файлу, коли завантаження завершиться. Використовується " -"лише для призначення з типом :class:`typing.BinaryIO`, за замовчуванням " +"Перейти до початку файлу, коли завантаження завершиться. Використовується" +" лише для призначення з типом :class:`typing.BinaryIO`, за замовчуванням " "значення True" #: ../../api/download_file.rst:38 @@ -139,11 +136,11 @@ msgstr "Завантаження файлу на диск" #: ../../api/download_file.rst:43 msgid "" -"To download file to disk, you must specify the file name or path where to " -"download the file. In this case, the function will return nothing." +"To download file to disk, you must specify the file name or path where to" +" download the file. In this case, the function will return nothing." msgstr "" -"Щоб завантажити файл на диск, необхідно вказати ім'я файлу або шлях, куди " -"його завантажити. У цьому випадку функція нічого не поверне." +"Щоб завантажити файл на диск, необхідно вказати ім'я файлу або шлях, куди" +" його завантажити. У цьому випадку функція нічого не поверне." #: ../../api/download_file.rst:51 msgid "Download file to binary I/O object" @@ -151,12 +148,12 @@ msgstr "Завантаження файлу в оперативну пам'ят #: ../../api/download_file.rst:53 msgid "" -"To download file to binary I/O object, you must specify an object with the :" -"obj:`typing.BinaryIO` type or use the default (:obj:`None`) value." +"To download file to binary I/O object, you must specify an object with " +"the :obj:`typing.BinaryIO` type or use the default (:obj:`None`) value." msgstr "" -"Щоб завантажити файл до оперативної пам'яті, ви повинні вказати об’єкт із " -"типом :obj:`typing.BinaryIO` або використати значення за замовчуванням (:" -"obj:`None`)." +"Щоб завантажити файл до оперативної пам'яті, ви повинні вказати об’єкт із" +" типом :obj:`typing.BinaryIO` або використати значення за замовчуванням " +"(:obj:`None`)." #: ../../api/download_file.rst:56 msgid "In the first case, the function will return your object:" @@ -164,11 +161,11 @@ msgstr "У першому випадку функція поверне ваш о #: ../../api/download_file.rst:64 msgid "" -"If you leave the default value, an :obj:`io.BytesIO` object will be created " -"and returned." +"If you leave the default value, an :obj:`io.BytesIO` object will be " +"created and returned." msgstr "" -"Якщо залишити значення за замовчуванням, буде створено та повернено об’єкт :" -"obj:`io.BytesIO`." +"Якщо залишити значення за замовчуванням, буде створено та повернено " +"об’єкт :obj:`io.BytesIO`." #: ../../api/download_file.rst:72 msgid "Download file in short way" @@ -188,8 +185,7 @@ msgstr "download(...)" #: ../../api/download_file.rst:79 msgid "Download file by `file_id` or `Downloadable` object to destination." -msgstr "" -"Завантажує файл за `file_id` або `Downloadable` об’єктом у вказане місце." +msgstr "Завантажує файл за `file_id` або `Downloadable` об’єктом у вказане місце." #: aiogram.client.bot.Bot.download:1 of msgid "Download file by file_id or Downloadable object to destination." @@ -205,14 +201,15 @@ msgid "" "accepts `file_id` or an `Downloadable` object (object that contains the " "`file_id` attribute) instead of `file_path`." msgstr "" -"Він відрізняється від `download_file <#download-file>`__ **лише** тим, що " -"приймає `file_id` або `Downloadable` об’єкт (об’єкт, який містить атрибут " -"`file_id`) замість `file_path`." +"Він відрізняється від `download_file <#download-file>`__ **лише** тим, що" +" приймає `file_id` або `Downloadable` об’єкт (об’єкт, який містить " +"атрибут `file_id`) замість `file_path`." #: ../../api/download_file.rst:91 msgid "" "You can download a file to `disk <#download-file-to-disk>`__ or to a " -"`binary I/O <#download-file-to-binary-io-object>`__ object in the same way." +"`binary I/O <#download-file-to-binary-io-object>`__ object in the same " +"way." msgstr "" "Ви можете завантажити файл на `disk <#download-file-to-disk>`__ або в " "`binary I/O object <#download-file-to-binary-io-object>`__ так само." @@ -220,3 +217,6 @@ msgstr "" #: ../../api/download_file.rst:93 msgid "Example:" msgstr "Приклад:" + +#~ msgid "Bot class" +#~ msgstr "Bot class" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po index 04fcc637..ad64f7f1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,9 +18,12 @@ msgstr "" "Generated-By: Babel 2.10.3\n" #: ../../api/enums/index.rst:3 -msgid "Types" +msgid "Enums" msgstr "" #: ../../api/enums/index.rst:5 msgid "Here is list of all available enums:" msgstr "" + +#~ msgid "Types" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po index b79ff4c7..711dcfaa 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -49,7 +49,9 @@ msgid "Unique identifier for the target message thread of the forum topic" msgstr "" #: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.name:1 of -msgid "New topic name, 1-128 characters" +msgid "" +"New topic name, 0-128 characters. If not specififed or empty, the current" +" name of the topic will be kept" msgstr "" #: ../../docstring @@ -57,7 +59,8 @@ msgstr "" msgid "" "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." +" to get all allowed custom emoji identifiers. Pass an empty string to " +"remove the icon. If not specified, the current icon will be kept" msgstr "" #: ../../api/methods/edit_forum_topic.rst:14 @@ -100,3 +103,15 @@ msgstr "" #~ " to get all allowed custom emoji " #~ "identifiers" #~ msgstr "" + +#~ msgid "New topic name, 1-128 characters" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po index 56aedd83..ae8994c9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,8 +30,10 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -83,3 +85,10 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po index d84eff42..57619de4 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -104,6 +104,13 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_animation.SendAnimation.has_spoiler:1 +#: of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring #: aiogram.methods.send_animation.SendAnimation.disable_notification:1 of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po index e69951eb..b379f03c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_chat_action.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -76,6 +76,11 @@ msgid "" "`_." msgstr "" +#: ../../docstring +#: aiogram.methods.send_chat_action.SendChatAction.message_thread_id:1 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + #: ../../api/methods/send_chat_action.rst:14 msgid "Usage" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po index 496a13a5..440f3fb0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,6 +77,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_photo.SendPhoto.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_photo.SendPhoto.disable_notification:1 #: of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po index 55651775..5a575db2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,6 +103,12 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" +#: ../../docstring aiogram.methods.send_video.SendVideo.has_spoiler:1 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.methods.send_video.SendVideo.supports_streaming:1 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po index 802289d3..13a50fa1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -162,6 +162,21 @@ msgid "" ":class:`aiogram.methods.get_chat.GetChat`." msgstr "" +#: ../../docstring aiogram.types.chat.Chat.has_aggressive_anti_spam_enabled:1 +#: of +msgid "" +"*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in " +"the supergroup. The field is only available to chat administrators. " +"Returned only in :class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + +#: ../../docstring aiogram.types.chat.Chat.has_hidden_members:1 of +msgid "" +"*Optional*. :code:`True`, if non-administrators can only get the list of " +"bots and administrators in the chat. Returned only in " +":class:`aiogram.methods.get_chat.GetChat`." +msgstr "" + #: ../../docstring aiogram.types.chat.Chat.has_protected_content:1 of msgid "" "*Optional*. :code:`True`, if messages from the chat can't be forwarded to" @@ -641,6 +656,10 @@ msgid "" msgstr "" #: aiogram.types.chat.Chat.do:15 of +msgid "Unique identifier for the target message thread; supergroups only" +msgstr "" + +#: aiogram.types.chat.Chat.do:16 of msgid "" "instance of method " ":class:`aiogram.methods.send_chat_action.SendChatAction`" @@ -713,8 +732,10 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" -"Use this method to get information about a member of a chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"Use this method to get information about a member of a chat. The method " +"is guaranteed to work only if the bot is an administrator in the chat. " +"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " +"success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -1235,3 +1256,10 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. Returns" +#~ " a :class:`aiogram.types.chat_member.ChatMember` object" +#~ " on success." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po index 6cf3b36c..fbaceb09 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/error_event.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,6 +27,10 @@ msgid "" " from Telegram" msgstr "" +#: aiogram.types.error_event.ErrorEvent:3 of +msgid "Source: https://core.telegram.org/bots/api#error-event" +msgstr "" + #: ../../docstring aiogram.types.error_event.ErrorEvent.update:1 of msgid "Received update" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po index c7493068..8ee34c1a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,25 +33,29 @@ msgstr "" msgid "Available types" msgstr "" -#: ../../api/types/index.rst:130 +#: ../../api/types/index.rst:134 msgid "Telegram Passport" msgstr "" -#: ../../api/types/index.rst:151 +#: ../../api/types/index.rst:155 msgid "Getting updates" msgstr "" -#: ../../api/types/index.rst:160 +#: ../../api/types/index.rst:164 msgid "Stickers" msgstr "" -#: ../../api/types/index.rst:170 +#: ../../api/types/index.rst:174 msgid "Payments" msgstr "" -#: ../../api/types/index.rst:185 +#: ../../api/types/index.rst:189 msgid "Games" msgstr "" +#: ../../api/types/index.rst:199 +msgid "Internals" +msgstr "" + #~ msgid "Internal events" #~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po index 3a0bffbb..e19c352d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_animation.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -97,3 +97,10 @@ msgstr "" #: aiogram.types.input_media_animation.InputMediaAnimation.duration:1 of msgid "*Optional*. Animation duration in seconds" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_animation.InputMediaAnimation.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the animation needs to be covered with a" +" spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po index 5d6f0814..10a634e9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_photo.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,3 +62,10 @@ msgid "" "*Optional*. List of special entities that appear in the caption, which " "can be specified instead of *parse_mode*" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_photo.InputMediaPhoto.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the photo needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po index fc4f2e44..eef2e134 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_media_video.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -95,3 +95,10 @@ msgid "" "*Optional*. Pass :code:`True` if the uploaded video is suitable for " "streaming" msgstr "" + +#: ../../docstring +#: aiogram.types.input_media_video.InputMediaVideo.has_spoiler:1 of +msgid "" +"*Optional*. Pass :code:`True` if the video needs to be covered with a " +"spoiler animation" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po index b51e09c8..516aa013 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -199,6 +199,12 @@ msgid "" " URLs, bot commands, etc. that appear in the caption" msgstr "" +#: ../../docstring aiogram.types.message.Message.has_media_spoiler:1 of +msgid "" +"*Optional*. :code:`True`, if the message media is covered by a spoiler " +"animation" +msgstr "" + #: ../../docstring aiogram.types.message.Message.contact:1 of msgid "*Optional*. Message is a shared contact, information about the contact" msgstr "" @@ -329,6 +335,12 @@ msgid "" "`_" msgstr "" +#: ../../docstring aiogram.types.message.Message.write_access_allowed:1 of +msgid "" +"*Optional*. Service message: the user allowed the bot added to the " +"attachment menu to write messages" +msgstr "" + #: ../../docstring aiogram.types.message.Message.passport_data:1 of msgid "*Optional*. Telegram Passport data" msgstr "" @@ -343,6 +355,10 @@ msgstr "" msgid "*Optional*. Service message: forum topic created" msgstr "" +#: ../../docstring aiogram.types.message.Message.forum_topic_edited:1 of +msgid "*Optional*. Service message: forum topic edited" +msgstr "" + #: ../../docstring aiogram.types.message.Message.forum_topic_closed:1 of msgid "*Optional*. Service message: forum topic closed" msgstr "" @@ -351,6 +367,16 @@ msgstr "" msgid "*Optional*. Service message: forum topic reopened" msgstr "" +#: ../../docstring aiogram.types.message.Message.general_forum_topic_hidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic hidden" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.general_forum_topic_unhidden:1 +#: of +msgid "*Optional*. Service message: the 'General' forum topic unhidden" +msgstr "" + #: ../../docstring aiogram.types.message.Message.video_chat_scheduled:1 of msgid "*Optional*. Service message: video chat scheduled" msgstr "" @@ -627,8 +653,15 @@ msgid "" "which can be specified instead of *parse_mode*" msgstr "" -#: aiogram.types.message.Message.answer:15 #: aiogram.types.message.Message.answer_animation:19 +#: aiogram.types.message.Message.reply_animation:20 of +msgid "" +"Pass :code:`True` if the animation needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer:15 +#: aiogram.types.message.Message.answer_animation:20 #: aiogram.types.message.Message.answer_audio:20 #: aiogram.types.message.Message.answer_contact:15 #: aiogram.types.message.Message.answer_dice:12 @@ -636,17 +669,17 @@ msgstr "" #: aiogram.types.message.Message.answer_game:12 #: aiogram.types.message.Message.answer_invoice:32 #: aiogram.types.message.Message.answer_location:17 -#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.answer_photo:16 #: aiogram.types.message.Message.answer_poll:23 #: aiogram.types.message.Message.answer_sticker:12 #: aiogram.types.message.Message.answer_venue:19 -#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.answer_video:21 #: aiogram.types.message.Message.answer_video_note:15 #: aiogram.types.message.Message.answer_voice:16 #: aiogram.types.message.Message.copy_to:16 #: aiogram.types.message.Message.forward:13 #: aiogram.types.message.Message.reply:16 -#: aiogram.types.message.Message.reply_animation:20 +#: aiogram.types.message.Message.reply_animation:21 #: aiogram.types.message.Message.reply_audio:21 #: aiogram.types.message.Message.reply_contact:16 #: aiogram.types.message.Message.reply_dice:13 @@ -654,11 +687,11 @@ msgstr "" #: aiogram.types.message.Message.reply_game:13 #: aiogram.types.message.Message.reply_invoice:33 #: aiogram.types.message.Message.reply_location:18 -#: aiogram.types.message.Message.reply_photo:16 +#: aiogram.types.message.Message.reply_photo:17 #: aiogram.types.message.Message.reply_poll:24 #: aiogram.types.message.Message.reply_sticker:13 #: aiogram.types.message.Message.reply_venue:20 -#: aiogram.types.message.Message.reply_video:21 +#: aiogram.types.message.Message.reply_video:22 #: aiogram.types.message.Message.reply_video_note:16 #: aiogram.types.message.Message.reply_voice:17 of msgid "" @@ -667,41 +700,41 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:16 -#: aiogram.types.message.Message.answer_animation:20 +#: aiogram.types.message.Message.answer_animation:21 #: aiogram.types.message.Message.answer_audio:21 #: aiogram.types.message.Message.answer_contact:16 #: aiogram.types.message.Message.answer_document:18 #: aiogram.types.message.Message.answer_game:13 #: aiogram.types.message.Message.answer_invoice:33 #: aiogram.types.message.Message.answer_location:18 -#: aiogram.types.message.Message.answer_photo:16 +#: aiogram.types.message.Message.answer_photo:17 #: aiogram.types.message.Message.answer_poll:24 #: aiogram.types.message.Message.answer_sticker:13 #: aiogram.types.message.Message.answer_venue:20 -#: aiogram.types.message.Message.answer_video:21 +#: aiogram.types.message.Message.answer_video:22 #: aiogram.types.message.Message.answer_video_note:16 #: aiogram.types.message.Message.answer_voice:17 #: aiogram.types.message.Message.copy_to:17 #: aiogram.types.message.Message.reply:17 -#: aiogram.types.message.Message.reply_animation:21 +#: aiogram.types.message.Message.reply_animation:22 #: aiogram.types.message.Message.reply_audio:22 #: aiogram.types.message.Message.reply_contact:17 #: aiogram.types.message.Message.reply_document:19 #: aiogram.types.message.Message.reply_game:14 #: aiogram.types.message.Message.reply_invoice:34 #: aiogram.types.message.Message.reply_location:19 -#: aiogram.types.message.Message.reply_photo:17 +#: aiogram.types.message.Message.reply_photo:18 #: aiogram.types.message.Message.reply_poll:25 #: aiogram.types.message.Message.reply_sticker:14 #: aiogram.types.message.Message.reply_venue:21 -#: aiogram.types.message.Message.reply_video:22 +#: aiogram.types.message.Message.reply_video:23 #: aiogram.types.message.Message.reply_video_note:17 #: aiogram.types.message.Message.reply_voice:18 of msgid "Protects the contents of the sent message from forwarding and saving" msgstr "" #: aiogram.types.message.Message.answer:18 -#: aiogram.types.message.Message.answer_animation:22 +#: aiogram.types.message.Message.answer_animation:23 #: aiogram.types.message.Message.answer_audio:23 #: aiogram.types.message.Message.answer_contact:18 #: aiogram.types.message.Message.answer_dice:15 @@ -710,16 +743,16 @@ msgstr "" #: aiogram.types.message.Message.answer_invoice:35 #: aiogram.types.message.Message.answer_location:20 #: aiogram.types.message.Message.answer_media_group:15 -#: aiogram.types.message.Message.answer_photo:18 +#: aiogram.types.message.Message.answer_photo:19 #: aiogram.types.message.Message.answer_poll:26 #: aiogram.types.message.Message.answer_sticker:15 #: aiogram.types.message.Message.answer_venue:22 -#: aiogram.types.message.Message.answer_video:23 +#: aiogram.types.message.Message.answer_video:24 #: aiogram.types.message.Message.answer_video_note:18 #: aiogram.types.message.Message.answer_voice:19 #: aiogram.types.message.Message.copy_to:19 #: aiogram.types.message.Message.reply:18 -#: aiogram.types.message.Message.reply_animation:22 +#: aiogram.types.message.Message.reply_animation:23 #: aiogram.types.message.Message.reply_audio:23 #: aiogram.types.message.Message.reply_contact:18 #: aiogram.types.message.Message.reply_dice:15 @@ -728,11 +761,11 @@ msgstr "" #: aiogram.types.message.Message.reply_invoice:35 #: aiogram.types.message.Message.reply_location:20 #: aiogram.types.message.Message.reply_media_group:15 -#: aiogram.types.message.Message.reply_photo:18 +#: aiogram.types.message.Message.reply_photo:19 #: aiogram.types.message.Message.reply_poll:26 #: aiogram.types.message.Message.reply_sticker:15 #: aiogram.types.message.Message.reply_venue:22 -#: aiogram.types.message.Message.reply_video:23 +#: aiogram.types.message.Message.reply_video:24 #: aiogram.types.message.Message.reply_video_note:18 #: aiogram.types.message.Message.reply_voice:19 of msgid "" @@ -741,32 +774,32 @@ msgid "" msgstr "" #: aiogram.types.message.Message.answer:19 -#: aiogram.types.message.Message.answer_animation:23 +#: aiogram.types.message.Message.answer_animation:24 #: aiogram.types.message.Message.answer_audio:24 #: aiogram.types.message.Message.answer_contact:19 #: aiogram.types.message.Message.answer_dice:16 #: aiogram.types.message.Message.answer_document:21 #: aiogram.types.message.Message.answer_location:21 -#: aiogram.types.message.Message.answer_photo:19 +#: aiogram.types.message.Message.answer_photo:20 #: aiogram.types.message.Message.answer_poll:27 #: aiogram.types.message.Message.answer_sticker:16 #: aiogram.types.message.Message.answer_venue:23 -#: aiogram.types.message.Message.answer_video:24 +#: aiogram.types.message.Message.answer_video:25 #: aiogram.types.message.Message.answer_video_note:19 #: aiogram.types.message.Message.answer_voice:20 #: aiogram.types.message.Message.copy_to:20 #: aiogram.types.message.Message.reply:19 -#: aiogram.types.message.Message.reply_animation:23 +#: aiogram.types.message.Message.reply_animation:24 #: aiogram.types.message.Message.reply_audio:24 #: aiogram.types.message.Message.reply_contact:19 #: aiogram.types.message.Message.reply_dice:16 #: aiogram.types.message.Message.reply_document:21 #: aiogram.types.message.Message.reply_location:21 -#: aiogram.types.message.Message.reply_photo:19 +#: aiogram.types.message.Message.reply_photo:20 #: aiogram.types.message.Message.reply_poll:27 #: aiogram.types.message.Message.reply_sticker:16 #: aiogram.types.message.Message.reply_venue:23 -#: aiogram.types.message.Message.reply_video:24 +#: aiogram.types.message.Message.reply_video:25 #: aiogram.types.message.Message.reply_video_note:19 #: aiogram.types.message.Message.reply_voice:20 of msgid "" @@ -824,13 +857,13 @@ msgstr "" msgid "Returns" msgstr "" -#: aiogram.types.message.Message.answer_animation:24 -#: aiogram.types.message.Message.reply_animation:24 of +#: aiogram.types.message.Message.answer_animation:25 +#: aiogram.types.message.Message.reply_animation:25 of msgid "instance of method :class:`aiogram.methods.send_animation.SendAnimation`" msgstr "" #: aiogram.types.message.Message.answer:17 -#: aiogram.types.message.Message.answer_animation:21 +#: aiogram.types.message.Message.answer_animation:22 #: aiogram.types.message.Message.answer_audio:22 #: aiogram.types.message.Message.answer_contact:17 #: aiogram.types.message.Message.answer_dice:14 @@ -838,11 +871,11 @@ msgstr "" #: aiogram.types.message.Message.answer_game:14 #: aiogram.types.message.Message.answer_invoice:34 #: aiogram.types.message.Message.answer_location:19 -#: aiogram.types.message.Message.answer_photo:17 +#: aiogram.types.message.Message.answer_photo:18 #: aiogram.types.message.Message.answer_poll:25 #: aiogram.types.message.Message.answer_sticker:14 #: aiogram.types.message.Message.answer_venue:21 -#: aiogram.types.message.Message.answer_video:22 +#: aiogram.types.message.Message.answer_video:23 #: aiogram.types.message.Message.answer_video_note:17 #: aiogram.types.message.Message.answer_voice:18 #: aiogram.types.message.Message.copy_to:18 of @@ -1450,8 +1483,15 @@ msgid "" "details." msgstr "" -#: aiogram.types.message.Message.answer_photo:20 -#: aiogram.types.message.Message.reply_photo:20 of +#: aiogram.types.message.Message.answer_photo:15 +#: aiogram.types.message.Message.reply_photo:16 of +msgid "" +"Pass :code:`True` if the photo needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_photo:21 +#: aiogram.types.message.Message.reply_photo:21 of msgid "instance of method :class:`aiogram.methods.send_photo.SendPhoto`" msgstr "" @@ -1772,11 +1812,18 @@ msgstr "" #: aiogram.types.message.Message.answer_video:19 #: aiogram.types.message.Message.reply_video:20 of +msgid "" +"Pass :code:`True` if the video needs to be covered with a spoiler " +"animation" +msgstr "" + +#: aiogram.types.message.Message.answer_video:20 +#: aiogram.types.message.Message.reply_video:21 of msgid "Pass :code:`True` if the uploaded video is suitable for streaming" msgstr "" -#: aiogram.types.message.Message.answer_video:25 -#: aiogram.types.message.Message.reply_video:25 of +#: aiogram.types.message.Message.answer_video:26 +#: aiogram.types.message.Message.reply_video:26 of msgid "instance of method :class:`aiogram.methods.send_video.SendVideo`" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po index 43841e57..4f2b1f86 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/reply_keyboard_markup.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,6 +41,14 @@ msgid "" ":class:`aiogram.types.keyboard_button.KeyboardButton` objects" msgstr "" +#: ../../docstring +#: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.is_persistent:1 of +msgid "" +"*Optional*. Requests clients to always show the keyboard when the regular" +" keyboard is hidden. Defaults to *false*, in which case the custom " +"keyboard can be hidden and opened with a keyboard icon." +msgstr "" + #: ../../docstring #: aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup.resize_keyboard:1 of msgid "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/changelog.po b/docs/locale/uk_UA/LC_MESSAGES/changelog.po index 7aa01990..6f0f541b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/changelog.po +++ b/docs/locale/uk_UA/LC_MESSAGES/changelog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +msgid "\\ |release| [UNRELEASED DRAFT] (2022-12-30)" msgstr "" #: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 @@ -33,20 +33,108 @@ msgid "Features" msgstr "" #: ../../[towncrier-fragments]:7 +msgid "Added missing shortcuts, new enums, reworked old stuff" +msgstr "" + +#: ../../[towncrier-fragments]:9 msgid "" -"Added missing shortcuts, new enums, reworked old stuff `#952 " -"`_" +"**Breaking** All previously added enums is re-generated in new place - " +"`aiogram.enums` instead of `aiogram.types`" +msgstr "" + +#: ../../[towncrier-fragments]:27 +msgid "" +"**Added enums:** " +":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," +msgstr "" + +#: ../../[towncrier-fragments]:13 +msgid "" +":class:`aiogram.enums.chat_action.ChatActions`, " +":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " +":class:`aiogram.enums.chat_type.ChatType`, " +":class:`aiogram.enums.content_type.ContentType`, " +":class:`aiogram.enums.dice_emoji.DiceEmoji`, " +":class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, " +":class:`aiogram.enums.input_media_type.InputMediaType`, " +":class:`aiogram.enums.mask_position_point.MaskPositionPoint`, " +":class:`aiogram.enums.menu_button_type.MenuButtonType`, " +":class:`aiogram.enums.message_entity_type.MessageEntityType`, " +":class:`aiogram.enums.parse_mode.ParseMode`, " +":class:`aiogram.enums.poll_type.PollType`, " +":class:`aiogram.enums.sticker_type.StickerType`, " +":class:`aiogram.enums.topic_icon_color.TopicIconColor`, " +":class:`aiogram.enums.update_type.UpdateType`," +msgstr "" + +#: ../../[towncrier-fragments]:29 +msgid "**Added shortcuts**:" +msgstr "" + +#: ../../[towncrier-fragments]:54 +msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," +msgstr "" + +#: ../../[towncrier-fragments]:32 +msgid "" +":meth:`aiogram.types.chat.Chat.delete_message`, " +":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " +":meth:`aiogram.types.chat.Chat.edit_invite_link`, " +":meth:`aiogram.types.chat.Chat.create_invite_link`, " +":meth:`aiogram.types.chat.Chat.export_invite_link`, " +":meth:`aiogram.types.chat.Chat.do`, " +":meth:`aiogram.types.chat.Chat.delete_sticker_set`, " +":meth:`aiogram.types.chat.Chat.set_sticker_set`, " +":meth:`aiogram.types.chat.Chat.get_member`, " +":meth:`aiogram.types.chat.Chat.get_member_count`, " +":meth:`aiogram.types.chat.Chat.leave`, " +":meth:`aiogram.types.chat.Chat.unpin_all_messages`, " +":meth:`aiogram.types.chat.Chat.unpin_message`, " +":meth:`aiogram.types.chat.Chat.pin_message`, " +":meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, " +":meth:`aiogram.types.chat.Chat.set_permissions`, " +":meth:`aiogram.types.chat.Chat.promote`, " +":meth:`aiogram.types.chat.Chat.restrict`, " +":meth:`aiogram.types.chat.Chat.unban`, " +":meth:`aiogram.types.chat.Chat.ban`, " +":meth:`aiogram.types.chat.Chat.set_description`, " +":meth:`aiogram.types.chat.Chat.set_title`, " +":meth:`aiogram.types.chat.Chat.delete_photo`, " +":meth:`aiogram.types.chat.Chat.set_photo`," +msgstr "" + +#: ../../[towncrier-fragments]:56 +msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," +msgstr "" + +#: ../../[towncrier-fragments]:57 +msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," +msgstr "" + +#: ../../[towncrier-fragments]:58 +msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" +msgstr "" + +#: ../../[towncrier-fragments]:59 +msgid "`#952 `_" +msgstr "" + +#: ../../[towncrier-fragments]:60 +msgid "" +"Added full support of `Bot API 6.4 `_ `#1088 " +"`_" msgstr "" #: ../../../CHANGES.rst:71 ../../../CHANGES.rst:124 ../../../CHANGES.rst:175 #: ../../../CHANGES.rst:229 ../../../CHANGES.rst:271 ../../../CHANGES.rst:317 #: ../../../CHANGES.rst:377 ../../../CHANGES.rst:398 ../../../CHANGES.rst:421 #: ../../../CHANGES.rst:458 ../../../CHANGES.rst:497 -#: ../../[towncrier-fragments]:12 +#: ../../[towncrier-fragments]:65 msgid "Misc" msgstr "" -#: ../../[towncrier-fragments]:14 +#: ../../[towncrier-fragments]:67 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " @@ -2405,3 +2493,12 @@ msgstr "" #~ ":code:`ChatMemberStatus.yml` was renamed to " #~ ":code:`is_chat_member` and :code:`is_chat_admin`" #~ msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" +#~ msgstr "" + +#~ msgid "" +#~ "Added missing shortcuts, new enums, " +#~ "reworked old stuff `#952 " +#~ "`_" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/index.po b/docs/locale/uk_UA/LC_MESSAGES/index.po index 75a39e96..1d6913cf 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-03 01:03+0300\n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -131,8 +131,9 @@ msgid "Supports `PyPy `_" msgstr "Працює з `PyPy `_" #: ../../../README.rst:70 +#, fuzzy msgid "" -"Supports `Telegram Bot API 6.3 `_ and" +"Supports `Telegram Bot API 6.4 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" "Підтримує `Telegram Bot API 6.3 `_ та" diff --git a/tests/test_api/test_client/test_bot.py b/tests/test_api/test_client/test_bot.py index 7266bdcd..1cf94238 100644 --- a/tests/test_api/test_client/test_bot.py +++ b/tests/test_api/test_client/test_bot.py @@ -14,8 +14,6 @@ from aiogram.methods import GetFile, GetMe from aiogram.types import File, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestBot: def test_init(self): diff --git a/tests/test_api/test_client/test_session/test_aiohttp_session.py b/tests/test_api/test_client/test_session/test_aiohttp_session.py index 6dbf213c..14c25ad3 100644 --- a/tests/test_api/test_client/test_session/test_aiohttp_session.py +++ b/tests/test_api/test_client/test_session/test_aiohttp_session.py @@ -15,8 +15,6 @@ from aiogram.methods import Request, TelegramMethod from aiogram.types import UNSET, InputFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class BareInputFile(InputFile): async def read(self, chunk_size: int): 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 51803094..e46981f6 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 @@ -27,8 +27,6 @@ from aiogram.methods import DeleteMessage, GetMe, TelegramMethod from aiogram.types import UNSET, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class CustomSession(BaseSession): async def close(self): diff --git a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py index 33e40992..9772bf2b 100644 --- a/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py +++ b/tests/test_api/test_client/test_session/test_middlewares/test_request_logging.py @@ -1,15 +1,11 @@ import datetime import logging -import pytest - from aiogram.client.session.middlewares.request_logging import RequestLogging from aiogram.methods import GetMe, SendMessage from aiogram.types import Chat, Message, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRequestLogging: async def test_use_middleware(self, bot: MockedBot, caplog): diff --git a/tests/test_api/test_methods/test_add_sticker_to_set.py b/tests/test_api/test_methods/test_add_sticker_to_set.py index 35a08f75..0bc6472c 100644 --- a/tests/test_api/test_methods/test_add_sticker_to_set.py +++ b/tests/test_api/test_methods/test_add_sticker_to_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AddStickerToSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAddStickerToSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_callback_query.py b/tests/test_api/test_methods/test_answer_callback_query.py index f157e86f..54f9e640 100644 --- a/tests/test_api/test_methods/test_answer_callback_query.py +++ b/tests/test_api/test_methods/test_answer_callback_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerCallbackQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerCallbackQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_inline_query.py b/tests/test_api/test_methods/test_answer_inline_query.py index 98227b57..ba7cc938 100644 --- a/tests/test_api/test_methods/test_answer_inline_query.py +++ b/tests/test_api/test_methods/test_answer_inline_query.py @@ -1,12 +1,8 @@ -import pytest - from aiogram import Bot from aiogram.methods import AnswerInlineQuery, Request from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerInlineQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_pre_checkout_query.py b/tests/test_api/test_methods/test_answer_pre_checkout_query.py index 7d0077c7..f15f5beb 100644 --- a/tests/test_api/test_methods/test_answer_pre_checkout_query.py +++ b/tests/test_api/test_methods/test_answer_pre_checkout_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerPreCheckoutQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerPreCheckoutQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_shipping_query.py b/tests/test_api/test_methods/test_answer_shipping_query.py index 1374543e..8a2b5f89 100644 --- a/tests/test_api/test_methods/test_answer_shipping_query.py +++ b/tests/test_api/test_methods/test_answer_shipping_query.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import AnswerShippingQuery, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestAnswerShippingQuery: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_answer_web_app_query.py b/tests/test_api/test_methods/test_answer_web_app_query.py index 8d9848da..713653f1 100644 --- a/tests/test_api/test_methods/test_answer_web_app_query.py +++ b/tests/test_api/test_methods/test_answer_web_app_query.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import AnswerWebAppQuery, Request from aiogram.types import InlineQueryResult, SentWebAppMessage from tests.mocked_bot import MockedBot class TestAnswerWebAppQuery: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) @@ -19,7 +16,6 @@ class TestAnswerWebAppQuery: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) diff --git a/tests/test_api/test_methods/test_approve_chat_join_request.py b/tests/test_api/test_methods/test_approve_chat_join_request.py index 52d6554a..ea81c4ac 100755 --- a/tests/test_api/test_methods/test_approve_chat_join_request.py +++ b/tests/test_api/test_methods/test_approve_chat_join_request.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import ApproveChatJoinRequest, Request from tests.mocked_bot import MockedBot class TestApproveChatJoinRequest: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=True) @@ -17,7 +14,6 @@ class TestApproveChatJoinRequest: assert request.method == "approveChatJoinRequest" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=None) diff --git a/tests/test_api/test_methods/test_ban_chat_member.py b/tests/test_api/test_methods/test_ban_chat_member.py index 73090f40..10464737 100644 --- a/tests/test_api/test_methods/test_ban_chat_member.py +++ b/tests/test_api/test_methods/test_ban_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import BanChatMember, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_ban_chat_sender_chat.py b/tests/test_api/test_methods/test_ban_chat_sender_chat.py index 1d832e87..b93f27a5 100755 --- a/tests/test_api/test_methods/test_ban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_ban_chat_sender_chat.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import BanChatSenderChat, Request from tests.mocked_bot import MockedBot class TestBanChatSenderChat: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) @@ -18,7 +15,6 @@ class TestBanChatSenderChat: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_base.py b/tests/test_api/test_methods/test_base.py index 4dc39946..38306db1 100644 --- a/tests/test_api/test_methods/test_base.py +++ b/tests/test_api/test_methods/test_base.py @@ -6,8 +6,6 @@ from aiogram import Bot from aiogram.methods.base import prepare_parse_mode from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPrepareFile: # TODO: Add tests diff --git a/tests/test_api/test_methods/test_close.py b/tests/test_api/test_methods/test_close.py index c6a84e31..f8f8956b 100644 --- a/tests/test_api/test_methods/test_close.py +++ b/tests/test_api/test_methods/test_close.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Close, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestClose: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_close_forum_topic.py b/tests/test_api/test_methods/test_close_forum_topic.py index a9fa87b3..4857e7a4 100644 --- a/tests/test_api/test_methods/test_close_forum_topic.py +++ b/tests/test_api/test_methods/test_close_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import CloseForumTopic, Request from tests.mocked_bot import MockedBot class TestCloseForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) @@ -18,7 +15,6 @@ class TestCloseForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_close_general_forum_topic.py b/tests/test_api/test_methods/test_close_general_forum_topic.py new file mode 100644 index 00000000..a62ce146 --- /dev/null +++ b/tests/test_api/test_methods/test_close_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import CloseGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestCloseGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(CloseGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "closeGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.close_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "closeGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_copy_message.py b/tests/test_api/test_methods/test_copy_message.py index e844cede..38419c6b 100644 --- a/tests/test_api/test_methods/test_copy_message.py +++ b/tests/test_api/test_methods/test_copy_message.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import CopyMessage, Request from aiogram.types import MessageId from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCopyMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_create_chat_invite_link.py b/tests/test_api/test_methods/test_create_chat_invite_link.py index c07c55bc..cfdca233 100644 --- a/tests/test_api/test_methods/test_create_chat_invite_link.py +++ b/tests/test_api/test_methods/test_create_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import CreateChatInviteLink, Request from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_create_forum_topic.py b/tests/test_api/test_methods/test_create_forum_topic.py index 69f5ff3d..84eaf02e 100644 --- a/tests/test_api/test_methods/test_create_forum_topic.py +++ b/tests/test_api/test_methods/test_create_forum_topic.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import CreateForumTopic, Request from aiogram.types import ForumTopic from tests.mocked_bot import MockedBot class TestCreateForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateForumTopic, @@ -23,7 +20,6 @@ class TestCreateForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateForumTopic, diff --git a/tests/test_api/test_methods/test_create_invoice_link.py b/tests/test_api/test_methods/test_create_invoice_link.py index 2a3e16ac..7909fac9 100644 --- a/tests/test_api/test_methods/test_create_invoice_link.py +++ b/tests/test_api/test_methods/test_create_invoice_link.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import CreateInvoiceLink, Request from aiogram.types import LabeledPrice from tests.mocked_bot import MockedBot class TestCreateInvoiceLink: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" @@ -24,7 +21,6 @@ class TestCreateInvoiceLink: assert request.method == "createInvoiceLink" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" diff --git a/tests/test_api/test_methods/test_create_new_sticker_set.py b/tests/test_api/test_methods/test_create_new_sticker_set.py index 4c927b77..b82b1974 100644 --- a/tests/test_api/test_methods/test_create_new_sticker_set.py +++ b/tests/test_api/test_methods/test_create_new_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import CreateNewStickerSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCreateNewStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_decline_chat_join_request.py b/tests/test_api/test_methods/test_decline_chat_join_request.py index e6e60ca5..549f43d1 100755 --- a/tests/test_api/test_methods/test_decline_chat_join_request.py +++ b/tests/test_api/test_methods/test_decline_chat_join_request.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import DeclineChatJoinRequest, Request from tests.mocked_bot import MockedBot class TestDeclineChatJoinRequest: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) @@ -17,7 +14,6 @@ class TestDeclineChatJoinRequest: assert request.method == "declineChatJoinRequest" assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_delete_chat_photo.py b/tests/test_api/test_methods/test_delete_chat_photo.py index 0f528775..9faaa8bf 100644 --- a/tests/test_api/test_methods/test_delete_chat_photo.py +++ b/tests/test_api/test_methods/test_delete_chat_photo.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteChatPhoto, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_chat_sticker_set.py b/tests/test_api/test_methods/test_delete_chat_sticker_set.py index 8fdb7b84..ae6af449 100644 --- a/tests/test_api/test_methods/test_delete_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_delete_chat_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteChatStickerSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteChatStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_forum_topic.py b/tests/test_api/test_methods/test_delete_forum_topic.py index 773627fe..e0ad6bfd 100644 --- a/tests/test_api/test_methods/test_delete_forum_topic.py +++ b/tests/test_api/test_methods/test_delete_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import DeleteForumTopic, Request from tests.mocked_bot import MockedBot class TestDeleteForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) @@ -18,7 +15,6 @@ class TestDeleteForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_delete_message.py b/tests/test_api/test_methods/test_delete_message.py index ecceb6dd..097496a2 100644 --- a/tests/test_api/test_methods/test_delete_message.py +++ b/tests/test_api/test_methods/test_delete_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteMessage, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_my_commands.py b/tests/test_api/test_methods/test_delete_my_commands.py index 14d36381..c4902ec4 100644 --- a/tests/test_api/test_methods/test_delete_my_commands.py +++ b/tests/test_api/test_methods/test_delete_my_commands.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteMyCommands, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestKickChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_sticker_from_set.py b/tests/test_api/test_methods/test_delete_sticker_from_set.py index c17a5493..bc2a8e79 100644 --- a/tests/test_api/test_methods/test_delete_sticker_from_set.py +++ b/tests/test_api/test_methods/test_delete_sticker_from_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteStickerFromSet, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteStickerFromSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_delete_webhook.py b/tests/test_api/test_methods/test_delete_webhook.py index 21c0fcf7..76591a8a 100644 --- a/tests/test_api/test_methods/test_delete_webhook.py +++ b/tests/test_api/test_methods/test_delete_webhook.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import DeleteWebhook, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestDeleteWebhook: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_chat_invite_link.py b/tests/test_api/test_methods/test_edit_chat_invite_link.py index a1fd6a10..ab71c3ae 100644 --- a/tests/test_api/test_methods/test_edit_chat_invite_link.py +++ b/tests/test_api/test_methods/test_edit_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import EditChatInviteLink, Request from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_forum_topic.py b/tests/test_api/test_methods/test_edit_forum_topic.py index 5441bd9b..98e30166 100644 --- a/tests/test_api/test_methods/test_edit_forum_topic.py +++ b/tests/test_api/test_methods/test_edit_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import EditForumTopic, Request from tests.mocked_bot import MockedBot class TestEditForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) @@ -21,7 +18,6 @@ class TestEditForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_edit_general_forum_topic.py b/tests/test_api/test_methods/test_edit_general_forum_topic.py new file mode 100644 index 00000000..01bff1d6 --- /dev/null +++ b/tests/test_api/test_methods/test_edit_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import EditGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestCloseGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(EditGeneralForumTopic(chat_id=42, name="Test")) + request: Request = bot.get_request() + assert request.method == "editGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.edit_general_forum_topic(chat_id=42, name="Test") + request: Request = bot.get_request() + assert request.method == "editGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_caption.py b/tests/test_api/test_methods/test_edit_message_caption.py index a3afef46..71a7784e 100644 --- a/tests/test_api/test_methods/test_edit_message_caption.py +++ b/tests/test_api/test_methods/test_edit_message_caption.py @@ -1,14 +1,10 @@ import datetime from typing import Union -import pytest - from aiogram.methods import EditMessageCaption, Request from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageCaption: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_live_location.py b/tests/test_api/test_methods/test_edit_message_live_location.py index 32f19b2f..7a2c2f7d 100644 --- a/tests/test_api/test_methods/test_edit_message_live_location.py +++ b/tests/test_api/test_methods/test_edit_message_live_location.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageLiveLocation, Request from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageLiveLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_media.py b/tests/test_api/test_methods/test_edit_message_media.py index bc60e4d5..15594aff 100644 --- a/tests/test_api/test_methods/test_edit_message_media.py +++ b/tests/test_api/test_methods/test_edit_message_media.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageMedia, Request from aiogram.types import BufferedInputFile, InputMediaPhoto, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageMedia: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_reply_markup.py b/tests/test_api/test_methods/test_edit_message_reply_markup.py index 71a1f823..38baa76f 100644 --- a/tests/test_api/test_methods/test_edit_message_reply_markup.py +++ b/tests/test_api/test_methods/test_edit_message_reply_markup.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageReplyMarkup, Request from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageReplyMarkup: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_edit_message_text.py b/tests/test_api/test_methods/test_edit_message_text.py index 5543f62c..1cdfcfe0 100644 --- a/tests/test_api/test_methods/test_edit_message_text.py +++ b/tests/test_api/test_methods/test_edit_message_text.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import EditMessageText, Request from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestEditMessageText: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_export_chat_invite_link.py b/tests/test_api/test_methods/test_export_chat_invite_link.py index fc8b4f13..7e3901a0 100644 --- a/tests/test_api/test_methods/test_export_chat_invite_link.py +++ b/tests/test_api/test_methods/test_export_chat_invite_link.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import ExportChatInviteLink, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestExportChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_forward_message.py b/tests/test_api/test_methods/test_forward_message.py index 94dfdf60..955b6456 100644 --- a/tests/test_api/test_methods/test_forward_message.py +++ b/tests/test_api/test_methods/test_forward_message.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import ForwardMessage, Request from aiogram.types import Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestForwardMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat.py b/tests/test_api/test_methods/test_get_chat.py index f5117d11..c5d4bfcd 100644 --- a/tests/test_api/test_methods/test_get_chat.py +++ b/tests/test_api/test_methods/test_get_chat.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetChat, Request from aiogram.types import Chat from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChat: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_administrators.py b/tests/test_api/test_methods/test_get_chat_administrators.py index e254d34e..945b2e02 100644 --- a/tests/test_api/test_methods/test_get_chat_administrators.py +++ b/tests/test_api/test_methods/test_get_chat_administrators.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetChatAdministrators, Request from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatAdministrators: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_member.py b/tests/test_api/test_methods/test_get_chat_member.py index 35dc98bd..e2fd2a75 100644 --- a/tests/test_api/test_methods/test_get_chat_member.py +++ b/tests/test_api/test_methods/test_get_chat_member.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetChatMember, Request from aiogram.types import ChatMember, ChatMemberOwner, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_member_count.py b/tests/test_api/test_methods/test_get_chat_member_count.py index e0fd1a4a..91a7c514 100644 --- a/tests/test_api/test_methods/test_get_chat_member_count.py +++ b/tests/test_api/test_methods/test_get_chat_member_count.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import GetChatMemberCount, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetChatMembersCount: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_chat_menu_button.py b/tests/test_api/test_methods/test_get_chat_menu_button.py index a7c2fd37..89181d3f 100644 --- a/tests/test_api/test_methods/test_get_chat_menu_button.py +++ b/tests/test_api/test_methods/test_get_chat_menu_button.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import GetChatMenuButton, Request from aiogram.types import MenuButton, MenuButtonDefault from tests.mocked_bot import MockedBot class TestGetChatMenuButton: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) @@ -16,7 +13,6 @@ class TestGetChatMenuButton: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) diff --git a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py index b47bc4c5..fd3ea8ff 100644 --- a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py +++ b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py @@ -1,14 +1,11 @@ from typing import List -import pytest - from aiogram.methods import GetCustomEmojiStickers, Request from aiogram.types import Sticker from tests.mocked_bot import MockedBot class TestGetCustomEmojiStickers: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetCustomEmojiStickers, @@ -35,7 +32,6 @@ class TestGetCustomEmojiStickers: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetCustomEmojiStickers, diff --git a/tests/test_api/test_methods/test_get_file.py b/tests/test_api/test_methods/test_get_file.py index 38923a6e..eb95cd20 100644 --- a/tests/test_api/test_methods/test_get_file.py +++ b/tests/test_api/test_methods/test_get_file.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetFile, Request from aiogram.types import File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetFile: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py index d8233eea..c9a1455a 100644 --- a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py +++ b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py @@ -1,14 +1,11 @@ from typing import List -import pytest - from aiogram.methods import GetForumTopicIconStickers, Request from aiogram.types import Sticker from tests.mocked_bot import MockedBot class TestGetForumTopicIconStickers: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) @@ -18,7 +15,6 @@ class TestGetForumTopicIconStickers: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) diff --git a/tests/test_api/test_methods/test_get_game_high_scores.py b/tests/test_api/test_methods/test_get_game_high_scores.py index bc2c7116..fe84d21d 100644 --- a/tests/test_api/test_methods/test_get_game_high_scores.py +++ b/tests/test_api/test_methods/test_get_game_high_scores.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetGameHighScores, Request from aiogram.types import GameHighScore, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetGameHighScores: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_me.py b/tests/test_api/test_methods/test_get_me.py index ba51e6a6..70f274ec 100644 --- a/tests/test_api/test_methods/test_get_me.py +++ b/tests/test_api/test_methods/test_get_me.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetMe, Request from aiogram.types import User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMe: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_commands.py b/tests/test_api/test_methods/test_get_my_commands.py index a28ef026..c627ff11 100644 --- a/tests/test_api/test_methods/test_get_my_commands.py +++ b/tests/test_api/test_methods/test_get_my_commands.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetMyCommands, Request from aiogram.types import BotCommand from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetMyCommands: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py index 179b468d..7e843686 100644 --- a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py @@ -1,12 +1,9 @@ -import pytest - from aiogram.methods import GetMyDefaultAdministratorRights, Request from aiogram.types import ChatAdministratorRights from tests.mocked_bot import MockedBot class TestGetMyDefaultAdministratorRights: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDefaultAdministratorRights, @@ -29,7 +26,6 @@ class TestGetMyDefaultAdministratorRights: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDefaultAdministratorRights, diff --git a/tests/test_api/test_methods/test_get_sticker_set.py b/tests/test_api/test_methods/test_get_sticker_set.py index 377a81c0..d8e7ca45 100644 --- a/tests/test_api/test_methods/test_get_sticker_set.py +++ b/tests/test_api/test_methods/test_get_sticker_set.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetStickerSet, Request from aiogram.types import Sticker, StickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_updates.py b/tests/test_api/test_methods/test_get_updates.py index 8f8dfa87..b4cd11b9 100644 --- a/tests/test_api/test_methods/test_get_updates.py +++ b/tests/test_api/test_methods/test_get_updates.py @@ -1,13 +1,9 @@ from typing import List -import pytest - from aiogram.methods import GetUpdates, Request from aiogram.types import Update from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUpdates: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_user_profile_photos.py b/tests/test_api/test_methods/test_get_user_profile_photos.py index d6094eb9..cbfd0dbc 100644 --- a/tests/test_api/test_methods/test_get_user_profile_photos.py +++ b/tests/test_api/test_methods/test_get_user_profile_photos.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetUserProfilePhotos, Request from aiogram.types import PhotoSize, UserProfilePhotos from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetUserProfilePhotos: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_webhook_info.py b/tests/test_api/test_methods/test_get_webhook_info.py index f50213cb..06d11dbc 100644 --- a/tests/test_api/test_methods/test_get_webhook_info.py +++ b/tests/test_api/test_methods/test_get_webhook_info.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import GetWebhookInfo, Request from aiogram.types import WebhookInfo from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestGetWebhookInfo: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_hide_general_forum_topic.py b/tests/test_api/test_methods/test_hide_general_forum_topic.py new file mode 100644 index 00000000..51e6684b --- /dev/null +++ b/tests/test_api/test_methods/test_hide_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import HideGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestHideGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(HideGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "hideGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.hide_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "hideGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_leave_chat.py b/tests/test_api/test_methods/test_leave_chat.py index 77bf739f..db771a7d 100644 --- a/tests/test_api/test_methods/test_leave_chat.py +++ b/tests/test_api/test_methods/test_leave_chat.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import LeaveChat, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLeaveChat: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_log_out.py b/tests/test_api/test_methods/test_log_out.py index b472da50..fd09d116 100644 --- a/tests/test_api/test_methods/test_log_out.py +++ b/tests/test_api/test_methods/test_log_out.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import LogOut, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestLogOut: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_pin_chat_message.py b/tests/test_api/test_methods/test_pin_chat_message.py index 59a2bf91..f74cd4cd 100644 --- a/tests/test_api/test_methods/test_pin_chat_message.py +++ b/tests/test_api/test_methods/test_pin_chat_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import PinChatMessage, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPinChatMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_promote_chat_member.py b/tests/test_api/test_methods/test_promote_chat_member.py index 20c796bd..6721eb1f 100644 --- a/tests/test_api/test_methods/test_promote_chat_member.py +++ b/tests/test_api/test_methods/test_promote_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import PromoteChatMember, Request from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestPromoteChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_reopen_forum_topic.py b/tests/test_api/test_methods/test_reopen_forum_topic.py index 9fe47eac..2c4a33b2 100644 --- a/tests/test_api/test_methods/test_reopen_forum_topic.py +++ b/tests/test_api/test_methods/test_reopen_forum_topic.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import ReopenForumTopic, Request from tests.mocked_bot import MockedBot class TestReopenForumTopic: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) @@ -18,7 +15,6 @@ class TestReopenForumTopic: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) diff --git a/tests/test_api/test_methods/test_reopen_general_forum_topic.py b/tests/test_api/test_methods/test_reopen_general_forum_topic.py new file mode 100644 index 00000000..af1abf55 --- /dev/null +++ b/tests/test_api/test_methods/test_reopen_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import ReopenGeneralForumTopic, Request +from tests.mocked_bot import MockedBot + + +class TestReopenGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(ReopenGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "reopenGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.reopen_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "reopenGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_restrict_chat_member.py b/tests/test_api/test_methods/test_restrict_chat_member.py index 715d0c28..ca9ee4c8 100644 --- a/tests/test_api/test_methods/test_restrict_chat_member.py +++ b/tests/test_api/test_methods/test_restrict_chat_member.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, RestrictChatMember from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRestrictChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_revoke_chat_invite_link.py b/tests/test_api/test_methods/test_revoke_chat_invite_link.py index b26b5d11..84ca46b5 100644 --- a/tests/test_api/test_methods/test_revoke_chat_invite_link.py +++ b/tests/test_api/test_methods/test_revoke_chat_invite_link.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, RevokeChatInviteLink from aiogram.types import ChatInviteLink, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestRevokeChatInviteLink: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_animation.py b/tests/test_api/test_methods/test_send_animation.py index 9a123f1a..5ec7f52a 100644 --- a/tests/test_api/test_methods/test_send_animation.py +++ b/tests/test_api/test_methods/test_send_animation.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendAnimation from aiogram.types import Animation, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAnimation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_audio.py b/tests/test_api/test_methods/test_send_audio.py index 77ad22f7..95621f10 100644 --- a/tests/test_api/test_methods/test_send_audio.py +++ b/tests/test_api/test_methods/test_send_audio.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendAudio from aiogram.types import Audio, Chat, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendAudio: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_chat_action.py b/tests/test_api/test_methods/test_send_chat_action.py index 41f9e3e4..a37568fe 100644 --- a/tests/test_api/test_methods/test_send_chat_action.py +++ b/tests/test_api/test_methods/test_send_chat_action.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.enums import ChatAction from aiogram.methods import Request, SendChatAction from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendChatAction: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_contact.py b/tests/test_api/test_methods/test_send_contact.py index adfb697e..97f6981c 100644 --- a/tests/test_api/test_methods/test_send_contact.py +++ b/tests/test_api/test_methods/test_send_contact.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendContact from aiogram.types import Chat, Contact, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendContact: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_dice.py b/tests/test_api/test_methods/test_send_dice.py index 80e618ac..3dea06c4 100644 --- a/tests/test_api/test_methods/test_send_dice.py +++ b/tests/test_api/test_methods/test_send_dice.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SendDice from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_document.py b/tests/test_api/test_methods/test_send_document.py index 106e1737..cf758815 100644 --- a/tests/test_api/test_methods/test_send_document.py +++ b/tests/test_api/test_methods/test_send_document.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendDocument from aiogram.types import Chat, Document, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendDocument: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_game.py b/tests/test_api/test_methods/test_send_game.py index fca6753c..57ab645f 100644 --- a/tests/test_api/test_methods/test_send_game.py +++ b/tests/test_api/test_methods/test_send_game.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendGame from aiogram.types import Chat, Game, Message, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendGame: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_invoice.py b/tests/test_api/test_methods/test_send_invoice.py index 6915fcc5..e88d9acf 100644 --- a/tests/test_api/test_methods/test_send_invoice.py +++ b/tests/test_api/test_methods/test_send_invoice.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendInvoice from aiogram.types import Chat, Invoice, LabeledPrice, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendInvoice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_location.py b/tests/test_api/test_methods/test_send_location.py index 0f42cf74..7429f0b8 100644 --- a/tests/test_api/test_methods/test_send_location.py +++ b/tests/test_api/test_methods/test_send_location.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendLocation from aiogram.types import Chat, Location, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_media_group.py b/tests/test_api/test_methods/test_send_media_group.py index 5b6dc3e1..149937d4 100644 --- a/tests/test_api/test_methods/test_send_media_group.py +++ b/tests/test_api/test_methods/test_send_media_group.py @@ -1,8 +1,6 @@ import datetime from typing import List -import pytest - from aiogram.methods import Request, SendMediaGroup from aiogram.types import ( BufferedInputFile, @@ -15,8 +13,6 @@ from aiogram.types import ( ) from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMediaGroup: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_message.py b/tests/test_api/test_methods/test_send_message.py index 35324f34..5ebe604a 100644 --- a/tests/test_api/test_methods/test_send_message.py +++ b/tests/test_api/test_methods/test_send_message.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendMessage from aiogram.types import Chat, ForceReply, Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_photo.py b/tests/test_api/test_methods/test_send_photo.py index c55565f3..0e955dd1 100644 --- a/tests/test_api/test_methods/test_send_photo.py +++ b/tests/test_api/test_methods/test_send_photo.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendPhoto from aiogram.types import Chat, Message, PhotoSize from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_poll.py b/tests/test_api/test_methods/test_send_poll.py index 5cbb3c75..9f67af14 100644 --- a/tests/test_api/test_methods/test_send_poll.py +++ b/tests/test_api/test_methods/test_send_poll.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendPoll from aiogram.types import Chat, Message, Poll, PollOption from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendPoll: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_sticker.py b/tests/test_api/test_methods/test_send_sticker.py index 33bce785..b19313fc 100644 --- a/tests/test_api/test_methods/test_send_sticker.py +++ b/tests/test_api/test_methods/test_send_sticker.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendSticker from aiogram.types import Chat, Message, Sticker from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendSticker: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_venue.py b/tests/test_api/test_methods/test_send_venue.py index 2f046196..6a529fcb 100644 --- a/tests/test_api/test_methods/test_send_venue.py +++ b/tests/test_api/test_methods/test_send_venue.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVenue from aiogram.types import Chat, Location, Message, Venue from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVenue: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_video.py b/tests/test_api/test_methods/test_send_video.py index cb1c1222..86e3c413 100644 --- a/tests/test_api/test_methods/test_send_video.py +++ b/tests/test_api/test_methods/test_send_video.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVideo from aiogram.types import Chat, Message, Video from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVideo: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_video_note.py b/tests/test_api/test_methods/test_send_video_note.py index 63c5bd84..e9afee41 100644 --- a/tests/test_api/test_methods/test_send_video_note.py +++ b/tests/test_api/test_methods/test_send_video_note.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVideoNote from aiogram.types import BufferedInputFile, Chat, Message, VideoNote from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVideoNote: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_send_voice.py b/tests/test_api/test_methods/test_send_voice.py index ee3894cd..917a645b 100644 --- a/tests/test_api/test_methods/test_send_voice.py +++ b/tests/test_api/test_methods/test_send_voice.py @@ -1,13 +1,9 @@ import datetime -import pytest - from aiogram.methods import Request, SendVoice from aiogram.types import Chat, Message, Voice from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSendVoice: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py index 968c805b..7581e37d 100644 --- a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py +++ b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatAdministratorCustomTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_description.py b/tests/test_api/test_methods/test_set_chat_description.py index 36d05cec..0a11d7e3 100644 --- a/tests/test_api/test_methods/test_set_chat_description.py +++ b/tests/test_api/test_methods/test_set_chat_description.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatDescription from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatDescription: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_menu_button.py b/tests/test_api/test_methods/test_set_chat_menu_button.py index 97e2fa90..74923a5f 100644 --- a/tests/test_api/test_methods/test_set_chat_menu_button.py +++ b/tests/test_api/test_methods/test_set_chat_menu_button.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, SetChatMenuButton from tests.mocked_bot import MockedBot class TestSetChatMenuButton: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) @@ -15,7 +12,6 @@ class TestSetChatMenuButton: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_set_chat_permissions.py b/tests/test_api/test_methods/test_set_chat_permissions.py index a0278b80..73f488c1 100644 --- a/tests/test_api/test_methods/test_set_chat_permissions.py +++ b/tests/test_api/test_methods/test_set_chat_permissions.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetChatPermissions from aiogram.types import ChatPermissions from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPermissions: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_photo.py b/tests/test_api/test_methods/test_set_chat_photo.py index 268f668b..e17126f6 100644 --- a/tests/test_api/test_methods/test_set_chat_photo.py +++ b/tests/test_api/test_methods/test_set_chat_photo.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetChatPhoto from aiogram.types import BufferedInputFile from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatPhoto: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_sticker_set.py b/tests/test_api/test_methods/test_set_chat_sticker_set.py index 311b2dd8..cba3ba1f 100644 --- a/tests/test_api/test_methods/test_set_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_set_chat_sticker_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatStickerSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatStickerSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_chat_title.py b/tests/test_api/test_methods/test_set_chat_title.py index 01558d84..03f37b15 100644 --- a/tests/test_api/test_methods/test_set_chat_title.py +++ b/tests/test_api/test_methods/test_set_chat_title.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetChatTitle from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetChatTitle: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_game_score.py b/tests/test_api/test_methods/test_set_game_score.py index c8177625..4e739a89 100644 --- a/tests/test_api/test_methods/test_set_game_score.py +++ b/tests/test_api/test_methods/test_set_game_score.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import Request, SetGameScore from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetGameScore: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_my_commands.py b/tests/test_api/test_methods/test_set_my_commands.py index ec08bbc3..35f62e0c 100644 --- a/tests/test_api/test_methods/test_set_my_commands.py +++ b/tests/test_api/test_methods/test_set_my_commands.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetMyCommands from aiogram.types import BotCommand from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetMyCommands: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py index 4bd08822..eb24a531 100644 --- a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, SetMyDefaultAdministratorRights from tests.mocked_bot import MockedBot class TestSetMyDefaultAdministratorRights: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) @@ -15,7 +12,6 @@ class TestSetMyDefaultAdministratorRights: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_set_passport_data_errors.py b/tests/test_api/test_methods/test_set_passport_data_errors.py index fba464f7..cdc77778 100644 --- a/tests/test_api/test_methods/test_set_passport_data_errors.py +++ b/tests/test_api/test_methods/test_set_passport_data_errors.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, SetPassportDataErrors from aiogram.types import PassportElementError from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetPassportDataErrors: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_sticker_position_in_set.py b/tests/test_api/test_methods/test_set_sticker_position_in_set.py index 4de83feb..c67c7be5 100644 --- a/tests/test_api/test_methods/test_set_sticker_position_in_set.py +++ b/tests/test_api/test_methods/test_set_sticker_position_in_set.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetStickerPositionInSet from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetStickerPositionInSet: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumb.py b/tests/test_api/test_methods/test_set_sticker_set_thumb.py index 2ded22ee..ca1b596a 100644 --- a/tests/test_api/test_methods/test_set_sticker_set_thumb.py +++ b/tests/test_api/test_methods/test_set_sticker_set_thumb.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetStickerSetThumb from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetStickerSetThumb: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_set_webhook.py b/tests/test_api/test_methods/test_set_webhook.py index 48a67c73..cfa291c3 100644 --- a/tests/test_api/test_methods/test_set_webhook.py +++ b/tests/test_api/test_methods/test_set_webhook.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, SetWebhook from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestSetWebhook: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_stop_message_live_location.py b/tests/test_api/test_methods/test_stop_message_live_location.py index 4d34795b..2c1168f1 100644 --- a/tests/test_api/test_methods/test_stop_message_live_location.py +++ b/tests/test_api/test_methods/test_stop_message_live_location.py @@ -1,13 +1,9 @@ from typing import Union -import pytest - from aiogram.methods import Request, StopMessageLiveLocation from aiogram.types import Message from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopMessageLiveLocation: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_stop_poll.py b/tests/test_api/test_methods/test_stop_poll.py index e3b83bc1..7601c771 100644 --- a/tests/test_api/test_methods/test_stop_poll.py +++ b/tests/test_api/test_methods/test_stop_poll.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, StopPoll from aiogram.types import Poll, PollOption from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestStopPoll: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unban_chat_member.py b/tests/test_api/test_methods/test_unban_chat_member.py index 0139b9de..72ba662c 100644 --- a/tests/test_api/test_methods/test_unban_chat_member.py +++ b/tests/test_api/test_methods/test_unban_chat_member.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnbanChatMember from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnbanChatMember: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unban_chat_sender_chat.py b/tests/test_api/test_methods/test_unban_chat_sender_chat.py index 4f80a5e1..4a259c62 100755 --- a/tests/test_api/test_methods/test_unban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_unban_chat_sender_chat.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, UnbanChatSenderChat from tests.mocked_bot import MockedBot class TestUnbanChatSenderChat: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) @@ -18,7 +15,6 @@ class TestUnbanChatSenderChat: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_unhide_general_forum_topic.py b/tests/test_api/test_methods/test_unhide_general_forum_topic.py new file mode 100644 index 00000000..45fcb0c8 --- /dev/null +++ b/tests/test_api/test_methods/test_unhide_general_forum_topic.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, UnhideGeneralForumTopic +from tests.mocked_bot import MockedBot + + +class TestUnhideGeneralForumTopic: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot(UnhideGeneralForumTopic(chat_id=42)) + request: Request = bot.get_request() + assert request.method == "unhideGeneralForumTopic" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) + + response: bool = await bot.unhide_general_forum_topic(chat_id=42) + request: Request = bot.get_request() + assert request.method == "unhideGeneralForumTopic" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_all_chat_messages.py b/tests/test_api/test_methods/test_unpin_all_chat_messages.py index 24d90171..82202742 100644 --- a/tests/test_api/test_methods/test_unpin_all_chat_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_chat_messages.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnpinAllChatMessages from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinAllChatMessages: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py index eaf64b69..445f2b4c 100644 --- a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py @@ -1,11 +1,8 @@ -import pytest - from aiogram.methods import Request, UnpinAllForumTopicMessages from tests.mocked_bot import MockedBot class TestUnpinAllForumTopicMessages: - @pytest.mark.asyncio async def test_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) @@ -18,7 +15,6 @@ class TestUnpinAllForumTopicMessages: # assert request.data == {} assert response == prepare_result.result - @pytest.mark.asyncio async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) diff --git a/tests/test_api/test_methods/test_unpin_chat_message.py b/tests/test_api/test_methods/test_unpin_chat_message.py index 7a0bca41..52f8765a 100644 --- a/tests/test_api/test_methods/test_unpin_chat_message.py +++ b/tests/test_api/test_methods/test_unpin_chat_message.py @@ -1,10 +1,6 @@ -import pytest - from aiogram.methods import Request, UnpinChatMessage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUnpinChatMessage: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_upload_sticker_file.py b/tests/test_api/test_methods/test_upload_sticker_file.py index 2a7b14ea..f8332815 100644 --- a/tests/test_api/test_methods/test_upload_sticker_file.py +++ b/tests/test_api/test_methods/test_upload_sticker_file.py @@ -1,11 +1,7 @@ -import pytest - from aiogram.methods import Request, UploadStickerFile from aiogram.types import BufferedInputFile, File from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestUploadStickerFile: async def test_method(self, bot: MockedBot): diff --git a/tests/test_api/test_types/test_input_file.py b/tests/test_api/test_types/test_input_file.py index 9317158e..05391a8e 100644 --- a/tests/test_api/test_types/test_input_file.py +++ b/tests/test_api/test_types/test_input_file.py @@ -1,13 +1,10 @@ from typing import AsyncIterable -import pytest from aresponses import ResponsesMockServer from aiogram import Bot from aiogram.types import BufferedInputFile, FSInputFile, InputFile, URLInputFile -pytestmark = pytest.mark.asyncio - class TestInputFile: def test_fs_input_file(self): diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 5f06ef52..7c70ef68 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -34,8 +34,6 @@ from aiogram.types import ( from aiogram.types.error_event import ErrorEvent from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - async def simple_message_handler(message: Message): await asyncio.sleep(0.2) diff --git a/tests/test_dispatcher/test_event/test_event.py b/tests/test_dispatcher/test_event/test_event.py index c8f32212..3b35579c 100644 --- a/tests/test_dispatcher/test_event/test_event.py +++ b/tests/test_dispatcher/test_event/test_event.py @@ -7,8 +7,6 @@ import pytest from aiogram.dispatcher.event.event import EventObserver from aiogram.dispatcher.event.handler import HandlerObject -pytestmark = pytest.mark.asyncio - async def my_handler(value: str, index: int = 0) -> Any: return value diff --git a/tests/test_dispatcher/test_event/test_handler.py b/tests/test_dispatcher/test_event/test_handler.py index 1c787b3c..f7000d8e 100644 --- a/tests/test_dispatcher/test_event/test_handler.py +++ b/tests/test_dispatcher/test_event/test_handler.py @@ -11,8 +11,6 @@ from aiogram.handlers import BaseHandler from aiogram.types import Update from aiogram.utils.warnings import Recommendation -pytestmark = pytest.mark.asyncio - def callback1(foo: int, bar: int, baz: int): return locals() diff --git a/tests/test_dispatcher/test_event/test_telegram.py b/tests/test_dispatcher/test_event/test_telegram.py index 004cfa06..37f66357 100644 --- a/tests/test_dispatcher/test_event/test_telegram.py +++ b/tests/test_dispatcher/test_event/test_telegram.py @@ -12,9 +12,6 @@ from aiogram.dispatcher.router import Router from aiogram.filters import Filter from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - - # TODO: Test middlewares in routers tree diff --git a/tests/test_dispatcher/test_middlewares/test_user_context.py b/tests/test_dispatcher/test_middlewares/test_user_context.py index 8d289c2b..ca2abb2d 100644 --- a/tests/test_dispatcher/test_middlewares/test_user_context.py +++ b/tests/test_dispatcher/test_middlewares/test_user_context.py @@ -8,7 +8,6 @@ async def next_handler(*args, **kwargs): class TestUserContextMiddleware: - @pytest.mark.asyncio async def test_unexpected_event_type(self): with pytest.raises(RuntimeError): await UserContextMiddleware()(next_handler, object(), {}) diff --git a/tests/test_dispatcher/test_router.py b/tests/test_dispatcher/test_router.py index 66fac6c1..673bb46d 100644 --- a/tests/test_dispatcher/test_router.py +++ b/tests/test_dispatcher/test_router.py @@ -3,8 +3,6 @@ import pytest from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler, skip from aiogram.dispatcher.router import Router -pytestmark = pytest.mark.asyncio - class TestRouter: def test_including_routers(self): diff --git a/tests/test_filters/test_base.py b/tests/test_filters/test_base.py index 82780c56..36d5bbee 100644 --- a/tests/test_filters/test_base.py +++ b/tests/test_filters/test_base.py @@ -1,12 +1,8 @@ from typing import Awaitable from unittest.mock import AsyncMock, patch -import pytest - from aiogram.filters import Filter -pytestmark = pytest.mark.asyncio - class MyFilter(Filter): async def __call__(self, event: str): diff --git a/tests/test_filters/test_callback_data.py b/tests/test_filters/test_callback_data.py index 98e11357..70388689 100644 --- a/tests/test_filters/test_callback_data.py +++ b/tests/test_filters/test_callback_data.py @@ -12,8 +12,6 @@ from aiogram import F from aiogram.filters.callback_data import CallbackData from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class MyIntEnum(Enum): FOO = auto() diff --git a/tests/test_filters/test_chat_member_updated.py b/tests/test_filters/test_chat_member_updated.py index 42386a55..17b38762 100644 --- a/tests/test_filters/test_chat_member_updated.py +++ b/tests/test_filters/test_chat_member_updated.py @@ -267,7 +267,6 @@ class TestMemberStatusTransition: class TestChatMemberUpdatedStatusFilter: - @pytest.mark.asyncio @pytest.mark.parametrize( "transition,old,new,result", [ diff --git a/tests/test_filters/test_command.py b/tests/test_filters/test_command.py index d5301e33..1bb7d0a4 100644 --- a/tests/test_filters/test_command.py +++ b/tests/test_filters/test_command.py @@ -9,8 +9,6 @@ from aiogram.filters.command import CommandStart from aiogram.types import BotCommand, Chat, Message, User from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestCommandFilter: def test_commands_not_iterable(self): diff --git a/tests/test_filters/test_exception.py b/tests/test_filters/test_exception.py index 2480e76c..be056b72 100644 --- a/tests/test_filters/test_exception.py +++ b/tests/test_filters/test_exception.py @@ -7,8 +7,6 @@ from aiogram.filters import ExceptionMessageFilter, ExceptionTypeFilter from aiogram.types import Update from aiogram.types.error_event import ErrorEvent -pytestmark = pytest.mark.asyncio - class TestExceptionMessageFilter: @pytest.mark.parametrize("value", ["value", re.compile("value")]) diff --git a/tests/test_filters/test_magic_data.py b/tests/test_filters/test_magic_data.py index 1cf538c2..efc12a5f 100644 --- a/tests/test_filters/test_magic_data.py +++ b/tests/test_filters/test_magic_data.py @@ -1,4 +1,3 @@ -import pytest from magic_filter import AttrDict from aiogram import F @@ -7,7 +6,6 @@ from aiogram.types import Update class TestMagicDataFilter: - @pytest.mark.asyncio async def test_call(self): called = False diff --git a/tests/test_filters/test_state.py b/tests/test_filters/test_state.py index 2d14ab35..16124ef9 100644 --- a/tests/test_filters/test_state.py +++ b/tests/test_filters/test_state.py @@ -8,8 +8,6 @@ from aiogram.filters import StateFilter from aiogram.fsm.state import State, StatesGroup from aiogram.types import Update -pytestmark = pytest.mark.asyncio - class MyGroup(StatesGroup): state = State() @@ -40,7 +38,6 @@ class TestStateFilter: [[MyGroup, State("state")], "state", False], ], ) - @pytestmark async def test_filter(self, state, current_state, result): f = StateFilter(*state) assert bool(await f(obj=Update(update_id=42), raw_state=current_state)) is result @@ -49,11 +46,9 @@ class TestStateFilter: with pytest.raises(ValueError): StateFilter() - @pytestmark async def test_create_filter_from_state(self): FilterObject(callback=State(state="state")) - @pytestmark async def test_state_copy(self): class SG(StatesGroup): state = State() diff --git a/tests/test_filters/test_text.py b/tests/test_filters/test_text.py index fd33b02e..5d84081a 100644 --- a/tests/test_filters/test_text.py +++ b/tests/test_filters/test_text.py @@ -7,8 +7,6 @@ import pytest from aiogram.filters import Text from aiogram.types import CallbackQuery, Chat, InlineQuery, Message, Poll, PollOption, User -pytestmark = pytest.mark.asyncio - class TestText: @pytest.mark.parametrize( diff --git a/tests/test_fsm/storage/test_isolation.py b/tests/test_fsm/storage/test_isolation.py index 5f20a3c9..042cc305 100644 --- a/tests/test_fsm/storage/test_isolation.py +++ b/tests/test_fsm/storage/test_isolation.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import BaseEventIsolation, StorageKey from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture(name="storage_key") def create_storate_key(bot: MockedBot): diff --git a/tests/test_fsm/storage/test_redis.py b/tests/test_fsm/storage/test_redis.py index 9d10e295..8d320e27 100644 --- a/tests/test_fsm/storage/test_redis.py +++ b/tests/test_fsm/storage/test_redis.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import DEFAULT_DESTINY, StorageKey from aiogram.fsm.storage.redis import DefaultKeyBuilder, RedisEventIsolation, RedisStorage -pytestmark = pytest.mark.asyncio - PREFIX = "test" BOT_ID = 42 CHAT_ID = -1 diff --git a/tests/test_fsm/storage/test_storages.py b/tests/test_fsm/storage/test_storages.py index ac456251..83871722 100644 --- a/tests/test_fsm/storage/test_storages.py +++ b/tests/test_fsm/storage/test_storages.py @@ -3,8 +3,6 @@ import pytest from aiogram.fsm.storage.base import BaseStorage, StorageKey from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture(name="storage_key") def create_storate_key(bot: MockedBot): diff --git a/tests/test_fsm/test_context.py b/tests/test_fsm/test_context.py index 836c2081..5c31373c 100644 --- a/tests/test_fsm/test_context.py +++ b/tests/test_fsm/test_context.py @@ -5,8 +5,6 @@ from aiogram.fsm.storage.base import StorageKey from aiogram.fsm.storage.memory import MemoryStorage from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - @pytest.fixture() def state(bot: MockedBot): diff --git a/tests/test_handler/test_base.py b/tests/test_handler/test_base.py index 96cdea00..f79a6a6b 100644 --- a/tests/test_handler/test_base.py +++ b/tests/test_handler/test_base.py @@ -10,8 +10,6 @@ from aiogram.dispatcher.event.handler import HandlerObject from aiogram.handlers import BaseHandler from aiogram.types import Chat, Message, Update -pytestmark = pytest.mark.asyncio - class MyHandler(BaseHandler): async def handle(self) -> Any: diff --git a/tests/test_handler/test_callback_query.py b/tests/test_handler/test_callback_query.py index 345d098f..93ac9498 100644 --- a/tests/test_handler/test_callback_query.py +++ b/tests/test_handler/test_callback_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import CallbackQueryHandler from aiogram.types import CallbackQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_chat_member.py b/tests/test_handler/test_chat_member.py index 85562c7c..f343b247 100644 --- a/tests/test_handler/test_chat_member.py +++ b/tests/test_handler/test_chat_member.py @@ -1,13 +1,9 @@ import datetime from typing import Any -import pytest - from aiogram.handlers import ChatMemberHandler from aiogram.types import Chat, ChatMemberMember, ChatMemberUpdated, User -pytestmark = pytest.mark.asyncio - class TestChatMemberUpdated: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_chosen_inline_result.py b/tests/test_handler/test_chosen_inline_result.py index 3e1c09bc..62ac8aa7 100644 --- a/tests/test_handler/test_chosen_inline_result.py +++ b/tests/test_handler/test_chosen_inline_result.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import ChosenInlineResultHandler from aiogram.types import ChosenInlineResult, User -pytestmark = pytest.mark.asyncio - class TestChosenInlineResultHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_error.py b/tests/test_handler/test_error.py index 4d1dc3aa..fb9d88bf 100644 --- a/tests/test_handler/test_error.py +++ b/tests/test_handler/test_error.py @@ -1,11 +1,7 @@ from typing import Any -import pytest - from aiogram.handlers import ErrorHandler -pytestmark = pytest.mark.asyncio - class TestErrorHandler: async def test_extensions(self): diff --git a/tests/test_handler/test_inline_query.py b/tests/test_handler/test_inline_query.py index 8201db33..d1bb7037 100644 --- a/tests/test_handler/test_inline_query.py +++ b/tests/test_handler/test_inline_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import InlineQueryHandler from aiogram.types import InlineQuery, User -pytestmark = pytest.mark.asyncio - class TestCallbackQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_message.py b/tests/test_handler/test_message.py index eef3be01..7b5581a4 100644 --- a/tests/test_handler/test_message.py +++ b/tests/test_handler/test_message.py @@ -1,14 +1,10 @@ import datetime from typing import Any -import pytest - from aiogram.filters import CommandObject from aiogram.handlers import MessageHandler, MessageHandlerCommandMixin from aiogram.types import Chat, Message, User -pytestmark = pytest.mark.asyncio - class MyHandler(MessageHandler): async def handle(self) -> Any: diff --git a/tests/test_handler/test_poll.py b/tests/test_handler/test_poll.py index 4d4c2835..b070874d 100644 --- a/tests/test_handler/test_poll.py +++ b/tests/test_handler/test_poll.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import PollHandler from aiogram.types import Poll, PollOption -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_pre_checkout_query.py b/tests/test_handler/test_pre_checkout_query.py index 26b26f81..c764bf91 100644 --- a/tests/test_handler/test_pre_checkout_query.py +++ b/tests/test_handler/test_pre_checkout_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import PreCheckoutQueryHandler from aiogram.types import PreCheckoutQuery, User -pytestmark = pytest.mark.asyncio - class TestPreCheckoutQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_handler/test_shipping_query.py b/tests/test_handler/test_shipping_query.py index 7113cdef..51ba6b96 100644 --- a/tests/test_handler/test_shipping_query.py +++ b/tests/test_handler/test_shipping_query.py @@ -1,12 +1,8 @@ from typing import Any -import pytest - from aiogram.handlers import ShippingQueryHandler from aiogram.types import ShippingAddress, ShippingQuery, User -pytestmark = pytest.mark.asyncio - class TestShippingQueryHandler: async def test_attributes_aliases(self): diff --git a/tests/test_utils/test_backoff.py b/tests/test_utils/test_backoff.py index b409e22a..57e7269f 100644 --- a/tests/test_utils/test_backoff.py +++ b/tests/test_utils/test_backoff.py @@ -3,7 +3,6 @@ import pytest from aiogram.utils.backoff import Backoff, BackoffConfig BACKOFF_CONFIG = BackoffConfig(min_delay=0.1, max_delay=1.0, factor=2.0, jitter=0.0) -pytestmark = pytest.mark.asyncio class TestBackoffConfig: diff --git a/tests/test_utils/test_chat_action.py b/tests/test_utils/test_chat_action.py index 21182968..517b8e90 100644 --- a/tests/test_utils/test_chat_action.py +++ b/tests/test_utils/test_chat_action.py @@ -11,8 +11,6 @@ from aiogram.types import Chat, Message, User from aiogram.utils.chat_action import ChatActionMiddleware, ChatActionSender from tests.mocked_bot import MockedBot -pytestmark = pytest.mark.asyncio - class TestChatActionSender: async def test_wait(self, bot: Bot, loop: asyncio.BaseEventLoop): diff --git a/tests/test_utils/test_deep_linking.py b/tests/test_utils/test_deep_linking.py index 78dce6a3..3c1dbec2 100644 --- a/tests/test_utils/test_deep_linking.py +++ b/tests/test_utils/test_deep_linking.py @@ -22,8 +22,6 @@ WRONG_PAYLOADS = [ 1234567890123456789.0, ] -pytestmark = pytest.mark.asyncio - @pytest.fixture(params=PAYLOADS, name="payload") def payload_fixture(request): diff --git a/tests/test_utils/test_i18n.py b/tests/test_utils/test_i18n.py index aa6f9516..d31dac9e 100644 --- a/tests/test_utils/test_i18n.py +++ b/tests/test_utils/test_i18n.py @@ -87,7 +87,6 @@ async def next_call(event, data): return gettext("test") -@pytest.mark.asyncio class TestSimpleI18nMiddleware: @pytest.mark.parametrize( "event_from_user,result", @@ -133,7 +132,6 @@ class TestSimpleI18nMiddleware: assert locale == i18n.default_locale -@pytest.mark.asyncio class TestConstI18nMiddleware: async def test_middleware(self, i18n: I18n): middleware = ConstI18nMiddleware(i18n=i18n, locale="uk") @@ -145,7 +143,6 @@ class TestConstI18nMiddleware: assert result == "тест" -@pytest.mark.asyncio class TestFSMI18nMiddleware: async def test_middleware(self, i18n: I18n, bot: MockedBot): middleware = FSMI18nMiddleware(i18n=i18n) From c5f35694718a6b45f3a107440eb5ee5002bba5fa Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 7 Jan 2023 22:41:36 +0200 Subject: [PATCH 07/42] Update from API docs --- .butcher/methods/editForumTopic/entity.json | 6 +++--- .butcher/methods/getChatMember/entity.json | 6 +++--- .butcher/schema/schema.json | 12 ++++++------ aiogram/client/bot.py | 4 ++-- aiogram/methods/edit_forum_topic.py | 2 +- aiogram/methods/get_chat_member.py | 2 +- aiogram/types/chat.py | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.butcher/methods/editForumTopic/entity.json b/.butcher/methods/editForumTopic/entity.json index 57bd3d5b..8b65f5c9 100644 --- a/.butcher/methods/editForumTopic/entity.json +++ b/.butcher/methods/editForumTopic/entity.json @@ -32,9 +32,9 @@ { "type": "String", "required": false, - "description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", - "html_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", - "rst_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept\n", + "description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept\n", "name": "name" }, { diff --git a/.butcher/methods/getChatMember/entity.json b/.butcher/methods/getChatMember/entity.json index b33af127..57a4e1c2 100644 --- a/.butcher/methods/getChatMember/entity.json +++ b/.butcher/methods/getChatMember/entity.json @@ -9,9 +9,9 @@ "object": { "anchor": "getchatmember", "name": "getChatMember", - "description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.", - "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", - "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index b79d08ae..1594155f 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -7282,9 +7282,9 @@ { "anchor": "getchatmember", "name": "getChatMember", - "description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.", - "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", - "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", @@ -7426,9 +7426,9 @@ { "type": "String", "required": false, - "description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", - "html_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept", - "rst_description": "New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept\n", + "description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "html_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept", + "rst_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept\n", "name": "name" }, { diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index f293da9f..f5fb2285 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -1117,7 +1117,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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, 0-128 characters. If not specififed or empty, the current name of the topic will be kept + :param name: New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept :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. Pass an empty string to remove the icon. If not specified, the current icon will be kept :param request_timeout: Request timeout :return: Returns :code:`True` on success. @@ -1417,7 +1417,7 @@ class Bot(ContextInstanceMixin["Bot"]): ChatMemberBanned, ]: """ - Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the 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 diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py index 64a78558..2e76a190 100644 --- a/aiogram/methods/edit_forum_topic.py +++ b/aiogram/methods/edit_forum_topic.py @@ -22,7 +22,7 @@ class EditForumTopic(TelegramMethod[bool]): message_thread_id: int """Unique identifier for the target message thread of the forum topic""" name: Optional[str] = None - """New topic name, 0-128 characters. If not specififed or empty, the current name of the topic will be kept""" + """New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept""" icon_custom_emoji_id: Optional[str] = None """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. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" diff --git a/aiogram/methods/get_chat_member.py b/aiogram/methods/get_chat_member.py index 29d264ab..2d4e9d0b 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -29,7 +29,7 @@ class GetChatMember( ] ): """ - Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember """ diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 78e7c301..7dc9baf8 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -506,7 +506,7 @@ class Chat(TelegramObject): - :code:`chat_id` - Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember From ea0987e7d98b96fb4c08cd098deea1fbbda7b3d9 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 7 Jan 2023 22:42:01 +0200 Subject: [PATCH 08/42] Added lost text files --- .../api/methods/close_general_forum_topic.po | 80 ++++++++++++++++++ .../api/methods/edit_general_forum_topic.po | 84 +++++++++++++++++++ .../api/methods/hide_general_forum_topic.po | 79 +++++++++++++++++ .../api/methods/reopen_general_forum_topic.po | 81 ++++++++++++++++++ .../api/methods/unhide_general_forum_topic.po | 80 ++++++++++++++++++ .../api/types/forum_topic_edited.po | 41 +++++++++ .../api/types/general_forum_topic_hidden.po | 32 +++++++ .../api/types/general_forum_topic_unhidden.po | 32 +++++++ .../api/types/write_access_allowed.po | 33 ++++++++ .../api/methods/close_general_forum_topic.po | 80 ++++++++++++++++++ .../api/methods/edit_general_forum_topic.po | 84 +++++++++++++++++++ .../api/methods/hide_general_forum_topic.po | 79 +++++++++++++++++ .../api/methods/reopen_general_forum_topic.po | 81 ++++++++++++++++++ .../api/methods/unhide_general_forum_topic.po | 80 ++++++++++++++++++ .../api/types/forum_topic_edited.po | 41 +++++++++ .../api/types/general_forum_topic_hidden.po | 32 +++++++ .../api/types/general_forum_topic_unhidden.po | 32 +++++++ .../api/types/write_access_allowed.po | 33 ++++++++ 18 files changed, 1084 insertions(+) create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/close_general_forum_topic.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/edit_general_forum_topic.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/hide_general_forum_topic.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/reopen_general_forum_topic.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/unhide_general_forum_topic.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/forum_topic_edited.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_hidden.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_unhidden.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/write_access_allowed.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/close_general_forum_topic.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/hide_general_forum_topic.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_general_forum_topic.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/unhide_general_forum_topic.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_edited.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_hidden.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_unhidden.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/write_access_allowed.po diff --git a/docs/locale/en/LC_MESSAGES/api/methods/close_general_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/close_general_forum_topic.po new file mode 100644 index 00000000..f67c10fd --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/close_general_forum_topic.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/close_general_forum_topic.rst:3 +msgid "closeGeneralForumTopic" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic:1 of +msgid "" +"Use this method to close an open 'General' 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 " +":code:`True` on success." +msgstr "" + +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#closegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.close_general_forum_topic import " +"CloseGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import CloseGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/edit_general_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/edit_general_forum_topic.po new file mode 100644 index 00000000..75700ab7 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/edit_general_forum_topic.po @@ -0,0 +1,84 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/edit_general_forum_topic.rst:3 +msgid "editGeneralForumTopic" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic:1 of +msgid "" +"Use this method to edit the name of the 'General' 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. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#editgeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic.name:1 of +msgid "New topic name, 1-128 characters" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.edit_general_forum_topic import " +"EditGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import EditGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/hide_general_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/hide_general_forum_topic.po new file mode 100644 index 00000000..500edf6d --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/hide_general_forum_topic.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/hide_general_forum_topic.rst:3 +msgid "hideGeneralForumTopic" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic:1 of +msgid "" +"Use this method to hide the 'General' 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. The topic will be " +"automatically closed if it was open. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#hidegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.hide_general_forum_topic import " +"HideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import HideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/reopen_general_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/reopen_general_forum_topic.po new file mode 100644 index 00000000..cd6c41db --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/reopen_general_forum_topic.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/reopen_general_forum_topic.rst:3 +msgid "reopenGeneralForumTopic" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic:1 of +msgid "" +"Use this method to reopen a closed 'General' 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. The topic will be" +" automatically unhidden if it was hidden. Returns :code:`True` on " +"success." +msgstr "" + +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#reopengeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.reopen_general_forum_topic import " +"ReopenGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import ReopenGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/unhide_general_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/unhide_general_forum_topic.po new file mode 100644 index 00000000..3432fdfb --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/unhide_general_forum_topic.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/unhide_general_forum_topic.rst:3 +msgid "unhideGeneralForumTopic" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic:1 of +msgid "" +"Use this method to unhide the 'General' 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 :code:`True` " +"on success." +msgstr "" + +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.unhide_general_forum_topic import " +"UnhideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import UnhideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/forum_topic_edited.po b/docs/locale/en/LC_MESSAGES/api/types/forum_topic_edited.po new file mode 100644 index 00000000..26fe021a --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/forum_topic_edited.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/forum_topic_edited.rst:3 +msgid "ForumTopicEdited" +msgstr "" + +#: aiogram.types.forum_topic_edited.ForumTopicEdited:1 of +msgid "This object represents a service message about an edited forum topic." +msgstr "" + +#: aiogram.types.forum_topic_edited.ForumTopicEdited:3 of +msgid "Source: https://core.telegram.org/bots/api#forumtopicedited" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic_edited.ForumTopicEdited.name:1 of +msgid "*Optional*. New name of the topic, if it was edited" +msgstr "" + +#: ../../docstring +#: aiogram.types.forum_topic_edited.ForumTopicEdited.icon_custom_emoji_id:1 of +msgid "" +"*Optional*. New identifier of the custom emoji shown as the topic icon, " +"if it was edited; an empty string if the icon was removed" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_hidden.po b/docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_hidden.po new file mode 100644 index 00000000..0cb7dbe1 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_hidden.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/general_forum_topic_hidden.rst:3 +msgid "GeneralForumTopicHidden" +msgstr "" + +#: aiogram.types.general_forum_topic_hidden.GeneralForumTopicHidden:1 of +msgid "" +"This object represents a service message about General forum topic hidden" +" in the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.general_forum_topic_hidden.GeneralForumTopicHidden:3 of +msgid "Source: https://core.telegram.org/bots/api#generalforumtopichidden" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_unhidden.po b/docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_unhidden.po new file mode 100644 index 00000000..84782543 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/general_forum_topic_unhidden.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/general_forum_topic_unhidden.rst:3 +msgid "GeneralForumTopicUnhidden" +msgstr "" + +#: aiogram.types.general_forum_topic_unhidden.GeneralForumTopicUnhidden:1 of +msgid "" +"This object represents a service message about General forum topic " +"unhidden in the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.general_forum_topic_unhidden.GeneralForumTopicUnhidden:3 of +msgid "Source: https://core.telegram.org/bots/api#generalforumtopicunhidden" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/write_access_allowed.po b/docs/locale/en/LC_MESSAGES/api/types/write_access_allowed.po new file mode 100644 index 00000000..e2754dd2 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/write_access_allowed.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/write_access_allowed.rst:3 +msgid "WriteAccessAllowed" +msgstr "" + +#: aiogram.types.write_access_allowed.WriteAccessAllowed:1 of +msgid "" +"This object represents a service message about a user allowing a bot " +"added to the attachment menu to write messages. Currently holds no " +"information." +msgstr "" + +#: aiogram.types.write_access_allowed.WriteAccessAllowed:3 of +msgid "Source: https://core.telegram.org/bots/api#writeaccessallowed" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_general_forum_topic.po new file mode 100644 index 00000000..f67c10fd --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/close_general_forum_topic.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/close_general_forum_topic.rst:3 +msgid "closeGeneralForumTopic" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic:1 of +msgid "" +"Use this method to close an open 'General' 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 " +":code:`True` on success." +msgstr "" + +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#closegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.close_general_forum_topic.CloseGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.close_general_forum_topic import " +"CloseGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import CloseGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/close_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po new file mode 100644 index 00000000..75700ab7 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_general_forum_topic.po @@ -0,0 +1,84 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/edit_general_forum_topic.rst:3 +msgid "editGeneralForumTopic" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic:1 of +msgid "" +"Use this method to edit the name of the 'General' 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. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#editgeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../docstring +#: aiogram.methods.edit_general_forum_topic.EditGeneralForumTopic.name:1 of +msgid "New topic name, 1-128 characters" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.edit_general_forum_topic import " +"EditGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import EditGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/edit_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/hide_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/hide_general_forum_topic.po new file mode 100644 index 00000000..500edf6d --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/hide_general_forum_topic.po @@ -0,0 +1,79 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/hide_general_forum_topic.rst:3 +msgid "hideGeneralForumTopic" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic:1 of +msgid "" +"Use this method to hide the 'General' 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. The topic will be " +"automatically closed if it was open. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#hidegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.hide_general_forum_topic.HideGeneralForumTopic.chat_id:1 of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.hide_general_forum_topic import " +"HideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import HideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/hide_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_general_forum_topic.po new file mode 100644 index 00000000..cd6c41db --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/reopen_general_forum_topic.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/reopen_general_forum_topic.rst:3 +msgid "reopenGeneralForumTopic" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic:1 of +msgid "" +"Use this method to reopen a closed 'General' 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. The topic will be" +" automatically unhidden if it was hidden. Returns :code:`True` on " +"success." +msgstr "" + +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#reopengeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.reopen_general_forum_topic.ReopenGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.reopen_general_forum_topic import " +"ReopenGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import ReopenGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/reopen_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/unhide_general_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unhide_general_forum_topic.po new file mode 100644 index 00000000..3432fdfb --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/unhide_general_forum_topic.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/methods/unhide_general_forum_topic.rst:3 +msgid "unhideGeneralForumTopic" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic:1 of +msgid "" +"Use this method to unhide the 'General' 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 :code:`True` " +"on success." +msgstr "" + +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic:3 of +msgid "Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic" +msgstr "" + +#: ../../docstring +#: aiogram.methods.unhide_general_forum_topic.UnhideGeneralForumTopic.chat_id:1 +#: of +msgid "" +"Unique identifier for the target chat or username of the target " +"supergroup (in the format :code:`@supergroupusername`)" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:29 +msgid "" +":code:`from aiogram.methods.unhide_general_forum_topic import " +"UnhideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:30 +msgid "alias: :code:`from aiogram.methods import UnhideGeneralForumTopic`" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/unhide_general_forum_topic.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_edited.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_edited.po new file mode 100644 index 00000000..26fe021a --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/forum_topic_edited.po @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/forum_topic_edited.rst:3 +msgid "ForumTopicEdited" +msgstr "" + +#: aiogram.types.forum_topic_edited.ForumTopicEdited:1 of +msgid "This object represents a service message about an edited forum topic." +msgstr "" + +#: aiogram.types.forum_topic_edited.ForumTopicEdited:3 of +msgid "Source: https://core.telegram.org/bots/api#forumtopicedited" +msgstr "" + +#: ../../docstring aiogram.types.forum_topic_edited.ForumTopicEdited.name:1 of +msgid "*Optional*. New name of the topic, if it was edited" +msgstr "" + +#: ../../docstring +#: aiogram.types.forum_topic_edited.ForumTopicEdited.icon_custom_emoji_id:1 of +msgid "" +"*Optional*. New identifier of the custom emoji shown as the topic icon, " +"if it was edited; an empty string if the icon was removed" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_hidden.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_hidden.po new file mode 100644 index 00000000..0cb7dbe1 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_hidden.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/general_forum_topic_hidden.rst:3 +msgid "GeneralForumTopicHidden" +msgstr "" + +#: aiogram.types.general_forum_topic_hidden.GeneralForumTopicHidden:1 of +msgid "" +"This object represents a service message about General forum topic hidden" +" in the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.general_forum_topic_hidden.GeneralForumTopicHidden:3 of +msgid "Source: https://core.telegram.org/bots/api#generalforumtopichidden" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_unhidden.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_unhidden.po new file mode 100644 index 00000000..84782543 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/general_forum_topic_unhidden.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/general_forum_topic_unhidden.rst:3 +msgid "GeneralForumTopicUnhidden" +msgstr "" + +#: aiogram.types.general_forum_topic_unhidden.GeneralForumTopicUnhidden:1 of +msgid "" +"This object represents a service message about General forum topic " +"unhidden in the chat. Currently holds no information." +msgstr "" + +#: aiogram.types.general_forum_topic_unhidden.GeneralForumTopicUnhidden:3 of +msgid "Source: https://core.telegram.org/bots/api#generalforumtopicunhidden" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/write_access_allowed.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/write_access_allowed.po new file mode 100644 index 00000000..e2754dd2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/write_access_allowed.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2022, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2022. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.10.3\n" + +#: ../../api/types/write_access_allowed.rst:3 +msgid "WriteAccessAllowed" +msgstr "" + +#: aiogram.types.write_access_allowed.WriteAccessAllowed:1 of +msgid "" +"This object represents a service message about a user allowing a bot " +"added to the attachment menu to write messages. Currently holds no " +"information." +msgstr "" + +#: aiogram.types.write_access_allowed.WriteAccessAllowed:3 of +msgid "Source: https://core.telegram.org/bots/api#writeaccessallowed" +msgstr "" From d5f3e302159e4682ff66309d23ea0d7d7805ff52 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 7 Jan 2023 23:03:42 +0200 Subject: [PATCH 09/42] Clean bot class & texts --- docs/api/bot.rst | 6 +- docs/locale/en/LC_MESSAGES/api/bot.po | 3794 +---------------- .../api/methods/edit_forum_topic.po | 27 +- .../api/methods/get_chat_member.po | 15 +- docs/locale/en/LC_MESSAGES/api/types/chat.po | 15 +- docs/locale/en/LC_MESSAGES/changelog.po | 26 +- docs/locale/uk_UA/LC_MESSAGES/api/bot.po | 3794 +---------------- .../api/methods/edit_forum_topic.po | 27 +- .../api/methods/get_chat_member.po | 15 +- .../uk_UA/LC_MESSAGES/api/types/chat.po | 15 +- docs/locale/uk_UA/LC_MESSAGES/changelog.po | 26 +- 11 files changed, 53 insertions(+), 7707 deletions(-) diff --git a/docs/api/bot.rst b/docs/api/bot.rst index 215c4b5b..f9e4e332 100644 --- a/docs/api/bot.rst +++ b/docs/api/bot.rst @@ -9,8 +9,12 @@ This class has aliases for all methods and named in :code:`lower_camel_case`. For example :code:`sendMessage` named :code:`send_message` and has the same specification with all class-based methods. +.. warning:: + + A full list of methods can be found in the appropriate section of the documentation + .. autoclass:: aiogram.client.bot.Bot - :members: + :members: __init__,token,id,context,me,download_file,download :show-inheritance: :member-order: bysource :special-members: __init__ diff --git a/docs/locale/en/LC_MESSAGES/api/bot.po b/docs/locale/en/LC_MESSAGES/api/bot.po index 6fe7be8c..0a7dbcc9 100644 --- a/docs/locale/en/LC_MESSAGES/api/bot.po +++ b/docs/locale/en/LC_MESSAGES/api/bot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -40,6 +40,12 @@ msgid "" "same specification with all class-based methods." msgstr "" +#: ../../api/bot.rst:14 +msgid "" +"A full list of methods can be found in the appropriate section of the " +"documentation" +msgstr "" + #: aiogram.client.bot.Bot:1 of msgid "" "Bases: :py:class:`~aiogram.utils.mixins.ContextInstanceMixin`\\ " @@ -50,92 +56,8 @@ msgstr "" msgid "Bot class" msgstr "" -#: aiogram.client.bot.Bot.__init__ aiogram.client.bot.Bot.add_sticker_to_set -#: aiogram.client.bot.Bot.answer_callback_query -#: aiogram.client.bot.Bot.answer_inline_query -#: aiogram.client.bot.Bot.answer_pre_checkout_query -#: aiogram.client.bot.Bot.answer_shipping_query -#: aiogram.client.bot.Bot.answer_web_app_query -#: aiogram.client.bot.Bot.approve_chat_join_request -#: aiogram.client.bot.Bot.ban_chat_member -#: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic -#: aiogram.client.bot.Bot.close_general_forum_topic -#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message -#: aiogram.client.bot.Bot.create_chat_invite_link -#: aiogram.client.bot.Bot.create_forum_topic -#: aiogram.client.bot.Bot.create_invoice_link -#: aiogram.client.bot.Bot.create_new_sticker_set -#: aiogram.client.bot.Bot.decline_chat_join_request -#: aiogram.client.bot.Bot.delete_chat_photo -#: aiogram.client.bot.Bot.delete_chat_sticker_set -#: aiogram.client.bot.Bot.delete_forum_topic -#: aiogram.client.bot.Bot.delete_message -#: aiogram.client.bot.Bot.delete_my_commands -#: aiogram.client.bot.Bot.delete_sticker_from_set -#: aiogram.client.bot.Bot.delete_webhook aiogram.client.bot.Bot.download -#: aiogram.client.bot.Bot.download_file -#: aiogram.client.bot.Bot.edit_chat_invite_link -#: aiogram.client.bot.Bot.edit_forum_topic -#: aiogram.client.bot.Bot.edit_general_forum_topic -#: aiogram.client.bot.Bot.edit_message_caption -#: aiogram.client.bot.Bot.edit_message_live_location -#: aiogram.client.bot.Bot.edit_message_media -#: aiogram.client.bot.Bot.edit_message_reply_markup -#: aiogram.client.bot.Bot.edit_message_text -#: aiogram.client.bot.Bot.export_chat_invite_link -#: aiogram.client.bot.Bot.forward_message aiogram.client.bot.Bot.get_chat -#: aiogram.client.bot.Bot.get_chat_administrators -#: aiogram.client.bot.Bot.get_chat_member -#: aiogram.client.bot.Bot.get_chat_member_count -#: aiogram.client.bot.Bot.get_chat_menu_button -#: aiogram.client.bot.Bot.get_custom_emoji_stickers -#: aiogram.client.bot.Bot.get_file -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers -#: aiogram.client.bot.Bot.get_game_high_scores aiogram.client.bot.Bot.get_me -#: aiogram.client.bot.Bot.get_my_commands -#: aiogram.client.bot.Bot.get_my_default_administrator_rights -#: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates -#: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info -#: aiogram.client.bot.Bot.hide_general_forum_topic -#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.pin_chat_message -#: aiogram.client.bot.Bot.promote_chat_member -#: aiogram.client.bot.Bot.reopen_forum_topic -#: aiogram.client.bot.Bot.reopen_general_forum_topic -#: aiogram.client.bot.Bot.restrict_chat_member -#: aiogram.client.bot.Bot.revoke_chat_invite_link -#: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio -#: aiogram.client.bot.Bot.send_chat_action aiogram.client.bot.Bot.send_contact -#: aiogram.client.bot.Bot.send_dice aiogram.client.bot.Bot.send_document -#: aiogram.client.bot.Bot.send_game aiogram.client.bot.Bot.send_invoice -#: aiogram.client.bot.Bot.send_location aiogram.client.bot.Bot.send_media_group -#: aiogram.client.bot.Bot.send_message aiogram.client.bot.Bot.send_photo -#: aiogram.client.bot.Bot.send_poll aiogram.client.bot.Bot.send_sticker -#: aiogram.client.bot.Bot.send_venue aiogram.client.bot.Bot.send_video -#: aiogram.client.bot.Bot.send_video_note aiogram.client.bot.Bot.send_voice -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title -#: aiogram.client.bot.Bot.set_chat_description -#: aiogram.client.bot.Bot.set_chat_menu_button -#: aiogram.client.bot.Bot.set_chat_permissions -#: aiogram.client.bot.Bot.set_chat_photo -#: aiogram.client.bot.Bot.set_chat_sticker_set -#: aiogram.client.bot.Bot.set_chat_title aiogram.client.bot.Bot.set_game_score -#: aiogram.client.bot.Bot.set_my_commands -#: aiogram.client.bot.Bot.set_my_default_administrator_rights -#: aiogram.client.bot.Bot.set_passport_data_errors -#: aiogram.client.bot.Bot.set_sticker_position_in_set -#: aiogram.client.bot.Bot.set_sticker_set_thumb -#: aiogram.client.bot.Bot.set_webhook -#: aiogram.client.bot.Bot.stop_message_live_location -#: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member -#: aiogram.client.bot.Bot.unban_chat_sender_chat -#: aiogram.client.bot.Bot.unhide_general_forum_topic -#: aiogram.client.bot.Bot.unpin_all_chat_messages -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages -#: aiogram.client.bot.Bot.unpin_chat_message -#: aiogram.client.bot.Bot.upload_sticker_file of +#: aiogram.client.bot.Bot.__init__ aiogram.client.bot.Bot.context +#: aiogram.client.bot.Bot.download aiogram.client.bot.Bot.download_file of msgid "Parameters" msgstr "" @@ -167,91 +89,8 @@ msgstr "" msgid "Get bot ID from token" msgstr "" -#: aiogram.client.bot.Bot.add_sticker_to_set -#: aiogram.client.bot.Bot.answer_callback_query -#: aiogram.client.bot.Bot.answer_inline_query -#: aiogram.client.bot.Bot.answer_pre_checkout_query -#: aiogram.client.bot.Bot.answer_shipping_query -#: aiogram.client.bot.Bot.answer_web_app_query -#: aiogram.client.bot.Bot.approve_chat_join_request -#: aiogram.client.bot.Bot.ban_chat_member -#: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic -#: aiogram.client.bot.Bot.close_general_forum_topic -#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message -#: aiogram.client.bot.Bot.create_chat_invite_link -#: aiogram.client.bot.Bot.create_forum_topic -#: aiogram.client.bot.Bot.create_invoice_link -#: aiogram.client.bot.Bot.create_new_sticker_set -#: aiogram.client.bot.Bot.decline_chat_join_request -#: aiogram.client.bot.Bot.delete_chat_photo -#: aiogram.client.bot.Bot.delete_chat_sticker_set -#: aiogram.client.bot.Bot.delete_forum_topic -#: aiogram.client.bot.Bot.delete_message -#: aiogram.client.bot.Bot.delete_my_commands -#: aiogram.client.bot.Bot.delete_sticker_from_set -#: aiogram.client.bot.Bot.delete_webhook -#: aiogram.client.bot.Bot.edit_chat_invite_link -#: aiogram.client.bot.Bot.edit_forum_topic -#: aiogram.client.bot.Bot.edit_general_forum_topic -#: aiogram.client.bot.Bot.edit_message_caption -#: aiogram.client.bot.Bot.edit_message_live_location -#: aiogram.client.bot.Bot.edit_message_media -#: aiogram.client.bot.Bot.edit_message_reply_markup -#: aiogram.client.bot.Bot.edit_message_text -#: aiogram.client.bot.Bot.export_chat_invite_link -#: aiogram.client.bot.Bot.forward_message aiogram.client.bot.Bot.get_chat -#: aiogram.client.bot.Bot.get_chat_administrators -#: aiogram.client.bot.Bot.get_chat_member -#: aiogram.client.bot.Bot.get_chat_member_count -#: aiogram.client.bot.Bot.get_chat_menu_button -#: aiogram.client.bot.Bot.get_custom_emoji_stickers -#: aiogram.client.bot.Bot.get_file -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers -#: aiogram.client.bot.Bot.get_game_high_scores aiogram.client.bot.Bot.get_me -#: aiogram.client.bot.Bot.get_my_commands -#: aiogram.client.bot.Bot.get_my_default_administrator_rights -#: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates -#: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info -#: aiogram.client.bot.Bot.hide_general_forum_topic aiogram.client.bot.Bot.id -#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.me aiogram.client.bot.Bot.pin_chat_message -#: aiogram.client.bot.Bot.promote_chat_member -#: aiogram.client.bot.Bot.reopen_forum_topic -#: aiogram.client.bot.Bot.reopen_general_forum_topic -#: aiogram.client.bot.Bot.restrict_chat_member -#: aiogram.client.bot.Bot.revoke_chat_invite_link -#: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio -#: aiogram.client.bot.Bot.send_chat_action aiogram.client.bot.Bot.send_contact -#: aiogram.client.bot.Bot.send_dice aiogram.client.bot.Bot.send_document -#: aiogram.client.bot.Bot.send_game aiogram.client.bot.Bot.send_invoice -#: aiogram.client.bot.Bot.send_location aiogram.client.bot.Bot.send_media_group -#: aiogram.client.bot.Bot.send_message aiogram.client.bot.Bot.send_photo -#: aiogram.client.bot.Bot.send_poll aiogram.client.bot.Bot.send_sticker -#: aiogram.client.bot.Bot.send_venue aiogram.client.bot.Bot.send_video -#: aiogram.client.bot.Bot.send_video_note aiogram.client.bot.Bot.send_voice -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title -#: aiogram.client.bot.Bot.set_chat_description -#: aiogram.client.bot.Bot.set_chat_menu_button -#: aiogram.client.bot.Bot.set_chat_permissions -#: aiogram.client.bot.Bot.set_chat_photo -#: aiogram.client.bot.Bot.set_chat_sticker_set -#: aiogram.client.bot.Bot.set_chat_title aiogram.client.bot.Bot.set_game_score -#: aiogram.client.bot.Bot.set_my_commands -#: aiogram.client.bot.Bot.set_my_default_administrator_rights -#: aiogram.client.bot.Bot.set_passport_data_errors -#: aiogram.client.bot.Bot.set_sticker_position_in_set -#: aiogram.client.bot.Bot.set_sticker_set_thumb -#: aiogram.client.bot.Bot.set_webhook -#: aiogram.client.bot.Bot.stop_message_live_location -#: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member -#: aiogram.client.bot.Bot.unban_chat_sender_chat -#: aiogram.client.bot.Bot.unhide_general_forum_topic -#: aiogram.client.bot.Bot.unpin_all_chat_messages -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages -#: aiogram.client.bot.Bot.unpin_chat_message -#: aiogram.client.bot.Bot.upload_sticker_file of +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.id +#: aiogram.client.bot.Bot.me of msgid "Returns" msgstr "" @@ -307,3614 +146,3 @@ msgstr "" #: aiogram.client.bot.Bot.download:6 of msgid "file_id or Downloadable object" msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:3 of -msgid "User identifier of sticker set owner" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:4 -#: aiogram.client.bot.Bot.set_sticker_set_thumb:3 of -msgid "Sticker set name" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:5 -#: aiogram.client.bot.Bot.create_new_sticker_set:6 of -msgid "One or more emoji corresponding to the sticker" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:6 -#: aiogram.client.bot.Bot.create_new_sticker_set:7 of -msgid "" -"**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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:7 -#: aiogram.client.bot.Bot.create_new_sticker_set:8 of -msgid "" -"**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" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:8 -#: aiogram.client.bot.Bot.create_new_sticker_set:9 of -msgid "" -"**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" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:9 -#: aiogram.client.bot.Bot.create_new_sticker_set:11 of -msgid "" -"A JSON-serialized object for position where the mask should be placed on " -"faces" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:10 -#: aiogram.client.bot.Bot.answer_callback_query:10 -#: aiogram.client.bot.Bot.answer_inline_query:12 -#: aiogram.client.bot.Bot.answer_pre_checkout_query:6 -#: aiogram.client.bot.Bot.answer_shipping_query:7 -#: aiogram.client.bot.Bot.answer_web_app_query:5 -#: aiogram.client.bot.Bot.approve_chat_join_request:5 -#: aiogram.client.bot.Bot.ban_chat_member:7 -#: aiogram.client.bot.Bot.ban_chat_sender_chat:5 aiogram.client.bot.Bot.close:3 -#: aiogram.client.bot.Bot.close_forum_topic:5 -#: aiogram.client.bot.Bot.close_general_forum_topic:4 -#: aiogram.client.bot.Bot.copy_message:15 -#: aiogram.client.bot.Bot.create_chat_invite_link:8 -#: aiogram.client.bot.Bot.create_forum_topic:7 -#: aiogram.client.bot.Bot.create_invoice_link:23 -#: aiogram.client.bot.Bot.create_new_sticker_set:12 -#: aiogram.client.bot.Bot.decline_chat_join_request:5 -#: aiogram.client.bot.Bot.delete_chat_photo:4 -#: aiogram.client.bot.Bot.delete_chat_sticker_set:4 -#: aiogram.client.bot.Bot.delete_forum_topic:5 -#: aiogram.client.bot.Bot.delete_message:23 -#: aiogram.client.bot.Bot.delete_my_commands:5 -#: aiogram.client.bot.Bot.delete_sticker_from_set:4 -#: aiogram.client.bot.Bot.delete_webhook:4 -#: aiogram.client.bot.Bot.edit_chat_invite_link:9 -#: aiogram.client.bot.Bot.edit_forum_topic:7 -#: aiogram.client.bot.Bot.edit_general_forum_topic:5 -#: aiogram.client.bot.Bot.edit_message_caption:10 -#: aiogram.client.bot.Bot.edit_message_live_location:12 -#: aiogram.client.bot.Bot.edit_message_media:8 -#: aiogram.client.bot.Bot.edit_message_reply_markup:7 -#: aiogram.client.bot.Bot.edit_message_text:11 -#: aiogram.client.bot.Bot.export_chat_invite_link:6 -#: aiogram.client.bot.Bot.forward_message:9 aiogram.client.bot.Bot.get_chat:4 -#: aiogram.client.bot.Bot.get_chat_administrators:4 -#: aiogram.client.bot.Bot.get_chat_member:5 -#: aiogram.client.bot.Bot.get_chat_member_count:4 -#: aiogram.client.bot.Bot.get_chat_menu_button:4 -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:4 -#: aiogram.client.bot.Bot.get_file:5 -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers:3 -#: aiogram.client.bot.Bot.get_game_high_scores:9 -#: aiogram.client.bot.Bot.get_me:3 aiogram.client.bot.Bot.get_my_commands:5 -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:4 -#: aiogram.client.bot.Bot.get_sticker_set:4 -#: aiogram.client.bot.Bot.get_updates:13 -#: aiogram.client.bot.Bot.get_user_profile_photos:6 -#: aiogram.client.bot.Bot.get_webhook_info:3 -#: aiogram.client.bot.Bot.hide_general_forum_topic:4 -#: aiogram.client.bot.Bot.leave_chat:4 aiogram.client.bot.Bot.log_out:3 -#: aiogram.client.bot.Bot.pin_chat_message:6 -#: aiogram.client.bot.Bot.promote_chat_member:17 -#: aiogram.client.bot.Bot.reopen_forum_topic:5 -#: aiogram.client.bot.Bot.reopen_general_forum_topic:4 -#: aiogram.client.bot.Bot.restrict_chat_member:7 -#: aiogram.client.bot.Bot.revoke_chat_invite_link:5 -#: aiogram.client.bot.Bot.send_animation:19 -#: aiogram.client.bot.Bot.send_audio:19 -#: aiogram.client.bot.Bot.send_chat_action:10 -#: aiogram.client.bot.Bot.send_contact:14 aiogram.client.bot.Bot.send_dice:11 -#: aiogram.client.bot.Bot.send_document:16 aiogram.client.bot.Bot.send_game:11 -#: aiogram.client.bot.Bot.send_invoice:31 -#: aiogram.client.bot.Bot.send_location:16 -#: aiogram.client.bot.Bot.send_media_group:10 -#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:15 -#: aiogram.client.bot.Bot.send_poll:22 aiogram.client.bot.Bot.send_sticker:11 -#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:20 -#: aiogram.client.bot.Bot.send_video_note:14 -#: aiogram.client.bot.Bot.send_voice:15 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:6 -#: aiogram.client.bot.Bot.set_chat_description:5 -#: aiogram.client.bot.Bot.set_chat_menu_button:5 -#: aiogram.client.bot.Bot.set_chat_permissions:5 -#: aiogram.client.bot.Bot.set_chat_photo:5 -#: aiogram.client.bot.Bot.set_chat_sticker_set:5 -#: aiogram.client.bot.Bot.set_chat_title:5 -#: aiogram.client.bot.Bot.set_game_score:10 -#: aiogram.client.bot.Bot.set_my_commands:6 -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:5 -#: aiogram.client.bot.Bot.set_passport_data_errors:6 -#: aiogram.client.bot.Bot.set_sticker_position_in_set:5 -#: aiogram.client.bot.Bot.set_sticker_set_thumb:6 -#: aiogram.client.bot.Bot.set_webhook:20 -#: aiogram.client.bot.Bot.stop_message_live_location:7 -#: aiogram.client.bot.Bot.stop_poll:6 -#: aiogram.client.bot.Bot.unban_chat_member:6 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:5 -#: aiogram.client.bot.Bot.unhide_general_forum_topic:4 -#: aiogram.client.bot.Bot.unpin_all_chat_messages:4 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:5 -#: aiogram.client.bot.Bot.unpin_chat_message:5 -#: aiogram.client.bot.Bot.upload_sticker_file:5 of -msgid "Request timeout" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:11 -#: aiogram.client.bot.Bot.approve_chat_join_request:6 -#: aiogram.client.bot.Bot.ban_chat_member:8 -#: aiogram.client.bot.Bot.ban_chat_sender_chat:6 -#: aiogram.client.bot.Bot.close_forum_topic:6 -#: aiogram.client.bot.Bot.close_general_forum_topic:5 -#: aiogram.client.bot.Bot.create_new_sticker_set:13 -#: aiogram.client.bot.Bot.decline_chat_join_request:6 -#: aiogram.client.bot.Bot.delete_chat_photo:5 -#: aiogram.client.bot.Bot.delete_chat_sticker_set:5 -#: aiogram.client.bot.Bot.delete_forum_topic:6 -#: aiogram.client.bot.Bot.delete_message:19 -#: aiogram.client.bot.Bot.delete_my_commands:6 -#: aiogram.client.bot.Bot.delete_sticker_from_set:5 -#: aiogram.client.bot.Bot.delete_webhook:5 -#: aiogram.client.bot.Bot.edit_forum_topic:8 -#: aiogram.client.bot.Bot.edit_general_forum_topic:6 -#: aiogram.client.bot.Bot.hide_general_forum_topic:5 -#: aiogram.client.bot.Bot.leave_chat:5 -#: aiogram.client.bot.Bot.pin_chat_message:7 -#: aiogram.client.bot.Bot.promote_chat_member:18 -#: aiogram.client.bot.Bot.reopen_forum_topic:6 -#: aiogram.client.bot.Bot.reopen_general_forum_topic:5 -#: aiogram.client.bot.Bot.restrict_chat_member:8 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:7 -#: aiogram.client.bot.Bot.set_chat_description:6 -#: aiogram.client.bot.Bot.set_chat_menu_button:6 -#: aiogram.client.bot.Bot.set_chat_permissions:6 -#: aiogram.client.bot.Bot.set_chat_photo:6 -#: aiogram.client.bot.Bot.set_chat_sticker_set:6 -#: aiogram.client.bot.Bot.set_chat_title:6 -#: aiogram.client.bot.Bot.set_my_commands:7 -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:6 -#: aiogram.client.bot.Bot.set_sticker_position_in_set:6 -#: aiogram.client.bot.Bot.set_sticker_set_thumb:7 -#: aiogram.client.bot.Bot.unban_chat_member:7 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:6 -#: aiogram.client.bot.Bot.unhide_general_forum_topic:5 -#: aiogram.client.bot.Bot.unpin_all_chat_messages:5 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:6 -#: aiogram.client.bot.Bot.unpin_chat_message:6 of -msgid "Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:5 -#: aiogram.client.bot.Bot.answer_pre_checkout_query:3 -#: aiogram.client.bot.Bot.answer_shipping_query:3 -#: aiogram.client.bot.Bot.answer_web_app_query:3 of -msgid "Unique identifier for the query to be answered" -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:6 of -msgid "" -"Text of the notification. If not specified, nothing will be shown to the " -"user, 0-200 characters" -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:7 of -msgid "" -"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*." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:8 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:9 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:11 of -msgid "" -"Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that " -"open your bot with a parameter." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:1 of -msgid "" -"Use this method to send answers to an inline query. On success, " -":code:`True` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:3 of -msgid "No more than **50** results per query are allowed." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:5 of -msgid "Unique identifier for the answered query" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:6 of -msgid "A JSON-serialized array of results for the inline query" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:7 of -msgid "" -"The maximum amount of time in seconds that the result of the inline query" -" may be cached on the server. Defaults to 300." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:8 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:9 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:10 of -msgid "" -"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*" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:11 of -msgid "" -"`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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:13 -#: aiogram.client.bot.Bot.answer_shipping_query:8 of -msgid "On success, :code:`True` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:4 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:7 of -msgid "" -"**Note:** The Bot API must receive an answer within 10 seconds after the " -"pre-checkout query was sent." -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:4 of -msgid "" -"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)" -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:5 of -msgid "" -"Required if *ok* is :code:`True`. A JSON-serialized array of available " -"shipping options." -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:6 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_web_app_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_web_app_query:4 of -msgid "A JSON-serialized object describing the message to be sent" -msgstr "" - -#: aiogram.client.bot.Bot.answer_web_app_query:6 of -msgid "" -"On success, a " -":class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.approve_chat_join_request:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.approve_chat_join_request:3 -#: aiogram.client.bot.Bot.ban_chat_sender_chat:3 -#: aiogram.client.bot.Bot.copy_message:3 -#: aiogram.client.bot.Bot.create_chat_invite_link:3 -#: aiogram.client.bot.Bot.decline_chat_join_request:3 -#: aiogram.client.bot.Bot.delete_chat_photo:3 -#: aiogram.client.bot.Bot.delete_message:21 -#: aiogram.client.bot.Bot.edit_chat_invite_link:3 -#: aiogram.client.bot.Bot.export_chat_invite_link:5 -#: aiogram.client.bot.Bot.forward_message:3 -#: aiogram.client.bot.Bot.pin_chat_message:3 -#: aiogram.client.bot.Bot.promote_chat_member:3 -#: aiogram.client.bot.Bot.send_animation:3 aiogram.client.bot.Bot.send_audio:4 -#: aiogram.client.bot.Bot.send_chat_action:7 -#: aiogram.client.bot.Bot.send_contact:3 aiogram.client.bot.Bot.send_dice:3 -#: aiogram.client.bot.Bot.send_document:3 aiogram.client.bot.Bot.send_invoice:3 -#: aiogram.client.bot.Bot.send_location:3 -#: aiogram.client.bot.Bot.send_media_group:3 -#: aiogram.client.bot.Bot.send_message:3 aiogram.client.bot.Bot.send_photo:3 -#: aiogram.client.bot.Bot.send_poll:3 aiogram.client.bot.Bot.send_sticker:3 -#: aiogram.client.bot.Bot.send_venue:3 aiogram.client.bot.Bot.send_video:3 -#: aiogram.client.bot.Bot.send_video_note:3 aiogram.client.bot.Bot.send_voice:3 -#: aiogram.client.bot.Bot.set_chat_description:3 -#: aiogram.client.bot.Bot.set_chat_photo:3 -#: aiogram.client.bot.Bot.set_chat_title:3 aiogram.client.bot.Bot.stop_poll:3 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:3 -#: aiogram.client.bot.Bot.unpin_all_chat_messages:3 -#: aiogram.client.bot.Bot.unpin_chat_message:3 of -msgid "" -"Unique identifier for the target chat or username of the target channel " -"(in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.approve_chat_join_request:4 -#: aiogram.client.bot.Bot.ban_chat_member:4 -#: aiogram.client.bot.Bot.decline_chat_join_request:4 -#: aiogram.client.bot.Bot.get_chat_member:4 -#: aiogram.client.bot.Bot.get_user_profile_photos:3 -#: aiogram.client.bot.Bot.promote_chat_member:4 -#: aiogram.client.bot.Bot.restrict_chat_member:4 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:4 -#: aiogram.client.bot.Bot.unban_chat_member:4 of -msgid "Unique identifier of the target user" -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:3 -#: aiogram.client.bot.Bot.unban_chat_member:3 of -msgid "" -"Unique identifier for the target group or username of the target " -"supergroup or channel (in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:6 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_sender_chat:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_sender_chat:4 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:4 of -msgid "Unique identifier of the target sender chat" -msgstr "" - -#: aiogram.client.bot.Bot.close:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.close:4 aiogram.client.bot.Bot.log_out:4 of -msgid "Requires no parameters." -msgstr "" - -#: aiogram.client.bot.Bot.close_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.close_forum_topic:3 -#: aiogram.client.bot.Bot.close_general_forum_topic:3 -#: aiogram.client.bot.Bot.create_forum_topic:3 -#: aiogram.client.bot.Bot.delete_chat_sticker_set:3 -#: aiogram.client.bot.Bot.delete_forum_topic:3 -#: aiogram.client.bot.Bot.edit_forum_topic:3 -#: aiogram.client.bot.Bot.edit_general_forum_topic:3 -#: aiogram.client.bot.Bot.hide_general_forum_topic:3 -#: aiogram.client.bot.Bot.reopen_forum_topic:3 -#: aiogram.client.bot.Bot.reopen_general_forum_topic:3 -#: aiogram.client.bot.Bot.restrict_chat_member:3 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:3 -#: aiogram.client.bot.Bot.set_chat_permissions:3 -#: aiogram.client.bot.Bot.set_chat_sticker_set:3 -#: aiogram.client.bot.Bot.unhide_general_forum_topic:3 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:3 of -msgid "" -"Unique identifier for the target chat or username of the target " -"supergroup (in the format :code:`@supergroupusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.close_forum_topic:4 -#: aiogram.client.bot.Bot.delete_forum_topic:4 -#: aiogram.client.bot.Bot.edit_forum_topic:4 -#: aiogram.client.bot.Bot.reopen_forum_topic:4 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:4 of -msgid "Unique identifier for the target message thread of the forum topic" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:4 -#: aiogram.client.bot.Bot.forward_message:4 of -msgid "" -"Unique identifier for the chat where the original message was sent (or " -"channel username in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:5 -#: aiogram.client.bot.Bot.forward_message:5 of -msgid "Message identifier in the chat specified in *from_chat_id*" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:6 -#: aiogram.client.bot.Bot.forward_message:6 -#: aiogram.client.bot.Bot.send_animation:5 aiogram.client.bot.Bot.send_audio:6 -#: aiogram.client.bot.Bot.send_contact:6 aiogram.client.bot.Bot.send_dice:4 -#: aiogram.client.bot.Bot.send_document:5 aiogram.client.bot.Bot.send_game:5 -#: aiogram.client.bot.Bot.send_invoice:10 -#: aiogram.client.bot.Bot.send_location:6 -#: aiogram.client.bot.Bot.send_media_group:5 -#: aiogram.client.bot.Bot.send_message:5 aiogram.client.bot.Bot.send_photo:5 -#: aiogram.client.bot.Bot.send_poll:6 aiogram.client.bot.Bot.send_sticker:5 -#: aiogram.client.bot.Bot.send_venue:8 aiogram.client.bot.Bot.send_video:5 -#: aiogram.client.bot.Bot.send_video_note:5 aiogram.client.bot.Bot.send_voice:5 -#: of -msgid "" -"Unique identifier for the target message thread (topic) of the forum; for" -" forum supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:7 of -msgid "" -"New caption for media, 0-1024 characters after entities parsing. If not " -"specified, the original caption is kept" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:8 of -msgid "" -"Mode for parsing entities in the new caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:9 of -msgid "" -"A JSON-serialized list of special entities that appear in the new " -"caption, which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:10 -#: aiogram.client.bot.Bot.forward_message:7 -#: aiogram.client.bot.Bot.send_animation:14 -#: aiogram.client.bot.Bot.send_audio:14 aiogram.client.bot.Bot.send_contact:9 -#: aiogram.client.bot.Bot.send_dice:6 aiogram.client.bot.Bot.send_document:11 -#: aiogram.client.bot.Bot.send_game:6 aiogram.client.bot.Bot.send_invoice:26 -#: aiogram.client.bot.Bot.send_location:11 -#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:10 -#: aiogram.client.bot.Bot.send_poll:17 aiogram.client.bot.Bot.send_sticker:6 -#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:15 -#: aiogram.client.bot.Bot.send_video_note:9 -#: aiogram.client.bot.Bot.send_voice:10 of -msgid "" -"Sends the message `silently `_. Users will receive a notification with no sound." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:11 -#: aiogram.client.bot.Bot.send_animation:15 -#: aiogram.client.bot.Bot.send_audio:15 aiogram.client.bot.Bot.send_contact:10 -#: aiogram.client.bot.Bot.send_document:12 aiogram.client.bot.Bot.send_game:7 -#: aiogram.client.bot.Bot.send_invoice:27 -#: aiogram.client.bot.Bot.send_location:12 -#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:11 -#: aiogram.client.bot.Bot.send_poll:18 aiogram.client.bot.Bot.send_sticker:7 -#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:16 -#: aiogram.client.bot.Bot.send_video_note:10 -#: aiogram.client.bot.Bot.send_voice:11 of -msgid "Protects the contents of the sent message from forwarding and saving" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:12 -#: aiogram.client.bot.Bot.send_animation:16 -#: aiogram.client.bot.Bot.send_audio:16 aiogram.client.bot.Bot.send_contact:11 -#: aiogram.client.bot.Bot.send_dice:8 aiogram.client.bot.Bot.send_document:13 -#: aiogram.client.bot.Bot.send_game:8 aiogram.client.bot.Bot.send_invoice:28 -#: aiogram.client.bot.Bot.send_location:13 -#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:12 -#: aiogram.client.bot.Bot.send_poll:19 aiogram.client.bot.Bot.send_sticker:8 -#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:17 -#: aiogram.client.bot.Bot.send_video_note:11 -#: aiogram.client.bot.Bot.send_voice:12 of -msgid "If the message is a reply, ID of the original message" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:13 -#: aiogram.client.bot.Bot.send_animation:17 -#: aiogram.client.bot.Bot.send_audio:17 aiogram.client.bot.Bot.send_contact:12 -#: aiogram.client.bot.Bot.send_dice:9 aiogram.client.bot.Bot.send_document:14 -#: aiogram.client.bot.Bot.send_game:9 aiogram.client.bot.Bot.send_invoice:29 -#: aiogram.client.bot.Bot.send_location:14 -#: aiogram.client.bot.Bot.send_media_group:9 -#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:13 -#: aiogram.client.bot.Bot.send_poll:20 aiogram.client.bot.Bot.send_sticker:9 -#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:18 -#: aiogram.client.bot.Bot.send_video_note:12 -#: aiogram.client.bot.Bot.send_voice:13 of -msgid "" -"Pass :code:`True` if the message should be sent even if the specified " -"replied-to message is not found" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:14 -#: aiogram.client.bot.Bot.send_animation:18 -#: aiogram.client.bot.Bot.send_audio:18 aiogram.client.bot.Bot.send_contact:13 -#: aiogram.client.bot.Bot.send_dice:10 aiogram.client.bot.Bot.send_document:15 -#: aiogram.client.bot.Bot.send_location:15 -#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:14 -#: aiogram.client.bot.Bot.send_poll:21 aiogram.client.bot.Bot.send_sticker:10 -#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:19 -#: aiogram.client.bot.Bot.send_video_note:13 -#: aiogram.client.bot.Bot.send_voice:14 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:16 of -msgid "" -"Returns the :class:`aiogram.types.message_id.MessageId` of the sent " -"message on success." -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:4 -#: aiogram.client.bot.Bot.edit_chat_invite_link:5 of -msgid "Invite link name; 0-32 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:5 -#: aiogram.client.bot.Bot.edit_chat_invite_link:6 of -msgid "Point in time (Unix timestamp) when the link will expire" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:6 -#: aiogram.client.bot.Bot.edit_chat_invite_link:7 of -msgid "" -"The maximum number of users that can be members of the chat " -"simultaneously after joining the chat via this invite link; 1-99999" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:7 -#: aiogram.client.bot.Bot.edit_chat_invite_link:8 of -msgid "" -":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" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:9 of -msgid "" -"Returns the new invite link as " -":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:4 of -msgid "Topic name, 1-128 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:5 of -msgid "" -"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)" -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:6 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:8 of -msgid "" -"Returns information about the created topic as a " -":class:`aiogram.types.forum_topic.ForumTopic` object." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:1 of -msgid "" -"Use this method to create a link for an invoice. Returns the created " -"invoice link as *String* on success." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:3 -#: aiogram.client.bot.Bot.send_invoice:4 of -msgid "Product name, 1-32 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:4 -#: aiogram.client.bot.Bot.send_invoice:5 of -msgid "Product description, 1-255 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:5 -#: aiogram.client.bot.Bot.send_invoice:6 of -msgid "" -"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:6 of -msgid "Payment provider token, obtained via `BotFather `_" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:7 -#: aiogram.client.bot.Bot.send_invoice:8 of -msgid "" -"Three-letter ISO 4217 currency code, see `more on currencies " -"`_" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:8 -#: aiogram.client.bot.Bot.send_invoice:9 of -msgid "" -"Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:9 -#: aiogram.client.bot.Bot.send_invoice:11 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:10 -#: aiogram.client.bot.Bot.send_invoice:12 of -msgid "" -"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*." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:11 -#: aiogram.client.bot.Bot.send_invoice:14 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:12 of -msgid "" -"URL of the product photo for the invoice. Can be a photo of the goods or " -"a marketing image for a service." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:13 -#: aiogram.client.bot.Bot.send_invoice:16 of -msgid "Photo size in bytes" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:14 -#: aiogram.client.bot.Bot.send_invoice:17 of -msgid "Photo width" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:15 -#: aiogram.client.bot.Bot.send_invoice:18 of -msgid "Photo height" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:16 -#: aiogram.client.bot.Bot.send_invoice:19 of -msgid "" -"Pass :code:`True` if you require the user's full name to complete the " -"order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:17 -#: aiogram.client.bot.Bot.send_invoice:20 of -msgid "" -"Pass :code:`True` if you require the user's phone number to complete the " -"order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:18 -#: aiogram.client.bot.Bot.send_invoice:21 of -msgid "" -"Pass :code:`True` if you require the user's email address to complete the" -" order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:19 -#: aiogram.client.bot.Bot.send_invoice:22 of -msgid "" -"Pass :code:`True` if you require the user's shipping address to complete " -"the order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:20 of -msgid "" -"Pass :code:`True` if the user's phone number should be sent to the " -"provider" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:21 of -msgid "" -"Pass :code:`True` if the user's email address should be sent to the " -"provider" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:22 -#: aiogram.client.bot.Bot.send_invoice:25 of -msgid "Pass :code:`True` if the final price depends on the shipping method" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:24 of -msgid "Returns the created invoice link as *String* on success." -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:3 of -msgid "User identifier of created sticker set owner" -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:4 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:5 of -msgid "Sticker set title, 1-64 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:10 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.decline_chat_join_request:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_chat_photo:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_chat_sticker_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:1 -#: aiogram.client.bot.Bot.delete_message:24 of -msgid "" -"Use this method to delete a message, including service messages, with the" -" following limitations:" -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:3 of -msgid "A message can only be deleted if it was sent less than 48 hours ago." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:5 of -msgid "" -"Service messages about a supergroup, channel, or forum topic creation " -"can't be deleted." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:7 of -msgid "" -"A dice message in a private chat can only be deleted if it was sent more " -"than 24 hours ago." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:9 of -msgid "" -"Bots can delete outgoing messages in private chats, groups, and " -"supergroups." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:11 of -msgid "Bots can delete incoming messages in private chats." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:13 of -msgid "" -"Bots granted *can_post_messages* permissions can delete outgoing messages" -" in channels." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:15 of -msgid "" -"If the bot is an administrator of a group, it can delete any message " -"there." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:17 of -msgid "" -"If the bot has *can_delete_messages* permission in a supergroup or a " -"channel, it can delete any message there." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:22 of -msgid "Identifier of the message to delete" -msgstr "" - -#: aiogram.client.bot.Bot.delete_my_commands:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_my_commands:3 -#: aiogram.client.bot.Bot.set_my_commands:4 of -msgid "" -"A JSON-serialized object, describing scope of users for which the " -"commands are relevant. Defaults to " -":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`." -msgstr "" - -#: aiogram.client.bot.Bot.delete_my_commands:4 -#: aiogram.client.bot.Bot.set_my_commands:5 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.delete_sticker_from_set:1 of -msgid "" -"Use this method to delete a sticker from a set created by the bot. " -"Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.delete_sticker_from_set:3 -#: aiogram.client.bot.Bot.set_sticker_position_in_set:3 of -msgid "File identifier of the sticker" -msgstr "" - -#: aiogram.client.bot.Bot.delete_webhook:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_webhook:3 -#: aiogram.client.bot.Bot.set_webhook:18 of -msgid "Pass :code:`True` to drop all pending updates" -msgstr "" - -#: aiogram.client.bot.Bot.edit_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_chat_invite_link:4 of -msgid "The invite link to edit" -msgstr "" - -#: aiogram.client.bot.Bot.edit_chat_invite_link:10 of -msgid "" -"Returns the edited invite link as a " -":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." -msgstr "" - -#: aiogram.client.bot.Bot.edit_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_forum_topic:5 of -msgid "" -"New topic name, 0-128 characters. If not specififed or empty, the current" -" name of the topic will be kept" -msgstr "" - -#: aiogram.client.bot.Bot.edit_forum_topic:6 of -msgid "" -"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. Pass an empty string to " -"remove the icon. If not specified, the current icon will be kept" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:3 -#: aiogram.client.bot.Bot.edit_message_live_location:5 -#: aiogram.client.bot.Bot.edit_message_media:4 -#: aiogram.client.bot.Bot.edit_message_reply_markup:3 -#: aiogram.client.bot.Bot.edit_message_text:4 -#: aiogram.client.bot.Bot.stop_message_live_location:3 of -msgid "" -"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`)" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:4 -#: aiogram.client.bot.Bot.edit_message_live_location:6 -#: aiogram.client.bot.Bot.edit_message_media:5 -#: aiogram.client.bot.Bot.edit_message_reply_markup:4 -#: aiogram.client.bot.Bot.edit_message_text:5 of -msgid "" -"Required if *inline_message_id* is not specified. Identifier of the " -"message to edit" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:5 -#: aiogram.client.bot.Bot.edit_message_live_location:7 -#: aiogram.client.bot.Bot.edit_message_media:6 -#: aiogram.client.bot.Bot.edit_message_reply_markup:5 -#: aiogram.client.bot.Bot.edit_message_text:6 -#: aiogram.client.bot.Bot.get_game_high_scores:8 -#: aiogram.client.bot.Bot.set_game_score:9 -#: aiogram.client.bot.Bot.stop_message_live_location:5 of -msgid "" -"Required if *chat_id* and *message_id* are not specified. Identifier of " -"the inline message" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:6 of -msgid "New caption of the message, 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:7 of -msgid "" -"Mode for parsing entities in the message caption. See `formatting options" -" `_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:8 -#: aiogram.client.bot.Bot.send_animation:12 aiogram.client.bot.Bot.send_audio:9 -#: aiogram.client.bot.Bot.send_document:9 aiogram.client.bot.Bot.send_photo:8 -#: aiogram.client.bot.Bot.send_video:12 aiogram.client.bot.Bot.send_voice:8 of -msgid "" -"A JSON-serialized list of special entities that appear in the caption, " -"which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:9 -#: aiogram.client.bot.Bot.edit_message_reply_markup:6 -#: aiogram.client.bot.Bot.edit_message_text:10 of -msgid "" -"A JSON-serialized object for an `inline keyboard " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:11 -#: aiogram.client.bot.Bot.edit_message_live_location:13 -#: aiogram.client.bot.Bot.edit_message_media:9 -#: aiogram.client.bot.Bot.edit_message_reply_markup:8 -#: aiogram.client.bot.Bot.edit_message_text:12 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:3 of -msgid "Latitude of new location" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:4 of -msgid "Longitude of new location" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:8 -#: aiogram.client.bot.Bot.send_location:7 of -msgid "The radius of uncertainty for the location, measured in meters; 0-1500" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:9 of -msgid "" -"Direction in which the user is moving, in degrees. Must be between 1 and " -"360 if specified." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:10 of -msgid "" -"The maximum distance for proximity alerts about approaching another chat " -"member, in meters. Must be between 1 and 100000 if specified." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:11 -#: aiogram.client.bot.Bot.edit_message_media:7 -#: aiogram.client.bot.Bot.stop_message_live_location:6 of -msgid "" -"A JSON-serialized object for a new `inline keyboard " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_media:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_media:3 of -msgid "A JSON-serialized object for a new media content of the message" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_reply_markup:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:3 of -msgid "New text of the message, 1-4096 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:7 -#: aiogram.client.bot.Bot.send_message:6 of -msgid "" -"Mode for parsing entities in the message text. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:8 -#: aiogram.client.bot.Bot.send_message:7 of -msgid "" -"A JSON-serialized list of special entities that appear in message text, " -"which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:9 -#: aiogram.client.bot.Bot.send_message:8 of -msgid "Disables link previews for links in this message" -msgstr "" - -#: aiogram.client.bot.Bot.export_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.export_chat_invite_link:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.export_chat_invite_link:7 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.forward_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.forward_message:8 of -msgid "Protects the contents of the forwarded message from forwarding and saving" -msgstr "" - -#: aiogram.client.bot.Bot.forward_message:10 -#: aiogram.client.bot.Bot.send_contact:15 aiogram.client.bot.Bot.send_dice:12 -#: aiogram.client.bot.Bot.send_game:12 aiogram.client.bot.Bot.send_invoice:32 -#: aiogram.client.bot.Bot.send_location:17 -#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:16 -#: aiogram.client.bot.Bot.send_poll:23 aiogram.client.bot.Bot.send_sticker:12 -#: aiogram.client.bot.Bot.send_venue:19 -#: aiogram.client.bot.Bot.send_video_note:15 of -msgid "On success, the sent :class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat:3 -#: aiogram.client.bot.Bot.get_chat_administrators:3 -#: aiogram.client.bot.Bot.get_chat_member:3 -#: aiogram.client.bot.Bot.get_chat_member_count:3 -#: aiogram.client.bot.Bot.leave_chat:3 of -msgid "" -"Unique identifier for the target chat or username of the target " -"supergroup or channel (in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.get_chat:5 of -msgid "Returns a :class:`aiogram.types.chat.Chat` object on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_administrators:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_administrators:5 of -msgid "Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member:1 of -msgid "" -"Use this method to get information about a member of a chat. The method " -"is guaranteed to work only if the bot is an administrator in the chat. " -"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " -"success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member:6 of -msgid "Returns a :class:`aiogram.types.chat_member.ChatMember` object on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member_count:1 of -msgid "" -"Use this method to get the number of members in a chat. Returns *Int* on " -"success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member_count:5 of -msgid "Returns *Int* on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_menu_button:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_menu_button:3 of -msgid "" -"Unique identifier for the target private chat. If not specified, default " -"bot's menu button will be returned" -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_menu_button:5 of -msgid "Returns :class:`aiogram.types.menu_button.MenuButton` on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:1 of -msgid "" -"Use this method to get information about custom emoji stickers by their " -"identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` " -"objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:3 of -msgid "" -"List of custom emoji identifiers. At most 200 custom emoji identifiers " -"can be specified." -msgstr "" - -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:5 -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers:4 of -msgid "Returns an Array of :class:`aiogram.types.sticker.Sticker` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_file:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_file:4 of -msgid "File identifier to get information about" -msgstr "" - -#: aiogram.client.bot.Bot.get_file:6 of -msgid "" -"You should save the file's MIME type and name (if available) when the " -"File object is received." -msgstr "" - -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:5 of -msgid "Target user id" -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:6 -#: aiogram.client.bot.Bot.set_game_score:7 of -msgid "" -"Required if *inline_message_id* is not specified. Unique identifier for " -"the target chat" -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:7 -#: aiogram.client.bot.Bot.set_game_score:8 of -msgid "" -"Required if *inline_message_id* is not specified. Identifier of the sent " -"message" -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:10 of -msgid "Please note that this behavior is subject to change." -msgstr "" - -#: aiogram.client.bot.Bot.get_me:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_me:4 of -msgid "" -"Returns basic information about the bot in form of a " -":class:`aiogram.types.user.User` object." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:3 of -msgid "" -"A JSON-serialized object, describing scope of users. Defaults to " -":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:4 of -msgid "A two-letter ISO 639-1 language code or an empty string" -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:6 of -msgid "If commands aren't set, an empty list is returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:1 of -msgid "" -"Use this method to get the current default administrator rights of the " -"bot. Returns " -":class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` " -"on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:5 of -msgid "" -"Returns " -":class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` " -"on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_sticker_set:1 of -msgid "" -"Use this method to get a sticker set. On success, a " -":class:`aiogram.types.sticker_set.StickerSet` object is returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_sticker_set:3 of -msgid "Name of the sticker set" -msgstr "" - -#: aiogram.client.bot.Bot.get_sticker_set:5 of -msgid "" -"On success, a :class:`aiogram.types.sticker_set.StickerSet` object is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:1 of -msgid "" -"Use this method to receive incoming updates using long polling (`wiki " -"`_). Returns " -"an Array of :class:`aiogram.types.update.Update` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:3 aiogram.client.bot.Bot.set_webhook:4 of -msgid "**Notes**" -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:5 of -msgid "**1.** This method will not work if an outgoing webhook is set up." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:7 of -msgid "" -"**2.** In order to avoid getting duplicate updates, recalculate *offset* " -"after each server response." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:9 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:10 of -msgid "" -"Limits the number of updates to be retrieved. Values between 1-100 are " -"accepted. Defaults to 100." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:11 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:12 aiogram.client.bot.Bot.set_webhook:17 -#: of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:14 of -msgid "Returns an Array of :class:`aiogram.types.update.Update` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:1 of -msgid "" -"Use this method to get a list of profile pictures for a user. Returns a " -":class:`aiogram.types.user_profile_photos.UserProfilePhotos` object." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:4 of -msgid "" -"Sequential number of the first photo to be returned. By default, all " -"photos are returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:5 of -msgid "" -"Limits the number of photos to be retrieved. Values between 1-100 are " -"accepted. Defaults to 100." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:7 of -msgid "" -"Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` " -"object." -msgstr "" - -#: aiogram.client.bot.Bot.get_webhook_info:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_webhook_info:4 of -msgid "" -"If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will" -" return an object with the *url* field empty." -msgstr "" - -#: aiogram.client.bot.Bot.leave_chat:1 of -msgid "" -"Use this method for your bot to leave a group, supergroup or channel. " -"Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.log_out:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.pin_chat_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.pin_chat_message:4 of -msgid "Identifier of a message to pin" -msgstr "" - -#: aiogram.client.bot.Bot.pin_chat_message:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:5 of -msgid "Pass :code:`True` if the administrator's presence in the chat is hidden" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:6 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:7 of -msgid "" -"Pass :code:`True` if the administrator can create channel posts, channels" -" only" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:8 of -msgid "" -"Pass :code:`True` if the administrator can edit messages of other users " -"and can pin messages, channels only" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:9 of -msgid "Pass :code:`True` if the administrator can delete messages of other users" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:10 of -msgid "Pass :code:`True` if the administrator can manage video chats" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:11 of -msgid "" -"Pass :code:`True` if the administrator can restrict, ban or unban chat " -"members" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:12 of -msgid "" -"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)" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:13 of -msgid "" -"Pass :code:`True` if the administrator can change chat title, photo and " -"other settings" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:14 of -msgid "Pass :code:`True` if the administrator can invite new users to the chat" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:15 of -msgid "Pass :code:`True` if the administrator can pin messages, supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:16 of -msgid "" -"Pass :code:`True` if the user is allowed to create, rename, close, and " -"reopen forum topics, supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.reopen_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.restrict_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.restrict_chat_member:5 of -msgid "A JSON-serialized object for new user permissions" -msgstr "" - -#: aiogram.client.bot.Bot.restrict_chat_member:6 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:3 of -msgid "" -"Unique identifier of the target chat or username of the target channel " -"(in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:4 of -msgid "The invite link to revoke" -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:6 of -msgid "" -"Returns the revoked invite link as " -":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:6 of -msgid "Duration of sent animation in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:7 of -msgid "Animation width" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:8 of -msgid "Animation height" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:9 aiogram.client.bot.Bot.send_audio:13 -#: aiogram.client.bot.Bot.send_document:6 aiogram.client.bot.Bot.send_video:9 -#: aiogram.client.bot.Bot.send_video_note:8 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:10 of -msgid "" -"Animation caption (may also be used when resending animation by " -"*file_id*), 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:11 of -msgid "" -"Mode for parsing entities in the animation caption. See `formatting " -"options `_ for " -"more details." -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:13 of -msgid "" -"Pass :code:`True` if the animation needs to be covered with a spoiler " -"animation" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:20 of -msgid "" -"Bots can currently send animation files of up to 50 MB in size, this " -"limit may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:5 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:7 of -msgid "Audio caption, 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:8 of -msgid "" -"Mode for parsing entities in the audio caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:10 of -msgid "Duration of the audio in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:11 of -msgid "Performer" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:12 of -msgid "Track name" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:20 of -msgid "" -"Bots can currently send audio files of up to 50 MB in size, this limit " -"may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:5 of -msgid "" -"We only recommend using this method when a response from the bot will " -"take a **noticeable** amount of time to arrive." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:8 of -msgid "" -"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 " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:9 of -msgid "Unique identifier for the target message thread; supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:11 of -msgid "The user will see a 'sending photo' status for the bot." -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:1 of -msgid "" -"Use this method to send phone contacts. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:4 of -msgid "Contact's phone number" -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:5 of -msgid "Contact's first name" -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:7 of -msgid "Contact's last name" -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:8 of -msgid "" -"Additional data about the contact in the form of a `vCard " -"`_, 0-2048 bytes" -msgstr "" - -#: aiogram.client.bot.Bot.send_dice:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_dice:5 of -msgid "" -"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 '🎲'" -msgstr "" - -#: aiogram.client.bot.Bot.send_dice:7 of -msgid "Protects the contents of the sent message from forwarding" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_document:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:7 of -msgid "" -"Document caption (may also be used when resending documents by " -"*file_id*), 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:8 of -msgid "" -"Mode for parsing entities in the document caption. See `formatting " -"options `_ for " -"more details." -msgstr "" - -#: aiogram.client.bot.Bot.send_document:10 of -msgid "" -"Disables automatic server-side content type detection for files uploaded " -"using multipart/form-data" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:17 of -msgid "" -"Bots can currently send files of any type of up to 50 MB in size, this " -"limit may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_game:1 of -msgid "" -"Use this method to send a game. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_game:3 of -msgid "Unique identifier for the target chat" -msgstr "" - -#: aiogram.client.bot.Bot.send_game:4 of -msgid "" -"Short name of the game, serves as the unique identifier for the game. Set" -" up your games via `@BotFather `_." -msgstr "" - -#: aiogram.client.bot.Bot.send_game:10 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:1 of -msgid "" -"Use this method to send invoices. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:7 of -msgid "" -"Payment provider token, obtained via `@BotFather " -"`_" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:13 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:15 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:23 of -msgid "Pass :code:`True` if the user's phone number should be sent to provider" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:24 of -msgid "Pass :code:`True` if the user's email address should be sent to provider" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:30 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:1 of -msgid "" -"Use this method to send point on the map. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:4 of -msgid "Latitude of the location" -msgstr "" - -#: aiogram.client.bot.Bot.send_location:5 of -msgid "Longitude of the location" -msgstr "" - -#: aiogram.client.bot.Bot.send_location:8 of -msgid "" -"Period in seconds for which the location will be updated (see `Live " -"Locations `_, should be between" -" 60 and 86400." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:9 of -msgid "" -"For live locations, a direction in which the user is moving, in degrees. " -"Must be between 1 and 360 if specified." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:10 of -msgid "" -"For live locations, a maximum distance for proximity alerts about " -"approaching another chat member, in meters. Must be between 1 and 100000 " -"if specified." -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:4 of -msgid "" -"A JSON-serialized array describing messages to be sent, must include 2-10" -" items" -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:6 of -msgid "" -"Sends messages `silently `_. Users will receive a notification with no sound." -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:7 of -msgid "Protects the contents of the sent messages from forwarding and saving" -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:8 of -msgid "If the messages are a reply, ID of the original message" -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:11 of -msgid "" -"On success, an array of `Messages " -"`_ that were sent is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_message:1 of -msgid "" -"Use this method to send text messages. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_message:4 of -msgid "Text of the message to be sent, 1-4096 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:1 of -msgid "" -"Use this method to send photos. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:6 of -msgid "" -"Photo caption (may also be used when resending photos by *file_id*), " -"0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:7 of -msgid "" -"Mode for parsing entities in the photo caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:9 of -msgid "" -"Pass :code:`True` if the photo needs to be covered with a spoiler " -"animation" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:1 of -msgid "" -"Use this method to send a native poll. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:4 of -msgid "Poll question, 1-300 characters" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:5 of -msgid "" -"A JSON-serialized list of answer options, 2-10 strings 1-100 characters " -"each" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:7 of -msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:8 of -msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:9 of -msgid "" -":code:`True`, if the poll allows multiple answers, ignored for polls in " -"quiz mode, defaults to :code:`False`" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:10 of -msgid "" -"0-based identifier of the correct answer option, required for polls in " -"quiz mode" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:11 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:12 of -msgid "" -"Mode for parsing entities in the explanation. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:13 of -msgid "" -"A JSON-serialized list of special entities that appear in the poll " -"explanation, which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:14 of -msgid "" -"Amount of time in seconds the poll will be active after creation, 5-600. " -"Can't be used together with *close_date*." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:15 of -msgid "" -"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*." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:16 of -msgid "" -"Pass :code:`True` if the poll needs to be immediately closed. This can be" -" useful for poll preview." -msgstr "" - -#: aiogram.client.bot.Bot.send_sticker:1 of -msgid "" -"Use this method to send static .WEBP, `animated " -"`_ .TGS, or `video " -"`_ .WEBM " -"stickers. On success, the sent :class:`aiogram.types.message.Message` is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_sticker:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:1 of -msgid "" -"Use this method to send information about a venue. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:4 of -msgid "Latitude of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:5 of -msgid "Longitude of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:6 of -msgid "Name of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:7 of -msgid "Address of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:9 of -msgid "Foursquare identifier of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:10 of -msgid "" -"Foursquare type of the venue, if known. (For example, " -"'arts_entertainment/default', 'arts_entertainment/aquarium' or " -"'food/icecream'.)" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:11 of -msgid "Google Places identifier of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:12 of -msgid "" -"Google Places type of the venue. (See `supported types " -"`_.)" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_video:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:6 aiogram.client.bot.Bot.send_video_note:6 -#: of -msgid "Duration of sent video in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:7 of -msgid "Video width" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:8 of -msgid "Video height" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:10 of -msgid "" -"Video caption (may also be used when resending videos by *file_id*), " -"0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:11 of -msgid "" -"Mode for parsing entities in the video caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_video:13 of -msgid "" -"Pass :code:`True` if the video needs to be covered with a spoiler " -"animation" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:14 of -msgid "Pass :code:`True` if the uploaded video is suitable for streaming" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:21 of -msgid "" -"Bots can currently send video files of up to 50 MB in size, this limit " -"may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_video_note:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_video_note:4 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.send_video_note:7 of -msgid "Video width and height, i.e. diameter of the video message" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:6 of -msgid "Voice message caption, 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:7 of -msgid "" -"Mode for parsing entities in the voice message caption. See `formatting " -"options `_ for " -"more details." -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:9 of -msgid "Duration of the voice message in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:16 of -msgid "" -"Bots can currently send voice messages of up to 50 MB in size, this limit" -" may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:1 of -msgid "" -"Use this method to set a custom title for an administrator in a " -"supergroup promoted by the bot. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:5 of -msgid "" -"New custom title for the administrator; 0-16 characters, emoji are not " -"allowed" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_description:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_description:4 of -msgid "New chat description, 0-255 characters" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_menu_button:1 of -msgid "" -"Use this method to change the bot's menu button in a private chat, or the" -" default menu button. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_menu_button:3 of -msgid "" -"Unique identifier for the target private chat. If not specified, default " -"bot's menu button will be changed" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_menu_button:4 of -msgid "" -"A JSON-serialized object for the bot's new menu button. Defaults to " -":class:`aiogram.types.menu_button_default.MenuButtonDefault`" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_permissions:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_permissions:4 of -msgid "A JSON-serialized object for new default chat permissions" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_photo:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_photo:4 of -msgid "New chat photo, uploaded using multipart/form-data" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_sticker_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_sticker_set:4 of -msgid "Name of the sticker set to be set as the group sticker set" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_title:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_title:4 of -msgid "New chat title, 1-128 characters" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:1 of -msgid "" -"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`." -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:3 -#: aiogram.client.bot.Bot.set_passport_data_errors:4 of -msgid "User identifier" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:4 of -msgid "New score, must be non-negative" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:5 of -msgid "" -"Pass :code:`True` if the high score is allowed to decrease. This can be " -"useful when fixing mistakes or banning cheaters" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:6 of -msgid "" -"Pass :code:`True` if the game message should not be automatically edited " -"to include the current scoreboard" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:11 of -msgid "" -"Returns an error, if the new score is not greater than the user's current" -" score in the chat and *force* is :code:`False`." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_commands:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_commands:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:3 of -msgid "" -"A JSON-serialized object describing new default administrator rights. If " -"not specified, the default administrator rights will be cleared." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:4 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_passport_data_errors:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_passport_data_errors:5 of -msgid "A JSON-serialized array describing the errors" -msgstr "" - -#: aiogram.client.bot.Bot.set_passport_data_errors:7 of -msgid "" -"Supply some details in the error message to make sure the user knows how " -"to correct the issues." -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_position_in_set:1 of -msgid "" -"Use this method to move a sticker in a set created by the bot to a " -"specific position. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_position_in_set:4 of -msgid "New sticker position in the set, zero-based" -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_set_thumb:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_set_thumb:4 of -msgid "User identifier of the sticker set owner" -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_set_thumb:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:6 of -msgid "" -"**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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:8 of -msgid "" -"**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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:10 of -msgid "" -"**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 `_." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:13 of -msgid "" -"HTTPS URL to send updates to. Use an empty string to remove webhook " -"integration" -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:14 of -msgid "" -"Upload your public key certificate so that the root certificate in use " -"can be checked. See our `self-signed guide " -"`_ for details." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:15 of -msgid "" -"The fixed IP address which will be used to send webhook requests instead " -"of the IP address resolved through DNS" -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:16 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:19 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:21 of -msgid "Please upload as InputFile, sending a String will not work." -msgstr "" - -#: aiogram.client.bot.Bot.stop_message_live_location:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.stop_message_live_location:4 of -msgid "" -"Required if *inline_message_id* is not specified. Identifier of the " -"message with live location to stop" -msgstr "" - -#: aiogram.client.bot.Bot.stop_message_live_location:8 of -msgid "" -"On success, if the message is not an inline message, the edited " -":class:`aiogram.types.message.Message` is returned, otherwise " -":code:`True` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:1 of -msgid "" -"Use this method to stop a poll which was sent by the bot. On success, the" -" stopped :class:`aiogram.types.poll.Poll` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:4 of -msgid "Identifier of the original message with the poll" -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:5 of -msgid "" -"A JSON-serialized object for a new message `inline keyboard " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:7 of -msgid "On success, the stopped :class:`aiogram.types.poll.Poll` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.unban_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unban_chat_member:5 of -msgid "Do nothing if the user is not banned" -msgstr "" - -#: aiogram.client.bot.Bot.unban_chat_sender_chat:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_all_chat_messages:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_chat_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_chat_message:4 of -msgid "" -"Identifier of a message to unpin. If not specified, the most recent " -"pinned message (by sending date) will be unpinned." -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:3 of -msgid "User identifier of sticker file owner" -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:4 of -msgid "" -"**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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:6 of -msgid "Returns the uploaded :class:`aiogram.types.file.File` on success." -msgstr "" - -#: aiogram.client.bot.Bot.close_general_forum_topic:1 of -msgid "" -"Use this method to close an open 'General' 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 " -":code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.edit_general_forum_topic:1 of -msgid "" -"Use this method to edit the name of the 'General' 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. Returns " -":code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.edit_general_forum_topic:4 of -msgid "New topic name, 1-128 characters" -msgstr "" - -#: aiogram.client.bot.Bot.hide_general_forum_topic:1 of -msgid "" -"Use this method to hide the 'General' 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. The topic will be " -"automatically closed if it was open. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.reopen_general_forum_topic:1 of -msgid "" -"Use this method to reopen a closed 'General' 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. The topic will be" -" automatically unhidden if it was hidden. Returns :code:`True` on " -"success." -msgstr "" - -#: aiogram.client.bot.Bot.unhide_general_forum_topic:1 of -msgid "" -"Use this method to unhide the 'General' 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 :code:`True` " -"on success." -msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "A JSON-serialized object for a new" -#~ " `inline keyboard `_." -#~ msgstr "" - -#~ msgid "" -#~ "Additional interface options. A JSON-" -#~ "serialized object for an `inline " -#~ "keyboard `_, " -#~ "`custom reply keyboard " -#~ "`_, instructions " -#~ "to remove keyboard or to force a" -#~ " reply from the user." -#~ msgstr "" - -#~ msgid "New chat title, 1-255 characters" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "Use this method to change the list" -#~ " of the bot's commands. See " -#~ "`https://core.telegram.org/bots#commands " -#~ "`_`https://core.telegram.org/bots#commands" -#~ " `_ for more" -#~ " details about bot commands. Returns " -#~ ":code:`True` on success." -#~ msgstr "" - -#~ msgid "" -#~ "A JSON-serialized object for an " -#~ "`inline keyboard `_." -#~ msgstr "" - -#~ msgid "" -#~ "A JSON-serialized object for a new" -#~ " message `inline keyboard " -#~ "`_." -#~ msgstr "" - -#~ msgid "" -#~ "`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." -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getupdates" -#~ msgstr "" - -#~ msgid "Returns an Array of Update objects." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setwebhook" -#~ msgstr "" - -#~ msgid "Returns True on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletewebhook" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getwebhookinfo" -#~ msgstr "" - -#~ msgid "" -#~ "On success, returns a WebhookInfo " -#~ "object. If the bot is using " -#~ "getUpdates, will return an object with" -#~ " the url field empty." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getme" -#~ msgstr "" - -#~ msgid "Returns basic information about the bot in form of a User object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#logout" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#close" -#~ msgstr "" - -#~ msgid "" -#~ "The method will return error 429 " -#~ "in the first 10 minutes after the" -#~ " bot is launched. Returns True on " -#~ "success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendmessage" -#~ msgstr "" - -#~ msgid "On success, the sent Message is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#forwardmessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#copymessage" -#~ msgstr "" - -#~ msgid "Returns the MessageId of the sent message on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendphoto" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendaudio" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#senddocument" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvideo" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendanimation" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvoice" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvideonote" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendmediagroup" -#~ msgstr "" - -#~ msgid "On success, an array of Messages that were sent is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendlocation" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagelivelocation" -#~ msgstr "" - -#~ msgid "" -#~ "On success, if the edited message " -#~ "is not an inline message, the " -#~ "edited Message is returned, otherwise " -#~ "True is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#stopmessagelivelocation" -#~ msgstr "" - -#~ msgid "" -#~ "On success, if the message is not" -#~ " an inline message, the edited " -#~ "Message is returned, otherwise True is" -#~ " returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvenue" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendcontact" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendpoll" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#senddice" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendchataction" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getuserprofilephotos" -#~ msgstr "" - -#~ msgid "Returns a UserProfilePhotos object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getfile" -#~ msgstr "" - -#~ msgid "On success, a File object is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#banchatmember" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unbanchatmember" -#~ msgstr "" - -#~ msgid "" -#~ "The user will not return to the" -#~ " group or channel automatically, but " -#~ "will be able to join via link, " -#~ "etc. Returns True on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#restrictchatmember" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#promotechatmember" -#~ msgstr "" - -#~ msgid "" -#~ "Source: " -#~ "https://core.telegram.org/bots/api#setchatadministratorcustomtitle" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#banchatsenderchat" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unbanchatsenderchat" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatpermissions" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#exportchatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the new invite link as String on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createchatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the new invite link as ChatInviteLink object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editchatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the edited invite link as a ChatInviteLink object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#revokechatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the revoked invite link as ChatInviteLink object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#approvechatjoinrequest" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#declinechatjoinrequest" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatphoto" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletechatphoto" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchattitle" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatdescription" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#pinchatmessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unpinchatmessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unpinallchatmessages" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#leavechat" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchat" -#~ msgstr "" - -#~ msgid "Returns a Chat object on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatadministrators" -#~ msgstr "" - -#~ msgid "Returns an Array of ChatMember objects." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatmembercount" -#~ msgstr "" - -#~ msgid "Returns Int on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatmember" -#~ msgstr "" - -#~ msgid "Returns a ChatMember object on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatstickerset" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletechatstickerset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getforumtopiciconstickers" -#~ msgstr "" - -#~ msgid "Returns an Array of Sticker objects." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createforumtopic" -#~ msgstr "" - -#~ msgid "" -#~ "Color of the topic icon in RGB " -#~ "format. Currently, must be one of " -#~ "0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, " -#~ "0xFF93B2, or 0xFB6F5F" -#~ msgstr "" - -#~ msgid "Returns information about the created topic as a ForumTopic object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editforumtopic" -#~ msgstr "" - -#~ msgid "" -#~ "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" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#closeforumtopic" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#reopenforumtopic" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deleteforumtopic" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answercallbackquery" -#~ msgstr "" - -#~ msgid "On success, True is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setmycommands" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletemycommands" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getmycommands" -#~ msgstr "" - -#~ msgid "" -#~ "Returns an Array of BotCommand objects." -#~ " If commands aren't set, an empty " -#~ "list is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatmenubutton" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatmenubutton" -#~ msgstr "" - -#~ msgid "Returns MenuButton on success." -#~ msgstr "" - -#~ msgid "" -#~ "Source: " -#~ "https://core.telegram.org/bots/api#setmydefaultadministratorrights" -#~ msgstr "" - -#~ msgid "" -#~ "Source: " -#~ "https://core.telegram.org/bots/api#getmydefaultadministratorrights" -#~ msgstr "" - -#~ msgid "Returns ChatAdministratorRights on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagetext" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagecaption" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagemedia" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagereplymarkup" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#stoppoll" -#~ msgstr "" - -#~ msgid "On success, the stopped Poll is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletemessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendsticker" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getstickerset" -#~ msgstr "" - -#~ msgid "On success, a StickerSet object is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getcustomemojistickers" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#uploadstickerfile" -#~ msgstr "" - -#~ msgid "Returns the uploaded File on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createnewstickerset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#addstickertoset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setstickerpositioninset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletestickerfromset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setstickersetthumb" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answerinlinequery" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answerwebappquery" -#~ msgstr "" - -#~ msgid "On success, a SentWebAppMessage object is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendinvoice" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createinvoicelink" -#~ msgstr "" - -#~ msgid "Returns the created invoice link as String on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answershippingquery" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answerprecheckoutquery" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setpassportdataerrors" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendgame" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setgamescore" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getgamehighscores" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "Use this method to get information " -#~ "about a member of a chat. Returns" -#~ " a :class:`aiogram.types.chat_member.ChatMember` object" -#~ " on success." -#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po b/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po index 711dcfaa..bf582c84 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,8 +50,8 @@ msgstr "" #: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.name:1 of msgid "" -"New topic name, 0-128 characters. If not specififed or empty, the current" -" name of the topic will be kept" +"New topic name, 0-128 characters. If not specified or empty, the current " +"name of the topic will be kept" msgstr "" #: ../../docstring @@ -94,24 +94,3 @@ msgstr "" #: ../../api/methods/edit_forum_topic.rst:40 msgid "As reply into Webhook in handler" msgstr "" - -#~ msgid "" -#~ "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" -#~ msgstr "" - -#~ msgid "New topic name, 1-128 characters" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po index ae8994c9..f882bd5a 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -31,9 +31,9 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work only if the bot is an administrator in the chat. " -"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " -"success." +"is guaranteed to work for other users, only if the bot is an " +"administrator in the chat. Returns a " +":class:`aiogram.types.chat_member.ChatMember` object on success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -85,10 +85,3 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" - -#~ msgid "" -#~ "Use this method to get information " -#~ "about a member of a chat. Returns" -#~ " a :class:`aiogram.types.chat_member.ChatMember` object" -#~ " on success." -#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat.po b/docs/locale/en/LC_MESSAGES/api/types/chat.po index 13a50fa1..c0f95110 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -733,9 +733,9 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work only if the bot is an administrator in the chat. " -"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " -"success." +"is guaranteed to work for other users, only if the bot is an " +"administrator in the chat. Returns a " +":class:`aiogram.types.chat_member.ChatMember` object on success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -1256,10 +1256,3 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" - -#~ msgid "" -#~ "Use this method to get information " -#~ "about a member of a chat. Returns" -#~ " a :class:`aiogram.types.chat_member.ChatMember` object" -#~ " on success." -#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/changelog.po b/docs/locale/en/LC_MESSAGES/changelog.po index 6f0f541b..a8b8a071 100644 --- a/docs/locale/en/LC_MESSAGES/changelog.po +++ b/docs/locale/en/LC_MESSAGES/changelog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2022-12-30)" +msgid "\\ |release| [UNRELEASED DRAFT] (2023-01-07)" msgstr "" #: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 @@ -2480,25 +2480,3 @@ msgstr "" #: ../../../HISTORY.rst:497 msgid "0.1 (2017-06-03)" msgstr "" - -#~ msgid "" -#~ "Added is_chat_creator method to " -#~ "ChatMemberStatus.yml (`#394 " -#~ "`_)" -#~ msgstr "" - -#~ msgid "" -#~ ":code:`is_member` and :code:`is_admin` methods " -#~ "of :code:`ChatMember` and " -#~ ":code:`ChatMemberStatus.yml` was renamed to " -#~ ":code:`is_chat_member` and :code:`is_chat_admin`" -#~ msgstr "" - -#~ msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" -#~ msgstr "" - -#~ msgid "" -#~ "Added missing shortcuts, new enums, " -#~ "reworked old stuff `#952 " -#~ "`_" -#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po index 6fe7be8c..0a7dbcc9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/bot.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/bot.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -40,6 +40,12 @@ msgid "" "same specification with all class-based methods." msgstr "" +#: ../../api/bot.rst:14 +msgid "" +"A full list of methods can be found in the appropriate section of the " +"documentation" +msgstr "" + #: aiogram.client.bot.Bot:1 of msgid "" "Bases: :py:class:`~aiogram.utils.mixins.ContextInstanceMixin`\\ " @@ -50,92 +56,8 @@ msgstr "" msgid "Bot class" msgstr "" -#: aiogram.client.bot.Bot.__init__ aiogram.client.bot.Bot.add_sticker_to_set -#: aiogram.client.bot.Bot.answer_callback_query -#: aiogram.client.bot.Bot.answer_inline_query -#: aiogram.client.bot.Bot.answer_pre_checkout_query -#: aiogram.client.bot.Bot.answer_shipping_query -#: aiogram.client.bot.Bot.answer_web_app_query -#: aiogram.client.bot.Bot.approve_chat_join_request -#: aiogram.client.bot.Bot.ban_chat_member -#: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic -#: aiogram.client.bot.Bot.close_general_forum_topic -#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message -#: aiogram.client.bot.Bot.create_chat_invite_link -#: aiogram.client.bot.Bot.create_forum_topic -#: aiogram.client.bot.Bot.create_invoice_link -#: aiogram.client.bot.Bot.create_new_sticker_set -#: aiogram.client.bot.Bot.decline_chat_join_request -#: aiogram.client.bot.Bot.delete_chat_photo -#: aiogram.client.bot.Bot.delete_chat_sticker_set -#: aiogram.client.bot.Bot.delete_forum_topic -#: aiogram.client.bot.Bot.delete_message -#: aiogram.client.bot.Bot.delete_my_commands -#: aiogram.client.bot.Bot.delete_sticker_from_set -#: aiogram.client.bot.Bot.delete_webhook aiogram.client.bot.Bot.download -#: aiogram.client.bot.Bot.download_file -#: aiogram.client.bot.Bot.edit_chat_invite_link -#: aiogram.client.bot.Bot.edit_forum_topic -#: aiogram.client.bot.Bot.edit_general_forum_topic -#: aiogram.client.bot.Bot.edit_message_caption -#: aiogram.client.bot.Bot.edit_message_live_location -#: aiogram.client.bot.Bot.edit_message_media -#: aiogram.client.bot.Bot.edit_message_reply_markup -#: aiogram.client.bot.Bot.edit_message_text -#: aiogram.client.bot.Bot.export_chat_invite_link -#: aiogram.client.bot.Bot.forward_message aiogram.client.bot.Bot.get_chat -#: aiogram.client.bot.Bot.get_chat_administrators -#: aiogram.client.bot.Bot.get_chat_member -#: aiogram.client.bot.Bot.get_chat_member_count -#: aiogram.client.bot.Bot.get_chat_menu_button -#: aiogram.client.bot.Bot.get_custom_emoji_stickers -#: aiogram.client.bot.Bot.get_file -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers -#: aiogram.client.bot.Bot.get_game_high_scores aiogram.client.bot.Bot.get_me -#: aiogram.client.bot.Bot.get_my_commands -#: aiogram.client.bot.Bot.get_my_default_administrator_rights -#: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates -#: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info -#: aiogram.client.bot.Bot.hide_general_forum_topic -#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.pin_chat_message -#: aiogram.client.bot.Bot.promote_chat_member -#: aiogram.client.bot.Bot.reopen_forum_topic -#: aiogram.client.bot.Bot.reopen_general_forum_topic -#: aiogram.client.bot.Bot.restrict_chat_member -#: aiogram.client.bot.Bot.revoke_chat_invite_link -#: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio -#: aiogram.client.bot.Bot.send_chat_action aiogram.client.bot.Bot.send_contact -#: aiogram.client.bot.Bot.send_dice aiogram.client.bot.Bot.send_document -#: aiogram.client.bot.Bot.send_game aiogram.client.bot.Bot.send_invoice -#: aiogram.client.bot.Bot.send_location aiogram.client.bot.Bot.send_media_group -#: aiogram.client.bot.Bot.send_message aiogram.client.bot.Bot.send_photo -#: aiogram.client.bot.Bot.send_poll aiogram.client.bot.Bot.send_sticker -#: aiogram.client.bot.Bot.send_venue aiogram.client.bot.Bot.send_video -#: aiogram.client.bot.Bot.send_video_note aiogram.client.bot.Bot.send_voice -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title -#: aiogram.client.bot.Bot.set_chat_description -#: aiogram.client.bot.Bot.set_chat_menu_button -#: aiogram.client.bot.Bot.set_chat_permissions -#: aiogram.client.bot.Bot.set_chat_photo -#: aiogram.client.bot.Bot.set_chat_sticker_set -#: aiogram.client.bot.Bot.set_chat_title aiogram.client.bot.Bot.set_game_score -#: aiogram.client.bot.Bot.set_my_commands -#: aiogram.client.bot.Bot.set_my_default_administrator_rights -#: aiogram.client.bot.Bot.set_passport_data_errors -#: aiogram.client.bot.Bot.set_sticker_position_in_set -#: aiogram.client.bot.Bot.set_sticker_set_thumb -#: aiogram.client.bot.Bot.set_webhook -#: aiogram.client.bot.Bot.stop_message_live_location -#: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member -#: aiogram.client.bot.Bot.unban_chat_sender_chat -#: aiogram.client.bot.Bot.unhide_general_forum_topic -#: aiogram.client.bot.Bot.unpin_all_chat_messages -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages -#: aiogram.client.bot.Bot.unpin_chat_message -#: aiogram.client.bot.Bot.upload_sticker_file of +#: aiogram.client.bot.Bot.__init__ aiogram.client.bot.Bot.context +#: aiogram.client.bot.Bot.download aiogram.client.bot.Bot.download_file of msgid "Parameters" msgstr "" @@ -167,91 +89,8 @@ msgstr "" msgid "Get bot ID from token" msgstr "" -#: aiogram.client.bot.Bot.add_sticker_to_set -#: aiogram.client.bot.Bot.answer_callback_query -#: aiogram.client.bot.Bot.answer_inline_query -#: aiogram.client.bot.Bot.answer_pre_checkout_query -#: aiogram.client.bot.Bot.answer_shipping_query -#: aiogram.client.bot.Bot.answer_web_app_query -#: aiogram.client.bot.Bot.approve_chat_join_request -#: aiogram.client.bot.Bot.ban_chat_member -#: aiogram.client.bot.Bot.ban_chat_sender_chat aiogram.client.bot.Bot.close -#: aiogram.client.bot.Bot.close_forum_topic -#: aiogram.client.bot.Bot.close_general_forum_topic -#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.copy_message -#: aiogram.client.bot.Bot.create_chat_invite_link -#: aiogram.client.bot.Bot.create_forum_topic -#: aiogram.client.bot.Bot.create_invoice_link -#: aiogram.client.bot.Bot.create_new_sticker_set -#: aiogram.client.bot.Bot.decline_chat_join_request -#: aiogram.client.bot.Bot.delete_chat_photo -#: aiogram.client.bot.Bot.delete_chat_sticker_set -#: aiogram.client.bot.Bot.delete_forum_topic -#: aiogram.client.bot.Bot.delete_message -#: aiogram.client.bot.Bot.delete_my_commands -#: aiogram.client.bot.Bot.delete_sticker_from_set -#: aiogram.client.bot.Bot.delete_webhook -#: aiogram.client.bot.Bot.edit_chat_invite_link -#: aiogram.client.bot.Bot.edit_forum_topic -#: aiogram.client.bot.Bot.edit_general_forum_topic -#: aiogram.client.bot.Bot.edit_message_caption -#: aiogram.client.bot.Bot.edit_message_live_location -#: aiogram.client.bot.Bot.edit_message_media -#: aiogram.client.bot.Bot.edit_message_reply_markup -#: aiogram.client.bot.Bot.edit_message_text -#: aiogram.client.bot.Bot.export_chat_invite_link -#: aiogram.client.bot.Bot.forward_message aiogram.client.bot.Bot.get_chat -#: aiogram.client.bot.Bot.get_chat_administrators -#: aiogram.client.bot.Bot.get_chat_member -#: aiogram.client.bot.Bot.get_chat_member_count -#: aiogram.client.bot.Bot.get_chat_menu_button -#: aiogram.client.bot.Bot.get_custom_emoji_stickers -#: aiogram.client.bot.Bot.get_file -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers -#: aiogram.client.bot.Bot.get_game_high_scores aiogram.client.bot.Bot.get_me -#: aiogram.client.bot.Bot.get_my_commands -#: aiogram.client.bot.Bot.get_my_default_administrator_rights -#: aiogram.client.bot.Bot.get_sticker_set aiogram.client.bot.Bot.get_updates -#: aiogram.client.bot.Bot.get_user_profile_photos -#: aiogram.client.bot.Bot.get_webhook_info -#: aiogram.client.bot.Bot.hide_general_forum_topic aiogram.client.bot.Bot.id -#: aiogram.client.bot.Bot.leave_chat aiogram.client.bot.Bot.log_out -#: aiogram.client.bot.Bot.me aiogram.client.bot.Bot.pin_chat_message -#: aiogram.client.bot.Bot.promote_chat_member -#: aiogram.client.bot.Bot.reopen_forum_topic -#: aiogram.client.bot.Bot.reopen_general_forum_topic -#: aiogram.client.bot.Bot.restrict_chat_member -#: aiogram.client.bot.Bot.revoke_chat_invite_link -#: aiogram.client.bot.Bot.send_animation aiogram.client.bot.Bot.send_audio -#: aiogram.client.bot.Bot.send_chat_action aiogram.client.bot.Bot.send_contact -#: aiogram.client.bot.Bot.send_dice aiogram.client.bot.Bot.send_document -#: aiogram.client.bot.Bot.send_game aiogram.client.bot.Bot.send_invoice -#: aiogram.client.bot.Bot.send_location aiogram.client.bot.Bot.send_media_group -#: aiogram.client.bot.Bot.send_message aiogram.client.bot.Bot.send_photo -#: aiogram.client.bot.Bot.send_poll aiogram.client.bot.Bot.send_sticker -#: aiogram.client.bot.Bot.send_venue aiogram.client.bot.Bot.send_video -#: aiogram.client.bot.Bot.send_video_note aiogram.client.bot.Bot.send_voice -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title -#: aiogram.client.bot.Bot.set_chat_description -#: aiogram.client.bot.Bot.set_chat_menu_button -#: aiogram.client.bot.Bot.set_chat_permissions -#: aiogram.client.bot.Bot.set_chat_photo -#: aiogram.client.bot.Bot.set_chat_sticker_set -#: aiogram.client.bot.Bot.set_chat_title aiogram.client.bot.Bot.set_game_score -#: aiogram.client.bot.Bot.set_my_commands -#: aiogram.client.bot.Bot.set_my_default_administrator_rights -#: aiogram.client.bot.Bot.set_passport_data_errors -#: aiogram.client.bot.Bot.set_sticker_position_in_set -#: aiogram.client.bot.Bot.set_sticker_set_thumb -#: aiogram.client.bot.Bot.set_webhook -#: aiogram.client.bot.Bot.stop_message_live_location -#: aiogram.client.bot.Bot.stop_poll aiogram.client.bot.Bot.unban_chat_member -#: aiogram.client.bot.Bot.unban_chat_sender_chat -#: aiogram.client.bot.Bot.unhide_general_forum_topic -#: aiogram.client.bot.Bot.unpin_all_chat_messages -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages -#: aiogram.client.bot.Bot.unpin_chat_message -#: aiogram.client.bot.Bot.upload_sticker_file of +#: aiogram.client.bot.Bot.context aiogram.client.bot.Bot.id +#: aiogram.client.bot.Bot.me of msgid "Returns" msgstr "" @@ -307,3614 +146,3 @@ msgstr "" #: aiogram.client.bot.Bot.download:6 of msgid "file_id or Downloadable object" msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:3 of -msgid "User identifier of sticker set owner" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:4 -#: aiogram.client.bot.Bot.set_sticker_set_thumb:3 of -msgid "Sticker set name" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:5 -#: aiogram.client.bot.Bot.create_new_sticker_set:6 of -msgid "One or more emoji corresponding to the sticker" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:6 -#: aiogram.client.bot.Bot.create_new_sticker_set:7 of -msgid "" -"**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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:7 -#: aiogram.client.bot.Bot.create_new_sticker_set:8 of -msgid "" -"**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" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:8 -#: aiogram.client.bot.Bot.create_new_sticker_set:9 of -msgid "" -"**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" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:9 -#: aiogram.client.bot.Bot.create_new_sticker_set:11 of -msgid "" -"A JSON-serialized object for position where the mask should be placed on " -"faces" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:10 -#: aiogram.client.bot.Bot.answer_callback_query:10 -#: aiogram.client.bot.Bot.answer_inline_query:12 -#: aiogram.client.bot.Bot.answer_pre_checkout_query:6 -#: aiogram.client.bot.Bot.answer_shipping_query:7 -#: aiogram.client.bot.Bot.answer_web_app_query:5 -#: aiogram.client.bot.Bot.approve_chat_join_request:5 -#: aiogram.client.bot.Bot.ban_chat_member:7 -#: aiogram.client.bot.Bot.ban_chat_sender_chat:5 aiogram.client.bot.Bot.close:3 -#: aiogram.client.bot.Bot.close_forum_topic:5 -#: aiogram.client.bot.Bot.close_general_forum_topic:4 -#: aiogram.client.bot.Bot.copy_message:15 -#: aiogram.client.bot.Bot.create_chat_invite_link:8 -#: aiogram.client.bot.Bot.create_forum_topic:7 -#: aiogram.client.bot.Bot.create_invoice_link:23 -#: aiogram.client.bot.Bot.create_new_sticker_set:12 -#: aiogram.client.bot.Bot.decline_chat_join_request:5 -#: aiogram.client.bot.Bot.delete_chat_photo:4 -#: aiogram.client.bot.Bot.delete_chat_sticker_set:4 -#: aiogram.client.bot.Bot.delete_forum_topic:5 -#: aiogram.client.bot.Bot.delete_message:23 -#: aiogram.client.bot.Bot.delete_my_commands:5 -#: aiogram.client.bot.Bot.delete_sticker_from_set:4 -#: aiogram.client.bot.Bot.delete_webhook:4 -#: aiogram.client.bot.Bot.edit_chat_invite_link:9 -#: aiogram.client.bot.Bot.edit_forum_topic:7 -#: aiogram.client.bot.Bot.edit_general_forum_topic:5 -#: aiogram.client.bot.Bot.edit_message_caption:10 -#: aiogram.client.bot.Bot.edit_message_live_location:12 -#: aiogram.client.bot.Bot.edit_message_media:8 -#: aiogram.client.bot.Bot.edit_message_reply_markup:7 -#: aiogram.client.bot.Bot.edit_message_text:11 -#: aiogram.client.bot.Bot.export_chat_invite_link:6 -#: aiogram.client.bot.Bot.forward_message:9 aiogram.client.bot.Bot.get_chat:4 -#: aiogram.client.bot.Bot.get_chat_administrators:4 -#: aiogram.client.bot.Bot.get_chat_member:5 -#: aiogram.client.bot.Bot.get_chat_member_count:4 -#: aiogram.client.bot.Bot.get_chat_menu_button:4 -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:4 -#: aiogram.client.bot.Bot.get_file:5 -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers:3 -#: aiogram.client.bot.Bot.get_game_high_scores:9 -#: aiogram.client.bot.Bot.get_me:3 aiogram.client.bot.Bot.get_my_commands:5 -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:4 -#: aiogram.client.bot.Bot.get_sticker_set:4 -#: aiogram.client.bot.Bot.get_updates:13 -#: aiogram.client.bot.Bot.get_user_profile_photos:6 -#: aiogram.client.bot.Bot.get_webhook_info:3 -#: aiogram.client.bot.Bot.hide_general_forum_topic:4 -#: aiogram.client.bot.Bot.leave_chat:4 aiogram.client.bot.Bot.log_out:3 -#: aiogram.client.bot.Bot.pin_chat_message:6 -#: aiogram.client.bot.Bot.promote_chat_member:17 -#: aiogram.client.bot.Bot.reopen_forum_topic:5 -#: aiogram.client.bot.Bot.reopen_general_forum_topic:4 -#: aiogram.client.bot.Bot.restrict_chat_member:7 -#: aiogram.client.bot.Bot.revoke_chat_invite_link:5 -#: aiogram.client.bot.Bot.send_animation:19 -#: aiogram.client.bot.Bot.send_audio:19 -#: aiogram.client.bot.Bot.send_chat_action:10 -#: aiogram.client.bot.Bot.send_contact:14 aiogram.client.bot.Bot.send_dice:11 -#: aiogram.client.bot.Bot.send_document:16 aiogram.client.bot.Bot.send_game:11 -#: aiogram.client.bot.Bot.send_invoice:31 -#: aiogram.client.bot.Bot.send_location:16 -#: aiogram.client.bot.Bot.send_media_group:10 -#: aiogram.client.bot.Bot.send_message:14 aiogram.client.bot.Bot.send_photo:15 -#: aiogram.client.bot.Bot.send_poll:22 aiogram.client.bot.Bot.send_sticker:11 -#: aiogram.client.bot.Bot.send_venue:18 aiogram.client.bot.Bot.send_video:20 -#: aiogram.client.bot.Bot.send_video_note:14 -#: aiogram.client.bot.Bot.send_voice:15 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:6 -#: aiogram.client.bot.Bot.set_chat_description:5 -#: aiogram.client.bot.Bot.set_chat_menu_button:5 -#: aiogram.client.bot.Bot.set_chat_permissions:5 -#: aiogram.client.bot.Bot.set_chat_photo:5 -#: aiogram.client.bot.Bot.set_chat_sticker_set:5 -#: aiogram.client.bot.Bot.set_chat_title:5 -#: aiogram.client.bot.Bot.set_game_score:10 -#: aiogram.client.bot.Bot.set_my_commands:6 -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:5 -#: aiogram.client.bot.Bot.set_passport_data_errors:6 -#: aiogram.client.bot.Bot.set_sticker_position_in_set:5 -#: aiogram.client.bot.Bot.set_sticker_set_thumb:6 -#: aiogram.client.bot.Bot.set_webhook:20 -#: aiogram.client.bot.Bot.stop_message_live_location:7 -#: aiogram.client.bot.Bot.stop_poll:6 -#: aiogram.client.bot.Bot.unban_chat_member:6 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:5 -#: aiogram.client.bot.Bot.unhide_general_forum_topic:4 -#: aiogram.client.bot.Bot.unpin_all_chat_messages:4 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:5 -#: aiogram.client.bot.Bot.unpin_chat_message:5 -#: aiogram.client.bot.Bot.upload_sticker_file:5 of -msgid "Request timeout" -msgstr "" - -#: aiogram.client.bot.Bot.add_sticker_to_set:11 -#: aiogram.client.bot.Bot.approve_chat_join_request:6 -#: aiogram.client.bot.Bot.ban_chat_member:8 -#: aiogram.client.bot.Bot.ban_chat_sender_chat:6 -#: aiogram.client.bot.Bot.close_forum_topic:6 -#: aiogram.client.bot.Bot.close_general_forum_topic:5 -#: aiogram.client.bot.Bot.create_new_sticker_set:13 -#: aiogram.client.bot.Bot.decline_chat_join_request:6 -#: aiogram.client.bot.Bot.delete_chat_photo:5 -#: aiogram.client.bot.Bot.delete_chat_sticker_set:5 -#: aiogram.client.bot.Bot.delete_forum_topic:6 -#: aiogram.client.bot.Bot.delete_message:19 -#: aiogram.client.bot.Bot.delete_my_commands:6 -#: aiogram.client.bot.Bot.delete_sticker_from_set:5 -#: aiogram.client.bot.Bot.delete_webhook:5 -#: aiogram.client.bot.Bot.edit_forum_topic:8 -#: aiogram.client.bot.Bot.edit_general_forum_topic:6 -#: aiogram.client.bot.Bot.hide_general_forum_topic:5 -#: aiogram.client.bot.Bot.leave_chat:5 -#: aiogram.client.bot.Bot.pin_chat_message:7 -#: aiogram.client.bot.Bot.promote_chat_member:18 -#: aiogram.client.bot.Bot.reopen_forum_topic:6 -#: aiogram.client.bot.Bot.reopen_general_forum_topic:5 -#: aiogram.client.bot.Bot.restrict_chat_member:8 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:7 -#: aiogram.client.bot.Bot.set_chat_description:6 -#: aiogram.client.bot.Bot.set_chat_menu_button:6 -#: aiogram.client.bot.Bot.set_chat_permissions:6 -#: aiogram.client.bot.Bot.set_chat_photo:6 -#: aiogram.client.bot.Bot.set_chat_sticker_set:6 -#: aiogram.client.bot.Bot.set_chat_title:6 -#: aiogram.client.bot.Bot.set_my_commands:7 -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:6 -#: aiogram.client.bot.Bot.set_sticker_position_in_set:6 -#: aiogram.client.bot.Bot.set_sticker_set_thumb:7 -#: aiogram.client.bot.Bot.unban_chat_member:7 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:6 -#: aiogram.client.bot.Bot.unhide_general_forum_topic:5 -#: aiogram.client.bot.Bot.unpin_all_chat_messages:5 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:6 -#: aiogram.client.bot.Bot.unpin_chat_message:6 of -msgid "Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:5 -#: aiogram.client.bot.Bot.answer_pre_checkout_query:3 -#: aiogram.client.bot.Bot.answer_shipping_query:3 -#: aiogram.client.bot.Bot.answer_web_app_query:3 of -msgid "Unique identifier for the query to be answered" -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:6 of -msgid "" -"Text of the notification. If not specified, nothing will be shown to the " -"user, 0-200 characters" -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:7 of -msgid "" -"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*." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:8 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:9 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_callback_query:11 of -msgid "" -"Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that " -"open your bot with a parameter." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:1 of -msgid "" -"Use this method to send answers to an inline query. On success, " -":code:`True` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:3 of -msgid "No more than **50** results per query are allowed." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:5 of -msgid "Unique identifier for the answered query" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:6 of -msgid "A JSON-serialized array of results for the inline query" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:7 of -msgid "" -"The maximum amount of time in seconds that the result of the inline query" -" may be cached on the server. Defaults to 300." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:8 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:9 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:10 of -msgid "" -"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*" -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:11 of -msgid "" -"`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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_inline_query:13 -#: aiogram.client.bot.Bot.answer_shipping_query:8 of -msgid "On success, :code:`True` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:4 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_pre_checkout_query:7 of -msgid "" -"**Note:** The Bot API must receive an answer within 10 seconds after the " -"pre-checkout query was sent." -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:4 of -msgid "" -"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)" -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:5 of -msgid "" -"Required if *ok* is :code:`True`. A JSON-serialized array of available " -"shipping options." -msgstr "" - -#: aiogram.client.bot.Bot.answer_shipping_query:6 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_web_app_query:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.answer_web_app_query:4 of -msgid "A JSON-serialized object describing the message to be sent" -msgstr "" - -#: aiogram.client.bot.Bot.answer_web_app_query:6 of -msgid "" -"On success, a " -":class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.approve_chat_join_request:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.approve_chat_join_request:3 -#: aiogram.client.bot.Bot.ban_chat_sender_chat:3 -#: aiogram.client.bot.Bot.copy_message:3 -#: aiogram.client.bot.Bot.create_chat_invite_link:3 -#: aiogram.client.bot.Bot.decline_chat_join_request:3 -#: aiogram.client.bot.Bot.delete_chat_photo:3 -#: aiogram.client.bot.Bot.delete_message:21 -#: aiogram.client.bot.Bot.edit_chat_invite_link:3 -#: aiogram.client.bot.Bot.export_chat_invite_link:5 -#: aiogram.client.bot.Bot.forward_message:3 -#: aiogram.client.bot.Bot.pin_chat_message:3 -#: aiogram.client.bot.Bot.promote_chat_member:3 -#: aiogram.client.bot.Bot.send_animation:3 aiogram.client.bot.Bot.send_audio:4 -#: aiogram.client.bot.Bot.send_chat_action:7 -#: aiogram.client.bot.Bot.send_contact:3 aiogram.client.bot.Bot.send_dice:3 -#: aiogram.client.bot.Bot.send_document:3 aiogram.client.bot.Bot.send_invoice:3 -#: aiogram.client.bot.Bot.send_location:3 -#: aiogram.client.bot.Bot.send_media_group:3 -#: aiogram.client.bot.Bot.send_message:3 aiogram.client.bot.Bot.send_photo:3 -#: aiogram.client.bot.Bot.send_poll:3 aiogram.client.bot.Bot.send_sticker:3 -#: aiogram.client.bot.Bot.send_venue:3 aiogram.client.bot.Bot.send_video:3 -#: aiogram.client.bot.Bot.send_video_note:3 aiogram.client.bot.Bot.send_voice:3 -#: aiogram.client.bot.Bot.set_chat_description:3 -#: aiogram.client.bot.Bot.set_chat_photo:3 -#: aiogram.client.bot.Bot.set_chat_title:3 aiogram.client.bot.Bot.stop_poll:3 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:3 -#: aiogram.client.bot.Bot.unpin_all_chat_messages:3 -#: aiogram.client.bot.Bot.unpin_chat_message:3 of -msgid "" -"Unique identifier for the target chat or username of the target channel " -"(in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.approve_chat_join_request:4 -#: aiogram.client.bot.Bot.ban_chat_member:4 -#: aiogram.client.bot.Bot.decline_chat_join_request:4 -#: aiogram.client.bot.Bot.get_chat_member:4 -#: aiogram.client.bot.Bot.get_user_profile_photos:3 -#: aiogram.client.bot.Bot.promote_chat_member:4 -#: aiogram.client.bot.Bot.restrict_chat_member:4 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:4 -#: aiogram.client.bot.Bot.unban_chat_member:4 of -msgid "Unique identifier of the target user" -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:3 -#: aiogram.client.bot.Bot.unban_chat_member:3 of -msgid "" -"Unique identifier for the target group or username of the target " -"supergroup or channel (in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_member:6 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_sender_chat:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.ban_chat_sender_chat:4 -#: aiogram.client.bot.Bot.unban_chat_sender_chat:4 of -msgid "Unique identifier of the target sender chat" -msgstr "" - -#: aiogram.client.bot.Bot.close:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.close:4 aiogram.client.bot.Bot.log_out:4 of -msgid "Requires no parameters." -msgstr "" - -#: aiogram.client.bot.Bot.close_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.close_forum_topic:3 -#: aiogram.client.bot.Bot.close_general_forum_topic:3 -#: aiogram.client.bot.Bot.create_forum_topic:3 -#: aiogram.client.bot.Bot.delete_chat_sticker_set:3 -#: aiogram.client.bot.Bot.delete_forum_topic:3 -#: aiogram.client.bot.Bot.edit_forum_topic:3 -#: aiogram.client.bot.Bot.edit_general_forum_topic:3 -#: aiogram.client.bot.Bot.hide_general_forum_topic:3 -#: aiogram.client.bot.Bot.reopen_forum_topic:3 -#: aiogram.client.bot.Bot.reopen_general_forum_topic:3 -#: aiogram.client.bot.Bot.restrict_chat_member:3 -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:3 -#: aiogram.client.bot.Bot.set_chat_permissions:3 -#: aiogram.client.bot.Bot.set_chat_sticker_set:3 -#: aiogram.client.bot.Bot.unhide_general_forum_topic:3 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:3 of -msgid "" -"Unique identifier for the target chat or username of the target " -"supergroup (in the format :code:`@supergroupusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.close_forum_topic:4 -#: aiogram.client.bot.Bot.delete_forum_topic:4 -#: aiogram.client.bot.Bot.edit_forum_topic:4 -#: aiogram.client.bot.Bot.reopen_forum_topic:4 -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:4 of -msgid "Unique identifier for the target message thread of the forum topic" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:4 -#: aiogram.client.bot.Bot.forward_message:4 of -msgid "" -"Unique identifier for the chat where the original message was sent (or " -"channel username in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:5 -#: aiogram.client.bot.Bot.forward_message:5 of -msgid "Message identifier in the chat specified in *from_chat_id*" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:6 -#: aiogram.client.bot.Bot.forward_message:6 -#: aiogram.client.bot.Bot.send_animation:5 aiogram.client.bot.Bot.send_audio:6 -#: aiogram.client.bot.Bot.send_contact:6 aiogram.client.bot.Bot.send_dice:4 -#: aiogram.client.bot.Bot.send_document:5 aiogram.client.bot.Bot.send_game:5 -#: aiogram.client.bot.Bot.send_invoice:10 -#: aiogram.client.bot.Bot.send_location:6 -#: aiogram.client.bot.Bot.send_media_group:5 -#: aiogram.client.bot.Bot.send_message:5 aiogram.client.bot.Bot.send_photo:5 -#: aiogram.client.bot.Bot.send_poll:6 aiogram.client.bot.Bot.send_sticker:5 -#: aiogram.client.bot.Bot.send_venue:8 aiogram.client.bot.Bot.send_video:5 -#: aiogram.client.bot.Bot.send_video_note:5 aiogram.client.bot.Bot.send_voice:5 -#: of -msgid "" -"Unique identifier for the target message thread (topic) of the forum; for" -" forum supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:7 of -msgid "" -"New caption for media, 0-1024 characters after entities parsing. If not " -"specified, the original caption is kept" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:8 of -msgid "" -"Mode for parsing entities in the new caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:9 of -msgid "" -"A JSON-serialized list of special entities that appear in the new " -"caption, which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:10 -#: aiogram.client.bot.Bot.forward_message:7 -#: aiogram.client.bot.Bot.send_animation:14 -#: aiogram.client.bot.Bot.send_audio:14 aiogram.client.bot.Bot.send_contact:9 -#: aiogram.client.bot.Bot.send_dice:6 aiogram.client.bot.Bot.send_document:11 -#: aiogram.client.bot.Bot.send_game:6 aiogram.client.bot.Bot.send_invoice:26 -#: aiogram.client.bot.Bot.send_location:11 -#: aiogram.client.bot.Bot.send_message:9 aiogram.client.bot.Bot.send_photo:10 -#: aiogram.client.bot.Bot.send_poll:17 aiogram.client.bot.Bot.send_sticker:6 -#: aiogram.client.bot.Bot.send_venue:13 aiogram.client.bot.Bot.send_video:15 -#: aiogram.client.bot.Bot.send_video_note:9 -#: aiogram.client.bot.Bot.send_voice:10 of -msgid "" -"Sends the message `silently `_. Users will receive a notification with no sound." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:11 -#: aiogram.client.bot.Bot.send_animation:15 -#: aiogram.client.bot.Bot.send_audio:15 aiogram.client.bot.Bot.send_contact:10 -#: aiogram.client.bot.Bot.send_document:12 aiogram.client.bot.Bot.send_game:7 -#: aiogram.client.bot.Bot.send_invoice:27 -#: aiogram.client.bot.Bot.send_location:12 -#: aiogram.client.bot.Bot.send_message:10 aiogram.client.bot.Bot.send_photo:11 -#: aiogram.client.bot.Bot.send_poll:18 aiogram.client.bot.Bot.send_sticker:7 -#: aiogram.client.bot.Bot.send_venue:14 aiogram.client.bot.Bot.send_video:16 -#: aiogram.client.bot.Bot.send_video_note:10 -#: aiogram.client.bot.Bot.send_voice:11 of -msgid "Protects the contents of the sent message from forwarding and saving" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:12 -#: aiogram.client.bot.Bot.send_animation:16 -#: aiogram.client.bot.Bot.send_audio:16 aiogram.client.bot.Bot.send_contact:11 -#: aiogram.client.bot.Bot.send_dice:8 aiogram.client.bot.Bot.send_document:13 -#: aiogram.client.bot.Bot.send_game:8 aiogram.client.bot.Bot.send_invoice:28 -#: aiogram.client.bot.Bot.send_location:13 -#: aiogram.client.bot.Bot.send_message:11 aiogram.client.bot.Bot.send_photo:12 -#: aiogram.client.bot.Bot.send_poll:19 aiogram.client.bot.Bot.send_sticker:8 -#: aiogram.client.bot.Bot.send_venue:15 aiogram.client.bot.Bot.send_video:17 -#: aiogram.client.bot.Bot.send_video_note:11 -#: aiogram.client.bot.Bot.send_voice:12 of -msgid "If the message is a reply, ID of the original message" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:13 -#: aiogram.client.bot.Bot.send_animation:17 -#: aiogram.client.bot.Bot.send_audio:17 aiogram.client.bot.Bot.send_contact:12 -#: aiogram.client.bot.Bot.send_dice:9 aiogram.client.bot.Bot.send_document:14 -#: aiogram.client.bot.Bot.send_game:9 aiogram.client.bot.Bot.send_invoice:29 -#: aiogram.client.bot.Bot.send_location:14 -#: aiogram.client.bot.Bot.send_media_group:9 -#: aiogram.client.bot.Bot.send_message:12 aiogram.client.bot.Bot.send_photo:13 -#: aiogram.client.bot.Bot.send_poll:20 aiogram.client.bot.Bot.send_sticker:9 -#: aiogram.client.bot.Bot.send_venue:16 aiogram.client.bot.Bot.send_video:18 -#: aiogram.client.bot.Bot.send_video_note:12 -#: aiogram.client.bot.Bot.send_voice:13 of -msgid "" -"Pass :code:`True` if the message should be sent even if the specified " -"replied-to message is not found" -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:14 -#: aiogram.client.bot.Bot.send_animation:18 -#: aiogram.client.bot.Bot.send_audio:18 aiogram.client.bot.Bot.send_contact:13 -#: aiogram.client.bot.Bot.send_dice:10 aiogram.client.bot.Bot.send_document:15 -#: aiogram.client.bot.Bot.send_location:15 -#: aiogram.client.bot.Bot.send_message:13 aiogram.client.bot.Bot.send_photo:14 -#: aiogram.client.bot.Bot.send_poll:21 aiogram.client.bot.Bot.send_sticker:10 -#: aiogram.client.bot.Bot.send_venue:17 aiogram.client.bot.Bot.send_video:19 -#: aiogram.client.bot.Bot.send_video_note:13 -#: aiogram.client.bot.Bot.send_voice:14 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.copy_message:16 of -msgid "" -"Returns the :class:`aiogram.types.message_id.MessageId` of the sent " -"message on success." -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:4 -#: aiogram.client.bot.Bot.edit_chat_invite_link:5 of -msgid "Invite link name; 0-32 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:5 -#: aiogram.client.bot.Bot.edit_chat_invite_link:6 of -msgid "Point in time (Unix timestamp) when the link will expire" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:6 -#: aiogram.client.bot.Bot.edit_chat_invite_link:7 of -msgid "" -"The maximum number of users that can be members of the chat " -"simultaneously after joining the chat via this invite link; 1-99999" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:7 -#: aiogram.client.bot.Bot.edit_chat_invite_link:8 of -msgid "" -":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" -msgstr "" - -#: aiogram.client.bot.Bot.create_chat_invite_link:9 of -msgid "" -"Returns the new invite link as " -":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:4 of -msgid "Topic name, 1-128 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:5 of -msgid "" -"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)" -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:6 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_forum_topic:8 of -msgid "" -"Returns information about the created topic as a " -":class:`aiogram.types.forum_topic.ForumTopic` object." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:1 of -msgid "" -"Use this method to create a link for an invoice. Returns the created " -"invoice link as *String* on success." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:3 -#: aiogram.client.bot.Bot.send_invoice:4 of -msgid "Product name, 1-32 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:4 -#: aiogram.client.bot.Bot.send_invoice:5 of -msgid "Product description, 1-255 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:5 -#: aiogram.client.bot.Bot.send_invoice:6 of -msgid "" -"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to " -"the user, use for your internal processes." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:6 of -msgid "Payment provider token, obtained via `BotFather `_" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:7 -#: aiogram.client.bot.Bot.send_invoice:8 of -msgid "" -"Three-letter ISO 4217 currency code, see `more on currencies " -"`_" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:8 -#: aiogram.client.bot.Bot.send_invoice:9 of -msgid "" -"Price breakdown, a JSON-serialized list of components (e.g. product " -"price, tax, discount, delivery cost, delivery tax, bonus, etc.)" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:9 -#: aiogram.client.bot.Bot.send_invoice:11 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:10 -#: aiogram.client.bot.Bot.send_invoice:12 of -msgid "" -"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*." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:11 -#: aiogram.client.bot.Bot.send_invoice:14 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:12 of -msgid "" -"URL of the product photo for the invoice. Can be a photo of the goods or " -"a marketing image for a service." -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:13 -#: aiogram.client.bot.Bot.send_invoice:16 of -msgid "Photo size in bytes" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:14 -#: aiogram.client.bot.Bot.send_invoice:17 of -msgid "Photo width" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:15 -#: aiogram.client.bot.Bot.send_invoice:18 of -msgid "Photo height" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:16 -#: aiogram.client.bot.Bot.send_invoice:19 of -msgid "" -"Pass :code:`True` if you require the user's full name to complete the " -"order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:17 -#: aiogram.client.bot.Bot.send_invoice:20 of -msgid "" -"Pass :code:`True` if you require the user's phone number to complete the " -"order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:18 -#: aiogram.client.bot.Bot.send_invoice:21 of -msgid "" -"Pass :code:`True` if you require the user's email address to complete the" -" order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:19 -#: aiogram.client.bot.Bot.send_invoice:22 of -msgid "" -"Pass :code:`True` if you require the user's shipping address to complete " -"the order" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:20 of -msgid "" -"Pass :code:`True` if the user's phone number should be sent to the " -"provider" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:21 of -msgid "" -"Pass :code:`True` if the user's email address should be sent to the " -"provider" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:22 -#: aiogram.client.bot.Bot.send_invoice:25 of -msgid "Pass :code:`True` if the final price depends on the shipping method" -msgstr "" - -#: aiogram.client.bot.Bot.create_invoice_link:24 of -msgid "Returns the created invoice link as *String* on success." -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:3 of -msgid "User identifier of created sticker set owner" -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:4 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:5 of -msgid "Sticker set title, 1-64 characters" -msgstr "" - -#: aiogram.client.bot.Bot.create_new_sticker_set:10 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.decline_chat_join_request:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_chat_photo:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_chat_sticker_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:1 -#: aiogram.client.bot.Bot.delete_message:24 of -msgid "" -"Use this method to delete a message, including service messages, with the" -" following limitations:" -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:3 of -msgid "A message can only be deleted if it was sent less than 48 hours ago." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:5 of -msgid "" -"Service messages about a supergroup, channel, or forum topic creation " -"can't be deleted." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:7 of -msgid "" -"A dice message in a private chat can only be deleted if it was sent more " -"than 24 hours ago." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:9 of -msgid "" -"Bots can delete outgoing messages in private chats, groups, and " -"supergroups." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:11 of -msgid "Bots can delete incoming messages in private chats." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:13 of -msgid "" -"Bots granted *can_post_messages* permissions can delete outgoing messages" -" in channels." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:15 of -msgid "" -"If the bot is an administrator of a group, it can delete any message " -"there." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:17 of -msgid "" -"If the bot has *can_delete_messages* permission in a supergroup or a " -"channel, it can delete any message there." -msgstr "" - -#: aiogram.client.bot.Bot.delete_message:22 of -msgid "Identifier of the message to delete" -msgstr "" - -#: aiogram.client.bot.Bot.delete_my_commands:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_my_commands:3 -#: aiogram.client.bot.Bot.set_my_commands:4 of -msgid "" -"A JSON-serialized object, describing scope of users for which the " -"commands are relevant. Defaults to " -":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`." -msgstr "" - -#: aiogram.client.bot.Bot.delete_my_commands:4 -#: aiogram.client.bot.Bot.set_my_commands:5 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.delete_sticker_from_set:1 of -msgid "" -"Use this method to delete a sticker from a set created by the bot. " -"Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.delete_sticker_from_set:3 -#: aiogram.client.bot.Bot.set_sticker_position_in_set:3 of -msgid "File identifier of the sticker" -msgstr "" - -#: aiogram.client.bot.Bot.delete_webhook:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.delete_webhook:3 -#: aiogram.client.bot.Bot.set_webhook:18 of -msgid "Pass :code:`True` to drop all pending updates" -msgstr "" - -#: aiogram.client.bot.Bot.edit_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_chat_invite_link:4 of -msgid "The invite link to edit" -msgstr "" - -#: aiogram.client.bot.Bot.edit_chat_invite_link:10 of -msgid "" -"Returns the edited invite link as a " -":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." -msgstr "" - -#: aiogram.client.bot.Bot.edit_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_forum_topic:5 of -msgid "" -"New topic name, 0-128 characters. If not specififed or empty, the current" -" name of the topic will be kept" -msgstr "" - -#: aiogram.client.bot.Bot.edit_forum_topic:6 of -msgid "" -"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. Pass an empty string to " -"remove the icon. If not specified, the current icon will be kept" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:3 -#: aiogram.client.bot.Bot.edit_message_live_location:5 -#: aiogram.client.bot.Bot.edit_message_media:4 -#: aiogram.client.bot.Bot.edit_message_reply_markup:3 -#: aiogram.client.bot.Bot.edit_message_text:4 -#: aiogram.client.bot.Bot.stop_message_live_location:3 of -msgid "" -"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`)" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:4 -#: aiogram.client.bot.Bot.edit_message_live_location:6 -#: aiogram.client.bot.Bot.edit_message_media:5 -#: aiogram.client.bot.Bot.edit_message_reply_markup:4 -#: aiogram.client.bot.Bot.edit_message_text:5 of -msgid "" -"Required if *inline_message_id* is not specified. Identifier of the " -"message to edit" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:5 -#: aiogram.client.bot.Bot.edit_message_live_location:7 -#: aiogram.client.bot.Bot.edit_message_media:6 -#: aiogram.client.bot.Bot.edit_message_reply_markup:5 -#: aiogram.client.bot.Bot.edit_message_text:6 -#: aiogram.client.bot.Bot.get_game_high_scores:8 -#: aiogram.client.bot.Bot.set_game_score:9 -#: aiogram.client.bot.Bot.stop_message_live_location:5 of -msgid "" -"Required if *chat_id* and *message_id* are not specified. Identifier of " -"the inline message" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:6 of -msgid "New caption of the message, 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:7 of -msgid "" -"Mode for parsing entities in the message caption. See `formatting options" -" `_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:8 -#: aiogram.client.bot.Bot.send_animation:12 aiogram.client.bot.Bot.send_audio:9 -#: aiogram.client.bot.Bot.send_document:9 aiogram.client.bot.Bot.send_photo:8 -#: aiogram.client.bot.Bot.send_video:12 aiogram.client.bot.Bot.send_voice:8 of -msgid "" -"A JSON-serialized list of special entities that appear in the caption, " -"which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:9 -#: aiogram.client.bot.Bot.edit_message_reply_markup:6 -#: aiogram.client.bot.Bot.edit_message_text:10 of -msgid "" -"A JSON-serialized object for an `inline keyboard " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_caption:11 -#: aiogram.client.bot.Bot.edit_message_live_location:13 -#: aiogram.client.bot.Bot.edit_message_media:9 -#: aiogram.client.bot.Bot.edit_message_reply_markup:8 -#: aiogram.client.bot.Bot.edit_message_text:12 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:3 of -msgid "Latitude of new location" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:4 of -msgid "Longitude of new location" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:8 -#: aiogram.client.bot.Bot.send_location:7 of -msgid "The radius of uncertainty for the location, measured in meters; 0-1500" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:9 of -msgid "" -"Direction in which the user is moving, in degrees. Must be between 1 and " -"360 if specified." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:10 of -msgid "" -"The maximum distance for proximity alerts about approaching another chat " -"member, in meters. Must be between 1 and 100000 if specified." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_live_location:11 -#: aiogram.client.bot.Bot.edit_message_media:7 -#: aiogram.client.bot.Bot.stop_message_live_location:6 of -msgid "" -"A JSON-serialized object for a new `inline keyboard " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_media:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_media:3 of -msgid "A JSON-serialized object for a new media content of the message" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_reply_markup:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:3 of -msgid "New text of the message, 1-4096 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:7 -#: aiogram.client.bot.Bot.send_message:6 of -msgid "" -"Mode for parsing entities in the message text. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:8 -#: aiogram.client.bot.Bot.send_message:7 of -msgid "" -"A JSON-serialized list of special entities that appear in message text, " -"which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.edit_message_text:9 -#: aiogram.client.bot.Bot.send_message:8 of -msgid "Disables link previews for links in this message" -msgstr "" - -#: aiogram.client.bot.Bot.export_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.export_chat_invite_link:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.export_chat_invite_link:7 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.forward_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.forward_message:8 of -msgid "Protects the contents of the forwarded message from forwarding and saving" -msgstr "" - -#: aiogram.client.bot.Bot.forward_message:10 -#: aiogram.client.bot.Bot.send_contact:15 aiogram.client.bot.Bot.send_dice:12 -#: aiogram.client.bot.Bot.send_game:12 aiogram.client.bot.Bot.send_invoice:32 -#: aiogram.client.bot.Bot.send_location:17 -#: aiogram.client.bot.Bot.send_message:15 aiogram.client.bot.Bot.send_photo:16 -#: aiogram.client.bot.Bot.send_poll:23 aiogram.client.bot.Bot.send_sticker:12 -#: aiogram.client.bot.Bot.send_venue:19 -#: aiogram.client.bot.Bot.send_video_note:15 of -msgid "On success, the sent :class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat:3 -#: aiogram.client.bot.Bot.get_chat_administrators:3 -#: aiogram.client.bot.Bot.get_chat_member:3 -#: aiogram.client.bot.Bot.get_chat_member_count:3 -#: aiogram.client.bot.Bot.leave_chat:3 of -msgid "" -"Unique identifier for the target chat or username of the target " -"supergroup or channel (in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.get_chat:5 of -msgid "Returns a :class:`aiogram.types.chat.Chat` object on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_administrators:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_administrators:5 of -msgid "Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member:1 of -msgid "" -"Use this method to get information about a member of a chat. The method " -"is guaranteed to work only if the bot is an administrator in the chat. " -"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " -"success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member:6 of -msgid "Returns a :class:`aiogram.types.chat_member.ChatMember` object on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member_count:1 of -msgid "" -"Use this method to get the number of members in a chat. Returns *Int* on " -"success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_member_count:5 of -msgid "Returns *Int* on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_menu_button:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_menu_button:3 of -msgid "" -"Unique identifier for the target private chat. If not specified, default " -"bot's menu button will be returned" -msgstr "" - -#: aiogram.client.bot.Bot.get_chat_menu_button:5 of -msgid "Returns :class:`aiogram.types.menu_button.MenuButton` on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:1 of -msgid "" -"Use this method to get information about custom emoji stickers by their " -"identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` " -"objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:3 of -msgid "" -"List of custom emoji identifiers. At most 200 custom emoji identifiers " -"can be specified." -msgstr "" - -#: aiogram.client.bot.Bot.get_custom_emoji_stickers:5 -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers:4 of -msgid "Returns an Array of :class:`aiogram.types.sticker.Sticker` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_file:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_file:4 of -msgid "File identifier to get information about" -msgstr "" - -#: aiogram.client.bot.Bot.get_file:6 of -msgid "" -"You should save the file's MIME type and name (if available) when the " -"File object is received." -msgstr "" - -#: aiogram.client.bot.Bot.get_forum_topic_icon_stickers:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:5 of -msgid "Target user id" -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:6 -#: aiogram.client.bot.Bot.set_game_score:7 of -msgid "" -"Required if *inline_message_id* is not specified. Unique identifier for " -"the target chat" -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:7 -#: aiogram.client.bot.Bot.set_game_score:8 of -msgid "" -"Required if *inline_message_id* is not specified. Identifier of the sent " -"message" -msgstr "" - -#: aiogram.client.bot.Bot.get_game_high_scores:10 of -msgid "Please note that this behavior is subject to change." -msgstr "" - -#: aiogram.client.bot.Bot.get_me:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_me:4 of -msgid "" -"Returns basic information about the bot in form of a " -":class:`aiogram.types.user.User` object." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:3 of -msgid "" -"A JSON-serialized object, describing scope of users. Defaults to " -":class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:4 of -msgid "A two-letter ISO 639-1 language code or an empty string" -msgstr "" - -#: aiogram.client.bot.Bot.get_my_commands:6 of -msgid "If commands aren't set, an empty list is returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:1 of -msgid "" -"Use this method to get the current default administrator rights of the " -"bot. Returns " -":class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` " -"on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_my_default_administrator_rights:5 of -msgid "" -"Returns " -":class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` " -"on success." -msgstr "" - -#: aiogram.client.bot.Bot.get_sticker_set:1 of -msgid "" -"Use this method to get a sticker set. On success, a " -":class:`aiogram.types.sticker_set.StickerSet` object is returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_sticker_set:3 of -msgid "Name of the sticker set" -msgstr "" - -#: aiogram.client.bot.Bot.get_sticker_set:5 of -msgid "" -"On success, a :class:`aiogram.types.sticker_set.StickerSet` object is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:1 of -msgid "" -"Use this method to receive incoming updates using long polling (`wiki " -"`_). Returns " -"an Array of :class:`aiogram.types.update.Update` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:3 aiogram.client.bot.Bot.set_webhook:4 of -msgid "**Notes**" -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:5 of -msgid "**1.** This method will not work if an outgoing webhook is set up." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:7 of -msgid "" -"**2.** In order to avoid getting duplicate updates, recalculate *offset* " -"after each server response." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:9 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:10 of -msgid "" -"Limits the number of updates to be retrieved. Values between 1-100 are " -"accepted. Defaults to 100." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:11 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:12 aiogram.client.bot.Bot.set_webhook:17 -#: of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_updates:14 of -msgid "Returns an Array of :class:`aiogram.types.update.Update` objects." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:1 of -msgid "" -"Use this method to get a list of profile pictures for a user. Returns a " -":class:`aiogram.types.user_profile_photos.UserProfilePhotos` object." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:4 of -msgid "" -"Sequential number of the first photo to be returned. By default, all " -"photos are returned." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:5 of -msgid "" -"Limits the number of photos to be retrieved. Values between 1-100 are " -"accepted. Defaults to 100." -msgstr "" - -#: aiogram.client.bot.Bot.get_user_profile_photos:7 of -msgid "" -"Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` " -"object." -msgstr "" - -#: aiogram.client.bot.Bot.get_webhook_info:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.get_webhook_info:4 of -msgid "" -"If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will" -" return an object with the *url* field empty." -msgstr "" - -#: aiogram.client.bot.Bot.leave_chat:1 of -msgid "" -"Use this method for your bot to leave a group, supergroup or channel. " -"Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.log_out:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.pin_chat_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.pin_chat_message:4 of -msgid "Identifier of a message to pin" -msgstr "" - -#: aiogram.client.bot.Bot.pin_chat_message:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:5 of -msgid "Pass :code:`True` if the administrator's presence in the chat is hidden" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:6 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:7 of -msgid "" -"Pass :code:`True` if the administrator can create channel posts, channels" -" only" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:8 of -msgid "" -"Pass :code:`True` if the administrator can edit messages of other users " -"and can pin messages, channels only" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:9 of -msgid "Pass :code:`True` if the administrator can delete messages of other users" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:10 of -msgid "Pass :code:`True` if the administrator can manage video chats" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:11 of -msgid "" -"Pass :code:`True` if the administrator can restrict, ban or unban chat " -"members" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:12 of -msgid "" -"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)" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:13 of -msgid "" -"Pass :code:`True` if the administrator can change chat title, photo and " -"other settings" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:14 of -msgid "Pass :code:`True` if the administrator can invite new users to the chat" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:15 of -msgid "Pass :code:`True` if the administrator can pin messages, supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.promote_chat_member:16 of -msgid "" -"Pass :code:`True` if the user is allowed to create, rename, close, and " -"reopen forum topics, supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.reopen_forum_topic:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.restrict_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.restrict_chat_member:5 of -msgid "A JSON-serialized object for new user permissions" -msgstr "" - -#: aiogram.client.bot.Bot.restrict_chat_member:6 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:3 of -msgid "" -"Unique identifier of the target chat or username of the target channel " -"(in the format :code:`@channelusername`)" -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:4 of -msgid "The invite link to revoke" -msgstr "" - -#: aiogram.client.bot.Bot.revoke_chat_invite_link:6 of -msgid "" -"Returns the revoked invite link as " -":class:`aiogram.types.chat_invite_link.ChatInviteLink` object." -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:6 of -msgid "Duration of sent animation in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:7 of -msgid "Animation width" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:8 of -msgid "Animation height" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:9 aiogram.client.bot.Bot.send_audio:13 -#: aiogram.client.bot.Bot.send_document:6 aiogram.client.bot.Bot.send_video:9 -#: aiogram.client.bot.Bot.send_video_note:8 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:10 of -msgid "" -"Animation caption (may also be used when resending animation by " -"*file_id*), 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:11 of -msgid "" -"Mode for parsing entities in the animation caption. See `formatting " -"options `_ for " -"more details." -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:13 of -msgid "" -"Pass :code:`True` if the animation needs to be covered with a spoiler " -"animation" -msgstr "" - -#: aiogram.client.bot.Bot.send_animation:20 of -msgid "" -"Bots can currently send animation files of up to 50 MB in size, this " -"limit may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:5 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:7 of -msgid "Audio caption, 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:8 of -msgid "" -"Mode for parsing entities in the audio caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:10 of -msgid "Duration of the audio in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:11 of -msgid "Performer" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:12 of -msgid "Track name" -msgstr "" - -#: aiogram.client.bot.Bot.send_audio:20 of -msgid "" -"Bots can currently send audio files of up to 50 MB in size, this limit " -"may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:5 of -msgid "" -"We only recommend using this method when a response from the bot will " -"take a **noticeable** amount of time to arrive." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:8 of -msgid "" -"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 " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:9 of -msgid "Unique identifier for the target message thread; supergroups only" -msgstr "" - -#: aiogram.client.bot.Bot.send_chat_action:11 of -msgid "The user will see a 'sending photo' status for the bot." -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:1 of -msgid "" -"Use this method to send phone contacts. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:4 of -msgid "Contact's phone number" -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:5 of -msgid "Contact's first name" -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:7 of -msgid "Contact's last name" -msgstr "" - -#: aiogram.client.bot.Bot.send_contact:8 of -msgid "" -"Additional data about the contact in the form of a `vCard " -"`_, 0-2048 bytes" -msgstr "" - -#: aiogram.client.bot.Bot.send_dice:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_dice:5 of -msgid "" -"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 '🎲'" -msgstr "" - -#: aiogram.client.bot.Bot.send_dice:7 of -msgid "Protects the contents of the sent message from forwarding" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_document:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:7 of -msgid "" -"Document caption (may also be used when resending documents by " -"*file_id*), 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:8 of -msgid "" -"Mode for parsing entities in the document caption. See `formatting " -"options `_ for " -"more details." -msgstr "" - -#: aiogram.client.bot.Bot.send_document:10 of -msgid "" -"Disables automatic server-side content type detection for files uploaded " -"using multipart/form-data" -msgstr "" - -#: aiogram.client.bot.Bot.send_document:17 of -msgid "" -"Bots can currently send files of any type of up to 50 MB in size, this " -"limit may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_game:1 of -msgid "" -"Use this method to send a game. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_game:3 of -msgid "Unique identifier for the target chat" -msgstr "" - -#: aiogram.client.bot.Bot.send_game:4 of -msgid "" -"Short name of the game, serves as the unique identifier for the game. Set" -" up your games via `@BotFather `_." -msgstr "" - -#: aiogram.client.bot.Bot.send_game:10 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:1 of -msgid "" -"Use this method to send invoices. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:7 of -msgid "" -"Payment provider token, obtained via `@BotFather " -"`_" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:13 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:15 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:23 of -msgid "Pass :code:`True` if the user's phone number should be sent to provider" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:24 of -msgid "Pass :code:`True` if the user's email address should be sent to provider" -msgstr "" - -#: aiogram.client.bot.Bot.send_invoice:30 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:1 of -msgid "" -"Use this method to send point on the map. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:4 of -msgid "Latitude of the location" -msgstr "" - -#: aiogram.client.bot.Bot.send_location:5 of -msgid "Longitude of the location" -msgstr "" - -#: aiogram.client.bot.Bot.send_location:8 of -msgid "" -"Period in seconds for which the location will be updated (see `Live " -"Locations `_, should be between" -" 60 and 86400." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:9 of -msgid "" -"For live locations, a direction in which the user is moving, in degrees. " -"Must be between 1 and 360 if specified." -msgstr "" - -#: aiogram.client.bot.Bot.send_location:10 of -msgid "" -"For live locations, a maximum distance for proximity alerts about " -"approaching another chat member, in meters. Must be between 1 and 100000 " -"if specified." -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:4 of -msgid "" -"A JSON-serialized array describing messages to be sent, must include 2-10" -" items" -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:6 of -msgid "" -"Sends messages `silently `_. Users will receive a notification with no sound." -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:7 of -msgid "Protects the contents of the sent messages from forwarding and saving" -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:8 of -msgid "If the messages are a reply, ID of the original message" -msgstr "" - -#: aiogram.client.bot.Bot.send_media_group:11 of -msgid "" -"On success, an array of `Messages " -"`_ that were sent is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_message:1 of -msgid "" -"Use this method to send text messages. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_message:4 of -msgid "Text of the message to be sent, 1-4096 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:1 of -msgid "" -"Use this method to send photos. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:6 of -msgid "" -"Photo caption (may also be used when resending photos by *file_id*), " -"0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:7 of -msgid "" -"Mode for parsing entities in the photo caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_photo:9 of -msgid "" -"Pass :code:`True` if the photo needs to be covered with a spoiler " -"animation" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:1 of -msgid "" -"Use this method to send a native poll. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:4 of -msgid "Poll question, 1-300 characters" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:5 of -msgid "" -"A JSON-serialized list of answer options, 2-10 strings 1-100 characters " -"each" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:7 of -msgid ":code:`True`, if the poll needs to be anonymous, defaults to :code:`True`" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:8 of -msgid "Poll type, 'quiz' or 'regular', defaults to 'regular'" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:9 of -msgid "" -":code:`True`, if the poll allows multiple answers, ignored for polls in " -"quiz mode, defaults to :code:`False`" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:10 of -msgid "" -"0-based identifier of the correct answer option, required for polls in " -"quiz mode" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:11 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:12 of -msgid "" -"Mode for parsing entities in the explanation. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:13 of -msgid "" -"A JSON-serialized list of special entities that appear in the poll " -"explanation, which can be specified instead of *parse_mode*" -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:14 of -msgid "" -"Amount of time in seconds the poll will be active after creation, 5-600. " -"Can't be used together with *close_date*." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:15 of -msgid "" -"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*." -msgstr "" - -#: aiogram.client.bot.Bot.send_poll:16 of -msgid "" -"Pass :code:`True` if the poll needs to be immediately closed. This can be" -" useful for poll preview." -msgstr "" - -#: aiogram.client.bot.Bot.send_sticker:1 of -msgid "" -"Use this method to send static .WEBP, `animated " -"`_ .TGS, or `video " -"`_ .WEBM " -"stickers. On success, the sent :class:`aiogram.types.message.Message` is " -"returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_sticker:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:1 of -msgid "" -"Use this method to send information about a venue. On success, the sent " -":class:`aiogram.types.message.Message` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:4 of -msgid "Latitude of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:5 of -msgid "Longitude of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:6 of -msgid "Name of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:7 of -msgid "Address of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:9 of -msgid "Foursquare identifier of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:10 of -msgid "" -"Foursquare type of the venue, if known. (For example, " -"'arts_entertainment/default', 'arts_entertainment/aquarium' or " -"'food/icecream'.)" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:11 of -msgid "Google Places identifier of the venue" -msgstr "" - -#: aiogram.client.bot.Bot.send_venue:12 of -msgid "" -"Google Places type of the venue. (See `supported types " -"`_.)" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_video:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:6 aiogram.client.bot.Bot.send_video_note:6 -#: of -msgid "Duration of sent video in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:7 of -msgid "Video width" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:8 of -msgid "Video height" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:10 of -msgid "" -"Video caption (may also be used when resending videos by *file_id*), " -"0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:11 of -msgid "" -"Mode for parsing entities in the video caption. See `formatting options " -"`_ for more " -"details." -msgstr "" - -#: aiogram.client.bot.Bot.send_video:13 of -msgid "" -"Pass :code:`True` if the video needs to be covered with a spoiler " -"animation" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:14 of -msgid "Pass :code:`True` if the uploaded video is suitable for streaming" -msgstr "" - -#: aiogram.client.bot.Bot.send_video:21 of -msgid "" -"Bots can currently send video files of up to 50 MB in size, this limit " -"may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.send_video_note:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_video_note:4 of -msgid "" -"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" -msgstr "" - -#: aiogram.client.bot.Bot.send_video_note:7 of -msgid "Video width and height, i.e. diameter of the video message" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:4 of -msgid "" -"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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:6 of -msgid "Voice message caption, 0-1024 characters after entities parsing" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:7 of -msgid "" -"Mode for parsing entities in the voice message caption. See `formatting " -"options `_ for " -"more details." -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:9 of -msgid "Duration of the voice message in seconds" -msgstr "" - -#: aiogram.client.bot.Bot.send_voice:16 of -msgid "" -"Bots can currently send voice messages of up to 50 MB in size, this limit" -" may be changed in the future." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:1 of -msgid "" -"Use this method to set a custom title for an administrator in a " -"supergroup promoted by the bot. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_administrator_custom_title:5 of -msgid "" -"New custom title for the administrator; 0-16 characters, emoji are not " -"allowed" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_description:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_description:4 of -msgid "New chat description, 0-255 characters" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_menu_button:1 of -msgid "" -"Use this method to change the bot's menu button in a private chat, or the" -" default menu button. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_menu_button:3 of -msgid "" -"Unique identifier for the target private chat. If not specified, default " -"bot's menu button will be changed" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_menu_button:4 of -msgid "" -"A JSON-serialized object for the bot's new menu button. Defaults to " -":class:`aiogram.types.menu_button_default.MenuButtonDefault`" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_permissions:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_permissions:4 of -msgid "A JSON-serialized object for new default chat permissions" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_photo:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_photo:4 of -msgid "New chat photo, uploaded using multipart/form-data" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_sticker_set:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_sticker_set:4 of -msgid "Name of the sticker set to be set as the group sticker set" -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_title:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_chat_title:4 of -msgid "New chat title, 1-128 characters" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:1 of -msgid "" -"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`." -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:3 -#: aiogram.client.bot.Bot.set_passport_data_errors:4 of -msgid "User identifier" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:4 of -msgid "New score, must be non-negative" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:5 of -msgid "" -"Pass :code:`True` if the high score is allowed to decrease. This can be " -"useful when fixing mistakes or banning cheaters" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:6 of -msgid "" -"Pass :code:`True` if the game message should not be automatically edited " -"to include the current scoreboard" -msgstr "" - -#: aiogram.client.bot.Bot.set_game_score:11 of -msgid "" -"Returns an error, if the new score is not greater than the user's current" -" score in the chat and *force* is :code:`False`." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_commands:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_commands:3 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:3 of -msgid "" -"A JSON-serialized object describing new default administrator rights. If " -"not specified, the default administrator rights will be cleared." -msgstr "" - -#: aiogram.client.bot.Bot.set_my_default_administrator_rights:4 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_passport_data_errors:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_passport_data_errors:5 of -msgid "A JSON-serialized array describing the errors" -msgstr "" - -#: aiogram.client.bot.Bot.set_passport_data_errors:7 of -msgid "" -"Supply some details in the error message to make sure the user knows how " -"to correct the issues." -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_position_in_set:1 of -msgid "" -"Use this method to move a sticker in a set created by the bot to a " -"specific position. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_position_in_set:4 of -msgid "New sticker position in the set, zero-based" -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_set_thumb:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_set_thumb:4 of -msgid "User identifier of the sticker set owner" -msgstr "" - -#: aiogram.client.bot.Bot.set_sticker_set_thumb:5 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:6 of -msgid "" -"**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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:8 of -msgid "" -"**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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:10 of -msgid "" -"**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 `_." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:13 of -msgid "" -"HTTPS URL to send updates to. Use an empty string to remove webhook " -"integration" -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:14 of -msgid "" -"Upload your public key certificate so that the root certificate in use " -"can be checked. See our `self-signed guide " -"`_ for details." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:15 of -msgid "" -"The fixed IP address which will be used to send webhook requests instead " -"of the IP address resolved through DNS" -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:16 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:19 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.set_webhook:21 of -msgid "Please upload as InputFile, sending a String will not work." -msgstr "" - -#: aiogram.client.bot.Bot.stop_message_live_location:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.stop_message_live_location:4 of -msgid "" -"Required if *inline_message_id* is not specified. Identifier of the " -"message with live location to stop" -msgstr "" - -#: aiogram.client.bot.Bot.stop_message_live_location:8 of -msgid "" -"On success, if the message is not an inline message, the edited " -":class:`aiogram.types.message.Message` is returned, otherwise " -":code:`True` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:1 of -msgid "" -"Use this method to stop a poll which was sent by the bot. On success, the" -" stopped :class:`aiogram.types.poll.Poll` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:4 of -msgid "Identifier of the original message with the poll" -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:5 of -msgid "" -"A JSON-serialized object for a new message `inline keyboard " -"`_." -msgstr "" - -#: aiogram.client.bot.Bot.stop_poll:7 of -msgid "On success, the stopped :class:`aiogram.types.poll.Poll` is returned." -msgstr "" - -#: aiogram.client.bot.Bot.unban_chat_member:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unban_chat_member:5 of -msgid "Do nothing if the user is not banned" -msgstr "" - -#: aiogram.client.bot.Bot.unban_chat_sender_chat:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_all_chat_messages:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_all_forum_topic_messages:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_chat_message:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.unpin_chat_message:4 of -msgid "" -"Identifier of a message to unpin. If not specified, the most recent " -"pinned message (by sending date) will be unpinned." -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:3 of -msgid "User identifier of sticker file owner" -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:4 of -msgid "" -"**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 » `" -msgstr "" - -#: aiogram.client.bot.Bot.upload_sticker_file:6 of -msgid "Returns the uploaded :class:`aiogram.types.file.File` on success." -msgstr "" - -#: aiogram.client.bot.Bot.close_general_forum_topic:1 of -msgid "" -"Use this method to close an open 'General' 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 " -":code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.edit_general_forum_topic:1 of -msgid "" -"Use this method to edit the name of the 'General' 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. Returns " -":code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.edit_general_forum_topic:4 of -msgid "New topic name, 1-128 characters" -msgstr "" - -#: aiogram.client.bot.Bot.hide_general_forum_topic:1 of -msgid "" -"Use this method to hide the 'General' 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. The topic will be " -"automatically closed if it was open. Returns :code:`True` on success." -msgstr "" - -#: aiogram.client.bot.Bot.reopen_general_forum_topic:1 of -msgid "" -"Use this method to reopen a closed 'General' 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. The topic will be" -" automatically unhidden if it was hidden. Returns :code:`True` on " -"success." -msgstr "" - -#: aiogram.client.bot.Bot.unhide_general_forum_topic:1 of -msgid "" -"Use this method to unhide the 'General' 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 :code:`True` " -"on success." -msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "A JSON-serialized object for a new" -#~ " `inline keyboard `_." -#~ msgstr "" - -#~ msgid "" -#~ "Additional interface options. A JSON-" -#~ "serialized object for an `inline " -#~ "keyboard `_, " -#~ "`custom reply keyboard " -#~ "`_, instructions " -#~ "to remove keyboard or to force a" -#~ " reply from the user." -#~ msgstr "" - -#~ msgid "New chat title, 1-255 characters" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "Use this method to change the list" -#~ " of the bot's commands. See " -#~ "`https://core.telegram.org/bots#commands " -#~ "`_`https://core.telegram.org/bots#commands" -#~ " `_ for more" -#~ " details about bot commands. Returns " -#~ ":code:`True` on success." -#~ msgstr "" - -#~ msgid "" -#~ "A JSON-serialized object for an " -#~ "`inline keyboard `_." -#~ msgstr "" - -#~ msgid "" -#~ "A JSON-serialized object for a new" -#~ " message `inline keyboard " -#~ "`_." -#~ msgstr "" - -#~ msgid "" -#~ "`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." -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getupdates" -#~ msgstr "" - -#~ msgid "Returns an Array of Update objects." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setwebhook" -#~ msgstr "" - -#~ msgid "Returns True on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletewebhook" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getwebhookinfo" -#~ msgstr "" - -#~ msgid "" -#~ "On success, returns a WebhookInfo " -#~ "object. If the bot is using " -#~ "getUpdates, will return an object with" -#~ " the url field empty." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getme" -#~ msgstr "" - -#~ msgid "Returns basic information about the bot in form of a User object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#logout" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#close" -#~ msgstr "" - -#~ msgid "" -#~ "The method will return error 429 " -#~ "in the first 10 minutes after the" -#~ " bot is launched. Returns True on " -#~ "success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendmessage" -#~ msgstr "" - -#~ msgid "On success, the sent Message is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#forwardmessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#copymessage" -#~ msgstr "" - -#~ msgid "Returns the MessageId of the sent message on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendphoto" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendaudio" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#senddocument" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvideo" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendanimation" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvoice" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvideonote" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendmediagroup" -#~ msgstr "" - -#~ msgid "On success, an array of Messages that were sent is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendlocation" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagelivelocation" -#~ msgstr "" - -#~ msgid "" -#~ "On success, if the edited message " -#~ "is not an inline message, the " -#~ "edited Message is returned, otherwise " -#~ "True is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#stopmessagelivelocation" -#~ msgstr "" - -#~ msgid "" -#~ "On success, if the message is not" -#~ " an inline message, the edited " -#~ "Message is returned, otherwise True is" -#~ " returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendvenue" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendcontact" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendpoll" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#senddice" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendchataction" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getuserprofilephotos" -#~ msgstr "" - -#~ msgid "Returns a UserProfilePhotos object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getfile" -#~ msgstr "" - -#~ msgid "On success, a File object is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#banchatmember" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unbanchatmember" -#~ msgstr "" - -#~ msgid "" -#~ "The user will not return to the" -#~ " group or channel automatically, but " -#~ "will be able to join via link, " -#~ "etc. Returns True on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#restrictchatmember" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#promotechatmember" -#~ msgstr "" - -#~ msgid "" -#~ "Source: " -#~ "https://core.telegram.org/bots/api#setchatadministratorcustomtitle" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#banchatsenderchat" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unbanchatsenderchat" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatpermissions" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#exportchatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the new invite link as String on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createchatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the new invite link as ChatInviteLink object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editchatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the edited invite link as a ChatInviteLink object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#revokechatinvitelink" -#~ msgstr "" - -#~ msgid "Returns the revoked invite link as ChatInviteLink object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#approvechatjoinrequest" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#declinechatjoinrequest" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatphoto" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletechatphoto" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchattitle" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatdescription" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#pinchatmessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unpinchatmessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unpinallchatmessages" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#leavechat" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchat" -#~ msgstr "" - -#~ msgid "Returns a Chat object on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatadministrators" -#~ msgstr "" - -#~ msgid "Returns an Array of ChatMember objects." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatmembercount" -#~ msgstr "" - -#~ msgid "Returns Int on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatmember" -#~ msgstr "" - -#~ msgid "Returns a ChatMember object on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatstickerset" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletechatstickerset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getforumtopiciconstickers" -#~ msgstr "" - -#~ msgid "Returns an Array of Sticker objects." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createforumtopic" -#~ msgstr "" - -#~ msgid "" -#~ "Color of the topic icon in RGB " -#~ "format. Currently, must be one of " -#~ "0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, " -#~ "0xFF93B2, or 0xFB6F5F" -#~ msgstr "" - -#~ msgid "Returns information about the created topic as a ForumTopic object." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editforumtopic" -#~ msgstr "" - -#~ msgid "" -#~ "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" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#closeforumtopic" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#reopenforumtopic" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deleteforumtopic" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answercallbackquery" -#~ msgstr "" - -#~ msgid "On success, True is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setmycommands" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletemycommands" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getmycommands" -#~ msgstr "" - -#~ msgid "" -#~ "Returns an Array of BotCommand objects." -#~ " If commands aren't set, an empty " -#~ "list is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setchatmenubutton" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getchatmenubutton" -#~ msgstr "" - -#~ msgid "Returns MenuButton on success." -#~ msgstr "" - -#~ msgid "" -#~ "Source: " -#~ "https://core.telegram.org/bots/api#setmydefaultadministratorrights" -#~ msgstr "" - -#~ msgid "" -#~ "Source: " -#~ "https://core.telegram.org/bots/api#getmydefaultadministratorrights" -#~ msgstr "" - -#~ msgid "Returns ChatAdministratorRights on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagetext" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagecaption" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagemedia" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#editmessagereplymarkup" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#stoppoll" -#~ msgstr "" - -#~ msgid "On success, the stopped Poll is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletemessage" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendsticker" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getstickerset" -#~ msgstr "" - -#~ msgid "On success, a StickerSet object is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getcustomemojistickers" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#uploadstickerfile" -#~ msgstr "" - -#~ msgid "Returns the uploaded File on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createnewstickerset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#addstickertoset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setstickerpositioninset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#deletestickerfromset" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setstickersetthumb" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answerinlinequery" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answerwebappquery" -#~ msgstr "" - -#~ msgid "On success, a SentWebAppMessage object is returned." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendinvoice" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#createinvoicelink" -#~ msgstr "" - -#~ msgid "Returns the created invoice link as String on success." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answershippingquery" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#answerprecheckoutquery" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setpassportdataerrors" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#sendgame" -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#setgamescore" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "Source: https://core.telegram.org/bots/api#getgamehighscores" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid "" -#~ "Use this method to get information " -#~ "about a member of a chat. Returns" -#~ " a :class:`aiogram.types.chat_member.ChatMember` object" -#~ " on success." -#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po index 711dcfaa..bf582c84 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/edit_forum_topic.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,8 +50,8 @@ msgstr "" #: ../../docstring aiogram.methods.edit_forum_topic.EditForumTopic.name:1 of msgid "" -"New topic name, 0-128 characters. If not specififed or empty, the current" -" name of the topic will be kept" +"New topic name, 0-128 characters. If not specified or empty, the current " +"name of the topic will be kept" msgstr "" #: ../../docstring @@ -94,24 +94,3 @@ msgstr "" #: ../../api/methods/edit_forum_topic.rst:40 msgid "As reply into Webhook in handler" msgstr "" - -#~ msgid "" -#~ "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" -#~ msgstr "" - -#~ msgid "New topic name, 1-128 characters" -#~ msgstr "" - -#~ msgid "" -#~ "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." -#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po index ae8994c9..f882bd5a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -31,9 +31,9 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work only if the bot is an administrator in the chat. " -"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " -"success." +"is guaranteed to work for other users, only if the bot is an " +"administrator in the chat. Returns a " +":class:`aiogram.types.chat_member.ChatMember` object on success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -85,10 +85,3 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" - -#~ msgid "" -#~ "Use this method to get information " -#~ "about a member of a chat. Returns" -#~ " a :class:`aiogram.types.chat_member.ChatMember` object" -#~ " on success." -#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po index 13a50fa1..c0f95110 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -733,9 +733,9 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work only if the bot is an administrator in the chat. " -"Returns a :class:`aiogram.types.chat_member.ChatMember` object on " -"success." +"is guaranteed to work for other users, only if the bot is an " +"administrator in the chat. Returns a " +":class:`aiogram.types.chat_member.ChatMember` object on success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -1256,10 +1256,3 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" - -#~ msgid "" -#~ "Use this method to get information " -#~ "about a member of a chat. Returns" -#~ " a :class:`aiogram.types.chat_member.ChatMember` object" -#~ " on success." -#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/changelog.po b/docs/locale/uk_UA/LC_MESSAGES/changelog.po index 6f0f541b..a8b8a071 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/changelog.po +++ b/docs/locale/uk_UA/LC_MESSAGES/changelog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-01-07 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2022-12-30)" +msgid "\\ |release| [UNRELEASED DRAFT] (2023-01-07)" msgstr "" #: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 @@ -2480,25 +2480,3 @@ msgstr "" #: ../../../HISTORY.rst:497 msgid "0.1 (2017-06-03)" msgstr "" - -#~ msgid "" -#~ "Added is_chat_creator method to " -#~ "ChatMemberStatus.yml (`#394 " -#~ "`_)" -#~ msgstr "" - -#~ msgid "" -#~ ":code:`is_member` and :code:`is_admin` methods " -#~ "of :code:`ChatMember` and " -#~ ":code:`ChatMemberStatus.yml` was renamed to " -#~ ":code:`is_chat_member` and :code:`is_chat_admin`" -#~ msgstr "" - -#~ msgid "\\ |release| [UNRELEASED DRAFT] (2022-11-23)" -#~ msgstr "" - -#~ msgid "" -#~ "Added missing shortcuts, new enums, " -#~ "reworked old stuff `#952 " -#~ "`_" -#~ msgstr "" From 2e59adefe6f93296acbbc616d17467b4131764af Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 7 Jan 2023 23:52:33 +0200 Subject: [PATCH 10/42] Update docs --- docs/dispatcher/flags.rst | 5 +- .../locale/en/LC_MESSAGES/dispatcher/flags.po | 63 ++++++++++++++-- docs/locale/en/LC_MESSAGES/utils/keyboard.po | 31 ++++++-- .../uk_UA/LC_MESSAGES/dispatcher/flags.po | 74 ++++++++++++++++--- .../uk_UA/LC_MESSAGES/utils/keyboard.po | 33 +++++++-- docs/utils/keyboard.rst | 23 ++++++ 6 files changed, 194 insertions(+), 35 deletions(-) diff --git a/docs/dispatcher/flags.rst b/docs/dispatcher/flags.rst index 1b36bd1e..1e65f28e 100644 --- a/docs/dispatcher/flags.rst +++ b/docs/dispatcher/flags.rst @@ -54,8 +54,9 @@ Via filters Use in middlewares ================== -.. automodule:: aiogram.flags.getter - :members: +.. automodule:: aiogram.dispatcher.flags + :members: extract_flags, get_flag, check_flags + Example in middlewares ---------------------- diff --git a/docs/locale/en/LC_MESSAGES/dispatcher/flags.po b/docs/locale/en/LC_MESSAGES/dispatcher/flags.po index 75478096..0ad40047 100644 --- a/docs/locale/en/LC_MESSAGES/dispatcher/flags.po +++ b/docs/locale/en/LC_MESSAGES/dispatcher/flags.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-01-07 23:33+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -59,20 +59,71 @@ msgstr "" msgid "Use in middlewares" msgstr "" -#: aiogram.flags.getter:1 of -msgid "FlagDecorator(flag: aiogram.dispatcher.flags.Flag)" +#: aiogram.dispatcher.flags.check_flags:1 of +msgid "Check flags via magic filter" msgstr "" -#: ../../dispatcher/flags.rst:61 +#: aiogram.dispatcher.flags.check_flags aiogram.dispatcher.flags.extract_flags +#: aiogram.dispatcher.flags.get_flag of +msgid "Parameters" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:3 +#: aiogram.dispatcher.flags.extract_flags:3 aiogram.dispatcher.flags.get_flag:3 +#: of +msgid "handler object or data" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:4 of +msgid "instance of the magic" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags aiogram.dispatcher.flags.extract_flags +#: aiogram.dispatcher.flags.get_flag of +msgid "Returns" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:5 of +msgid "the result of magic filter check" +msgstr "" + +#: aiogram.dispatcher.flags.extract_flags:1 of +msgid "Extract flags from handler or middleware context data" +msgstr "" + +#: aiogram.dispatcher.flags.extract_flags:4 of +msgid "dictionary with all handler flags" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:1 of +msgid "Get flag by name" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:4 of +msgid "name of the flag" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:5 of +msgid "default value (None)" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:6 of +msgid "value of the flag or default" +msgstr "" + +#: ../../dispatcher/flags.rst:62 msgid "Example in middlewares" msgstr "" -#: ../../dispatcher/flags.rst:74 +#: ../../dispatcher/flags.rst:75 msgid "Use in utilities" msgstr "" -#: ../../dispatcher/flags.rst:76 +#: ../../dispatcher/flags.rst:77 msgid "" "For example you can collect all registered commands with handler " "description and then it can be used for generating commands help" msgstr "" + +#~ msgid "FlagDecorator(flag: aiogram.dispatcher.flags.Flag)" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/utils/keyboard.po b/docs/locale/en/LC_MESSAGES/utils/keyboard.po index bf3a94a8..f550df18 100644 --- a/docs/locale/en/LC_MESSAGES/utils/keyboard.po +++ b/docs/locale/en/LC_MESSAGES/utils/keyboard.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-14 19:29+0300\n" +"POT-Creation-Date: 2023-01-07 23:24+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,22 @@ msgstr "" msgid "Keyboard builder" msgstr "" -#: ../../utils/keyboard.rst:6 +#: ../../utils/keyboard.rst:5 +msgid "Keyboard builder helps to dynamically generate markup." +msgstr "" + +#: ../../utils/keyboard.rst:9 +msgid "" +"Note that if you have static markup, it's best to define it explicitly " +"rather than using builder, but if you have dynamic markup configuration, " +"feel free to use builder as you wish." +msgstr "" + +#: ../../utils/keyboard.rst:14 +msgid "Usage example" +msgstr "" + +#: ../../utils/keyboard.rst:29 msgid "Base builder" msgstr "" @@ -80,7 +95,7 @@ msgstr "" msgid "When too much buttons is passed it will be separated to many rows" msgstr "" -#: ../../utils/keyboard.rst:12 +#: ../../utils/keyboard.rst:35 msgid "Inline Keyboard" msgstr "" @@ -88,23 +103,23 @@ msgstr "" msgid "Inline keyboard builder inherits all methods from generic builder" msgstr "" -#: ../../utils/keyboard.rst:20 +#: ../../utils/keyboard.rst:43 msgid "Add new inline button to markup" msgstr "" -#: ../../utils/keyboard.rst:25 +#: ../../utils/keyboard.rst:48 msgid "Construct an InlineKeyboardMarkup" msgstr "" -#: ../../utils/keyboard.rst:28 +#: ../../utils/keyboard.rst:51 msgid "Reply Keyboard" msgstr "" -#: ../../utils/keyboard.rst:36 +#: ../../utils/keyboard.rst:59 msgid "Add new button to markup" msgstr "" -#: ../../utils/keyboard.rst:41 +#: ../../utils/keyboard.rst:64 msgid "Construct an ReplyKeyboardMarkup" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/flags.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/flags.po index 29770fd9..d9d8beb1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/flags.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/flags.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-01-07 23:33+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,16 +27,17 @@ msgid "" "in-middlewares>`_ or special `utilities <#use-in-utilities>`_ to make " "classification of the handlers." msgstr "" -"Маркери це, так звані мітки для обробників, які можна використовувати `міддлварах <#use-" -"in-middlewares>`_ або в спеціальних `утилітах <#use-in-utilities>`_ щоб " -"провести класифікацію обробників." +"Маркери це, так звані мітки для обробників, які можна використовувати " +"`міддлварах <#use-in-middlewares>`_ або в спеціальних `утилітах <#use-in-" +"utilities>`_ щоб провести класифікацію обробників." #: ../../dispatcher/flags.rst:8 msgid "" "Flags can be added to the handler via `decorators <#via-decorators>`_, " "`handlers registration <#via-handler-registration-method>`_ or `filters " "`_." -msgstr "Маркери можна додати до обробника через `декоратори <#via-decorators>`_, " +msgstr "" +"Маркери можна додати до обробника через `декоратори <#via-decorators>`_, " "`реєстрацію обробників <#via-handler-registration-method>`_ або `фільтри " "`_." @@ -64,20 +65,71 @@ msgstr "Через фільтри" msgid "Use in middlewares" msgstr "Використовувати в міддлварах" -#: aiogram.flags.getter:1 of -msgid "FlagDecorator(flag: aiogram.dispatcher.flags.Flag)" +#: aiogram.dispatcher.flags.check_flags:1 of +msgid "Check flags via magic filter" msgstr "" -#: ../../dispatcher/flags.rst:61 +#: aiogram.dispatcher.flags.check_flags aiogram.dispatcher.flags.extract_flags +#: aiogram.dispatcher.flags.get_flag of +msgid "Parameters" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:3 +#: aiogram.dispatcher.flags.extract_flags:3 aiogram.dispatcher.flags.get_flag:3 +#: of +msgid "handler object or data" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:4 of +msgid "instance of the magic" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags aiogram.dispatcher.flags.extract_flags +#: aiogram.dispatcher.flags.get_flag of +msgid "Returns" +msgstr "" + +#: aiogram.dispatcher.flags.check_flags:5 of +msgid "the result of magic filter check" +msgstr "" + +#: aiogram.dispatcher.flags.extract_flags:1 of +msgid "Extract flags from handler or middleware context data" +msgstr "" + +#: aiogram.dispatcher.flags.extract_flags:4 of +msgid "dictionary with all handler flags" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:1 of +msgid "Get flag by name" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:4 of +msgid "name of the flag" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:5 of +msgid "default value (None)" +msgstr "" + +#: aiogram.dispatcher.flags.get_flag:6 of +msgid "value of the flag or default" +msgstr "" + +#: ../../dispatcher/flags.rst:62 msgid "Example in middlewares" msgstr "Приклад в міддлварах" -#: ../../dispatcher/flags.rst:74 +#: ../../dispatcher/flags.rst:75 msgid "Use in utilities" msgstr "Використання в утилітах" -#: ../../dispatcher/flags.rst:76 +#: ../../dispatcher/flags.rst:77 msgid "" "For example you can collect all registered commands with handler " "description and then it can be used for generating commands help" -msgstr "Наприклад, ви можете зібрати всі зареєстровані команди з описом обробника, а потім його можна використовувати для створення довідки щодо команд" +msgstr "" +"Наприклад, ви можете зібрати всі зареєстровані команди з описом " +"обробника, а потім його можна використовувати для створення довідки щодо " +"команд" diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/keyboard.po b/docs/locale/uk_UA/LC_MESSAGES/utils/keyboard.po index d2fa88bc..a8baf774 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/utils/keyboard.po +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/keyboard.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-14 19:29+0300\n" +"POT-Creation-Date: 2023-01-07 23:24+0200\n" "PO-Revision-Date: 2022-10-13 21:54+0300\n" "Last-Translator: \n" "Language-Team: \n" @@ -20,7 +20,24 @@ msgstr "" msgid "Keyboard builder" msgstr "Конструктор клавіатури" -#: ../../utils/keyboard.rst:6 +#: ../../utils/keyboard.rst:5 +msgid "Keyboard builder helps to dynamically generate markup." +msgstr "Конструктор клавіатури допомагає динамічно генерувати розмітку" + +#: ../../utils/keyboard.rst:9 +msgid "" +"Note that if you have static markup, it's best to define it explicitly " +"rather than using builder, but if you have dynamic markup configuration, " +"feel free to use builder as you wish." +msgstr "Зауважте, що якщо у вас є статична розмітка, найкраще визначити її явно, " +"а не використовувати конструктор, але якщо у вас є конфігурація динамічної розмітки, " +"сміливо використовуйте конструктор на свій розсуд." + +#: ../../utils/keyboard.rst:14 +msgid "Usage example" +msgstr "Приклад використання" + +#: ../../utils/keyboard.rst:29 msgid "Base builder" msgstr "Базовий конструктор" @@ -88,7 +105,7 @@ msgstr "" "Коли передано занадто багато кнопок, вони будуть розділені на багато " "рядків" -#: ../../utils/keyboard.rst:12 +#: ../../utils/keyboard.rst:35 msgid "Inline Keyboard" msgstr "Клавіатура під повідомленням(Inline Keyboard)" @@ -98,22 +115,22 @@ msgstr "" "Конструктор клавіатури під повідомленням успадковує всі методи від " "універсального конструктора" -#: ../../utils/keyboard.rst:20 +#: ../../utils/keyboard.rst:43 msgid "Add new inline button to markup" msgstr "Додавання нової кнопки до розмітки" -#: ../../utils/keyboard.rst:25 +#: ../../utils/keyboard.rst:48 msgid "Construct an InlineKeyboardMarkup" msgstr "Створення InlineKeyboardMarkup" -#: ../../utils/keyboard.rst:28 +#: ../../utils/keyboard.rst:51 msgid "Reply Keyboard" msgstr "Клавіатура відповідей" -#: ../../utils/keyboard.rst:36 +#: ../../utils/keyboard.rst:59 msgid "Add new button to markup" msgstr "Додавання нової кнопки до розмітки" -#: ../../utils/keyboard.rst:41 +#: ../../utils/keyboard.rst:64 msgid "Construct an ReplyKeyboardMarkup" msgstr "Створення ReplyKeyboardMarkup" diff --git a/docs/utils/keyboard.rst b/docs/utils/keyboard.rst index e117de4f..752ffb0e 100644 --- a/docs/utils/keyboard.rst +++ b/docs/utils/keyboard.rst @@ -2,6 +2,29 @@ Keyboard builder ================ +Keyboard builder helps to dynamically generate markup. + +.. note:: + + Note that if you have static markup, it's best to define it explicitly rather than using builder, + but if you have dynamic markup configuration, feel free to use builder as you wish. + + +Usage example +============= + +.. code-block:: python + + builder = InlineKeyboardBuilder() + + for index in range(1, 11): + builder.button(text=f"Set {index}", callback_data=f"set:{index}") + + builder.adjust(3, 2) + + await message.answer("Some text here", reply_markup=builder.as_markup()) + + Base builder ============ .. autoclass:: aiogram.utils.keyboard.ReplyKeyboardBuilder From 04ccb390d5c25a3c8882e04738a484572fd17998 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 8 Jan 2023 16:49:34 +0200 Subject: [PATCH 11/42] Callback answer feature (#1091) * Added callback answer feature * Fixed typehints and tests * Make context manager in tests compatible with Python 3.8 --- CHANGES/1091.feature.rst | 1 + aiogram/exceptions.py | 4 + aiogram/utils/callback_answer.py | 211 ++++++++++++++++++++++ docs/dispatcher/flags.rst | 2 + docs/utils/callback_answer.rst | 106 +++++++++++ docs/utils/index.rst | 1 + tests/test_filters/test_callback_data.py | 62 +++---- tests/test_utils/test_callback_answer.py | 217 +++++++++++++++++++++++ 8 files changed, 574 insertions(+), 30 deletions(-) create mode 100644 CHANGES/1091.feature.rst create mode 100644 aiogram/utils/callback_answer.py create mode 100644 docs/utils/callback_answer.rst create mode 100644 tests/test_utils/test_callback_answer.py diff --git a/CHANGES/1091.feature.rst b/CHANGES/1091.feature.rst new file mode 100644 index 00000000..b3e773ce --- /dev/null +++ b/CHANGES/1091.feature.rst @@ -0,0 +1 @@ +Added :ref:`callback answer ` feature diff --git a/aiogram/exceptions.py b/aiogram/exceptions.py index a32c3ec6..15f5c45f 100644 --- a/aiogram/exceptions.py +++ b/aiogram/exceptions.py @@ -24,6 +24,10 @@ class DetailedAiogramError(AiogramError): return f"{type(self).__name__}('{self}')" +class CallbackAnswerException(AiogramError): + pass + + class TelegramAPIError(DetailedAiogramError): def __init__( self, diff --git a/aiogram/utils/callback_answer.py b/aiogram/utils/callback_answer.py new file mode 100644 index 00000000..1515a7e6 --- /dev/null +++ b/aiogram/utils/callback_answer.py @@ -0,0 +1,211 @@ +from typing import Any, Awaitable, Callable, Dict, Optional, Union + +from aiogram import BaseMiddleware, loggers +from aiogram.dispatcher.flags import get_flag +from aiogram.exceptions import CallbackAnswerException +from aiogram.methods import AnswerCallbackQuery +from aiogram.types import CallbackQuery, TelegramObject + + +class CallbackAnswer: + def __init__( + self, + answered: bool, + disabled: bool = False, + text: Optional[str] = None, + show_alert: Optional[bool] = None, + url: Optional[str] = None, + cache_time: Optional[int] = None, + ) -> None: + """ + Callback answer configuration + + :param answered: this request is already answered by middleware + :param disabled: answer will not be performed + :param text: answer with text + :param show_alert: show alert + :param url: game url + :param cache_time: cache answer for some time + """ + self._answered = answered + self._disabled = disabled + self._text = text + self._show_alert = show_alert + self._url = url + self._cache_time = cache_time + + def disable(self) -> None: + """ + Deactivate answering for this handler + """ + self.disabled = True + + @property + def disabled(self) -> bool: + """Indicates that automatic answer is disabled in this handler""" + return self._disabled + + @disabled.setter + def disabled(self, value: bool) -> None: + if self._answered: + raise CallbackAnswerException("Can't change disabled state after answer") + self._disabled = value + + @property + def answered(self) -> bool: + """ + Indicates that request is already answered by middleware + """ + return self._answered + + @property + def text(self) -> Optional[str]: + """ + Response text + :return: + """ + return self._text + + @text.setter + def text(self, value: Optional[str]) -> None: + if self._answered: + raise CallbackAnswerException("Can't change text after answer") + self._text = value + + @property + def show_alert(self) -> Optional[bool]: + """ + Whether to display an alert + """ + return self._show_alert + + @show_alert.setter + def show_alert(self, value: Optional[bool]) -> None: + if self._answered: + raise CallbackAnswerException("Can't change show_alert after answer") + self._show_alert = value + + @property + def url(self) -> Optional[str]: + """ + Game url + """ + return self._url + + @url.setter + def url(self, value: Optional[str]) -> None: + if self._answered: + raise CallbackAnswerException("Can't change url after answer") + self._url = value + + @property + def cache_time(self) -> Optional[int]: + """ + Response cache time + """ + return self._cache_time + + @cache_time.setter + def cache_time(self, value: Optional[int]) -> None: + if self._answered: + raise CallbackAnswerException("Can't change cache_time after answer") + self._cache_time = value + + def __str__(self) -> str: + args = ", ".join( + f"{k}={v!r}" + for k, v in { + "answered": self.answered, + "disabled": self.disabled, + "text": self.text, + "show_alert": self.show_alert, + "url": self.url, + "cache_time": self.cache_time, + }.items() + if v is not None + ) + return f"{type(self).__name__}({args})" + + +class CallbackAnswerMiddleware(BaseMiddleware): + def __init__( + self, + pre: bool = False, + text: Optional[str] = None, + show_alert: Optional[bool] = None, + url: Optional[str] = None, + cache_time: Optional[int] = None, + ) -> None: + """ + Inner middleware for callback query handlers, can be useful in bots with a lot of callback + handlers to automatically take answer to all requests + + :param pre: send answer before execute handler + :param text: answer with text + :param show_alert: show alert + :param url: game url + :param cache_time: cache answer for some time + """ + self.pre = pre + self.text = text + self.show_alert = show_alert + self.url = url + self.cache_time = cache_time + + async def __call__( + self, + handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], + event: TelegramObject, + data: Dict[str, Any], + ) -> Any: + if not isinstance(event, CallbackQuery): + return await handler(event, data) + + callback_answer = data["callback_answer"] = self.construct_callback_answer( + properties=get_flag(data, "callback_answer") + ) + + if not callback_answer.disabled and callback_answer.answered: + await self.answer(event, callback_answer) + try: + return await handler(event, data) + finally: + if not callback_answer.disabled and not callback_answer.answered: + await self.answer(event, callback_answer) + + def construct_callback_answer( + self, properties: Optional[Union[Dict[str, Any], bool]] + ) -> CallbackAnswer: + pre, disabled, text, show_alert, url, cache_time = ( + self.pre, + False, + self.text, + self.show_alert, + self.url, + self.cache_time, + ) + if isinstance(properties, dict): + pre = properties.get("pre", pre) + disabled = properties.get("disabled", disabled) + text = properties.get("text", text) + show_alert = properties.get("show_alert", show_alert) + url = properties.get("url", url) + cache_time = properties.get("cache_time", cache_time) + + return CallbackAnswer( + answered=pre, + disabled=disabled, + text=text, + show_alert=show_alert, + url=url, + cache_time=cache_time, + ) + + def answer(self, event: CallbackQuery, callback_answer: CallbackAnswer) -> AnswerCallbackQuery: + loggers.middlewares.info("Answer to callback query id=%s", event.id) + return event.answer( + text=callback_answer.text, + show_alert=callback_answer.show_alert, + url=callback_answer.url, + cache_time=callback_answer.cache_time, + ) diff --git a/docs/dispatcher/flags.rst b/docs/dispatcher/flags.rst index 1e65f28e..b958de1d 100644 --- a/docs/dispatcher/flags.rst +++ b/docs/dispatcher/flags.rst @@ -1,3 +1,5 @@ +.. _flags: + ===== Flags ===== diff --git a/docs/utils/callback_answer.rst b/docs/utils/callback_answer.rst new file mode 100644 index 00000000..f7fc4715 --- /dev/null +++ b/docs/utils/callback_answer.rst @@ -0,0 +1,106 @@ +.. _callback-answer-util: +=============== +Callback answer +=============== + +Helper for callback query handlers, can be useful in bots with a lot of callback +handlers to automatically take answer to all requests. + +Simple usage +============ + +For use, it is enough to register the inner middleware :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` in dispatcher or specific router: + +.. code-block:: python + + dispatcher.callback_query.middleware(CallbackAnswerMiddleware()) + +After that all handled callback queries will be answered automatically after processing the handler. + +Advanced usage +============== + +In some cases you need to have some non-standard response parameters, this can be done in several ways: + +Global defaults +--------------- + +Change default parameters while initializing middleware, for example change answer to `pre` mode and text "OK": + +.. code-block:: python + + dispatcher.callback_query.middleware(CallbackAnswerMiddleware(pre=True, text="OK")) + + +Look at :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` to get all available parameters + + +Handler specific +---------------- + +By using :ref:`flags ` you can change the behavior for specific handler + +.. code-block:: python + + @router.callback_query() + @flags.callback_answer(text="Thanks", cache_time=30) + async def my_handler(query: CallbackQuery): + ... + +Flag arguments is the same as in :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` +with additional one :code:`disabled` to disable answer. + +A special case +-------------- + +It is not always correct to answer the same in every case, +so there is an option to change the answer inside the handler. You can get an instance of :class:`aiogram.utils.callback_answer.CallbackAnswer` object inside handler and change whatever you want. + +.. danger:: + + Note that is impossible to change callback answer attributes when you use :code:`pre=True` mode. + +.. code-block:: python + + @router.callback_query() + async def my_handler(query: CallbackQuery, callback_answer: CallbackAnswer): + ... + if : + callback_answer.text = "All is ok" + else: + callback_answer.text = "Something wrong" + callback_answer.cache_time = 10 + + +Combine that all at once +------------------------ + +For example you want to answer in most of cases before handler with text "🤔" but at some cases need to answer after the handler with custom text, +so you can do it: + +.. code-block:: python + + dispatcher.callback_query.middleware(CallbackAnswerMiddleware(pre=True, text="🤔")) + + @router.callback_query() + @flags.callback_answer(pre=False, cache_time=30) + async def my_handler(query: CallbackQuery): + ... + if : + callback_answer.text = "All is ok" + + +Description of objects +====================== + +.. autoclass:: aiogram.utils.callback_answer.CallbackAnswerMiddleware + :show-inheritance: + :member-order: bysource + :special-members: __init__ + :members: + +.. autoclass:: aiogram.utils.callback_answer.CallbackAnswer + :show-inheritance: + :member-order: bysource + :special-members: __init__ + :members: diff --git a/docs/utils/index.rst b/docs/utils/index.rst index a7a8474d..cfe5a543 100644 --- a/docs/utils/index.rst +++ b/docs/utils/index.rst @@ -8,3 +8,4 @@ Utils i18n chat_action web_app + callback_answer diff --git a/tests/test_filters/test_callback_data.py b/tests/test_filters/test_callback_data.py index e2f1f1fc..70388689 100644 --- a/tests/test_filters/test_callback_data.py +++ b/tests/test_filters/test_callback_data.py @@ -1,5 +1,8 @@ +from decimal import Decimal from enum import Enum, auto +from fractions import Fraction from typing import Optional +from uuid import UUID import pytest from magic_filter import MagicFilter @@ -45,36 +48,35 @@ class TestCallbackData: class MyInvalidCallback(CallbackData, prefix="sp@m", sep="@"): pass - # - # @pytest.mark.parametrize( - # "value,success,expected", - # [ - # [None, True, ""], - # [42, True, "42"], - # ["test", True, "test"], - # [9.99, True, "9.99"], - # [Decimal("9.99"), True, "9.99"], - # [Fraction("3/2"), True, "3/2"], - # [ - # UUID("123e4567-e89b-12d3-a456-426655440000"), - # True, - # "123e4567-e89b-12d3-a456-426655440000", - # ], - # [MyIntEnum.FOO, True, "1"], - # [MyStringEnum.FOO, True, "FOO"], - # [..., False, "..."], - # [object, False, "..."], - # [object(), False, "..."], - # [User(id=42, is_bot=False, first_name="test"), False, "..."], - # ], - # ) - # def test_encode_value(self, value, success, expected): - # callback = MyCallback(foo="test", bar=42) - # if success: - # assert callback._encode_value("test", value) == expected - # else: - # with pytest.raises(ValueError): - # assert callback._encode_value("test", value) == expected + @pytest.mark.parametrize( + "value,success,expected", + [ + [None, True, ""], + [42, True, "42"], + ["test", True, "test"], + [9.99, True, "9.99"], + [Decimal("9.99"), True, "9.99"], + [Fraction("3/2"), True, "3/2"], + [ + UUID("123e4567-e89b-12d3-a456-426655440000"), + True, + "123e4567-e89b-12d3-a456-426655440000", + ], + [MyIntEnum.FOO, True, "1"], + [MyStringEnum.FOO, True, "FOO"], + [..., False, "..."], + [object, False, "..."], + [object(), False, "..."], + [User(id=42, is_bot=False, first_name="test"), False, "..."], + ], + ) + def test_encode_value(self, value, success, expected): + callback = MyCallback(foo="test", bar=42) + if success: + assert callback._encode_value("test", value) == expected + else: + with pytest.raises(ValueError): + assert callback._encode_value("test", value) == expected def test_pack(self): with pytest.raises(ValueError, match="Separator symbol .+"): diff --git a/tests/test_utils/test_callback_answer.py b/tests/test_utils/test_callback_answer.py new file mode 100644 index 00000000..cf641f46 --- /dev/null +++ b/tests/test_utils/test_callback_answer.py @@ -0,0 +1,217 @@ +from unittest.mock import AsyncMock, MagicMock, patch + +import pytest + +from aiogram.exceptions import CallbackAnswerException +from aiogram.methods import AnswerCallbackQuery +from aiogram.types import CallbackQuery, User +from aiogram.utils.callback_answer import CallbackAnswer, CallbackAnswerMiddleware + + +class TestCallbackAnswer: + @pytest.mark.parametrize( + "name,value", + [ + ["answered", True], + ["answered", False], + ["disabled", True], + ["disabled", False], + ["text", "test"], + ["text", None], + ["show_alert", True], + ["show_alert", False], + ["show_alert", None], + ["url", "https://example.com"], + ["url", None], + ["cache_time", None], + ["cache_time", 10], + ], + ) + def test_getters(self, name, value): + kwargs = { + "answered": False, + name: value, + } + instance = CallbackAnswer(**kwargs) + result = getattr(instance, name) + assert result == value + + @pytest.mark.parametrize( + "name,value", + [ + ["disabled", True], + ["disabled", False], + ["text", None], + ["text", ""], + ["text", "test"], + ["show_alert", None], + ["show_alert", True], + ["show_alert", False], + ["url", None], + ["url", "https://example.com"], + ["cache_time", None], + ["cache_time", 0], + ["cache_time", 10], + ], + ) + def test_setter_allowed(self, name, value): + instance = CallbackAnswer(answered=False) + setattr(instance, name, value) + assert getattr(instance, name) == value + + @pytest.mark.parametrize( + "name", + [ + "disabled", + "text", + "show_alert", + "url", + "cache_time", + ], + ) + def test_setter_blocked(self, name): + instance = CallbackAnswer(answered=True) + with pytest.raises(CallbackAnswerException): + setattr(instance, name, "test") + + def test_disable(self): + instance = CallbackAnswer(answered=False) + assert not instance.disabled + instance.disable() + assert instance.disabled + + def test_str(self): + instance = CallbackAnswer(answered=False, text="test") + assert str(instance) == "CallbackAnswer(answered=False, disabled=False, text='test')" + + +class TestCallbackAnswerMiddleware: + @pytest.mark.parametrize( + "init_kwargs,flag_properties,expected", + [ + [ + {}, + True, + { + "answered": False, + "disabled": False, + "text": None, + "show_alert": None, + "url": None, + "cache_time": None, + }, + ], + [ + { + "pre": True, + "text": "test", + "show_alert": True, + "url": "https://example.com", + "cache_time": 5, + }, + True, + { + "answered": True, + "disabled": False, + "text": "test", + "show_alert": True, + "url": "https://example.com", + "cache_time": 5, + }, + ], + [ + { + "pre": False, + "text": "test", + "show_alert": True, + "url": "https://example.com", + "cache_time": 5, + }, + { + "pre": True, + "disabled": True, + "text": "another test", + "show_alert": False, + "url": "https://example.com/game.html", + "cache_time": 10, + }, + { + "answered": True, + "disabled": True, + "text": "another test", + "show_alert": False, + "url": "https://example.com/game.html", + "cache_time": 10, + }, + ], + ], + ) + def test_construct_answer(self, init_kwargs, flag_properties, expected): + middleware = CallbackAnswerMiddleware(**init_kwargs) + callback_answer = middleware.construct_callback_answer(properties=flag_properties) + for key, value in expected.items(): + assert getattr(callback_answer, key) == value + + def test_answer(self): + middleware = CallbackAnswerMiddleware() + event = CallbackQuery( + id="1", + from_user=User(id=42, first_name="Test", is_bot=False), + chat_instance="test", + ) + callback_answer = CallbackAnswer( + answered=False, + disabled=False, + text="another test", + show_alert=False, + url="https://example.com/game.html", + cache_time=10, + ) + method = middleware.answer(event=event, callback_answer=callback_answer) + + assert isinstance(method, AnswerCallbackQuery) + assert method.text == callback_answer.text + assert method.show_alert == callback_answer.show_alert + assert method.url == callback_answer.url + assert method.cache_time == callback_answer.cache_time + + @pytest.mark.parametrize( + "properties,expected_stack", + [ + [{"answered": False}, ["handler", "answer"]], + [{"answered": True}, ["answer", "handler"]], + [{"disabled": True}, ["handler"]], + ], + ) + async def test_call(self, properties, expected_stack): + stack = [] + event = CallbackQuery( + id="1", + from_user=User(id=42, first_name="Test", is_bot=False), + chat_instance="test", + ) + + async def handler(*args, **kwargs): + stack.append("handler") + + async def answer(*args, **kwargs): + stack.append("answer") + + middleware = CallbackAnswerMiddleware() + with patch( + "aiogram.utils.callback_answer.CallbackAnswerMiddleware.construct_callback_answer", + new_callable=MagicMock, + side_effect=lambda **kwargs: CallbackAnswer(**{"answered": False, **properties}), + ), patch( + "aiogram.utils.callback_answer.CallbackAnswerMiddleware.answer", + new=answer, + ): + await middleware(handler, event, {}) + + assert stack == expected_stack + + async def test_invalid_event_type(self): + middleware = CallbackAnswerMiddleware() + handler = AsyncMock() + await middleware(handler, None, {}) + handler.assert_awaited() From f4ce4431f9bf0b6303d0e438c1195ee2f2d5ac42 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Thu, 12 Jan 2023 02:49:58 +0200 Subject: [PATCH 12/42] Migrate to hatchling (#1095) * Migrate to hatchling instead of poetry, ruff instead of flake8 * Migrate to hatchling instead of poetry, ruff instead of flake8 * Update tests suite * venv? * -m venv? * Change dependencies * Remove venv * Change mypy config * Added changelog * Mark uvloop incompatible with pypy * Update release script * Use internal caching for dependencies * Re-disable cov branches * Added contributing guide --- .coveragerc | 6 - .flake8 | 12 - .../{deploy.yml => pypi-release.yml} | 32 +- .github/workflows/tests.yml | 61 +- .gitignore | 2 +- .pre-commit-config.yaml | 34 +- .readthedocs.yml | 6 +- CHANGES/1095.misc.rst | 1 + CONTRIBUTING.md | 1 + Makefile | 79 +- aiogram/__init__.py | 11 +- aiogram/client/bot.py | 7 +- aiogram/client/session/aiohttp.py | 24 +- aiogram/client/session/base.py | 17 +- aiogram/client/telegram.py | 3 +- aiogram/dispatcher/dispatcher.py | 4 +- aiogram/dispatcher/event/event.py | 3 +- aiogram/dispatcher/flags.py | 2 +- aiogram/dispatcher/middlewares/manager.py | 6 +- aiogram/dispatcher/router.py | 2 +- aiogram/exceptions.py | 3 +- aiogram/filters/base.py | 3 +- aiogram/filters/callback_data.py | 12 +- aiogram/filters/chat_member_updated.py | 27 +- aiogram/filters/command.py | 2 +- aiogram/filters/text.py | 5 +- aiogram/fsm/middleware.py | 7 +- aiogram/fsm/storage/memory.py | 7 +- aiogram/methods/base.py | 11 +- aiogram/types/__init__.py | 8 +- aiogram/types/message.py | 47 +- aiogram/utils/auth_widget.py | 2 +- aiogram/utils/backoff.py | 5 +- aiogram/utils/chat_action.py | 5 +- aiogram/utils/keyboard.py | 9 +- aiogram/utils/magic_filter.py | 5 +- aiogram/utils/text_decorations.py | 3 +- aiogram/utils/web_app.py | 23 +- aiogram/webhook/aiohttp_server.py | 12 +- docs/contributing.rst | 213 ++ docs/index.rst | 1 + examples/finite_state_machine.py | 7 +- examples/multibot.py | 2 +- examples/web_app/routes.py | 1 - mypy.ini | 37 - poetry.lock | 2486 ----------------- pyproject.toml | 323 ++- pytest.ini | 4 - requirements/base.txt | 16 - requirements/docs.txt | 65 - tests/conftest.py | 6 +- .../test_methods/test_answer_inline_query.py | 6 +- .../test_types/test_shipping_query.py | 8 +- tests/test_filters/test_text.py | 10 +- tests/test_fsm/storage/test_redis.py | 6 +- tests/test_utils/test_i18n.py | 88 +- tests/test_utils/test_keyboard.py | 6 +- tests/test_utils/test_text_decorations.py | 6 +- 58 files changed, 799 insertions(+), 3001 deletions(-) delete mode 100644 .coveragerc delete mode 100644 .flake8 rename .github/workflows/{deploy.yml => pypi-release.yml} (65%) create mode 100644 CHANGES/1095.misc.rst create mode 100644 CONTRIBUTING.md create mode 100644 docs/contributing.rst delete mode 100644 mypy.ini delete mode 100644 poetry.lock delete mode 100644 pytest.ini delete mode 100644 requirements/base.txt delete mode 100644 requirements/docs.txt diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index e1862099..00000000 --- a/.coveragerc +++ /dev/null @@ -1,6 +0,0 @@ -[report] -exclude_lines = - pragma: no cover - if TYPE_CHECKING: - @abstractmethod - @overload diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 9e19cd03..00000000 --- a/.flake8 +++ /dev/null @@ -1,12 +0,0 @@ -[flake8] -max-line-length = 99 -select = C,E,F,W,B,B950 -ignore = E501,W503,E203 -exclude = - .git - build - dist - venv - docs - *.egg-info - experiment.py diff --git a/.github/workflows/deploy.yml b/.github/workflows/pypi-release.yml similarity index 65% rename from .github/workflows/deploy.yml rename to .github/workflows/pypi-release.yml index ed978fae..1cfe82b1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/pypi-release.yml @@ -1,4 +1,4 @@ -name: Deploy +name: "Deploy" on: push: @@ -17,16 +17,12 @@ jobs: with: python-version: "3.10" - - name: Install and configure Poetry - uses: snok/install-poetry@v1 - with: - version: 1.2.1 - virtualenvs-create: false - installer-parallel: true + - name: Install build dependencies + run: python -m pip install --upgrade build + + - name: Build source distribution + run: python -m build . - - name: Build - run: | - poetry build - name: Try install wheel run: | pip install -U virtualenv @@ -53,17 +49,17 @@ jobs: name: dist path: dist -# - name: Publish a Python distribution to Test PyPI -# uses: pypa/gh-action-pypi-publish@master -## if: github.event.action != 'published' -# with: -# user: __token__ -# password: ${{ secrets.PYPI_TEST_TOKEN }} -# repository_url: https://test.pypi.org/legacy/ + # - name: Publish a Python distribution to Test PyPI + # uses: pypa/gh-action-pypi-publish@master + ## if: github.event.action != 'published' + # with: + # user: __token__ + # password: ${{ secrets.PYPI_TEST_TOKEN }} + # repository_url: https://test.pypi.org/legacy/ - name: Publish a Python distribution to PyPI uses: pypa/gh-action-pypi-publish@master -# if: github.event.action == 'published' + # if: github.event.action == 'published' with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e94e89d3..b2e6dc08 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,11 +8,7 @@ on: - ".github/workflows/tests.yml" - "aiogram/**" - "tests/**" - - ".coveragerc" - - ".flake8" - "codecov.yaml" - - "mypy.ini" - - "poetry.lock" - "pyproject.toml" pull_request: branches: @@ -21,11 +17,6 @@ on: - ".github/workflows/tests.yml" - "aiogram/**" - "tests/**" - - ".coveragerc" - - ".flake8" - - "codecov.yaml" - - "mypy.ini" - - "poetry.lock" - "pyproject.toml" jobs: @@ -67,30 +58,25 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: "pip" + cache-dependency-path: pyproject.toml - - name: Install and configure Poetry - uses: snok/install-poetry@v1 - if: "env.IS_PYPY == 'false' || env.IS_WINDOWS == 'false'" - with: - version: 1.2.1 - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - - - name: Install and configure Poetry (PyPy on Windows) - if: "env.IS_PYPY == 'true' && env.IS_WINDOWS == 'true'" + - name: Install project dependencies run: | - set -eu - pip install "poetry==1.2.1" - poetry config virtualenvs.create true - poetry config virtualenvs.in-project true - poetry config installer.parallel true + pip install -e .[dev,test,redis,proxy,i18n,fast] + + - name: Lint code + if: "env.IS_PYPY == 'false'" + run: | + ruff --format=github aiogram examples + mypy aiogram + black --check --diff aiogram tests - name: Setup redis if: ${{ env.IS_WINDOWS == 'false' }} @@ -98,33 +84,12 @@ jobs: with: redis-version: 6 - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ secrets.CACHE_VERSION }} - - - name: Install project dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: | - flags="" - [[ "$IS_PYPY" == "false" ]] && flags="$flags -E fast" - poetry install --no-interaction -E redis -E proxy -E i18n $flags - - - name: Lint code - if: "env.IS_PYPY == 'false'" - run: | - poetry run flake8 aiogram - poetry run mypy aiogram - poetry run black --check --diff aiogram tests - - name: Run tests run: | flags="" [[ "$IS_PYPY" == "false" ]] && flags="$flags --cov=aiogram --cov-config .coveragerc --cov-report=xml" [[ "$IS_WINDOWS" == "false" ]] && flags="$flags --redis redis://localhost:6379/0" - poetry run pytest $flags + pytest $flags - name: Upload coverage data if: "env.IS_PYPY == 'false'" diff --git a/.gitignore b/.gitignore index c26b2c10..d1dbf6d6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ dist/ site/ *.egg-info/ *.egg -aiogram/_meta.py +.ruff_cache .mypy_cache .pytest_cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ffe7b117..bf00554d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,34 +19,8 @@ repos: - id: black files: &files '^(aiogram|tests|examples)' - - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.10.1 + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: 'v0.0.215' hooks: - - id: isort - additional_dependencies: [ toml ] - files: *files - - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 - hooks: - - id: flake8 - args: [ '--config=.flake8' ] - files: *files - - - repo: https://github.com/floatingpurr/sync_with_poetry - rev: 0.2.0 - hooks: - - id: sync_with_poetry - - - repo: https://github.com/python-poetry/poetry - rev: '1.2.1' - hooks: - - id: poetry-check - - id: poetry-lock - args: [ "--no-update" ] - - id: poetry-export - args: [ "-f", "requirements.txt", "--without-hashes", "-o", "requirements/base.txt" ] - - id: poetry-export - args: [ "-f", "requirements.txt", "--without-hashes", "-o", "requirements/docs.txt", - "-E", "fast", "-E", "redis", "-E", "proxy", "-E", "i18n", - "--with", "docs" ] + - id: ruff + args: [ "--force-exclude" ] diff --git a/.readthedocs.yml b/.readthedocs.yml index 8fbc4dc1..56287c32 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,11 +1,13 @@ version: 2 python: - version: "3.8" + version: "3.10" install: - method: pip path: . - - requirements: requirements/docs.txt + extra_requirements: + - docs + - redis sphinx: configuration: docs/conf.py diff --git a/CHANGES/1095.misc.rst b/CHANGES/1095.misc.rst new file mode 100644 index 00000000..87de48c8 --- /dev/null +++ b/CHANGES/1095.misc.rst @@ -0,0 +1 @@ +Updated package metadata, moved build internals from Poetry to Hatch, added contributing guides. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..ada02324 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +Please read the [Contributing](https://docs.aiogram.dev/en/dev-3.x/contributing/) guidelines in the documentation site. diff --git a/Makefile b/Makefile index e451a0c4..cbe5c333 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,4 @@ -.DEFAULT_GOAL := help - -base_python := python3 -py := poetry run -python := $(py) python +.DEFAULT_GOAL := lint package_dir := aiogram tests_dir := tests @@ -13,43 +9,10 @@ reports_dir := reports redis_connection := redis://localhost:6379 -.PHONY: help -help: - @echo "=======================================================================================" - @echo " aiogram build tools " - @echo "=======================================================================================" - @echo "Environment:" - @echo " help: Show this message" - @echo " install: Install development dependencies" - @echo " clean: Delete temporary files" - @echo "" - @echo "Code quality:" - @echo " lint: Lint code by isort, black, flake8 and mypy tools" - @echo " reformat: Reformat code by isort and black tools" - @echo "" - @echo "Tests:" - @echo " test: Run tests" - @echo " test-coverage: Run tests with HTML reporting (results + coverage)" - @echo " test-coverage-report: Open coverage report in default system web browser" - @echo "" - @echo "Documentation:" - @echo " docs: Build docs" - @echo " docs-serve: Serve docs for local development" - @echo " docs-prepare-reports: Move all HTML reports to docs dir" - @echo "" - @echo "Project" - @echo " build: Run tests build package and docs" - @echo "" - # ================================================================================================= # Environment # ================================================================================================= -.PHONY: install -install: - poetry install --all-extras - $(py) pre-commit install - .PHONY: clean clean: rm -rf `find . -name __pycache__` @@ -68,16 +31,15 @@ clean: .PHONY: lint lint: - $(py) isort --check-only $(code_dir) - $(py) black --check --diff $(code_dir) - $(py) flake8 $(code_dir) - $(py) mypy $(package_dir) - # TODO: wemake-python-styleguide + isort --check-only $(code_dir) + black --check --diff $(code_dir) + ruff $(package_dir) + mypy $(package_dir) .PHONY: reformat reformat: - $(py) black $(code_dir) - $(py) isort $(code_dir) + black $(code_dir) + isort $(code_dir) # ================================================================================================= # Tests @@ -88,17 +50,17 @@ test-run-services: .PHONY: test test: test-run-services - $(py) pytest --cov=aiogram --cov-config .coveragerc tests/ --redis $(redis_connection) + pytest --cov=aiogram --cov-config .coveragerc tests/ --redis $(redis_connection) .PHONY: test-coverage test-coverage: test-run-services mkdir -p $(reports_dir)/tests/ - $(py) pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ --redis $(redis_connection) - $(py) coverage html -d $(reports_dir)/coverage + pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ --redis $(redis_connection) + coverage html -d $(reports_dir)/coverage .PHONY: test-coverage-view test-coverage-view: - $(py) coverage html -d $(reports_dir)/coverage + coverage html -d $(reports_dir)/coverage python -c "import webbrowser; webbrowser.open('file://$(shell pwd)/reports/coverage/index.html')" # ================================================================================================= @@ -117,7 +79,7 @@ docs-gettext: docs-serve: #rm -rf docs/_build - $(py) sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.rst docs/ docs/_build/ $(OPTS) + sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.rst docs/ docs/_build/ $(OPTS) .PHONY: docs-serve $(locale_targets): docs-serve-%: @@ -129,15 +91,13 @@ $(locale_targets): docs-serve-%: # ================================================================================================= .PHONY: build -build: clean flake8-report mypy-report test-coverage - mkdir -p site/simple - poetry build - mv dist site/simple/aiogram +build: clean + hatch build .PHONY: bump bump: - poetry version $(args) - $(python) scripts/bump_versions.py + hatch version $(args) + python scripts/bump_versions.py .PHONY: towncrier-build towncrier-build: @@ -160,10 +120,3 @@ release: git add . git commit -m "Release $(shell poetry version -s)" git tag v$(shell poetry version -s) - -_poetry_export_args := --format requirements.txt --without-hashes - -.PHONY: export-requirements -export-requirements: - poetry export $(_poetry_export_args) --output requirements/base.txt - poetry export $(_poetry_export_args) --output requirements/docs.txt -E fast -E redis -E proxy -E i18n --with docs diff --git a/aiogram/__init__.py b/aiogram/__init__.py index 42fb50f4..2cf3c391 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -1,5 +1,9 @@ -from aiogram.dispatcher.flags import FlagGenerator +from contextlib import suppress +from aiogram.dispatcher.flags import FlagGenerator +from . import methods +from . import types +from . import enums from .client import session from .client.bot import Bot from .dispatcher.dispatcher import Dispatcher @@ -9,12 +13,10 @@ from .utils.magic_filter import MagicFilter from .utils.text_decorations import html_decoration as html from .utils.text_decorations import markdown_decoration as md -try: +with suppress(ImportError): import uvloop as _uvloop _uvloop.install() -except ImportError: # pragma: no cover - pass F = MagicFilter() flags = FlagGenerator() @@ -24,6 +26,7 @@ __all__ = ( "__version__", "types", "methods", + "enums", "Bot", "session", "Dispatcher", diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index f5fb2285..aa2e6aec 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -310,10 +310,9 @@ class Bot(ContextInstanceMixin["Bot"]): if isinstance(destination, (str, pathlib.Path)): await self.__download_file(destination=destination, stream=stream) return None - else: - return await self.__download_file_binary_io( - destination=destination, seek=seek, stream=stream - ) + return await self.__download_file_binary_io( + destination=destination, seek=seek, stream=stream + ) finally: if close_stream: await stream.aclose() diff --git a/aiogram/client/session/aiohttp.py b/aiogram/client/session/aiohttp.py index 1f31ee97..66aae752 100644 --- a/aiogram/client/session/aiohttp.py +++ b/aiogram/client/session/aiohttp.py @@ -48,18 +48,22 @@ def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]: username = proxy_auth.login password = proxy_auth.password - return dict( - proxy_type=proxy_type, - host=host, - port=port, - username=username, - password=password, - rdns=True, - ) + return { + "proxy_type": proxy_type, + "host": host, + "port": port, + "username": username, + "password": password, + "rdns": True, + } def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"], Dict[str, Any]]: - from aiohttp_socks import ChainProxyConnector, ProxyConnector, ProxyInfo # type: ignore + from aiohttp_socks import ( # type: ignore + ChainProxyConnector, + ProxyConnector, + ProxyInfo, + ) # since tuple is Iterable(compatible with _ProxyChain) object, we assume that # user wants chained proxies if tuple is a pair of string(url) and BasicAuth @@ -74,7 +78,7 @@ def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"] for basic in chain_or_plain: infos.append(ProxyInfo(**_retrieve_basic(basic))) - return ChainProxyConnector, dict(proxy_infos=infos) + return ChainProxyConnector, {"proxy_infos": infos} class AiohttpSession(BaseSession): diff --git a/aiogram/client/session/base.py b/aiogram/client/session/base.py index 0e74d700..95392139 100644 --- a/aiogram/client/session/base.py +++ b/aiogram/client/session/base.py @@ -6,7 +6,17 @@ 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 +from typing import ( + TYPE_CHECKING, + Any, + AsyncGenerator, + Callable, + Final, + Optional, + Type, + Union, + cast, +) from pydantic import ValidationError @@ -165,8 +175,7 @@ class BaseSession(abc.ABC): return str(round(value.timestamp())) if isinstance(value, Enum): return self.prepare_value(value.value) - else: - return str(value) + return str(value) def clean_json(self, value: Any) -> Any: """ @@ -174,7 +183,7 @@ class BaseSession(abc.ABC): """ if isinstance(value, list): return [self.clean_json(v) for v in value if v is not None] - elif isinstance(value, dict): + if isinstance(value, dict): return {k: self.clean_json(v) for k, v in value.items() if v is not None} return value diff --git a/aiogram/client/telegram.py b/aiogram/client/telegram.py index 5f267973..5e29722f 100644 --- a/aiogram/client/telegram.py +++ b/aiogram/client/telegram.py @@ -52,7 +52,8 @@ class TelegramAPIServer: file: str """Files URL""" is_local: bool = False - """Mark this server is in `local mode `_.""" + """Mark this server is + in `local mode `_.""" wrap_local_file: FilesPathWrapper = BareFilesPathWrapper() """Callback to wrap files path in local mode""" diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 4aa60672..2c1a8cf5 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -107,13 +107,13 @@ class Dispatcher(Router): return self.fsm.storage @property - def parent_router(self) -> None: + def parent_router(self) -> Optional[Router]: """ Dispatcher has no parent router and can't be included to any other routers or dispatchers :return: """ - return None + return None # noqa: RET501 @parent_router.setter def parent_router(self, value: Router) -> None: diff --git a/aiogram/dispatcher/event/event.py b/aiogram/dispatcher/event/event.py index a2e1165c..3cbcffef 100644 --- a/aiogram/dispatcher/event/event.py +++ b/aiogram/dispatcher/event/event.py @@ -9,7 +9,8 @@ class EventObserver: """ Simple events observer - Is used for managing events is not related with Telegram (For example startup/shutdown processes) + Is used for managing events is not related with Telegram + (For example startup/shutdown processes) Handlers can be registered via decorator or method diff --git a/aiogram/dispatcher/flags.py b/aiogram/dispatcher/flags.py index d7d82874..82cdbc04 100644 --- a/aiogram/dispatcher/flags.py +++ b/aiogram/dispatcher/flags.py @@ -94,7 +94,7 @@ def extract_flags(handler: Union["HandlerObject", Dict[str, Any]]) -> Dict[str, handler = handler["handler"] if not hasattr(handler, "flags"): return {} - return handler.flags # type: ignore + return handler.flags def get_flag( diff --git a/aiogram/dispatcher/middlewares/manager.py b/aiogram/dispatcher/middlewares/manager.py index 9f132f58..a63e1ef4 100644 --- a/aiogram/dispatcher/middlewares/manager.py +++ b/aiogram/dispatcher/middlewares/manager.py @@ -1,7 +1,11 @@ import functools from typing import Any, Callable, Dict, List, Optional, Sequence, Union, overload -from aiogram.dispatcher.event.bases import MiddlewareEventType, MiddlewareType, NextMiddlewareType +from aiogram.dispatcher.event.bases import ( + MiddlewareEventType, + MiddlewareType, + NextMiddlewareType, +) from aiogram.dispatcher.event.handler import CallbackType from aiogram.types import TelegramObject diff --git a/aiogram/dispatcher/router.py b/aiogram/dispatcher/router.py index 088f7210..f1ddc1c4 100644 --- a/aiogram/dispatcher/router.py +++ b/aiogram/dispatcher/router.py @@ -101,7 +101,7 @@ class Router: if observer.handlers and update_name not in skip_events: handlers_in_use.add(update_name) - return list(sorted(handlers_in_use)) + return list(sorted(handlers_in_use)) # NOQA: C413 async def propagate_event(self, update_type: str, event: TelegramObject, **kwargs: Any) -> Any: kwargs.update(event_router=self) diff --git a/aiogram/exceptions.py b/aiogram/exceptions.py index 15f5c45f..96d0c0db 100644 --- a/aiogram/exceptions.py +++ b/aiogram/exceptions.py @@ -120,6 +120,7 @@ class ClientDecodeError(AiogramError): original_type = type(self.original) return ( f"{self.message}\n" - f"Caused from error: {original_type.__module__}.{original_type.__name__}: {self.original}\n" + f"Caused from error: " + f"{original_type.__module__}.{original_type.__name__}: {self.original}\n" f"Content: {self.data}" ) diff --git a/aiogram/filters/base.py b/aiogram/filters/base.py index fdec295e..94f9b6d7 100644 --- a/aiogram/filters/base.py +++ b/aiogram/filters/base.py @@ -37,7 +37,8 @@ class Filter(ABC): def update_handler_flags(self, flags: Dict[str, Any]) -> None: """ - Also if you want to extend handler flags with using this filter you should implement this method + Also if you want to extend handler flags with using this filter + you should implement this method :param flags: existing flags, can be updated directly """ diff --git a/aiogram/filters/callback_data.py b/aiogram/filters/callback_data.py index cf06d7f1..84ec1e88 100644 --- a/aiogram/filters/callback_data.py +++ b/aiogram/filters/callback_data.py @@ -3,7 +3,17 @@ from __future__ import annotations from decimal import Decimal from enum import Enum from fractions import Fraction -from typing import TYPE_CHECKING, Any, ClassVar, Dict, Literal, Optional, Type, TypeVar, Union +from typing import ( + TYPE_CHECKING, + Any, + ClassVar, + Dict, + Literal, + Optional, + Type, + TypeVar, + Union, +) from uuid import UUID from magic_filter import MagicFilter diff --git a/aiogram/filters/chat_member_updated.py b/aiogram/filters/chat_member_updated.py index 650ce631..7671ba4e 100644 --- a/aiogram/filters/chat_member_updated.py +++ b/aiogram/filters/chat_member_updated.py @@ -22,7 +22,7 @@ class _MemberStatusMarker: result = self.name.upper() if self.is_member is not None: result = ("+" if self.is_member else "-") + result - return result + return result # noqa: RET504 def __pos__(self: MarkerT) -> MarkerT: return type(self)(name=self.name, is_member=True) @@ -38,7 +38,8 @@ class _MemberStatusMarker: if isinstance(other, _MemberStatusGroupMarker): return other | self raise TypeError( - f"unsupported operand type(s) for |: {type(self).__name__!r} and {type(other).__name__!r}" + f"unsupported operand type(s) for |: " + f"{type(self).__name__!r} and {type(other).__name__!r}" ) __ror__ = __or__ @@ -52,7 +53,8 @@ class _MemberStatusMarker: if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=old, new=other) raise TypeError( - f"unsupported operand type(s) for >>: {type(self).__name__!r} and {type(other).__name__!r}" + f"unsupported operand type(s) for >>: " + f"{type(self).__name__!r} and {type(other).__name__!r}" ) def __lshift__( @@ -64,7 +66,8 @@ class _MemberStatusMarker: if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=other, new=new) raise TypeError( - f"unsupported operand type(s) for <<: {type(self).__name__!r} and {type(other).__name__!r}" + f"unsupported operand type(s) for <<: " + f"{type(self).__name__!r} and {type(other).__name__!r}" ) def __hash__(self) -> int: @@ -89,10 +92,11 @@ class _MemberStatusGroupMarker: ) -> MarkerGroupT: if isinstance(other, _MemberStatusMarker): return type(self)(*self.statuses, other) - elif isinstance(other, _MemberStatusGroupMarker): + if isinstance(other, _MemberStatusGroupMarker): return type(self)(*self.statuses, *other.statuses) raise TypeError( - f"unsupported operand type(s) for |: {type(self).__name__!r} and {type(other).__name__!r}" + f"unsupported operand type(s) for |: " + f"{type(self).__name__!r} and {type(other).__name__!r}" ) def __rshift__( @@ -103,7 +107,8 @@ class _MemberStatusGroupMarker: if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=self, new=other) raise TypeError( - f"unsupported operand type(s) for >>: {type(self).__name__!r} and {type(other).__name__!r}" + f"unsupported operand type(s) for >>: " + f"{type(self).__name__!r} and {type(other).__name__!r}" ) def __lshift__( @@ -114,7 +119,8 @@ class _MemberStatusGroupMarker: if isinstance(other, _MemberStatusGroupMarker): return _MemberStatusTransition(old=other, new=self) raise TypeError( - f"unsupported operand type(s) for <<: {type(self).__name__!r} and {type(other).__name__!r}" + f"unsupported operand type(s) for <<: " + f"{type(self).__name__!r} and {type(other).__name__!r}" ) def __str__(self) -> str: @@ -124,10 +130,7 @@ class _MemberStatusGroupMarker: return result def check(self, *, member: ChatMember) -> bool: - for status in self.statuses: - if status.check(member=member): - return True - return False + return any(status.check(member=member) for status in self.statuses) class _MemberStatusTransition: diff --git a/aiogram/filters/command.py b/aiogram/filters/command.py index edf68ef9..b590ba67 100644 --- a/aiogram/filters/command.py +++ b/aiogram/filters/command.py @@ -181,7 +181,7 @@ class Command(Filter): await self.validate_mention(bot=bot, command=command) command = self.validate_command(command) command = self.do_magic(command=command) - return command + return command # noqa: RET504 def do_magic(self, command: CommandObject) -> Any: if not self.magic: diff --git a/aiogram/filters/text.py b/aiogram/filters/text.py index 52585f95..bdef26f0 100644 --- a/aiogram/filters/text.py +++ b/aiogram/filters/text.py @@ -84,7 +84,7 @@ class Text(Filter): @classmethod def _validate_constraints(cls, **values: Any) -> None: # Validate that only one text filter type is presented - used_args = set(key for key, value in values.items() if value is not None) + used_args = {key for key, value in values.items() if value is not None} if len(used_args) < 1: raise ValueError(f"Filter should contain one of arguments: {set(values.keys())}") if len(used_args) > 1: @@ -133,5 +133,4 @@ class Text(Filter): def prepare_text(self, text: str) -> str: if self.ignore_case: return str(text).lower() - else: - return str(text) + return str(text) diff --git a/aiogram/fsm/middleware.py b/aiogram/fsm/middleware.py index f6bdecd9..11faca61 100644 --- a/aiogram/fsm/middleware.py +++ b/aiogram/fsm/middleware.py @@ -3,7 +3,12 @@ from typing import Any, Awaitable, Callable, Dict, Optional, cast from aiogram import Bot from aiogram.dispatcher.middlewares.base import BaseMiddleware from aiogram.fsm.context import FSMContext -from aiogram.fsm.storage.base import DEFAULT_DESTINY, BaseEventIsolation, BaseStorage, StorageKey +from aiogram.fsm.storage.base import ( + DEFAULT_DESTINY, + BaseEventIsolation, + BaseStorage, + StorageKey, +) from aiogram.fsm.strategy import FSMStrategy, apply_strategy from aiogram.types import TelegramObject diff --git a/aiogram/fsm/storage/memory.py b/aiogram/fsm/storage/memory.py index 16c13157..8be371b6 100644 --- a/aiogram/fsm/storage/memory.py +++ b/aiogram/fsm/storage/memory.py @@ -6,7 +6,12 @@ from typing import Any, AsyncGenerator, DefaultDict, Dict, Hashable, Optional from aiogram import Bot from aiogram.fsm.state import State -from aiogram.fsm.storage.base import BaseEventIsolation, BaseStorage, StateType, StorageKey +from aiogram.fsm.storage.base import ( + BaseEventIsolation, + BaseStorage, + StateType, + StorageKey, +) @dataclass diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index 2a42bd09..066fd434 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -2,7 +2,16 @@ from __future__ import annotations import abc import secrets -from typing import TYPE_CHECKING, Any, Dict, Generator, Generic, Optional, TypeVar, Union +from typing import ( + TYPE_CHECKING, + Any, + Dict, + Generator, + Generic, + Optional, + TypeVar, + Union, +) from pydantic import BaseConfig, BaseModel, Extra, root_validator from pydantic.generics import GenericModel diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index b38ec2c3..923a1ef5 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -5,7 +5,9 @@ from .audio import Audio from .base import UNSET, TelegramObject from .bot_command import BotCommand from .bot_command_scope import BotCommandScope -from .bot_command_scope_all_chat_administrators import BotCommandScopeAllChatAdministrators +from .bot_command_scope_all_chat_administrators import ( + BotCommandScopeAllChatAdministrators, +) from .bot_command_scope_all_group_chats import BotCommandScopeAllGroupChats from .bot_command_scope_all_private_chats import BotCommandScopeAllPrivateChats from .bot_command_scope_chat import BotCommandScopeChat @@ -110,7 +112,9 @@ from .passport_element_error_front_side import PassportElementErrorFrontSide from .passport_element_error_reverse_side import PassportElementErrorReverseSide from .passport_element_error_selfie import PassportElementErrorSelfie from .passport_element_error_translation_file import PassportElementErrorTranslationFile -from .passport_element_error_translation_files import PassportElementErrorTranslationFiles +from .passport_element_error_translation_files import ( + PassportElementErrorTranslationFiles, +) from .passport_element_error_unspecified import PassportElementErrorUnspecified from .passport_file import PassportFile from .photo_size import PhotoSize diff --git a/aiogram/types/message.py b/aiogram/types/message.py index e22b16c9..7aab1b55 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -5,7 +5,11 @@ from typing import TYPE_CHECKING, Any, List, Optional, Union from pydantic import Field -from aiogram.utils.text_decorations import TextDecoration, html_decoration, markdown_decoration +from aiogram.utils.text_decorations import ( + TextDecoration, + html_decoration, + markdown_decoration, +) from ..enums import ContentType from .base import UNSET, TelegramObject @@ -2465,7 +2469,7 @@ class Message(TelegramObject): **kwargs, ) - def send_copy( + def send_copy( # noqa: C901 self: Message, chat_id: Union[str, int], disable_notification: Optional[bool] = None, @@ -2538,7 +2542,7 @@ class Message(TelegramObject): if self.text: return SendMessage(text=text, entities=entities, **kwargs) - elif self.audio: + if self.audio: return SendAudio( audio=self.audio.file_id, caption=text, @@ -2548,29 +2552,29 @@ class Message(TelegramObject): caption_entities=entities, **kwargs, ) - elif self.animation: + if self.animation: return SendAnimation( animation=self.animation.file_id, caption=text, caption_entities=entities, **kwargs ) - elif self.document: + if self.document: return SendDocument( document=self.document.file_id, caption=text, caption_entities=entities, **kwargs ) - elif self.photo: + if self.photo: return SendPhoto( photo=self.photo[-1].file_id, caption=text, caption_entities=entities, **kwargs ) - elif self.sticker: + if self.sticker: return SendSticker(sticker=self.sticker.file_id, **kwargs) - elif self.video: + if self.video: return SendVideo( video=self.video.file_id, caption=text, caption_entities=entities, **kwargs ) - elif self.video_note: + if self.video_note: return SendVideoNote(video_note=self.video_note.file_id, **kwargs) - elif self.voice: + if self.voice: return SendVoice(voice=self.voice.file_id, **kwargs) - elif self.contact: + if self.contact: return SendContact( phone_number=self.contact.phone_number, first_name=self.contact.first_name, @@ -2578,7 +2582,7 @@ class Message(TelegramObject): vcard=self.contact.vcard, **kwargs, ) - elif self.venue: + if self.venue: return SendVenue( latitude=self.venue.location.latitude, longitude=self.venue.location.longitude, @@ -2588,20 +2592,20 @@ class Message(TelegramObject): foursquare_type=self.venue.foursquare_type, **kwargs, ) - elif self.location: + if self.location: return SendLocation( latitude=self.location.latitude, longitude=self.location.longitude, **kwargs ) - elif self.poll: + if self.poll: return SendPoll( question=self.poll.question, options=[option.text for option in self.poll.options], **kwargs, ) - elif self.dice: # Dice value can't be controlled + if self.dice: # Dice value can't be controlled return SendDice(**kwargs) - else: - raise TypeError("This type of message can't be copied.") + + raise TypeError("This type of message can't be copied.") def copy_to( self, @@ -3066,9 +3070,10 @@ class Message(TelegramObject): if self.chat.type in ("private", "group"): return None - if not self.chat.username or force_private: - chat_value = f"c/{self.chat.shifted_id}" - else: - chat_value = self.chat.username + chat_value = ( + f"c/{self.chat.shifted_id}" + if not self.chat.username or force_private + else self.chat.username + ) return f"https://t.me/{chat_value}/{self.message_id}" diff --git a/aiogram/utils/auth_widget.py b/aiogram/utils/auth_widget.py index a67afe65..080183e9 100644 --- a/aiogram/utils/auth_widget.py +++ b/aiogram/utils/auth_widget.py @@ -15,7 +15,7 @@ def check_signature(token: str, hash: str, **kwargs: Any) -> bool: :return: """ secret = hashlib.sha256(token.encode("utf-8")) - check_string = "\n".join(map(lambda k: f"{k}={kwargs[k]}", sorted(kwargs))) + check_string = "\n".join(f"{k}={kwargs[k]}" for k in sorted(kwargs)) hmac_string = hmac.new( secret.digest(), check_string.encode("utf-8"), digestmod=hashlib.sha256 ).hexdigest() diff --git a/aiogram/utils/backoff.py b/aiogram/utils/backoff.py index f0b1b578..ebe08e97 100644 --- a/aiogram/utils/backoff.py +++ b/aiogram/utils/backoff.py @@ -77,4 +77,7 @@ class Backoff: self._next_delay = self.min_delay def __str__(self) -> str: - return f"Backoff(tryings={self._counter}, current_delay={self._current_delay}, next_delay={self._next_delay})" + return ( + f"Backoff(tryings={self._counter}, current_delay={self._current_delay}, " + f"next_delay={self._next_delay})" + ) diff --git a/aiogram/utils/chat_action.py b/aiogram/utils/chat_action.py index e3f91f3f..b6bda916 100644 --- a/aiogram/utils/chat_action.py +++ b/aiogram/utils/chat_action.py @@ -23,7 +23,8 @@ class ChatActionSender: Provides simply to use context manager. Technically sender start background task with infinity loop which works - until action will be finished and sends the `chat action `_ + until action will be finished and sends the + `chat action `_ every 5 seconds. """ @@ -110,7 +111,7 @@ class ChatActionSender: async with self._lock: if not self.running: return - if not self._close_event.is_set(): + if not self._close_event.is_set(): # pragma: no branches self._close_event.set() await self._closed_event.wait() self._task = None diff --git a/aiogram/utils/keyboard.py b/aiogram/utils/keyboard.py index 3ec8d779..84258e6d 100644 --- a/aiogram/utils/keyboard.py +++ b/aiogram/utils/keyboard.py @@ -96,7 +96,8 @@ class KeyboardBuilder(Generic[ButtonType]): """ if not isinstance(row, list): raise ValueError( - f"Row {row!r} should be type 'List[{self._button_type.__name__}]' not type {type(row).__name__}" + f"Row {row!r} should be type 'List[{self._button_type.__name__}]' " + f"not type {type(row).__name__}" ) if len(row) > MAX_WIDTH: raise ValueError(f"Row {row!r} is too long (MAX_WIDTH={MAX_WIDTH})") @@ -114,7 +115,8 @@ class KeyboardBuilder(Generic[ButtonType]): count = 0 if not isinstance(markup, list): raise ValueError( - f"Markup should be type 'List[List[{self._button_type.__name__}]]' not type {type(markup).__name__!r}" + f"Markup should be type 'List[List[{self._button_type.__name__}]]' " + f"not type {type(markup).__name__!r}" ) for row in markup: self._validate_row(row) @@ -206,7 +208,8 @@ class KeyboardBuilder(Generic[ButtonType]): By default, when the sum of passed sizes is lower than buttons count the last one size will be used for tail of the markup. - If repeat=True is passed - all sizes will be cycled when available more buttons count than all sizes + If repeat=True is passed - all sizes will be cycled when available more buttons + count than all sizes :param sizes: :param repeat: diff --git a/aiogram/utils/magic_filter.py b/aiogram/utils/magic_filter.py index a00d0010..fed406a7 100644 --- a/aiogram/utils/magic_filter.py +++ b/aiogram/utils/magic_filter.py @@ -12,8 +12,9 @@ class AsFilterResultOperation(BaseOperation): self.name = name def resolve(self, value: Any, initial_value: Any) -> Any: - if value: - return {self.name: value} + if not value: + return None + return {self.name: value} class MagicFilter(_MagicFilter): diff --git a/aiogram/utils/text_decorations.py b/aiogram/utils/text_decorations.py index 93dc7111..70f96388 100644 --- a/aiogram/utils/text_decorations.py +++ b/aiogram/utils/text_decorations.py @@ -81,13 +81,12 @@ class TextDecoration(ABC): :param entities: Array of MessageEntities :return: """ - result = "".join( + return "".join( self._unparse_entities( add_surrogates(text), sorted(entities, key=lambda item: item.offset) if entities else [], ) ) - return result def _unparse_entities( self, diff --git a/aiogram/utils/web_app.py b/aiogram/utils/web_app.py index 44415d44..d21316f9 100644 --- a/aiogram/utils/web_app.py +++ b/aiogram/utils/web_app.py @@ -17,7 +17,10 @@ class WebAppUser(TelegramObject): """ id: int - """A unique identifier for the user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. It has at most 52 significant bits, so a 64-bit integer or a double-precision float type is safe for storing this identifier.""" + """A unique identifier for the user or bot. This number may have more than 32 significant bits + and some programming languages may have difficulty/silent defects in interpreting it. + It has at most 52 significant bits, so a 64-bit integer or a double-precision float type + is safe for storing this identifier.""" is_bot: Optional[bool] = None """True, if this user is a bot. Returns in the receiver field only.""" first_name: str @@ -29,24 +32,32 @@ class WebAppUser(TelegramObject): language_code: Optional[str] = None """IETF language tag of the user's language. Returns in user field only.""" photo_url: Optional[str] = None - """URL of the user’s profile photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.""" + """URL of the user’s profile photo. The photo can be in .jpeg or .svg formats. + Only returned for Web Apps launched from the attachment menu.""" class WebAppInitData(TelegramObject): """ - This object contains data that is transferred to the Web App when it is opened. It is empty if the Web App was launched from a keyboard button. + This object contains data that is transferred to the Web App when it is opened. + It is empty if the Web App was launched from a keyboard button. Source: https://core.telegram.org/bots/webapps#webappinitdata """ query_id: Optional[str] = None - """A unique identifier for the Web App session, required for sending messages via the answerWebAppQuery method.""" + """A unique identifier for the Web App session, required for sending messages + via the answerWebAppQuery method.""" user: Optional[WebAppUser] = None """An object containing data about the current user.""" receiver: Optional[WebAppUser] = None - """An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for Web Apps launched via the attachment menu.""" + """An object containing data about the chat partner of the current user in the chat where + the bot was launched via the attachment menu. + Returned only for Web Apps launched via the attachment menu.""" start_param: Optional[str] = None - """The value of the startattach parameter, passed via link. Only returned for Web Apps when launched from the attachment menu via link. The value of the start_param parameter will also be passed in the GET-parameter tgWebAppStartParam, so the Web App can load the correct interface right away.""" + """The value of the startattach parameter, passed via link. + Only returned for Web Apps when launched from the attachment menu via link. + The value of the start_param parameter will also be passed in the GET-parameter + tgWebAppStartParam, so the Web App can load the correct interface right away.""" auth_date: datetime """Unix time when the form was opened.""" hash: str diff --git a/aiogram/webhook/aiohttp_server.py b/aiogram/webhook/aiohttp_server.py index afb7d89c..4326f8db 100644 --- a/aiogram/webhook/aiohttp_server.py +++ b/aiogram/webhook/aiohttp_server.py @@ -88,7 +88,8 @@ class BaseRequestHandler(ABC): ) -> None: """ :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately respond to the Telegram instead of waiting end of handler process + :param handle_in_background: immediately respond to the Telegram instead of + waiting end of handler process """ self.dispatcher = dispatcher self.handle_in_background = handle_in_background @@ -166,7 +167,8 @@ class SimpleRequestHandler(BaseRequestHandler): ) -> None: """ :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately respond to the Telegram instead of waiting end of handler process + :param handle_in_background: immediately respond to the Telegram instead of + waiting end of handler process :param bot: instance of :class:`aiogram.client.bot.Bot` """ super().__init__(dispatcher=dispatcher, handle_in_background=handle_in_background, **data) @@ -184,7 +186,8 @@ class SimpleRequestHandler(BaseRequestHandler): class TokenBasedRequestHandler(BaseRequestHandler): """ - Handler that supports multiple bots, the context will be resolved from path variable 'bot_token' + Handler that supports multiple bots, the context will be resolved + from path variable 'bot_token' """ def __init__( @@ -196,7 +199,8 @@ class TokenBasedRequestHandler(BaseRequestHandler): ) -> None: """ :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately respond to the Telegram instead of waiting end of handler process + :param handle_in_background: immediately respond to the Telegram instead of + waiting end of handler process :param bot_settings: kwargs that will be passed to new Bot instance """ super().__init__(dispatcher=dispatcher, handle_in_background=handle_in_background, **data) diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 00000000..80709756 --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,213 @@ +============ +Contributing +============ + +You're welcome to contribute to aiogram! + +*aiogram* is an open-source project, and anyone can contribute to it in any possible way + + +Developing +========== + +Before making any changes in the framework code, it is necessary to fork the project and clone +the project to your PC and know how to do a pull-request. + +How to work with pull-request you can read in the `GitHub docs `_ + +Also in due to this project is written in Python, you will need Python to be installed +(is recommended to use latest Python versions, but any version starting from 3.8 can be used) + + +Use virtualenv +-------------- + +You can create a virtual environment in a directory using :code:`venv` module (it should be pre-installed by default): + +.. code-block::bash + + python -m venv .venv + +This action will create a :code:`.venv` directory with the Python binaries and then you will +be able to install packages into that isolated environment. + + +Activate the environment +------------------------ + +Linux/ macOS: + +.. code-block:: bash + + source .venv/bin/activate + +Windows PoweShell + +.. code-block:: powershell + + .\.venv\Scripts\Activate.ps1 + +To check it worked, use described command, it should show the :code:`pip` location inside +the isolated environment + +Linux, macOS: + +.. code-block:: + + which pip + +Windows PowerShell + +.. code-block:: + + Get-Command pip + +Also make you shure you have the latest pip version in your virtual environment to avoid +errors on next steps: + +.. code-block:: + + python -m pip install --upgrade pip + + +Setup project +------------- + +After activating the environment install `aiogram` from sources and their dependencies: + +.. code-block:: bash + + pip install -e ."[dev,test,docs,fast,redis,proxy,i18n]" + +It will install :code:`aiogram` in editable mode into your virtual environment and all dependencies. + +Making changes in code +---------------------- + +At this point you can make any changes in the code that you want, it can be any fixes, +implementing new features or experimenting. + + +Format the code (code-style) +---------------------------- + +Note that this project is Black-formatted, so you should follow that code-style, +too be sure You're correctly doing this let's reformat the code automatically: + +.. code-block:: bash + + black aiogram tests examples + isort aiogram tests examples + + +Run tests +--------- + +All changes should be tested: + +.. code-block:: bash + + pytest tests + +Also if you are doing something with Redis-storage, you will need to test everything works with Redis: + +.. code-block:: bash + + pytest --redis redis://:/ tests + +Docs +---- + +We are using `Sphinx` to render docs in different languages, all sources located in `docs` directory, +you can change the sources and to test it you can start live-preview server and look what you are doing: + +.. code-block:: bash + + sphinx-autobuild --watch aiogram/ docs/ docs/_build/ + + +Docs translations +----------------- + +Translation of the documentation is very necessary and cannot be done without the help of the +community from all over the world, so you are welcome to translate the documentation +into different languages. + +Before start, let's up to date all texts: + +.. code-block:: bash + + cd docs + make gettext + sphinx-intl update -p _build/gettext -l + +Change the :code:`` in example below to the target language code, after that +you can modify texts inside :code:`docs/locale//LC_MESSAGES` as :code:`*.po` files +by using any text-editor or specialized utilites for GNU Gettext, +for example via `poedit `_. + +To view results: + +.. code-block:: bash + + sphinx-autobuild --watch aiogram/ docs/ docs/_build/ -D language= + + +Describe changes +---------------- + +Describe your changes in one or more sentences so that bot developers know what's changed +in their favorite framework - create `..rst` file and write the description. + +:code:`` is Issue or Pull-request number, after release link to this issue will +be published to the *Changelog* page. + +:code:`` is a changes category marker, it can be one of: + +- :code:`feature` - when you are implementing new feature +- :code:`bugfix` - when you fix a bug +- :code:`doc` - when you improve the docs +- :code:`removal` - when you remove something from the framework +- :code:`misc` - when changed something inside the Core or project configuration + +If you have troubles with changing category feel free to ask Core-contributors to help with choosing it. + +Complete +-------- + +After you have made all your changes, publish them to the repository and create a pull request +as mentioned at the beginning of the article and wait for a review of these changes. + + +Star on GitHub +============== + +You can "star" repository on GitHub - https://github.com/aiogram/aiogram (click the star button at the top right) + +Adding stars makes it easier for other people to find this project and understand how useful it is. + +Guides +====== + +You can write guides how to develop Bots on top of aiogram and publish it into YouTube, Medium, +GitHub Books, any Courses platform or any other platform that you know. + +This will help more people learn about the framework and learn how to use it + + +Take answers +============ + +The developers is always asks for any question in our chats or any other platforms like GitHub Discussions, +StackOverflow and others, feel free to answer to this questions. + +Funding +======= + +The development of the project is free and not financed by commercial organizations, +it is my personal initiative (`@JRootJunior `_) and +I am engaged in the development of the project in my free time. + +So, if you want to financially support the project, or, for example, give me a pizza or a beer, +you can do it on `OpenCollective `_ +or `Patreon `_. diff --git a/docs/index.rst b/docs/index.rst index 2d007e88..d6ffb067 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -16,3 +16,4 @@ Contents dispatcher/index utils/index changelog + contributing diff --git a/examples/finite_state_machine.py b/examples/finite_state_machine.py index 8addfec0..79872bbf 100644 --- a/examples/finite_state_machine.py +++ b/examples/finite_state_machine.py @@ -8,7 +8,12 @@ from aiogram import Bot, Dispatcher, F, Router, html from aiogram.filters import Command from aiogram.fsm.context import FSMContext from aiogram.fsm.state import State, StatesGroup -from aiogram.types import KeyboardButton, Message, ReplyKeyboardMarkup, ReplyKeyboardRemove +from aiogram.types import ( + KeyboardButton, + Message, + ReplyKeyboardMarkup, + ReplyKeyboardRemove, +) form_router = Router() diff --git a/examples/multibot.py b/examples/multibot.py index c9ce099f..b6a324cd 100644 --- a/examples/multibot.py +++ b/examples/multibot.py @@ -48,7 +48,7 @@ async def command_add_bot(message: Message, command: CommandObject, bot: Bot) -> return message.answer("Invalid token") await new_bot.delete_webhook(drop_pending_updates=True) await new_bot.set_webhook(OTHER_BOTS_URL.format(bot_token=command.args)) - await message.answer(f"Bot @{bot_user.username} successful added") + return await message.answer(f"Bot @{bot_user.username} successful added") async def on_startup(dispatcher: Dispatcher, bot: Bot): diff --git a/examples/web_app/routes.py b/examples/web_app/routes.py index d8c6b697..bd913a12 100644 --- a/examples/web_app/routes.py +++ b/examples/web_app/routes.py @@ -36,7 +36,6 @@ async def send_message_handler(request: Request): except ValueError: return json_response({"ok": False, "err": "Unauthorized"}, status=401) - print(data) reply_markup = None if data["with_webview"] == "1": reply_markup = InlineKeyboardMarkup( diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index c6ca9065..00000000 --- a/mypy.ini +++ /dev/null @@ -1,37 +0,0 @@ -[mypy] -plugins = pydantic.mypy -python_version = 3.8 -show_error_codes = True -show_error_context = True -pretty = True -ignore_missing_imports = False -warn_unused_configs = True -disallow_subclassing_any = True -disallow_any_generics = True -disallow_untyped_calls = True -disallow_untyped_defs = True -disallow_incomplete_defs = True -check_untyped_defs = True -disallow_untyped_decorators = True -no_implicit_optional = True -warn_redundant_casts = True -warn_unused_ignores = True -warn_return_any = True -follow_imports_for_stubs = True -namespace_packages = True -show_absolute_path = True - -[mypy-aiofiles] -ignore_missing_imports = True - -[mypy-async_lru] -ignore_missing_imports = True - -[mypy-uvloop] -ignore_missing_imports = True - -[mypy-redis.*] -ignore_missing_imports = True - -[mypy-babel.*] -ignore_missing_imports = True diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index 6ff1580f..00000000 --- a/poetry.lock +++ /dev/null @@ -1,2486 +0,0 @@ -[[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" -description = "File support for asyncio." -category = "main" -optional = false -python-versions = ">=3.7,<4.0" - -[[package]] -name = "aiohttp" -version = "3.8.3" -description = "Async http client/server framework (asyncio)" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -aiosignal = ">=1.1.2" -async-timeout = ">=4.0.0a3,<5.0" -attrs = ">=17.3.0" -charset-normalizer = ">=2.0,<3.0" -frozenlist = ">=1.1.1" -multidict = ">=4.5,<7.0" -yarl = ">=1.0,<2.0" - -[package.extras] -speedups = ["Brotli", "aiodns", "cchardet"] - -[[package]] -name = "aiohttp-socks" -version = "0.7.1" -description = "Proxy connector for aiohttp" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -aiohttp = ">=2.3.2" -attrs = ">=19.2.0" -python-socks = {version = ">=2.0.0,<3.0.0", extras = ["asyncio"]} - -[[package]] -name = "aiosignal" -version = "1.2.0" -description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -frozenlist = ">=1.1.0" - -[[package]] -name = "alabaster" -version = "0.7.12" -description = "A configurable sidebar-enabled Sphinx theme" -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" -description = "Asyncio response mocking. Similar to the responses library used for 'requests'" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -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" -description = "Timeout context manager for asyncio programs" -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "attrs" -version = "22.1.0" -description = "Classes Without Boilerplate" -category = "main" -optional = false -python-versions = ">=3.5" - -[package.extras] -dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] -docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] -tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] -tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] - -[[package]] -name = "Babel" -version = "2.10.3" -description = "Internationalization utilities" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -pytz = ">=2015.7" - -[[package]] -name = "beautifulsoup4" -version = "4.11.1" -description = "Screen-scraping library" -category = "dev" -optional = false -python-versions = ">=3.6.0" - -[package.dependencies] -soupsieve = ">1.2" - -[package.extras] -html5lib = ["html5lib"] -lxml = ["lxml"] - -[[package]] -name = "black" -version = "22.10.0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} -typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -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.8" -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.8" -resolved_reference = "88a9e90742190e962877d475cbfeb1d66be699b7" - -[[package]] -name = "certifi" -version = "2022.9.24" -description = "Python package for providing Mozilla's CA Bundle." -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "cfgv" -version = "3.3.1" -description = "Validate configuration and produce human readable error messages." -category = "dev" -optional = false -python-versions = ">=3.6.1" - -[[package]] -name = "charset-normalizer" -version = "2.1.1" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" -optional = false -python-versions = ">=3.6.0" - -[package.extras] -unicode_backport = ["unicodedata2"] - -[[package]] -name = "click" -version = "8.1.3" -description = "Composable command line interface toolkit" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "click-default-group" -version = "1.2.2" -description = "Extends click.Group to invoke a command without explicit subcommand name" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -click = "*" - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" - -[[package]] -name = "coverage" -version = "6.5.0" -description = "Code coverage measurement for Python" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} - -[package.extras] -toml = ["tomli"] - -[[package]] -name = "Deprecated" -version = "1.2.13" -description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -category = "main" -optional = true -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.dependencies] -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" -description = "Distribution utilities" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "docutils" -version = "0.19" -description = "Docutils -- Python Documentation Utilities" -category = "dev" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "exceptiongroup" -version = "1.0.0rc9" -description = "Backport of PEP 654 (exception groups)" -category = "dev" -optional = false -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" -description = "A platform independent file lock." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -docs = ["furo (>=2022.6.21)", "sphinx (>=5.1.1)", "sphinx-autodoc-typehints (>=1.19.1)"] -testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "pytest (>=7.1.2)", "pytest-cov (>=3)", "pytest-timeout (>=2.1)"] - -[[package]] -name = "flake8" -version = "5.0.4" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = ">=3.6.1" - -[package.dependencies] -mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.9.0,<2.10.0" -pyflakes = ">=2.5.0,<2.6.0" - -[[package]] -name = "frozenlist" -version = "1.3.1" -description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "furo" -version = "2022.9.29" -description = "A clean customisable Sphinx documentation theme." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -beautifulsoup4 = "*" -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" -description = "File identification library for Python" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -license = ["ukkonen"] - -[[package]] -name = "idna" -version = "3.4" -description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "imagesize" -version = "1.4.1" -description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "importlib-metadata" -version = "5.0.0" -description = "Read metadata from Python packages" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -zipp = ">=0.5" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] -perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] - -[[package]] -name = "incremental" -version = "22.10.0" -description = "\"A small library that versions your Python projects.\"" -category = "dev" -optional = false -python-versions = "*" - -[package.extras] -mypy = ["click (>=6.0)", "mypy (==0.812)", "twisted (>=16.4.0)"] -scripts = ["click (>=6.0)", "twisted (>=16.4.0)"] - -[[package]] -name = "iniconfig" -version = "1.1.1" -description = "iniconfig: brain-dead simple config-ini parsing" -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "isort" -version = "5.10.1" -description = "A Python utility / library to sort Python imports." -category = "dev" -optional = false -python-versions = ">=3.6.1,<4.0" - -[package.extras] -colors = ["colorama (>=0.4.3,<0.5.0)"] -pipfile_deprecated_finder = ["pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements_deprecated_finder = ["pip-api", "pipreqs"] - -[[package]] -name = "Jinja2" -version = "3.1.2" -description = "A very fast and expressive template engine." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -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" -description = "Python LiveReload is an awesome tool for web developers" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -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" -description = "This package provides magic filter based on dynamic attribute getter" -category = "main" -optional = false -python-versions = ">=3.7,<4.0" - -[[package]] -name = "Markdown" -version = "3.4.1" -description = "Python implementation of Markdown." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} - -[package.extras] -testing = ["coverage", "pyyaml"] - -[[package]] -name = "markdown-include" -version = "0.7.0" -description = "This is an extension to Python-Markdown which provides an \"include\" function, similar to that found in LaTeX (and also the C pre-processor and Fortran). I originally wrote it for my FORD Fortran auto-documentation generator." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -markdown = ">=3.0" - -[[package]] -name = "MarkupSafe" -version = "2.1.1" -description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "mccabe" -version = "0.7.0" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "multidict" -version = "6.0.2" -description = "multidict implementation" -category = "main" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "mypy" -version = "0.981" -description = "Optional static typing for Python" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -mypy-extensions = ">=0.4.3" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=3.10" - -[package.extras] -dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<2)"] -reports = ["lxml"] - -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "nodeenv" -version = "1.7.0" -description = "Node.js virtual environment builder" -category = "dev" -optional = false -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" -description = "Core utilities for Python packages" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" - -[[package]] -name = "pathspec" -version = "0.10.1" -description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "platformdirs" -version = "2.5.2" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] - -[[package]] -name = "pluggy" -version = "1.0.0" -description = "plugin and hook calling mechanisms for python" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "pre-commit" -version = "2.20.0" -description = "A framework for managing and maintaining multi-language pre-commit hooks." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -cfgv = ">=2.0.0" -identify = ">=1.0.0" -nodeenv = ">=0.11.1" -pyyaml = ">=5.1" -toml = "*" -virtualenv = ">=20.0.8" - -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "pycodestyle" -version = "2.9.1" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "pydantic" -version = "1.10.2" -description = "Data validation and settings management using python type hints" -category = "main" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -typing-extensions = ">=4.1.0" - -[package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] - -[[package]] -name = "pyflakes" -version = "2.5.0" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "Pygments" -version = "2.13.0" -description = "Pygments is a syntax highlighting package written in Python." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -plugins = ["importlib-metadata"] - -[[package]] -name = "pymdown-extensions" -version = "9.7" -description = "Extension pack for Python Markdown." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -markdown = ">=3.2" - -[[package]] -name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" -optional = false -python-versions = ">=3.6.8" - -[package.extras] -diagrams = ["jinja2", "railroad-diagrams"] - -[[package]] -name = "pytest" -version = "7.2.0" -description = "pytest: simple powerful testing with Python" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -attrs = ">=19.2.0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} - -[package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] - -[[package]] -name = "pytest-aiohttp" -version = "1.0.4" -description = "Pytest plugin for aiohttp support" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -aiohttp = ">=3.8.1" -pytest = ">=6.1.0" -pytest-asyncio = ">=0.17.2" - -[package.extras] -testing = ["coverage (==6.2)", "mypy (==0.931)"] - -[[package]] -name = "pytest-asyncio" -version = "0.19.0" -description = "Pytest support for asyncio" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -pytest = ">=6.1.0" - -[package.extras] -testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy (>=0.931)", "pytest-trio (>=0.7.0)"] - -[[package]] -name = "pytest-cov" -version = "4.0.0" -description = "Pytest plugin for measuring coverage." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -coverage = {version = ">=5.2.1", extras = ["toml"]} -pytest = ">=4.6" - -[package.extras] -testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] - -[[package]] -name = "pytest-html" -version = "3.2.0" -description = "pytest plugin for generating HTML reports" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -py = ">=1.8.2" -pytest = ">=5.0,<6.0.0 || >6.0.0" -pytest-metadata = "*" - -[[package]] -name = "pytest-lazy-fixture" -version = "0.6.3" -description = "It helps to use fixtures in pytest.mark.parametrize" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -pytest = ">=3.2.5" - -[[package]] -name = "pytest-metadata" -version = "2.0.2" -description = "pytest plugin for test session metadata" -category = "dev" -optional = false -python-versions = ">=3.7,<4.0" - -[package.dependencies] -pytest = ">=3.0.0,<8.0.0" - -[[package]] -name = "pytest-mock" -version = "3.10.0" -description = "Thin-wrapper around the mock package for easier use with pytest" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -pytest = ">=5.0" - -[package.extras] -dev = ["pre-commit", "pytest-asyncio", "tox"] - -[[package]] -name = "pytest-mypy" -version = "0.10.0" -description = "Mypy static type checker plugin for Pytest" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -attrs = ">=19.0" -filelock = ">=3.0" -mypy = [ - {version = ">=0.780", markers = "python_version >= \"3.9\""}, - {version = ">=0.700", markers = "python_version >= \"3.8\" and python_version < \"3.9\""}, -] -pytest = [ - {version = ">=6.2", markers = "python_version >= \"3.10\""}, - {version = ">=4.6", markers = "python_version >= \"3.6\" and python_version < \"3.10\""}, -] - -[[package]] -name = "python-socks" -version = "2.0.3" -description = "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -async-timeout = {version = ">=3.0.1", optional = true, markers = "extra == \"asyncio\""} - -[package.extras] -anyio = ["anyio (>=3.3.4)"] -asyncio = ["async-timeout (>=3.0.1)"] -curio = ["curio (>=1.4)"] -trio = ["trio (>=0.16.0)"] - -[[package]] -name = "pytz" -version = "2022.5" -description = "World timezone definitions, modern and historical" -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "PyYAML" -version = "6.0" -description = "YAML parser and emitter for Python" -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "redis" -version = "4.3.4" -description = "Python client for Redis database and key-value store" -category = "main" -optional = true -python-versions = ">=3.6" - -[package.dependencies] -async-timeout = ">=4.0.2" -deprecated = ">=1.2.3" -packaging = ">=20.4" - -[package.extras] -hiredis = ["hiredis (>=1.0.0)"] -ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)"] - -[[package]] -name = "requests" -version = "2.28.1" -description = "Python HTTP for Humans." -category = "dev" -optional = false -python-versions = ">=3.7, <4" - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<3" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<1.27" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "setuptools" -version = "65.5.0" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mock", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" - -[[package]] -name = "snowballstemmer" -version = "2.2.0" -description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "soupsieve" -version = "2.3.2.post1" -description = "A modern CSS selector implementation for Beautiful Soup." -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "Sphinx" -version = "5.3.0" -description = "Python documentation generator" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -alabaster = ">=0.7,<0.8" -babel = ">=2.9" -colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.14,<0.20" -imagesize = ">=1.3" -importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} -Jinja2 = ">=3.0" -packaging = ">=21.0" -Pygments = ">=2.12" -requests = ">=2.5.0" -snowballstemmer = ">=2.0" -sphinxcontrib-applehelp = "*" -sphinxcontrib-devhelp = "*" -sphinxcontrib-htmlhelp = ">=2.0.0" -sphinxcontrib-jsmath = "*" -sphinxcontrib-qthelp = "*" -sphinxcontrib-serializinghtml = ">=1.1.5" - -[package.extras] -docs = ["sphinxcontrib-websupport"] -lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-bugbear", "flake8-comprehensions", "flake8-simplify", "isort", "mypy (>=0.981)", "sphinx-lint", "types-requests", "types-typed-ast"] -test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] - -[[package]] -name = "sphinx-autobuild" -version = "2021.3.14" -description = "Rebuild Sphinx documentation on changes, with live-reload in the browser." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -colorama = "*" -livereload = "*" -sphinx = "*" - -[package.extras] -test = ["pytest", "pytest-cov"] - -[[package]] -name = "sphinx-basic-ng" -version = "1.0.0b1" -description = "A modern skeleton for Sphinx themes." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -sphinx = ">=4.0" - -[package.extras] -docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-tabs"] - -[[package]] -name = "sphinx-copybutton" -version = "0.5.0" -description = "Add a copy button to each of your code cells." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -sphinx = ">=1.8" - -[package.extras] -code_style = ["pre-commit (==2.12.1)"] -rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme"] - -[[package]] -name = "sphinx-intl" -version = "2.0.1" -description = "Sphinx utility that make it easy to translate and to apply translation." -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -babel = "*" -click = "*" -setuptools = "*" -sphinx = "*" - -[package.extras] -test = ["mock", "pytest"] -transifex = ["transifex_client (>=0.11)"] - -[[package]] -name = "sphinx-prompt" -version = "1.5.0" -description = "Sphinx directive to add unselectable prompt" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -pygments = "*" -Sphinx = "*" - -[[package]] -name = "Sphinx-Substitution-Extensions" -version = "2022.2.16" -description = "Extensions for Sphinx which allow for substitutions." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -docutils = ">=0.15" -sphinx = ">=4.0.0" - -[package.extras] -dev = ["autoflake (==1.4)", "black (==22.1.0)", "check-manifest (==0.47)", "doc8 (==0.10.1)", "flake8 (==4.0.1)", "flake8-commas (==2.1.0)", "flake8-quotes (==3.3.1)", "isort (==5.10.1)", "mypy (==0.931)", "pip-check-reqs (==2.3.2)", "pydocstyle (==6.1.1)", "pyenchant (==3.2.2)", "pylint (==2.12.2)", "pyroma (==3.2)", "pytest (==7.0.1)", "pytest-cov (==3.0.0)", "types-docutils (==0.17.5)", "vulture (==2.3)"] -prompt = ["sphinx-prompt (>=0.1)"] - -[[package]] -name = "sphinxcontrib-applehelp" -version = "1.0.2" -description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-devhelp" -version = "1.0.2" -description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-htmlhelp" -version = "2.0.0" -description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["html5lib", "pytest"] - -[[package]] -name = "sphinxcontrib-jsmath" -version = "1.0.1" -description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.extras] -test = ["flake8", "mypy", "pytest"] - -[[package]] -name = "sphinxcontrib-qthelp" -version = "1.0.3" -description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-serializinghtml" -version = "1.1.5" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" -optional = false -python-versions = ">=3.5" - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-towncrier" -version = "0.3.1a3" -description = "An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -sphinx = "*" -towncrier = ">=19.2" - -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" - -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -category = "dev" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "tornado" -version = "6.2" -description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "dev" -optional = false -python-versions = ">= 3.7" - -[[package]] -name = "towncrier" -version = "22.8.0" -description = "Building newsfiles for your project." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -click = "*" -click-default-group = "*" -incremental = "*" -jinja2 = "*" -setuptools = "*" -tomli = "*" - -[package.extras] -dev = ["packaging"] - -[[package]] -name = "typing-extensions" -version = "4.4.0" -description = "Backported and Experimental Type Hints for Python 3.7+" -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" -description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] - -[[package]] -name = "uvloop" -version = "0.17.0" -description = "Fast implementation of asyncio event loop on top of libuv" -category = "main" -optional = true -python-versions = ">=3.7" - -[package.extras] -dev = ["Cython (>=0.29.32,<0.30.0)", "Sphinx (>=4.1.2,<4.2.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=22.0.0,<22.1.0)", "pycodestyle (>=2.7.0,<2.8.0)", "pytest (>=3.6.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] -docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] -test = ["Cython (>=0.29.32,<0.30.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=22.0.0,<22.1.0)", "pycodestyle (>=2.7.0,<2.8.0)"] - -[[package]] -name = "virtualenv" -version = "20.16.6" -description = "Virtual Python Environment builder" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -distlib = ">=0.3.6,<1" -filelock = ">=3.4.1,<4" -platformdirs = ">=2.4,<3" - -[package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] -testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] - -[[package]] -name = "wrapt" -version = "1.14.1" -description = "Module for decorators, wrappers and monkey patching." -category = "main" -optional = true -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" - -[[package]] -name = "yarl" -version = "1.8.1" -description = "Yet another URL library" -category = "main" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -idna = ">=2.0" -multidict = ">=4.0" - -[[package]] -name = "zipp" -version = "3.10.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] -testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] - -[extras] -fast = ["uvloop"] -i18n = ["Babel"] -proxy = ["aiohttp-socks"] -redis = ["redis"] - -[metadata] -lock-version = "1.1" -python-versions = "^3.8" -content-hash = "475ca0c579e3997fe16a79826e94f7a4f7bc99a98edbd33fc6579580af0582d0" - -[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"}, -] -aiohttp = [ - {file = "aiohttp-3.8.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ba71c9b4dcbb16212f334126cc3d8beb6af377f6703d9dc2d9fb3874fd667ee9"}, - {file = "aiohttp-3.8.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d24b8bb40d5c61ef2d9b6a8f4528c2f17f1c5d2d31fed62ec860f6006142e83e"}, - {file = "aiohttp-3.8.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f88df3a83cf9df566f171adba39d5bd52814ac0b94778d2448652fc77f9eb491"}, - {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b97decbb3372d4b69e4d4c8117f44632551c692bb1361b356a02b97b69e18a62"}, - {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:309aa21c1d54b8ef0723181d430347d7452daaff93e8e2363db8e75c72c2fb2d"}, - {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ad5383a67514e8e76906a06741febd9126fc7c7ff0f599d6fcce3e82b80d026f"}, - {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20acae4f268317bb975671e375493dbdbc67cddb5f6c71eebdb85b34444ac46b"}, - {file = "aiohttp-3.8.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:05a3c31c6d7cd08c149e50dc7aa2568317f5844acd745621983380597f027a18"}, - {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d6f76310355e9fae637c3162936e9504b4767d5c52ca268331e2756e54fd4ca5"}, - {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:256deb4b29fe5e47893fa32e1de2d73c3afe7407738bd3c63829874661d4822d"}, - {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:5c59fcd80b9049b49acd29bd3598cada4afc8d8d69bd4160cd613246912535d7"}, - {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:059a91e88f2c00fe40aed9031b3606c3f311414f86a90d696dd982e7aec48142"}, - {file = "aiohttp-3.8.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2feebbb6074cdbd1ac276dbd737b40e890a1361b3cc30b74ac2f5e24aab41f7b"}, - {file = "aiohttp-3.8.3-cp310-cp310-win32.whl", hash = "sha256:5bf651afd22d5f0c4be16cf39d0482ea494f5c88f03e75e5fef3a85177fecdeb"}, - {file = "aiohttp-3.8.3-cp310-cp310-win_amd64.whl", hash = "sha256:653acc3880459f82a65e27bd6526e47ddf19e643457d36a2250b85b41a564715"}, - {file = "aiohttp-3.8.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:86fc24e58ecb32aee09f864cb11bb91bc4c1086615001647dbfc4dc8c32f4008"}, - {file = "aiohttp-3.8.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:75e14eac916f024305db517e00a9252714fce0abcb10ad327fb6dcdc0d060f1d"}, - {file = "aiohttp-3.8.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d1fde0f44029e02d02d3993ad55ce93ead9bb9b15c6b7ccd580f90bd7e3de476"}, - {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ab94426ddb1ecc6a0b601d832d5d9d421820989b8caa929114811369673235c"}, - {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:89d2e02167fa95172c017732ed7725bc8523c598757f08d13c5acca308e1a061"}, - {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:02f9a2c72fc95d59b881cf38a4b2be9381b9527f9d328771e90f72ac76f31ad8"}, - {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c7149272fb5834fc186328e2c1fa01dda3e1fa940ce18fded6d412e8f2cf76d"}, - {file = "aiohttp-3.8.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:512bd5ab136b8dc0ffe3fdf2dfb0c4b4f49c8577f6cae55dca862cd37a4564e2"}, - {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7018ecc5fe97027214556afbc7c502fbd718d0740e87eb1217b17efd05b3d276"}, - {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:88c70ed9da9963d5496d38320160e8eb7e5f1886f9290475a881db12f351ab5d"}, - {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:da22885266bbfb3f78218dc40205fed2671909fbd0720aedba39b4515c038091"}, - {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:e65bc19919c910127c06759a63747ebe14f386cda573d95bcc62b427ca1afc73"}, - {file = "aiohttp-3.8.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:08c78317e950e0762c2983f4dd58dc5e6c9ff75c8a0efeae299d363d439c8e34"}, - {file = "aiohttp-3.8.3-cp311-cp311-win32.whl", hash = "sha256:45d88b016c849d74ebc6f2b6e8bc17cabf26e7e40c0661ddd8fae4c00f015697"}, - {file = "aiohttp-3.8.3-cp311-cp311-win_amd64.whl", hash = "sha256:96372fc29471646b9b106ee918c8eeb4cca423fcbf9a34daa1b93767a88a2290"}, - {file = "aiohttp-3.8.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c971bf3786b5fad82ce5ad570dc6ee420f5b12527157929e830f51c55dc8af77"}, - {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ff25f48fc8e623d95eca0670b8cc1469a83783c924a602e0fbd47363bb54aaca"}, - {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e381581b37db1db7597b62a2e6b8b57c3deec95d93b6d6407c5b61ddc98aca6d"}, - {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:db19d60d846283ee275d0416e2a23493f4e6b6028825b51290ac05afc87a6f97"}, - {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25892c92bee6d9449ffac82c2fe257f3a6f297792cdb18ad784737d61e7a9a85"}, - {file = "aiohttp-3.8.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:398701865e7a9565d49189f6c90868efaca21be65c725fc87fc305906be915da"}, - {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:4a4fbc769ea9b6bd97f4ad0b430a6807f92f0e5eb020f1e42ece59f3ecfc4585"}, - {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:b29bfd650ed8e148f9c515474a6ef0ba1090b7a8faeee26b74a8ff3b33617502"}, - {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:1e56b9cafcd6531bab5d9b2e890bb4937f4165109fe98e2b98ef0dcfcb06ee9d"}, - {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:ec40170327d4a404b0d91855d41bfe1fe4b699222b2b93e3d833a27330a87a6d"}, - {file = "aiohttp-3.8.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:2df5f139233060578d8c2c975128fb231a89ca0a462b35d4b5fcf7c501ebdbe1"}, - {file = "aiohttp-3.8.3-cp36-cp36m-win32.whl", hash = "sha256:f973157ffeab5459eefe7b97a804987876dd0a55570b8fa56b4e1954bf11329b"}, - {file = "aiohttp-3.8.3-cp36-cp36m-win_amd64.whl", hash = "sha256:437399385f2abcd634865705bdc180c8314124b98299d54fe1d4c8990f2f9494"}, - {file = "aiohttp-3.8.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:09e28f572b21642128ef31f4e8372adb6888846f32fecb288c8b0457597ba61a"}, - {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f3553510abdbec67c043ca85727396ceed1272eef029b050677046d3387be8d"}, - {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e168a7560b7c61342ae0412997b069753f27ac4862ec7867eff74f0fe4ea2ad9"}, - {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:db4c979b0b3e0fa7e9e69ecd11b2b3174c6963cebadeecfb7ad24532ffcdd11a"}, - {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e164e0a98e92d06da343d17d4e9c4da4654f4a4588a20d6c73548a29f176abe2"}, - {file = "aiohttp-3.8.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8a78079d9a39ca9ca99a8b0ac2fdc0c4d25fc80c8a8a82e5c8211509c523363"}, - {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:21b30885a63c3f4ff5b77a5d6caf008b037cb521a5f33eab445dc566f6d092cc"}, - {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4b0f30372cef3fdc262f33d06e7b411cd59058ce9174ef159ad938c4a34a89da"}, - {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:8135fa153a20d82ffb64f70a1b5c2738684afa197839b34cc3e3c72fa88d302c"}, - {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:ad61a9639792fd790523ba072c0555cd6be5a0baf03a49a5dd8cfcf20d56df48"}, - {file = "aiohttp-3.8.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:978b046ca728073070e9abc074b6299ebf3501e8dee5e26efacb13cec2b2dea0"}, - {file = "aiohttp-3.8.3-cp37-cp37m-win32.whl", hash = "sha256:0d2c6d8c6872df4a6ec37d2ede71eff62395b9e337b4e18efd2177de883a5033"}, - {file = "aiohttp-3.8.3-cp37-cp37m-win_amd64.whl", hash = "sha256:21d69797eb951f155026651f7e9362877334508d39c2fc37bd04ff55b2007091"}, - {file = "aiohttp-3.8.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ca9af5f8f5812d475c5259393f52d712f6d5f0d7fdad9acdb1107dd9e3cb7eb"}, - {file = "aiohttp-3.8.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d90043c1882067f1bd26196d5d2db9aa6d268def3293ed5fb317e13c9413ea4"}, - {file = "aiohttp-3.8.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d737fc67b9a970f3234754974531dc9afeea11c70791dcb7db53b0cf81b79784"}, - {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebf909ea0a3fc9596e40d55d8000702a85e27fd578ff41a5500f68f20fd32e6c"}, - {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5835f258ca9f7c455493a57ee707b76d2d9634d84d5d7f62e77be984ea80b849"}, - {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da37dcfbf4b7f45d80ee386a5f81122501ec75672f475da34784196690762f4b"}, - {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87f44875f2804bc0511a69ce44a9595d5944837a62caecc8490bbdb0e18b1342"}, - {file = "aiohttp-3.8.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:527b3b87b24844ea7865284aabfab08eb0faf599b385b03c2aa91fc6edd6e4b6"}, - {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5ba88df9aa5e2f806650fcbeedbe4f6e8736e92fc0e73b0400538fd25a4dd96"}, - {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e7b8813be97cab8cb52b1375f41f8e6804f6507fe4660152e8ca5c48f0436017"}, - {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:2dea10edfa1a54098703cb7acaa665c07b4e7568472a47f4e64e6319d3821ccf"}, - {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:713d22cd9643ba9025d33c4af43943c7a1eb8547729228de18d3e02e278472b6"}, - {file = "aiohttp-3.8.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2d252771fc85e0cf8da0b823157962d70639e63cb9b578b1dec9868dd1f4f937"}, - {file = "aiohttp-3.8.3-cp38-cp38-win32.whl", hash = "sha256:66bd5f950344fb2b3dbdd421aaa4e84f4411a1a13fca3aeb2bcbe667f80c9f76"}, - {file = "aiohttp-3.8.3-cp38-cp38-win_amd64.whl", hash = "sha256:84b14f36e85295fe69c6b9789b51a0903b774046d5f7df538176516c3e422446"}, - {file = "aiohttp-3.8.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16c121ba0b1ec2b44b73e3a8a171c4f999b33929cd2397124a8c7fcfc8cd9e06"}, - {file = "aiohttp-3.8.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8d6aaa4e7155afaf994d7924eb290abbe81a6905b303d8cb61310a2aba1c68ba"}, - {file = "aiohttp-3.8.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:43046a319664a04b146f81b40e1545d4c8ac7b7dd04c47e40bf09f65f2437346"}, - {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:599418aaaf88a6d02a8c515e656f6faf3d10618d3dd95866eb4436520096c84b"}, - {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92a2964319d359f494f16011e23434f6f8ef0434acd3cf154a6b7bec511e2fb7"}, - {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:73a4131962e6d91109bca6536416aa067cf6c4efb871975df734f8d2fd821b37"}, - {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:598adde339d2cf7d67beaccda3f2ce7c57b3b412702f29c946708f69cf8222aa"}, - {file = "aiohttp-3.8.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75880ed07be39beff1881d81e4a907cafb802f306efd6d2d15f2b3c69935f6fb"}, - {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a0239da9fbafd9ff82fd67c16704a7d1bccf0d107a300e790587ad05547681c8"}, - {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4e3a23ec214e95c9fe85a58470b660efe6534b83e6cbe38b3ed52b053d7cb6ad"}, - {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:47841407cc89a4b80b0c52276f3cc8138bbbfba4b179ee3acbd7d77ae33f7ac4"}, - {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:54d107c89a3ebcd13228278d68f1436d3f33f2dd2af5415e3feaeb1156e1a62c"}, - {file = "aiohttp-3.8.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c37c5cce780349d4d51739ae682dec63573847a2a8dcb44381b174c3d9c8d403"}, - {file = "aiohttp-3.8.3-cp39-cp39-win32.whl", hash = "sha256:f178d2aadf0166be4df834c4953da2d7eef24719e8aec9a65289483eeea9d618"}, - {file = "aiohttp-3.8.3-cp39-cp39-win_amd64.whl", hash = "sha256:88e5be56c231981428f4f506c68b6a46fa25c4123a2e86d156c58a8369d31ab7"}, - {file = "aiohttp-3.8.3.tar.gz", hash = "sha256:3828fb41b7203176b82fe5d699e0d845435f2374750a44b480ea6b930f6be269"}, -] -aiohttp-socks = [ - {file = "aiohttp_socks-0.7.1-py3-none-any.whl", hash = "sha256:94bcff5ef73611c6c6231c2ffc1be4af1599abec90dbd2fdbbd63233ec2fb0ff"}, - {file = "aiohttp_socks-0.7.1.tar.gz", hash = "sha256:2215cac4891ef3fa14b7d600ed343ed0f0a670c23b10e4142aa862b3db20341a"}, -] -aiosignal = [ - {file = "aiosignal-1.2.0-py3-none-any.whl", hash = "sha256:26e62109036cd181df6e6ad646f91f0dcfd05fe16d0cb924138ff2ab75d64e3a"}, - {file = "aiosignal-1.2.0.tar.gz", hash = "sha256:78ed67db6c7b7ced4f98e495e572106d5c432a93e1ddd1bf475e1dc05f5b7df2"}, -] -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"}, -] -attrs = [ - {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, - {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, -] -Babel = [ - {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, - {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, -] -beautifulsoup4 = [ - {file = "beautifulsoup4-4.11.1-py3-none-any.whl", hash = "sha256:58d5c3d29f5a36ffeb94f02f0d786cd53014cf9b3b3951d42e0080d8a9498d30"}, - {file = "beautifulsoup4-4.11.1.tar.gz", hash = "sha256:ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693"}, -] -black = [ - {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"}, - {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"}, - {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"}, - {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"}, - {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"}, - {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"}, - {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"}, - {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"}, - {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"}, - {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"}, - {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"}, - {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"}, - {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"}, - {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"}, - {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"}, - {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"}, - {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"}, - {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"}, - {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"}, - {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"}, -] -cfgv = [ - {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, - {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, - {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, -] -click = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, -] -click-default-group = [ - {file = "click-default-group-1.2.2.tar.gz", hash = "sha256:d9560e8e8dfa44b3562fbc9425042a0fd6d21956fcc2db0077f63f34253ab904"}, -] -colorama = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] -coverage = [ - {file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"}, - {file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"}, - {file = "coverage-6.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4a5be1748d538a710f87542f22c2cad22f80545a847ad91ce45e77417293eb4"}, - {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83516205e254a0cb77d2d7bb3632ee019d93d9f4005de31dca0a8c3667d5bc04"}, - {file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af4fffaffc4067232253715065e30c5a7ec6faac36f8fc8d6f64263b15f74db0"}, - {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:97117225cdd992a9c2a5515db1f66b59db634f59d0679ca1fa3fe8da32749cae"}, - {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a1170fa54185845505fbfa672f1c1ab175446c887cce8212c44149581cf2d466"}, - {file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:11b990d520ea75e7ee8dcab5bc908072aaada194a794db9f6d7d5cfd19661e5a"}, - {file = "coverage-6.5.0-cp310-cp310-win32.whl", hash = "sha256:5dbec3b9095749390c09ab7c89d314727f18800060d8d24e87f01fb9cfb40b32"}, - {file = "coverage-6.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:59f53f1dc5b656cafb1badd0feb428c1e7bc19b867479ff72f7a9dd9b479f10e"}, - {file = "coverage-6.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4a5375e28c5191ac38cca59b38edd33ef4cc914732c916f2929029b4bfb50795"}, - {file = "coverage-6.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ed2820d919351f4167e52425e096af41bfabacb1857186c1ea32ff9983ed75"}, - {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33a7da4376d5977fbf0a8ed91c4dffaaa8dbf0ddbf4c8eea500a2486d8bc4d7b"}, - {file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fb6cf131ac4070c9c5a3e21de0f7dc5a0fbe8bc77c9456ced896c12fcdad91"}, - {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a6b7d95969b8845250586f269e81e5dfdd8ff828ddeb8567a4a2eaa7313460c4"}, - {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1ef221513e6f68b69ee9e159506d583d31aa3567e0ae84eaad9d6ec1107dddaa"}, - {file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cca4435eebea7962a52bdb216dec27215d0df64cf27fc1dd538415f5d2b9da6b"}, - {file = "coverage-6.5.0-cp311-cp311-win32.whl", hash = "sha256:98e8a10b7a314f454d9eff4216a9a94d143a7ee65018dd12442e898ee2310578"}, - {file = "coverage-6.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:bc8ef5e043a2af066fa8cbfc6e708d58017024dc4345a1f9757b329a249f041b"}, - {file = "coverage-6.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4433b90fae13f86fafff0b326453dd42fc9a639a0d9e4eec4d366436d1a41b6d"}, - {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3"}, - {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:94e2565443291bd778421856bc975d351738963071e9b8839ca1fc08b42d4bef"}, - {file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:027018943386e7b942fa832372ebc120155fd970837489896099f5cfa2890f79"}, - {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:255758a1e3b61db372ec2736c8e2a1fdfaf563977eedbdf131de003ca5779b7d"}, - {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:851cf4ff24062c6aec510a454b2584f6e998cada52d4cb58c5e233d07172e50c"}, - {file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:12adf310e4aafddc58afdb04d686795f33f4d7a6fa67a7a9d4ce7d6ae24d949f"}, - {file = "coverage-6.5.0-cp37-cp37m-win32.whl", hash = "sha256:b5604380f3415ba69de87a289a2b56687faa4fe04dbee0754bfcae433489316b"}, - {file = "coverage-6.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:4a8dbc1f0fbb2ae3de73eb0bdbb914180c7abfbf258e90b311dcd4f585d44bd2"}, - {file = "coverage-6.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d900bb429fdfd7f511f868cedd03a6bbb142f3f9118c09b99ef8dc9bf9643c3c"}, - {file = "coverage-6.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2198ea6fc548de52adc826f62cb18554caedfb1d26548c1b7c88d8f7faa8f6ba"}, - {file = "coverage-6.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c4459b3de97b75e3bd6b7d4b7f0db13f17f504f3d13e2a7c623786289dd670e"}, - {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:20c8ac5386253717e5ccc827caad43ed66fea0efe255727b1053a8154d952398"}, - {file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b07130585d54fe8dff3d97b93b0e20290de974dc8177c320aeaf23459219c0b"}, - {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dbdb91cd8c048c2b09eb17713b0c12a54fbd587d79adcebad543bc0cd9a3410b"}, - {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:de3001a203182842a4630e7b8d1a2c7c07ec1b45d3084a83d5d227a3806f530f"}, - {file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e07f4a4a9b41583d6eabec04f8b68076ab3cd44c20bd29332c6572dda36f372e"}, - {file = "coverage-6.5.0-cp38-cp38-win32.whl", hash = "sha256:6d4817234349a80dbf03640cec6109cd90cba068330703fa65ddf56b60223a6d"}, - {file = "coverage-6.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:7ccf362abd726b0410bf8911c31fbf97f09f8f1061f8c1cf03dfc4b6372848f6"}, - {file = "coverage-6.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:633713d70ad6bfc49b34ead4060531658dc6dfc9b3eb7d8a716d5873377ab745"}, - {file = "coverage-6.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:95203854f974e07af96358c0b261f1048d8e1083f2de9b1c565e1be4a3a48cfc"}, - {file = "coverage-6.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9023e237f4c02ff739581ef35969c3739445fb059b060ca51771e69101efffe"}, - {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:265de0fa6778d07de30bcf4d9dc471c3dc4314a23a3c6603d356a3c9abc2dfcf"}, - {file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f830ed581b45b82451a40faabb89c84e1a998124ee4212d440e9c6cf70083e5"}, - {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7b6be138d61e458e18d8e6ddcddd36dd96215edfe5f1168de0b1b32635839b62"}, - {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:42eafe6778551cf006a7c43153af1211c3aaab658d4d66fa5fcc021613d02518"}, - {file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:723e8130d4ecc8f56e9a611e73b31219595baa3bb252d539206f7bbbab6ffc1f"}, - {file = "coverage-6.5.0-cp39-cp39-win32.whl", hash = "sha256:d9ecf0829c6a62b9b573c7bb6d4dcd6ba8b6f80be9ba4fc7ed50bf4ac9aecd72"}, - {file = "coverage-6.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987"}, - {file = "coverage-6.5.0-pp36.pp37.pp38-none-any.whl", hash = "sha256:1431986dac3923c5945271f169f59c45b8802a114c8f548d611f2015133df77a"}, - {file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"}, -] -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"}, -] -docutils = [ - {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, - {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, -] -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"}, -] -flake8 = [ - {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, - {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, -] -frozenlist = [ - {file = "frozenlist-1.3.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5f271c93f001748fc26ddea409241312a75e13466b06c94798d1a341cf0e6989"}, - {file = "frozenlist-1.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9c6ef8014b842f01f5d2b55315f1af5cbfde284eb184075c189fd657c2fd8204"}, - {file = "frozenlist-1.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:219a9676e2eae91cb5cc695a78b4cb43d8123e4160441d2b6ce8d2c70c60e2f3"}, - {file = "frozenlist-1.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b47d64cdd973aede3dd71a9364742c542587db214e63b7529fbb487ed67cddd9"}, - {file = "frozenlist-1.3.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2af6f7a4e93f5d08ee3f9152bce41a6015b5cf87546cb63872cc19b45476e98a"}, - {file = "frozenlist-1.3.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a718b427ff781c4f4e975525edb092ee2cdef6a9e7bc49e15063b088961806f8"}, - {file = "frozenlist-1.3.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c56c299602c70bc1bb5d1e75f7d8c007ca40c9d7aebaf6e4ba52925d88ef826d"}, - {file = "frozenlist-1.3.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:717470bfafbb9d9be624da7780c4296aa7935294bd43a075139c3d55659038ca"}, - {file = "frozenlist-1.3.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:31b44f1feb3630146cffe56344704b730c33e042ffc78d21f2125a6a91168131"}, - {file = "frozenlist-1.3.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c3b31180b82c519b8926e629bf9f19952c743e089c41380ddca5db556817b221"}, - {file = "frozenlist-1.3.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:d82bed73544e91fb081ab93e3725e45dd8515c675c0e9926b4e1f420a93a6ab9"}, - {file = "frozenlist-1.3.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49459f193324fbd6413e8e03bd65789e5198a9fa3095e03f3620dee2f2dabff2"}, - {file = "frozenlist-1.3.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:94e680aeedc7fd3b892b6fa8395b7b7cc4b344046c065ed4e7a1e390084e8cb5"}, - {file = "frozenlist-1.3.1-cp310-cp310-win32.whl", hash = "sha256:fabb953ab913dadc1ff9dcc3a7a7d3dc6a92efab3a0373989b8063347f8705be"}, - {file = "frozenlist-1.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:eee0c5ecb58296580fc495ac99b003f64f82a74f9576a244d04978a7e97166db"}, - {file = "frozenlist-1.3.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0bc75692fb3770cf2b5856a6c2c9de967ca744863c5e89595df64e252e4b3944"}, - {file = "frozenlist-1.3.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:086ca1ac0a40e722d6833d4ce74f5bf1aba2c77cbfdc0cd83722ffea6da52a04"}, - {file = "frozenlist-1.3.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1b51eb355e7f813bcda00276b0114c4172872dc5fb30e3fea059b9367c18fbcb"}, - {file = "frozenlist-1.3.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:74140933d45271c1a1283f708c35187f94e1256079b3c43f0c2267f9db5845ff"}, - {file = "frozenlist-1.3.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee4c5120ddf7d4dd1eaf079af3af7102b56d919fa13ad55600a4e0ebe532779b"}, - {file = "frozenlist-1.3.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97d9e00f3ac7c18e685320601f91468ec06c58acc185d18bb8e511f196c8d4b2"}, - {file = "frozenlist-1.3.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6e19add867cebfb249b4e7beac382d33215d6d54476bb6be46b01f8cafb4878b"}, - {file = "frozenlist-1.3.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a027f8f723d07c3f21963caa7d585dcc9b089335565dabe9c814b5f70c52705a"}, - {file = "frozenlist-1.3.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:61d7857950a3139bce035ad0b0945f839532987dfb4c06cfe160254f4d19df03"}, - {file = "frozenlist-1.3.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:53b2b45052e7149ee8b96067793db8ecc1ae1111f2f96fe1f88ea5ad5fd92d10"}, - {file = "frozenlist-1.3.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bbb1a71b1784e68870800b1bc9f3313918edc63dbb8f29fbd2e767ce5821696c"}, - {file = "frozenlist-1.3.1-cp37-cp37m-win32.whl", hash = "sha256:ab6fa8c7871877810e1b4e9392c187a60611fbf0226a9e0b11b7b92f5ac72792"}, - {file = "frozenlist-1.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:f89139662cc4e65a4813f4babb9ca9544e42bddb823d2ec434e18dad582543bc"}, - {file = "frozenlist-1.3.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:4c0c99e31491a1d92cde8648f2e7ccad0e9abb181f6ac3ddb9fc48b63301808e"}, - {file = "frozenlist-1.3.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:61e8cb51fba9f1f33887e22488bad1e28dd8325b72425f04517a4d285a04c519"}, - {file = "frozenlist-1.3.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cc2f3e368ee5242a2cbe28323a866656006382872c40869b49b265add546703f"}, - {file = "frozenlist-1.3.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58fb94a01414cddcdc6839807db77ae8057d02ddafc94a42faee6004e46c9ba8"}, - {file = "frozenlist-1.3.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:022178b277cb9277d7d3b3f2762d294f15e85cd2534047e68a118c2bb0058f3e"}, - {file = "frozenlist-1.3.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:572ce381e9fe027ad5e055f143763637dcbac2542cfe27f1d688846baeef5170"}, - {file = "frozenlist-1.3.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19127f8dcbc157ccb14c30e6f00392f372ddb64a6ffa7106b26ff2196477ee9f"}, - {file = "frozenlist-1.3.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42719a8bd3792744c9b523674b752091a7962d0d2d117f0b417a3eba97d1164b"}, - {file = "frozenlist-1.3.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2743bb63095ef306041c8f8ea22bd6e4d91adabf41887b1ad7886c4c1eb43d5f"}, - {file = "frozenlist-1.3.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:fa47319a10e0a076709644a0efbcaab9e91902c8bd8ef74c6adb19d320f69b83"}, - {file = "frozenlist-1.3.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:52137f0aea43e1993264a5180c467a08a3e372ca9d378244c2d86133f948b26b"}, - {file = "frozenlist-1.3.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:f5abc8b4d0c5b556ed8cd41490b606fe99293175a82b98e652c3f2711b452988"}, - {file = "frozenlist-1.3.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:1e1cf7bc8cbbe6ce3881863671bac258b7d6bfc3706c600008925fb799a256e2"}, - {file = "frozenlist-1.3.1-cp38-cp38-win32.whl", hash = "sha256:0dde791b9b97f189874d654c55c24bf7b6782343e14909c84beebd28b7217845"}, - {file = "frozenlist-1.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:9494122bf39da6422b0972c4579e248867b6b1b50c9b05df7e04a3f30b9a413d"}, - {file = "frozenlist-1.3.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:31bf9539284f39ff9398deabf5561c2b0da5bb475590b4e13dd8b268d7a3c5c1"}, - {file = "frozenlist-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e0c8c803f2f8db7217898d11657cb6042b9b0553a997c4a0601f48a691480fab"}, - {file = "frozenlist-1.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da5ba7b59d954f1f214d352308d1d86994d713b13edd4b24a556bcc43d2ddbc3"}, - {file = "frozenlist-1.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74e6b2b456f21fc93ce1aff2b9728049f1464428ee2c9752a4b4f61e98c4db96"}, - {file = "frozenlist-1.3.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:526d5f20e954d103b1d47232e3839f3453c02077b74203e43407b962ab131e7b"}, - {file = "frozenlist-1.3.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b499c6abe62a7a8d023e2c4b2834fce78a6115856ae95522f2f974139814538c"}, - {file = "frozenlist-1.3.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ab386503f53bbbc64d1ad4b6865bf001414930841a870fc97f1546d4d133f141"}, - {file = "frozenlist-1.3.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f63c308f82a7954bf8263a6e6de0adc67c48a8b484fab18ff87f349af356efd"}, - {file = "frozenlist-1.3.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:12607804084d2244a7bd4685c9d0dca5df17a6a926d4f1967aa7978b1028f89f"}, - {file = "frozenlist-1.3.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:da1cdfa96425cbe51f8afa43e392366ed0b36ce398f08b60de6b97e3ed4affef"}, - {file = "frozenlist-1.3.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f810e764617b0748b49a731ffaa525d9bb36ff38332411704c2400125af859a6"}, - {file = "frozenlist-1.3.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:35c3d79b81908579beb1fb4e7fcd802b7b4921f1b66055af2578ff7734711cfa"}, - {file = "frozenlist-1.3.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c92deb5d9acce226a501b77307b3b60b264ca21862bd7d3e0c1f3594022f01bc"}, - {file = "frozenlist-1.3.1-cp39-cp39-win32.whl", hash = "sha256:5e77a8bd41e54b05e4fb2708dc6ce28ee70325f8c6f50f3df86a44ecb1d7a19b"}, - {file = "frozenlist-1.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:625d8472c67f2d96f9a4302a947f92a7adbc1e20bedb6aff8dbc8ff039ca6189"}, - {file = "frozenlist-1.3.1.tar.gz", hash = "sha256:3a735e4211a04ccfa3f4833547acdf5d2f863bfeb01cfd3edaffbc251f15cec8"}, -] -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"}, -] -idna = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] -imagesize = [ - {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, - {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, -] -importlib-metadata = [ - {file = "importlib_metadata-5.0.0-py3-none-any.whl", hash = "sha256:ddb0e35065e8938f867ed4928d0ae5bf2a53b7773871bfe6bcc7e4fcdc7dea43"}, - {file = "importlib_metadata-5.0.0.tar.gz", hash = "sha256:da31db32b304314d044d3c12c79bd59e307889b287ad12ff387b3500835fc2ab"}, -] -incremental = [ - {file = "incremental-22.10.0-py2.py3-none-any.whl", hash = "sha256:b864a1f30885ee72c5ac2835a761b8fe8aa9c28b9395cacf27286602688d3e51"}, - {file = "incremental-22.10.0.tar.gz", hash = "sha256:912feeb5e0f7e0188e6f42241d2f450002e11bbc0937c65865045854c24c0bd0"}, -] -iniconfig = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, -] -isort = [ - {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, - {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, -] -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"}, -] -Markdown = [ - {file = "Markdown-3.4.1-py3-none-any.whl", hash = "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186"}, - {file = "Markdown-3.4.1.tar.gz", hash = "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff"}, -] -markdown-include = [ - {file = "markdown_include-0.7.0-py3-none-any.whl", hash = "sha256:a06183b7c7225e73112737acdc6fe0ac0686c39457234eeb5ede23881fed001d"}, -] -MarkupSafe = [ - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, - {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, -] -mccabe = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, -] -multidict = [ - {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b9e95a740109c6047602f4db4da9949e6c5945cefbad34a1299775ddc9a62e2"}, - {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac0e27844758d7177989ce406acc6a83c16ed4524ebc363c1f748cba184d89d3"}, - {file = "multidict-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:041b81a5f6b38244b34dc18c7b6aba91f9cdaf854d9a39e5ff0b58e2b5773b9c"}, - {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fdda29a3c7e76a064f2477c9aab1ba96fd94e02e386f1e665bca1807fc5386f"}, - {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3368bf2398b0e0fcbf46d85795adc4c259299fec50c1416d0f77c0a843a3eed9"}, - {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4f052ee022928d34fe1f4d2bc743f32609fb79ed9c49a1710a5ad6b2198db20"}, - {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:225383a6603c086e6cef0f2f05564acb4f4d5f019a4e3e983f572b8530f70c88"}, - {file = "multidict-6.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50bd442726e288e884f7be9071016c15a8742eb689a593a0cac49ea093eef0a7"}, - {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:47e6a7e923e9cada7c139531feac59448f1f47727a79076c0b1ee80274cd8eee"}, - {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0556a1d4ea2d949efe5fd76a09b4a82e3a4a30700553a6725535098d8d9fb672"}, - {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:626fe10ac87851f4cffecee161fc6f8f9853f0f6f1035b59337a51d29ff3b4f9"}, - {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:8064b7c6f0af936a741ea1efd18690bacfbae4078c0c385d7c3f611d11f0cf87"}, - {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2d36e929d7f6a16d4eb11b250719c39560dd70545356365b494249e2186bc389"}, - {file = "multidict-6.0.2-cp310-cp310-win32.whl", hash = "sha256:fcb91630817aa8b9bc4a74023e4198480587269c272c58b3279875ed7235c293"}, - {file = "multidict-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:8cbf0132f3de7cc6c6ce00147cc78e6439ea736cee6bca4f068bcf892b0fd658"}, - {file = "multidict-6.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:05f6949d6169878a03e607a21e3b862eaf8e356590e8bdae4227eedadacf6e51"}, - {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2c2e459f7050aeb7c1b1276763364884595d47000c1cddb51764c0d8976e608"}, - {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0509e469d48940147e1235d994cd849a8f8195e0bca65f8f5439c56e17872a3"}, - {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:514fe2b8d750d6cdb4712346a2c5084a80220821a3e91f3f71eec11cf8d28fd4"}, - {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19adcfc2a7197cdc3987044e3f415168fc5dc1f720c932eb1ef4f71a2067e08b"}, - {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9d153e7f1f9ba0b23ad1568b3b9e17301e23b042c23870f9ee0522dc5cc79e8"}, - {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:aef9cc3d9c7d63d924adac329c33835e0243b5052a6dfcbf7732a921c6e918ba"}, - {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4571f1beddff25f3e925eea34268422622963cd8dc395bb8778eb28418248e43"}, - {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:d48b8ee1d4068561ce8033d2c344cf5232cb29ee1a0206a7b828c79cbc5982b8"}, - {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:45183c96ddf61bf96d2684d9fbaf6f3564d86b34cb125761f9a0ef9e36c1d55b"}, - {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:75bdf08716edde767b09e76829db8c1e5ca9d8bb0a8d4bd94ae1eafe3dac5e15"}, - {file = "multidict-6.0.2-cp37-cp37m-win32.whl", hash = "sha256:a45e1135cb07086833ce969555df39149680e5471c04dfd6a915abd2fc3f6dbc"}, - {file = "multidict-6.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6f3cdef8a247d1eafa649085812f8a310e728bdf3900ff6c434eafb2d443b23a"}, - {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0327292e745a880459ef71be14e709aaea2f783f3537588fb4ed09b6c01bca60"}, - {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e875b6086e325bab7e680e4316d667fc0e5e174bb5611eb16b3ea121c8951b86"}, - {file = "multidict-6.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:feea820722e69451743a3d56ad74948b68bf456984d63c1a92e8347b7b88452d"}, - {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cc57c68cb9139c7cd6fc39f211b02198e69fb90ce4bc4a094cf5fe0d20fd8b0"}, - {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:497988d6b6ec6ed6f87030ec03280b696ca47dbf0648045e4e1d28b80346560d"}, - {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89171b2c769e03a953d5969b2f272efa931426355b6c0cb508022976a17fd376"}, - {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684133b1e1fe91eda8fa7447f137c9490a064c6b7f392aa857bba83a28cfb693"}, - {file = "multidict-6.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd9fc9c4849a07f3635ccffa895d57abce554b467d611a5009ba4f39b78a8849"}, - {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e07c8e79d6e6fd37b42f3250dba122053fddb319e84b55dd3a8d6446e1a7ee49"}, - {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4070613ea2227da2bfb2c35a6041e4371b0af6b0be57f424fe2318b42a748516"}, - {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:47fbeedbf94bed6547d3aa632075d804867a352d86688c04e606971595460227"}, - {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:5774d9218d77befa7b70d836004a768fb9aa4fdb53c97498f4d8d3f67bb9cfa9"}, - {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2957489cba47c2539a8eb7ab32ff49101439ccf78eab724c828c1a54ff3ff98d"}, - {file = "multidict-6.0.2-cp38-cp38-win32.whl", hash = "sha256:e5b20e9599ba74391ca0cfbd7b328fcc20976823ba19bc573983a25b32e92b57"}, - {file = "multidict-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:8004dca28e15b86d1b1372515f32eb6f814bdf6f00952699bdeb541691091f96"}, - {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2e4a0785b84fb59e43c18a015ffc575ba93f7d1dbd272b4cdad9f5134b8a006c"}, - {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6701bf8a5d03a43375909ac91b6980aea74b0f5402fbe9428fc3f6edf5d9677e"}, - {file = "multidict-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a007b1638e148c3cfb6bf0bdc4f82776cef0ac487191d093cdc316905e504071"}, - {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07a017cfa00c9890011628eab2503bee5872f27144936a52eaab449be5eaf032"}, - {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c207fff63adcdf5a485969131dc70e4b194327666b7e8a87a97fbc4fd80a53b2"}, - {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:373ba9d1d061c76462d74e7de1c0c8e267e9791ee8cfefcf6b0b2495762c370c"}, - {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfba7c6d5d7c9099ba21f84662b037a0ffd4a5e6b26ac07d19e423e6fdf965a9"}, - {file = "multidict-6.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19d9bad105dfb34eb539c97b132057a4e709919ec4dd883ece5838bcbf262b80"}, - {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:de989b195c3d636ba000ee4281cd03bb1234635b124bf4cd89eeee9ca8fcb09d"}, - {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7c40b7bbece294ae3a87c1bc2abff0ff9beef41d14188cda94ada7bcea99b0fb"}, - {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:d16cce709ebfadc91278a1c005e3c17dd5f71f5098bfae1035149785ea6e9c68"}, - {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:a2c34a93e1d2aa35fbf1485e5010337c72c6791407d03aa5f4eed920343dd360"}, - {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:feba80698173761cddd814fa22e88b0661e98cb810f9f986c54aa34d281e4937"}, - {file = "multidict-6.0.2-cp39-cp39-win32.whl", hash = "sha256:23b616fdc3c74c9fe01d76ce0d1ce872d2d396d8fa8e4899398ad64fb5aa214a"}, - {file = "multidict-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:4bae31803d708f6f15fd98be6a6ac0b6958fcf68fda3c77a048a4f9073704aae"}, - {file = "multidict-6.0.2.tar.gz", hash = "sha256:5ff3bd75f38e4c43f1f470f2df7a4d430b821c4ce22be384e1459cb57d6bb013"}, -] -mypy = [ - {file = "mypy-0.981-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4bc460e43b7785f78862dab78674e62ec3cd523485baecfdf81a555ed29ecfa0"}, - {file = "mypy-0.981-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:756fad8b263b3ba39e4e204ee53042671b660c36c9017412b43af210ddee7b08"}, - {file = "mypy-0.981-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a16a0145d6d7d00fbede2da3a3096dcc9ecea091adfa8da48fa6a7b75d35562d"}, - {file = "mypy-0.981-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce65f70b14a21fdac84c294cde75e6dbdabbcff22975335e20827b3b94bdbf49"}, - {file = "mypy-0.981-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6e35d764784b42c3e256848fb8ed1d4292c9fc0098413adb28d84974c095b279"}, - {file = "mypy-0.981-cp310-cp310-win_amd64.whl", hash = "sha256:e53773073c864d5f5cec7f3fc72fbbcef65410cde8cc18d4f7242dea60dac52e"}, - {file = "mypy-0.981-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6ee196b1d10b8b215e835f438e06965d7a480f6fe016eddbc285f13955cca659"}, - {file = "mypy-0.981-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ad21d4c9d3673726cf986ea1d0c9fb66905258709550ddf7944c8f885f208be"}, - {file = "mypy-0.981-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d1debb09043e1f5ee845fa1e96d180e89115b30e47c5d3ce53bc967bab53f62d"}, - {file = "mypy-0.981-cp37-cp37m-win_amd64.whl", hash = "sha256:9f362470a3480165c4c6151786b5379351b790d56952005be18bdbdd4c7ce0ae"}, - {file = "mypy-0.981-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c9e0efb95ed6ca1654951bd5ec2f3fa91b295d78bf6527e026529d4aaa1e0c30"}, - {file = "mypy-0.981-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e178eaffc3c5cd211a87965c8c0df6da91ed7d258b5fc72b8e047c3771317ddb"}, - {file = "mypy-0.981-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:06e1eac8d99bd404ed8dd34ca29673c4346e76dd8e612ea507763dccd7e13c7a"}, - {file = "mypy-0.981-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa38f82f53e1e7beb45557ff167c177802ba7b387ad017eab1663d567017c8ee"}, - {file = "mypy-0.981-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:64e1f6af81c003f85f0dfed52db632817dabb51b65c0318ffbf5ff51995bbb08"}, - {file = "mypy-0.981-cp38-cp38-win_amd64.whl", hash = "sha256:e1acf62a8c4f7c092462c738aa2c2489e275ed386320c10b2e9bff31f6f7e8d6"}, - {file = "mypy-0.981-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b6ede64e52257931315826fdbfc6ea878d89a965580d1a65638ef77cb551f56d"}, - {file = "mypy-0.981-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eb3978b191b9fa0488524bb4ffedf2c573340e8c2b4206fc191d44c7093abfb7"}, - {file = "mypy-0.981-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:77f8fcf7b4b3cc0c74fb33ae54a4cd00bb854d65645c48beccf65fa10b17882c"}, - {file = "mypy-0.981-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f64d2ce043a209a297df322eb4054dfbaa9de9e8738291706eaafda81ab2b362"}, - {file = "mypy-0.981-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2ee3dbc53d4df7e6e3b1c68ac6a971d3a4fb2852bf10a05fda228721dd44fae1"}, - {file = "mypy-0.981-cp39-cp39-win_amd64.whl", hash = "sha256:8e8e49aa9cc23aa4c926dc200ce32959d3501c4905147a66ce032f05cb5ecb92"}, - {file = "mypy-0.981-py3-none-any.whl", hash = "sha256:794f385653e2b749387a42afb1e14c2135e18daeb027e0d97162e4b7031210f8"}, - {file = "mypy-0.981.tar.gz", hash = "sha256:ad77c13037d3402fbeffda07d51e3f228ba078d1c7096a73759c9419ea031bf4"}, -] -mypy-extensions = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] -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"}, -] -pathspec = [ - {file = "pathspec-0.10.1-py3-none-any.whl", hash = "sha256:46846318467efc4556ccfd27816e004270a9eeeeb4d062ce5e6fc7a87c573f93"}, - {file = "pathspec-0.10.1.tar.gz", hash = "sha256:7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d"}, -] -platformdirs = [ - {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, - {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, -] -pluggy = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -pre-commit = [ - {file = "pre_commit-2.20.0-py2.py3-none-any.whl", hash = "sha256:51a5ba7c480ae8072ecdb6933df22d2f812dc897d5fe848778116129a681aac7"}, - {file = "pre_commit-2.20.0.tar.gz", hash = "sha256:a978dac7bc9ec0bcee55c18a277d553b0f419d259dadb4b9418ff2d00eb43959"}, -] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] -pycodestyle = [ - {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, - {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, -] -pydantic = [ - {file = "pydantic-1.10.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb6ad4489af1bac6955d38ebcb95079a836af31e4c4f74aba1ca05bb9f6027bd"}, - {file = "pydantic-1.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a1f5a63a6dfe19d719b1b6e6106561869d2efaca6167f84f5ab9347887d78b98"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:352aedb1d71b8b0736c6d56ad2bd34c6982720644b0624462059ab29bd6e5912"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19b3b9ccf97af2b7519c42032441a891a5e05c68368f40865a90eb88833c2559"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e9069e1b01525a96e6ff49e25876d90d5a563bc31c658289a8772ae186552236"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:355639d9afc76bcb9b0c3000ddcd08472ae75318a6eb67a15866b87e2efa168c"}, - {file = "pydantic-1.10.2-cp310-cp310-win_amd64.whl", hash = "sha256:ae544c47bec47a86bc7d350f965d8b15540e27e5aa4f55170ac6a75e5f73b644"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a4c805731c33a8db4b6ace45ce440c4ef5336e712508b4d9e1aafa617dc9907f"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d49f3db871575e0426b12e2f32fdb25e579dea16486a26e5a0474af87cb1ab0a"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37c90345ec7dd2f1bcef82ce49b6235b40f282b94d3eec47e801baf864d15525"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b5ba54d026c2bd2cb769d3468885f23f43710f651688e91f5fb1edcf0ee9283"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:05e00dbebbe810b33c7a7362f231893183bcc4251f3f2ff991c31d5c08240c42"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2d0567e60eb01bccda3a4df01df677adf6b437958d35c12a3ac3e0f078b0ee52"}, - {file = "pydantic-1.10.2-cp311-cp311-win_amd64.whl", hash = "sha256:c6f981882aea41e021f72779ce2a4e87267458cc4d39ea990729e21ef18f0f8c"}, - {file = "pydantic-1.10.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4aac8e7103bf598373208f6299fa9a5cfd1fc571f2d40bf1dd1955a63d6eeb5"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a7b66c3f499108b448f3f004801fcd7d7165fb4200acb03f1c2402da73ce4c"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bedf309630209e78582ffacda64a21f96f3ed2e51fbf3962d4d488e503420254"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9300fcbebf85f6339a02c6994b2eb3ff1b9c8c14f502058b5bf349d42447dcf5"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:216f3bcbf19c726b1cc22b099dd409aa371f55c08800bcea4c44c8f74b73478d"}, - {file = "pydantic-1.10.2-cp37-cp37m-win_amd64.whl", hash = "sha256:dd3f9a40c16daf323cf913593083698caee97df2804aa36c4b3175d5ac1b92a2"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b97890e56a694486f772d36efd2ba31612739bc6f3caeee50e9e7e3ebd2fdd13"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9cabf4a7f05a776e7793e72793cd92cc865ea0e83a819f9ae4ecccb1b8aa6116"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06094d18dd5e6f2bbf93efa54991c3240964bb663b87729ac340eb5014310624"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc78cc83110d2f275ec1970e7a831f4e371ee92405332ebfe9860a715f8336e1"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ee433e274268a4b0c8fde7ad9d58ecba12b069a033ecc4645bb6303c062d2e9"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7c2abc4393dea97a4ccbb4ec7d8658d4e22c4765b7b9b9445588f16c71ad9965"}, - {file = "pydantic-1.10.2-cp38-cp38-win_amd64.whl", hash = "sha256:0b959f4d8211fc964772b595ebb25f7652da3f22322c007b6fed26846a40685e"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c33602f93bfb67779f9c507e4d69451664524389546bacfe1bee13cae6dc7488"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5760e164b807a48a8f25f8aa1a6d857e6ce62e7ec83ea5d5c5a802eac81bad41"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6eb843dcc411b6a2237a694f5e1d649fc66c6064d02b204a7e9d194dff81eb4b"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b8795290deaae348c4eba0cebb196e1c6b98bdbe7f50b2d0d9a4a99716342fe"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e0bedafe4bc165ad0a56ac0bd7695df25c50f76961da29c050712596cf092d6d"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e05aed07fa02231dbf03d0adb1be1d79cabb09025dd45aa094aa8b4e7b9dcda"}, - {file = "pydantic-1.10.2-cp39-cp39-win_amd64.whl", hash = "sha256:c1ba1afb396148bbc70e9eaa8c06c1716fdddabaf86e7027c5988bae2a829ab6"}, - {file = "pydantic-1.10.2-py3-none-any.whl", hash = "sha256:1b6ee725bd6e83ec78b1aa32c5b1fa67a3a65badddde3976bca5fe4568f27709"}, - {file = "pydantic-1.10.2.tar.gz", hash = "sha256:91b8e218852ef6007c2b98cd861601c6a09f1aa32bbbb74fab5b1c33d4a1e410"}, -] -pyflakes = [ - {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, - {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, -] -Pygments = [ - {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, - {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, -] -pymdown-extensions = [ - {file = "pymdown_extensions-9.7-py3-none-any.whl", hash = "sha256:767d07d9dead0f52f5135545c01f4ed627f9a7918ee86c646d893e24c59db87d"}, - {file = "pymdown_extensions-9.7.tar.gz", hash = "sha256:651b0107bc9ee790aedea3673cb88832c0af27d2569cf45c2de06f1d65292e96"}, -] -pyparsing = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, -] -pytest = [ - {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"}, - {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"}, -] -pytest-aiohttp = [ - {file = "pytest-aiohttp-1.0.4.tar.gz", hash = "sha256:39ff3a0d15484c01d1436cbedad575c6eafbf0f57cdf76fb94994c97b5b8c5a4"}, - {file = "pytest_aiohttp-1.0.4-py3-none-any.whl", hash = "sha256:1d2dc3a304c2be1fd496c0c2fb6b31ab60cd9fc33984f761f951f8ea1eb4ca95"}, -] -pytest-asyncio = [ - {file = "pytest-asyncio-0.19.0.tar.gz", hash = "sha256:ac4ebf3b6207259750bc32f4c1d8fcd7e79739edbc67ad0c58dd150b1d072fed"}, - {file = "pytest_asyncio-0.19.0-py3-none-any.whl", hash = "sha256:7a97e37cfe1ed296e2e84941384bdd37c376453912d397ed39293e0916f521fa"}, -] -pytest-cov = [ - {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"}, - {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"}, -] -pytest-html = [ - {file = "pytest-html-3.2.0.tar.gz", hash = "sha256:c4e2f4bb0bffc437f51ad2174a8a3e71df81bbc2f6894604e604af18fbe687c3"}, - {file = "pytest_html-3.2.0-py3-none-any.whl", hash = "sha256:868c08564a68d8b2c26866f1e33178419bb35b1e127c33784a28622eb827f3f3"}, -] -pytest-lazy-fixture = [ - {file = "pytest-lazy-fixture-0.6.3.tar.gz", hash = "sha256:0e7d0c7f74ba33e6e80905e9bfd81f9d15ef9a790de97993e34213deb5ad10ac"}, - {file = "pytest_lazy_fixture-0.6.3-py3-none-any.whl", hash = "sha256:e0b379f38299ff27a653f03eaa69b08a6fd4484e46fd1c9907d984b9f9daeda6"}, -] -pytest-metadata = [ - {file = "pytest-metadata-2.0.2.tar.gz", hash = "sha256:fcd2f416f15be295943527b3c8ba16a44ae5a7141939c90c3dc5ce9d167cf2a5"}, - {file = "pytest_metadata-2.0.2-py3-none-any.whl", hash = "sha256:39261ee0086f17649b180baf2a8633e1922a4c4b6fcc28a2de7d8127a82541bf"}, -] -pytest-mock = [ - {file = "pytest-mock-3.10.0.tar.gz", hash = "sha256:fbbdb085ef7c252a326fd8cdcac0aa3b1333d8811f131bdcc701002e1be7ed4f"}, - {file = "pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, -] -pytest-mypy = [ - {file = "pytest-mypy-0.10.0.tar.gz", hash = "sha256:e74d632685f15a39c31c551a9d8cec4619e24bd396245a6335c5db0ec6d17b6f"}, - {file = "pytest_mypy-0.10.0-py3-none-any.whl", hash = "sha256:83843dce75a7ce055efb264ff40dad2ecf7abd4e7bd5e5eda015261d11616abb"}, -] -python-socks = [ - {file = "python-socks-2.0.3.tar.gz", hash = "sha256:e3a9ca8e554733862ce4d8ce1d10efb480fd3a3acdafd03393943ec00c98ba8a"}, - {file = "python_socks-2.0.3-py3-none-any.whl", hash = "sha256:950723f27d2cf401e193a9e0a0d45baab848341298f5b397d27fda0c4635e9a9"}, -] -pytz = [ - {file = "pytz-2022.5-py2.py3-none-any.whl", hash = "sha256:335ab46900b1465e714b4fda4963d87363264eb662aab5e65da039c25f1f5b22"}, - {file = "pytz-2022.5.tar.gz", hash = "sha256:c4d88f472f54d615e9cd582a5004d1e5f624854a6a27a6211591c251f22a6914"}, -] -PyYAML = [ - {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, - {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, - {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, - {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, - {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, - {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, - {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, - {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, - {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, - {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, - {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, - {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, - {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, - {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, - {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, - {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, - {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, - {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, -] -redis = [ - {file = "redis-4.3.4-py3-none-any.whl", hash = "sha256:a52d5694c9eb4292770084fa8c863f79367ca19884b329ab574d5cb2036b3e54"}, - {file = "redis-4.3.4.tar.gz", hash = "sha256:ddf27071df4adf3821c4f2ca59d67525c3a82e5f268bed97b813cb4fabf87880"}, -] -requests = [ - {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, - {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, -] -setuptools = [ - {file = "setuptools-65.5.0-py3-none-any.whl", hash = "sha256:f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356"}, - {file = "setuptools-65.5.0.tar.gz", hash = "sha256:512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -snowballstemmer = [ - {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, - {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, -] -soupsieve = [ - {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, - {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, -] -Sphinx = [ - {file = "Sphinx-5.3.0.tar.gz", hash = "sha256:51026de0a9ff9fc13c05d74913ad66047e104f56a129ff73e174eb5c3ee794b5"}, - {file = "sphinx-5.3.0-py3-none-any.whl", hash = "sha256:060ca5c9f7ba57a08a1219e547b269fadf125ae25b06b9fa7f66768efb652d6d"}, -] -sphinx-autobuild = [ - {file = "sphinx-autobuild-2021.3.14.tar.gz", hash = "sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05"}, - {file = "sphinx_autobuild-2021.3.14-py3-none-any.whl", hash = "sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac"}, -] -sphinx-basic-ng = [ - {file = "sphinx_basic_ng-1.0.0b1-py3-none-any.whl", hash = "sha256:ade597a3029c7865b24ad0eda88318766bcc2f9f4cef60df7e28126fde94db2a"}, - {file = "sphinx_basic_ng-1.0.0b1.tar.gz", hash = "sha256:89374bd3ccd9452a301786781e28c8718e99960f2d4f411845ea75fc7bb5a9b0"}, -] -sphinx-copybutton = [ - {file = "sphinx-copybutton-0.5.0.tar.gz", hash = "sha256:a0c059daadd03c27ba750da534a92a63e7a36a7736dcf684f26ee346199787f6"}, - {file = "sphinx_copybutton-0.5.0-py3-none-any.whl", hash = "sha256:9684dec7434bd73f0eea58dda93f9bb879d24bff2d8b187b1f2ec08dfe7b5f48"}, -] -sphinx-intl = [ - {file = "sphinx-intl-2.0.1.tar.gz", hash = "sha256:b25a6ec169347909e8d983eefe2d8adecb3edc2f27760db79b965c69950638b4"}, -] -sphinx-prompt = [ - {file = "sphinx_prompt-1.5.0-py3-none-any.whl", hash = "sha256:fa4e90d8088b5a996c76087d701fc7e31175f8b9dc4aab03a507e45051067162"}, -] -Sphinx-Substitution-Extensions = [ - {file = "Sphinx Substitution Extensions-2022.2.16.tar.gz", hash = "sha256:ff7d05bd00e8b2d7eb8a403b9f317d70411d4e9b6812bf91534a50df22190c75"}, - {file = "Sphinx_Substitution_Extensions-2022.2.16-py3-none-any.whl", hash = "sha256:5a8ca34dac3984486344e95c36e3ed4766d402a71bdee7390d600f153db9795b"}, -] -sphinxcontrib-applehelp = [ - {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, - {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, -] -sphinxcontrib-devhelp = [ - {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, - {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, -] -sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, - {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, -] -sphinxcontrib-jsmath = [ - {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, - {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, -] -sphinxcontrib-qthelp = [ - {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, - {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, -] -sphinxcontrib-serializinghtml = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, -] -sphinxcontrib-towncrier = [ - {file = "sphinxcontrib-towncrier-0.3.1a3.tar.gz", hash = "sha256:7d521a435c06b39d519ce0c9c1495a9e5f0e7db7fd243674ee4a16ac1ce1812e"}, - {file = "sphinxcontrib_towncrier-0.3.1a3-py3-none-any.whl", hash = "sha256:eedf44b0e31f0bc7cc1dc0f608f9e84fb8a7aa775f5b3c89ce17bca062f12048"}, -] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -tomli = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] -tornado = [ - {file = "tornado-6.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:20f638fd8cc85f3cbae3c732326e96addff0a15e22d80f049e00121651e82e72"}, - {file = "tornado-6.2-cp37-abi3-macosx_10_9_x86_64.whl", hash = "sha256:87dcafae3e884462f90c90ecc200defe5e580a7fbbb4365eda7c7c1eb809ebc9"}, - {file = "tornado-6.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba09ef14ca9893954244fd872798b4ccb2367c165946ce2dd7376aebdde8e3ac"}, - {file = "tornado-6.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8150f721c101abdef99073bf66d3903e292d851bee51910839831caba341a75"}, - {file = "tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3a2f5999215a3a06a4fc218026cd84c61b8b2b40ac5296a6db1f1451ef04c1e"}, - {file = "tornado-6.2-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:5f8c52d219d4995388119af7ccaa0bcec289535747620116a58d830e7c25d8a8"}, - {file = "tornado-6.2-cp37-abi3-musllinux_1_1_i686.whl", hash = "sha256:6fdfabffd8dfcb6cf887428849d30cf19a3ea34c2c248461e1f7d718ad30b66b"}, - {file = "tornado-6.2-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:1d54d13ab8414ed44de07efecb97d4ef7c39f7438cf5e976ccd356bebb1b5fca"}, - {file = "tornado-6.2-cp37-abi3-win32.whl", hash = "sha256:5c87076709343557ef8032934ce5f637dbb552efa7b21d08e89ae7619ed0eb23"}, - {file = "tornado-6.2-cp37-abi3-win_amd64.whl", hash = "sha256:e5f923aa6a47e133d1cf87d60700889d7eae68988704e20c75fb2d65677a8e4b"}, - {file = "tornado-6.2.tar.gz", hash = "sha256:9b630419bde84ec666bfd7ea0a4cb2a8a651c2d5cccdbdd1972a0c859dfc3c13"}, -] -towncrier = [ - {file = "towncrier-22.8.0-py2.py3-none-any.whl", hash = "sha256:3b780c3d966e1b26414830aec3d15000654b31e64e024f3e5fd128b4c6eb8f47"}, - {file = "towncrier-22.8.0.tar.gz", hash = "sha256:7d3839b033859b45fb55df82b74cfd702431933c0cc9f287a5a7ea3e05d042cb"}, -] -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"}, -] -uvloop = [ - {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ce9f61938d7155f79d3cb2ffa663147d4a76d16e08f65e2c66b77bd41b356718"}, - {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:68532f4349fd3900b839f588972b3392ee56042e440dd5873dfbbcd2cc67617c"}, - {file = "uvloop-0.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0949caf774b9fcefc7c5756bacbbbd3fc4c05a6b7eebc7c7ad6f825b23998d6d"}, - {file = "uvloop-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff3d00b70ce95adce264462c930fbaecb29718ba6563db354608f37e49e09024"}, - {file = "uvloop-0.17.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:a5abddb3558d3f0a78949c750644a67be31e47936042d4f6c888dd6f3c95f4aa"}, - {file = "uvloop-0.17.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8efcadc5a0003d3a6e887ccc1fb44dec25594f117a94e3127954c05cf144d811"}, - {file = "uvloop-0.17.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3378eb62c63bf336ae2070599e49089005771cc651c8769aaad72d1bd9385a7c"}, - {file = "uvloop-0.17.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6aafa5a78b9e62493539456f8b646f85abc7093dd997f4976bb105537cf2635e"}, - {file = "uvloop-0.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c686a47d57ca910a2572fddfe9912819880b8765e2f01dc0dd12a9bf8573e539"}, - {file = "uvloop-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:864e1197139d651a76c81757db5eb199db8866e13acb0dfe96e6fc5d1cf45fc4"}, - {file = "uvloop-0.17.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2a6149e1defac0faf505406259561bc14b034cdf1d4711a3ddcdfbaa8d825a05"}, - {file = "uvloop-0.17.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6708f30db9117f115eadc4f125c2a10c1a50d711461699a0cbfaa45b9a78e376"}, - {file = "uvloop-0.17.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:23609ca361a7fc587031429fa25ad2ed7242941adec948f9d10c045bfecab06b"}, - {file = "uvloop-0.17.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2deae0b0fb00a6af41fe60a675cec079615b01d68beb4cc7b722424406b126a8"}, - {file = "uvloop-0.17.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45cea33b208971e87a31c17622e4b440cac231766ec11e5d22c76fab3bf9df62"}, - {file = "uvloop-0.17.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9b09e0f0ac29eee0451d71798878eae5a4e6a91aa275e114037b27f7db72702d"}, - {file = "uvloop-0.17.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbbaf9da2ee98ee2531e0c780455f2841e4675ff580ecf93fe5c48fe733b5667"}, - {file = "uvloop-0.17.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a4aee22ece20958888eedbad20e4dbb03c37533e010fb824161b4f05e641f738"}, - {file = "uvloop-0.17.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:307958f9fc5c8bb01fad752d1345168c0abc5d62c1b72a4a8c6c06f042b45b20"}, - {file = "uvloop-0.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ebeeec6a6641d0adb2ea71dcfb76017602ee2bfd8213e3fcc18d8f699c5104f"}, - {file = "uvloop-0.17.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1436c8673c1563422213ac6907789ecb2b070f5939b9cbff9ef7113f2b531595"}, - {file = "uvloop-0.17.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8887d675a64cfc59f4ecd34382e5b4f0ef4ae1da37ed665adba0c2badf0d6578"}, - {file = "uvloop-0.17.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3db8de10ed684995a7f34a001f15b374c230f7655ae840964d51496e2f8a8474"}, - {file = "uvloop-0.17.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7d37dccc7ae63e61f7b96ee2e19c40f153ba6ce730d8ba4d3b4e9738c1dccc1b"}, - {file = "uvloop-0.17.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cbbe908fda687e39afd6ea2a2f14c2c3e43f2ca88e3a11964b297822358d0e6c"}, - {file = "uvloop-0.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d97672dc709fa4447ab83276f344a165075fd9f366a97b712bdd3fee05efae8"}, - {file = "uvloop-0.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1e507c9ee39c61bfddd79714e4f85900656db1aec4d40c6de55648e85c2799c"}, - {file = "uvloop-0.17.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c092a2c1e736086d59ac8e41f9c98f26bbf9b9222a76f21af9dfe949b99b2eb9"}, - {file = "uvloop-0.17.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:30babd84706115626ea78ea5dbc7dd8d0d01a2e9f9b306d24ca4ed5796c66ded"}, - {file = "uvloop-0.17.0.tar.gz", hash = "sha256:0ddf6baf9cf11a1a22c71487f39f15b2cf78eb5bde7e5b45fbb99e8a9d91b9e1"}, -] -virtualenv = [ - {file = "virtualenv-20.16.6-py3-none-any.whl", hash = "sha256:186ca84254abcbde98180fd17092f9628c5fe742273c02724972a1d8a2035108"}, - {file = "virtualenv-20.16.6.tar.gz", hash = "sha256:530b850b523c6449406dfba859d6345e48ef19b8439606c5d74d7d3c9e14d76e"}, -] -wrapt = [ - {file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c"}, - {file = "wrapt-1.14.1-cp310-cp310-win32.whl", hash = "sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8"}, - {file = "wrapt-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d"}, - {file = "wrapt-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7"}, - {file = "wrapt-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00"}, - {file = "wrapt-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569"}, - {file = "wrapt-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed"}, - {file = "wrapt-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471"}, - {file = "wrapt-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a"}, - {file = "wrapt-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853"}, - {file = "wrapt-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57"}, - {file = "wrapt-1.14.1-cp38-cp38-win32.whl", hash = "sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5"}, - {file = "wrapt-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe"}, - {file = "wrapt-1.14.1-cp39-cp39-win32.whl", hash = "sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5"}, - {file = "wrapt-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb"}, - {file = "wrapt-1.14.1.tar.gz", hash = "sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d"}, -] -yarl = [ - {file = "yarl-1.8.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:abc06b97407868ef38f3d172762f4069323de52f2b70d133d096a48d72215d28"}, - {file = "yarl-1.8.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:07b21e274de4c637f3e3b7104694e53260b5fc10d51fb3ec5fed1da8e0f754e3"}, - {file = "yarl-1.8.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9de955d98e02fab288c7718662afb33aab64212ecb368c5dc866d9a57bf48880"}, - {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ec362167e2c9fd178f82f252b6d97669d7245695dc057ee182118042026da40"}, - {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:20df6ff4089bc86e4a66e3b1380460f864df3dd9dccaf88d6b3385d24405893b"}, - {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5999c4662631cb798496535afbd837a102859568adc67d75d2045e31ec3ac497"}, - {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed19b74e81b10b592084a5ad1e70f845f0aacb57577018d31de064e71ffa267a"}, - {file = "yarl-1.8.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e4808f996ca39a6463f45182e2af2fae55e2560be586d447ce8016f389f626f"}, - {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2d800b9c2eaf0684c08be5f50e52bfa2aa920e7163c2ea43f4f431e829b4f0fd"}, - {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6628d750041550c5d9da50bb40b5cf28a2e63b9388bac10fedd4f19236ef4957"}, - {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:f5af52738e225fcc526ae64071b7e5342abe03f42e0e8918227b38c9aa711e28"}, - {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:76577f13333b4fe345c3704811ac7509b31499132ff0181f25ee26619de2c843"}, - {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0c03f456522d1ec815893d85fccb5def01ffaa74c1b16ff30f8aaa03eb21e453"}, - {file = "yarl-1.8.1-cp310-cp310-win32.whl", hash = "sha256:ea30a42dc94d42f2ba4d0f7c0ffb4f4f9baa1b23045910c0c32df9c9902cb272"}, - {file = "yarl-1.8.1-cp310-cp310-win_amd64.whl", hash = "sha256:9130ddf1ae9978abe63808b6b60a897e41fccb834408cde79522feb37fb72fb0"}, - {file = "yarl-1.8.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0ab5a138211c1c366404d912824bdcf5545ccba5b3ff52c42c4af4cbdc2c5035"}, - {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0fb2cb4204ddb456a8e32381f9a90000429489a25f64e817e6ff94879d432fc"}, - {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85cba594433915d5c9a0d14b24cfba0339f57a2fff203a5d4fd070e593307d0b"}, - {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ca7e596c55bd675432b11320b4eacc62310c2145d6801a1f8e9ad160685a231"}, - {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0f77539733e0ec2475ddcd4e26777d08996f8cd55d2aef82ec4d3896687abda"}, - {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29e256649f42771829974e742061c3501cc50cf16e63f91ed8d1bf98242e5507"}, - {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7fce6cbc6c170ede0221cc8c91b285f7f3c8b9fe28283b51885ff621bbe0f8ee"}, - {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:59ddd85a1214862ce7c7c66457f05543b6a275b70a65de366030d56159a979f0"}, - {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:12768232751689c1a89b0376a96a32bc7633c08da45ad985d0c49ede691f5c0d"}, - {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:b19255dde4b4f4c32e012038f2c169bb72e7f081552bea4641cab4d88bc409dd"}, - {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6c8148e0b52bf9535c40c48faebb00cb294ee577ca069d21bd5c48d302a83780"}, - {file = "yarl-1.8.1-cp37-cp37m-win32.whl", hash = "sha256:de839c3a1826a909fdbfe05f6fe2167c4ab033f1133757b5936efe2f84904c07"}, - {file = "yarl-1.8.1-cp37-cp37m-win_amd64.whl", hash = "sha256:dd032e8422a52e5a4860e062eb84ac94ea08861d334a4bcaf142a63ce8ad4802"}, - {file = "yarl-1.8.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:19cd801d6f983918a3f3a39f3a45b553c015c5aac92ccd1fac619bd74beece4a"}, - {file = "yarl-1.8.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6347f1a58e658b97b0a0d1ff7658a03cb79bdbda0331603bed24dd7054a6dea1"}, - {file = "yarl-1.8.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7c0da7e44d0c9108d8b98469338705e07f4bb7dab96dbd8fa4e91b337db42548"}, - {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5587bba41399854703212b87071c6d8638fa6e61656385875f8c6dff92b2e461"}, - {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31a9a04ecccd6b03e2b0e12e82131f1488dea5555a13a4d32f064e22a6003cfe"}, - {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205904cffd69ae972a1707a1bd3ea7cded594b1d773a0ce66714edf17833cdae"}, - {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea513a25976d21733bff523e0ca836ef1679630ef4ad22d46987d04b372d57fc"}, - {file = "yarl-1.8.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0b51530877d3ad7a8d47b2fff0c8df3b8f3b8deddf057379ba50b13df2a5eae"}, - {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d2b8f245dad9e331540c350285910b20dd913dc86d4ee410c11d48523c4fd546"}, - {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ab2a60d57ca88e1d4ca34a10e9fb4ab2ac5ad315543351de3a612bbb0560bead"}, - {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:449c957ffc6bc2309e1fbe67ab7d2c1efca89d3f4912baeb8ead207bb3cc1cd4"}, - {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a165442348c211b5dea67c0206fc61366212d7082ba8118c8c5c1c853ea4d82e"}, - {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b3ded839a5c5608eec8b6f9ae9a62cb22cd037ea97c627f38ae0841a48f09eae"}, - {file = "yarl-1.8.1-cp38-cp38-win32.whl", hash = "sha256:c1445a0c562ed561d06d8cbc5c8916c6008a31c60bc3655cdd2de1d3bf5174a0"}, - {file = "yarl-1.8.1-cp38-cp38-win_amd64.whl", hash = "sha256:56c11efb0a89700987d05597b08a1efcd78d74c52febe530126785e1b1a285f4"}, - {file = "yarl-1.8.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e80ed5a9939ceb6fda42811542f31c8602be336b1fb977bccb012e83da7e4936"}, - {file = "yarl-1.8.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6afb336e23a793cd3b6476c30f030a0d4c7539cd81649683b5e0c1b0ab0bf350"}, - {file = "yarl-1.8.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4c322cbaa4ed78a8aac89b2174a6df398faf50e5fc12c4c191c40c59d5e28357"}, - {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fae37373155f5ef9b403ab48af5136ae9851151f7aacd9926251ab26b953118b"}, - {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5395da939ffa959974577eff2cbfc24b004a2fb6c346918f39966a5786874e54"}, - {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:076eede537ab978b605f41db79a56cad2e7efeea2aa6e0fa8f05a26c24a034fb"}, - {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d1a50e461615747dd93c099f297c1994d472b0f4d2db8a64e55b1edf704ec1c"}, - {file = "yarl-1.8.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7de89c8456525650ffa2bb56a3eee6af891e98f498babd43ae307bd42dca98f6"}, - {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a88510731cd8d4befaba5fbd734a7dd914de5ab8132a5b3dde0bbd6c9476c64"}, - {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2d93a049d29df172f48bcb09acf9226318e712ce67374f893b460b42cc1380ae"}, - {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:21ac44b763e0eec15746a3d440f5e09ad2ecc8b5f6dcd3ea8cb4773d6d4703e3"}, - {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d0272228fabe78ce00a3365ffffd6f643f57a91043e119c289aaba202f4095b0"}, - {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:99449cd5366fe4608e7226c6cae80873296dfa0cde45d9b498fefa1de315a09e"}, - {file = "yarl-1.8.1-cp39-cp39-win32.whl", hash = "sha256:8b0af1cf36b93cee99a31a545fe91d08223e64390c5ecc5e94c39511832a4bb6"}, - {file = "yarl-1.8.1-cp39-cp39-win_amd64.whl", hash = "sha256:de49d77e968de6626ba7ef4472323f9d2e5a56c1d85b7c0e2a190b2173d3b9be"}, - {file = "yarl-1.8.1.tar.gz", hash = "sha256:af887845b8c2e060eb5605ff72b6f2dd2aab7a761379373fd89d314f4752abbf"}, -] -zipp = [ - {file = "zipp-3.10.0-py3-none-any.whl", hash = "sha256:4fcb6f278987a6605757302a6e40e896257570d11c51628968ccb2a47e80c6c1"}, - {file = "zipp-3.10.0.tar.gz", hash = "sha256:7a7262fd930bd3e36c50b9a64897aec3fafff3dfdeec9623ae22b40e93f99bb8"}, -] diff --git a/pyproject.toml b/pyproject.toml index 06cc85a6..9d7dae75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,19 @@ -[tool.poetry] +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] name = "aiogram" -version = "3.0.0-beta.7" -description = "Modern and fully asynchronous framework for Telegram Bot API" +description = 'Modern and fully asynchronous framework for Telegram Bot API' +readme = "README.rst" +requires-python = ">=3.8" +license = "MIT" authors = [ - "Alex Root Junior ", + { name = "Alex Root Junior", email = "jroot.junior@gmail.com" }, ] maintainers = [ - "Alex Root Junior ", + { name = "Alex Root Junior", email = "jroot.junior@gmail.com" }, ] -license = "MIT" -readme = "README.rst" -homepage = "https://aiogram.dev/" -documentation = "https://docs.aiogram.dev/" -repository = "https://github.com/aiogram/aiogram/" keywords = [ "telegram", "bot", @@ -38,77 +39,245 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Communications :: Chat", ] -packages = [ - { include = "aiogram" } +dependencies = [ + "magic-filter~=1.0.9", + "aiohttp~=3.8.3", + "pydantic~=1.10.4", + "aiofiles~=22.1.0", + "certifi>=2022.9.24", +] +dynamic = ["version"] + +[tool.hatch.version] +path = "aiogram/__init__.py" + +[project.optional-dependencies] +fast = [ + "uvloop>=0.17.0; (sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy'", +] +redis = [ + "redis~=4.3.4", +] +proxy = [ + "aiohttp-socks~=0.7.1", +] +i18n = [ + "Babel~=2.9.1", +] +test = [ + "pytest~=7.1.3", + "pytest-html~=3.1.1", + "pytest-asyncio~=0.19.0", + "pytest-lazy-fixture~=0.6.3", + "pytest-mock~=3.9.0", + "pytest-mypy~=0.10.0", + "pytest-cov~=4.0.0", + "pytest-aiohttp~=1.0.4", + "aresponses~=2.1.6", +] +docs = [ + "Sphinx~=5.2.3", + "sphinx-intl~=2.0.1", + "sphinx-autobuild~=2021.3.14", + "sphinx-copybutton~=0.5.0", + "furo~=2022.9.29", + "sphinx-prompt~=1.5.0", + "Sphinx-Substitution-Extensions~=2022.2.16", + "towncrier~=22.8.0", + "pygments~=2.4", + "pymdown-extensions~=9.6", + "markdown-include~=0.7.0", + "Pygments~=2.13.0", + "sphinxcontrib-towncrier~=0.3.1a3", +] +dev = [ + "black~=22.8", + "isort~=5.11", + "ruff~=0.0.215", + "mypy~=0.981", + "toml~=0.10.2", + "pre-commit~=2.20.0", + "packaging~=21.3", + "typing-extensions~=4.3.0", ] +[project.urls] +Homepage = "https://aiogram.dev/" +Documentation = "https://docs.aiogram.dev/" +Repository = "https://github.com/aiogram/aiogram/" -[tool.poetry.dependencies] -python = "^3.8" -magic-filter = "^1.0.9" -aiohttp = "^3.8.3" -pydantic = "^1.10.2" -aiofiles = "^22.1.0" -# Fast -uvloop = { version = "^0.17.0", markers = "sys_platform == 'darwin' or sys_platform == 'linux'", optional = true } -# i18n -Babel = { version = "^2.9.1", optional = true } -# Proxy -aiohttp-socks = { version = "^0.7.1", optional = true } -# Redis -redis = { version = "^4.3.4", optional = true } -certifi = "^2022.9.24" +[tool.hatch.envs.default] +features = [ + "dev", + "fast", + "redis", + "proxy", + "i18n", +] +post-install-commands = [ + "pre-commit install", +] + +[tool.hatch.envs.default.scripts] +reformat = [ + "black aiogram tests", + "isort aiogram tests", +] +lint = "ruff aiogram" + +[tool.hatch.envs.docs] +features = [ + "fast", + "redis", + "proxy", + "i18n", + "docs", +] +[tool.hatch.envs.docs.scripts] +serve = "sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.rst docs/ docs/_build/ {args}" + +[tool.hatch.envs.dev] +python = "3.10" +features = [ + "dev", + "fast", + "redis", + "proxy", + "i18n", + "test", +] +extra-dependencies = [ + "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.9" +] + +[tool.hatch.envs.test] +features = [ + "fast", + "redis", + "proxy", + "i18n", + "test", +] + +[tool.hatch.envs.test.scripts] +cov = [ + "pytest --cov-config pyproject.toml --cov=aiogram --html=reports/py{matrix:python}/tests/index.html {args}", + "coverage html -d reports/py{matrix:python}/coverage", +] +cov-redis = [ + "pytest --cov-config pyproject.toml --cov=aiogram --html=reports/py{matrix:python}/tests/index.html --redis {env:REDIS_DNS:'redis://localhost:6379'} {args}", + "coverage html -d reports/py{matrix:python}/coverage", +] +view-cov = "google-chrome-stable reports/py{matrix:python}/coverage/index.html" -[tool.poetry.group.docs.dependencies] -Sphinx = "^5.2.3" -sphinx-intl = "^2.0.1" -sphinx-autobuild = "^2021.3.14" -sphinx-copybutton = "^0.5.0" -furo = "^2022.9.29" -sphinx-prompt = "^1.5.0" -Sphinx-Substitution-Extensions = "^2022.2.16" -towncrier = "^22.8.0" -pygments = "^2.4" -pymdown-extensions = "^9.6" -markdown-include = "^0.7.0" -Pygments = "^2.13.0" -sphinxcontrib-towncrier = "^0.3.1a3" +[[tool.hatch.envs.test.matrix]] +python = ["38", "39", "310", "311"] + +[tool.ruff] +line-length = 99 +select = [ + # "C", # TODO: mccabe - code complecity + "C4", + "E", + "F", + "T10", + "T20", + "Q", + "RET", +] +ignore = [ + "F401" +] +src = ["aiogram", "tests"] +exclude = [ + ".git", + "build", + "dist", + "venv", + ".venv", + "docs", + "tests", + "dev", + "scripts", + "*.egg-info", +] +target-version = "py310" + +[tool.ruff.isort] +known-first-party = [ + "aiogram", + "finite_state_machine", + "handlers", + "routes", +] + +[tool.ruff.per-file-ignores] +"aiogram/client/bot.py" = ["E501"] +"aiogram/types/*" = ["E501"] +"aiogram/methods/*" = ["E501"] +"aiogram/enums/*" = ["E501"] -[tool.poetry.group.test.dependencies] -pytest = "^7.1.3" -pytest-html = "^3.1.1" -pytest-asyncio = "^0.19.0" -pytest-lazy-fixture = "^0.6.3" -pytest-mock = "^3.9.0" -pytest-mypy = "^0.10.0" -pytest-cov = "^4.0.0" -pytest-aiohttp = "^1.0.4" -aresponses = "^2.1.6" +[tool.pytest.ini_options] +asyncio_mode = "auto" +testpaths = [ + "tests", +] +[tool.coverage.run] +branch = false +parallel = true +omit = [ + "aiogram/__about__.py", +] -[tool.poetry.group.dev.dependencies] -black = "^22.8.0" -isort = "^5.10.1" -flake8 = "^5.0.4" -mypy = "^0.981" -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.8", python = "3.10" } +[tool.coverage.report] +exclude_lines = [ + "if __name__ == .__main__.:", + "pragma: no cover", + "if TYPE_CHECKING:", + "@abstractmethod", + "@overload", +] +[tool.mypy] +plugins = "pydantic.mypy" +python_version = "3.8" +show_error_codes = true +show_error_context = true +pretty = true +ignore_missing_imports = false +warn_unused_configs = true +disallow_subclassing_any = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_untyped_defs = true +disallow_incomplete_defs = true +check_untyped_defs = true +disallow_untyped_decorators = true +no_implicit_optional = true +warn_redundant_casts = true +warn_unused_ignores = true +warn_return_any = true +follow_imports_for_stubs = true +namespace_packages = true +show_absolute_path = true -[tool.poetry.extras] -fast = ["uvloop"] -redis = ["redis"] -proxy = ["aiohttp-socks"] -i18n = ["Babel"] +[[tool.mypy.overrides]] +module = [ + "aiofiles", + "async_lru", + "uvloop", + "redis.*", + "babel.*", +] +ignore_missing_imports = true +disallow_untyped_defs = true [tool.black] line-length = 99 -target-version = ['py38', 'py39', 'py310'] +target-version = ['py38', 'py39', 'py310', 'py311'] exclude = ''' ( \.eggs @@ -122,21 +291,7 @@ exclude = ''' ''' [tool.isort] -multi_line_output = 3 -include_trailing_comma = true -force_grid_wrap = 0 -use_parentheses = true -line_length = 99 -known_third_party = [ - "aiofiles", - "aiohttp", - "aiohttp_socks", - "aresponses", - "packaging", - "pkg_resources", - "pydantic", - "pytest" -] +profile = "black" [tool.towncrier] package = "aiogram" @@ -172,7 +327,3 @@ showcontent = true directory = "misc" name = "Misc" showcontent = true - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index b56f128e..00000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -asyncio_mode = auto -testpaths = - tests diff --git a/requirements/base.txt b/requirements/base.txt deleted file mode 100644 index 3bd59183..00000000 --- a/requirements/base.txt +++ /dev/null @@ -1,16 +0,0 @@ -aiofiles==22.1.0 ; python_version >= "3.8" and python_version < "4.0" -aiohttp==3.8.3 ; python_version >= "3.8" and python_version < "4.0" -aiosignal==1.2.0 ; python_version >= "3.8" and python_version < "4.0" -async-timeout==4.0.2 ; python_version >= "3.8" and python_version < "4.0" -attrs==22.1.0 ; python_version >= "3.8" and python_version < "4.0" -babel==2.10.3 ; python_version >= "3.8" and python_version < "4.0" -certifi==2022.9.24 ; python_version >= "3.8" and python_version < "4.0" -charset-normalizer==2.1.1 ; python_version >= "3.8" and python_version < "4.0" -frozenlist==1.3.1 ; python_version >= "3.8" and python_version < "4.0" -idna==3.4 ; python_version >= "3.8" and python_version < "4.0" -magic-filter==1.0.9 ; python_version >= "3.8" and python_version < "4.0" -multidict==6.0.2 ; python_version >= "3.8" and python_version < "4.0" -pydantic==1.10.2 ; python_version >= "3.8" and python_version < "4.0" -pytz==2022.5 ; python_version >= "3.8" and python_version < "4.0" -typing-extensions==4.4.0 ; python_version >= "3.8" and python_version < "4.0" -yarl==1.8.1 ; python_version >= "3.8" and python_version < "4.0" diff --git a/requirements/docs.txt b/requirements/docs.txt deleted file mode 100644 index 9cb54aec..00000000 --- a/requirements/docs.txt +++ /dev/null @@ -1,65 +0,0 @@ -aiofiles==22.1.0 ; python_version >= "3.8" and python_version < "4.0" -aiohttp-socks==0.7.1 ; python_version >= "3.8" and python_version < "4.0" -aiohttp==3.8.3 ; python_version >= "3.8" and python_version < "4.0" -aiosignal==1.2.0 ; python_version >= "3.8" and python_version < "4.0" -alabaster==0.7.12 ; python_version >= "3.8" and python_version < "4.0" -async-timeout==4.0.2 ; python_version >= "3.8" and python_version < "4.0" -attrs==22.1.0 ; python_version >= "3.8" and python_version < "4.0" -babel==2.10.3 ; python_version >= "3.8" and python_version < "4.0" -beautifulsoup4==4.11.1 ; python_version >= "3.8" and python_version < "4.0" -certifi==2022.9.24 ; python_version >= "3.8" and python_version < "4.0" -charset-normalizer==2.1.1 ; python_version >= "3.8" and python_version < "4.0" -click-default-group==1.2.2 ; python_version >= "3.8" and python_version < "4.0" -click==8.1.3 ; python_version >= "3.8" and python_version < "4.0" -colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" -deprecated==1.2.13 ; python_version >= "3.8" and python_version < "4.0" -docutils==0.19 ; python_version >= "3.8" and python_version < "4.0" -frozenlist==1.3.1 ; python_version >= "3.8" and python_version < "4.0" -furo==2022.9.29 ; python_version >= "3.8" and python_version < "4.0" -idna==3.4 ; python_version >= "3.8" and python_version < "4.0" -imagesize==1.4.1 ; python_version >= "3.8" and python_version < "4.0" -importlib-metadata==5.0.0 ; python_version >= "3.8" and python_version < "3.10" -incremental==22.10.0 ; python_version >= "3.8" and python_version < "4.0" -jinja2==3.1.2 ; python_version >= "3.8" and python_version < "4.0" -livereload==2.6.3 ; python_version >= "3.8" and python_version < "4.0" -magic-filter==1.0.9 ; python_version >= "3.8" and python_version < "4.0" -markdown-include==0.7.0 ; python_version >= "3.8" and python_version < "4.0" -markdown==3.4.1 ; python_version >= "3.8" and python_version < "4.0" -markupsafe==2.1.1 ; python_version >= "3.8" and python_version < "4.0" -multidict==6.0.2 ; python_version >= "3.8" and python_version < "4.0" -packaging==21.3 ; python_version >= "3.8" and python_version < "4.0" -pydantic==1.10.2 ; python_version >= "3.8" and python_version < "4.0" -pygments==2.13.0 ; python_version >= "3.8" and python_version < "4.0" -pymdown-extensions==9.7 ; python_version >= "3.8" and python_version < "4.0" -pyparsing==3.0.9 ; python_version >= "3.8" and python_version < "4.0" -python-socks[asyncio]==2.0.3 ; python_version >= "3.8" and python_version < "4.0" -pytz==2022.5 ; python_version >= "3.8" and python_version < "4.0" -redis==4.3.4 ; python_version >= "3.8" and python_version < "4.0" -requests==2.28.1 ; python_version >= "3.8" and python_version < "4" -setuptools==65.5.0 ; python_version >= "3.8" and python_version < "4.0" -six==1.16.0 ; python_version >= "3.8" and python_version < "4.0" -snowballstemmer==2.2.0 ; python_version >= "3.8" and python_version < "4.0" -soupsieve==2.3.2.post1 ; python_version >= "3.8" and python_version < "4.0" -sphinx-autobuild==2021.3.14 ; python_version >= "3.8" and python_version < "4.0" -sphinx-basic-ng==1.0.0b1 ; python_version >= "3.8" and python_version < "4.0" -sphinx-copybutton==0.5.0 ; python_version >= "3.8" and python_version < "4.0" -sphinx-intl==2.0.1 ; python_version >= "3.8" and python_version < "4.0" -sphinx-prompt==1.5.0 ; python_version >= "3.8" and python_version < "4.0" -sphinx-substitution-extensions==2022.2.16 ; python_version >= "3.8" and python_version < "4.0" -sphinx==5.3.0 ; python_version >= "3.8" and python_version < "4.0" -sphinxcontrib-applehelp==1.0.2 ; python_version >= "3.8" and python_version < "4.0" -sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.8" and python_version < "4.0" -sphinxcontrib-htmlhelp==2.0.0 ; python_version >= "3.8" and python_version < "4.0" -sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.8" and python_version < "4.0" -sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.8" and python_version < "4.0" -sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.8" and python_version < "4.0" -sphinxcontrib-towncrier==0.3.1a3 ; python_version >= "3.8" and python_version < "4.0" -tomli==2.0.1 ; python_version >= "3.8" and python_version < "4.0" -tornado==6.2 ; python_version >= "3.8" and python_version < "4.0" -towncrier==22.8.0 ; python_version >= "3.8" and python_version < "4.0" -typing-extensions==4.4.0 ; python_version >= "3.8" and python_version < "4.0" -urllib3==1.26.12 ; python_version >= "3.8" and python_version < "4" -uvloop==0.17.0 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "darwin" or python_version >= "3.8" and python_version < "4.0" and sys_platform == "linux" -wrapt==1.14.1 ; python_version >= "3.8" and python_version < "4.0" -yarl==1.8.1 ; python_version >= "3.8" and python_version < "4.0" -zipp==3.10.0 ; python_version >= "3.8" and python_version < "3.10" diff --git a/tests/conftest.py b/tests/conftest.py index e1de346c..b7b7774a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,11 @@ from _pytest.config import UsageError from redis.asyncio.connection import parse_url as parse_redis_url from aiogram import Bot, Dispatcher -from aiogram.fsm.storage.memory import DisabledEventIsolation, MemoryStorage, SimpleEventIsolation +from aiogram.fsm.storage.memory import ( + DisabledEventIsolation, + MemoryStorage, + SimpleEventIsolation, +) from aiogram.fsm.storage.redis import RedisEventIsolation, RedisStorage from tests.mocked_bot import MockedBot diff --git a/tests/test_api/test_methods/test_answer_inline_query.py b/tests/test_api/test_methods/test_answer_inline_query.py index ba7cc938..c2d11b43 100644 --- a/tests/test_api/test_methods/test_answer_inline_query.py +++ b/tests/test_api/test_methods/test_answer_inline_query.py @@ -1,6 +1,10 @@ from aiogram import Bot from aiogram.methods import AnswerInlineQuery, Request -from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent +from aiogram.types import ( + InlineQueryResult, + InlineQueryResultPhoto, + InputTextMessageContent, +) from tests.mocked_bot import MockedBot diff --git a/tests/test_api/test_types/test_shipping_query.py b/tests/test_api/test_types/test_shipping_query.py index 82db8880..76668b15 100644 --- a/tests/test_api/test_types/test_shipping_query.py +++ b/tests/test_api/test_types/test_shipping_query.py @@ -1,5 +1,11 @@ from aiogram.methods import AnswerShippingQuery -from aiogram.types import LabeledPrice, ShippingAddress, ShippingOption, ShippingQuery, User +from aiogram.types import ( + LabeledPrice, + ShippingAddress, + ShippingOption, + ShippingQuery, + User, +) class TestInlineQuery: diff --git a/tests/test_filters/test_text.py b/tests/test_filters/test_text.py index 5d84081a..de823097 100644 --- a/tests/test_filters/test_text.py +++ b/tests/test_filters/test_text.py @@ -5,7 +5,15 @@ from typing import Sequence, Type import pytest from aiogram.filters import Text -from aiogram.types import CallbackQuery, Chat, InlineQuery, Message, Poll, PollOption, User +from aiogram.types import ( + CallbackQuery, + Chat, + InlineQuery, + Message, + Poll, + PollOption, + User, +) class TestText: diff --git a/tests/test_fsm/storage/test_redis.py b/tests/test_fsm/storage/test_redis.py index 8d320e27..6e42eb48 100644 --- a/tests/test_fsm/storage/test_redis.py +++ b/tests/test_fsm/storage/test_redis.py @@ -1,7 +1,11 @@ import pytest from aiogram.fsm.storage.base import DEFAULT_DESTINY, StorageKey -from aiogram.fsm.storage.redis import DefaultKeyBuilder, RedisEventIsolation, RedisStorage +from aiogram.fsm.storage.redis import ( + DefaultKeyBuilder, + RedisEventIsolation, + RedisStorage, +) PREFIX = "test" BOT_ID = 42 diff --git a/tests/test_utils/test_i18n.py b/tests/test_utils/test_i18n.py index d31dac9e..434d2e02 100644 --- a/tests/test_utils/test_i18n.py +++ b/tests/test_utils/test_i18n.py @@ -7,7 +7,12 @@ from aiogram.fsm.context import FSMContext from aiogram.fsm.storage.base import StorageKey from aiogram.fsm.storage.memory import MemoryStorage from aiogram.types import Update, User -from aiogram.utils.i18n import ConstI18nMiddleware, FSMI18nMiddleware, I18n, SimpleI18nMiddleware +from aiogram.utils.i18n import ( + ConstI18nMiddleware, + FSMI18nMiddleware, + I18n, + SimpleI18nMiddleware, +) from aiogram.utils.i18n.context import get_i18n, gettext, lazy_gettext from tests.conftest import DATA_DIR from tests.mocked_bot import MockedBot @@ -51,24 +56,24 @@ class TestI18nCore: @pytest.mark.parametrize( "locale,case,result", [ - [None, dict(singular="test"), "test"], - [None, dict(singular="test", locale="uk"), "тест"], - ["en", dict(singular="test", locale="uk"), "тест"], - ["uk", dict(singular="test", locale="uk"), "тест"], - ["uk", dict(singular="test"), "тест"], - ["it", dict(singular="test"), "test"], - [None, dict(singular="test", n=2), "test"], - [None, dict(singular="test", n=2, locale="uk"), "тест"], - ["en", dict(singular="test", n=2, locale="uk"), "тест"], - ["uk", dict(singular="test", n=2, locale="uk"), "тест"], - ["uk", dict(singular="test", n=2), "тест"], - ["it", dict(singular="test", n=2), "test"], - [None, dict(singular="test", plural="test2", n=2), "test2"], - [None, dict(singular="test", plural="test2", n=2, locale="uk"), "test2"], - ["en", dict(singular="test", plural="test2", n=2, locale="uk"), "test2"], - ["uk", dict(singular="test", plural="test2", n=2, locale="uk"), "test2"], - ["uk", dict(singular="test", plural="test2", n=2), "test2"], - ["it", dict(singular="test", plural="test2", n=2), "test2"], + [None, {"singular": "test"}, "test"], + [None, {"singular": "test", "locale": "uk"}, "тест"], + ["en", {"singular": "test", "locale": "uk"}, "тест"], + ["uk", {"singular": "test", "locale": "uk"}, "тест"], + ["uk", {"singular": "test"}, "тест"], + ["it", {"singular": "test"}, "test"], + [None, {"singular": "test", "n": 2}, "test"], + [None, {"singular": "test", "n": 2, "locale": "uk"}, "тест"], + ["en", {"singular": "test", "n": 2, "locale": "uk"}, "тест"], + ["uk", {"singular": "test", "n": 2, "locale": "uk"}, "тест"], + ["uk", {"singular": "test", "n": 2}, "тест"], + ["it", {"singular": "test", "n": 2}, "test"], + [None, {"singular": "test", "plural": "test2", "n": 2}, "test2"], + [None, {"singular": "test", "plural": "test2", "n": 2, "locale": "uk"}, "test2"], + ["en", {"singular": "test", "plural": "test2", "n": 2, "locale": "uk"}, "test2"], + ["uk", {"singular": "test", "plural": "test2", "n": 2, "locale": "uk"}, "test2"], + ["uk", {"singular": "test", "plural": "test2", "n": 2}, "test2"], + ["it", {"singular": "test", "plural": "test2", "n": 2}, "test2"], ], ) def test_gettext(self, i18n: I18n, locale: str, case: Dict[str, Any], result: str): @@ -110,8 +115,17 @@ class TestSimpleI18nMiddleware: middleware = SimpleI18nMiddleware(i18n=i18n) middleware.setup(router=dp) - assert middleware not in dp.update.outer_middleware assert middleware in dp.message.outer_middleware + assert middleware in dp.callback_query.outer_middleware + + async def test_setup_exclude(self, i18n: I18n): + dp = Dispatcher() + middleware = SimpleI18nMiddleware(i18n=i18n) + middleware.setup(router=dp, exclude={"message"}) + + assert middleware not in dp.update.outer_middleware + assert middleware not in dp.message.outer_middleware + assert middleware in dp.callback_query.outer_middleware async def test_get_unknown_locale(self, i18n: I18n): dp = Dispatcher() @@ -131,6 +145,19 @@ class TestSimpleI18nMiddleware: ) assert locale == i18n.default_locale + async def test_custom_keys(self, i18n: I18n): + async def handler(event, data): + return data + + middleware = SimpleI18nMiddleware( + i18n=i18n, i18n_key="translator", middleware_key="middleware" + ) + context: dict[str, Any] = await middleware(handler, None, {}) + assert "translator" in context + assert context["translator"] == i18n + assert "middleware" in context + assert context["middleware"] == middleware + class TestConstI18nMiddleware: async def test_middleware(self, i18n: I18n): @@ -138,13 +165,17 @@ class TestConstI18nMiddleware: result = await middleware( next_call, Update(update_id=42), - {"event_from_user": User(id=42, is_bot=False, language_code="it", first_name="Test")}, + { + "event_from_user": User( + id=42, is_bot=False, language_code="it", first_name="Test" + ), + }, ) assert result == "тест" class TestFSMI18nMiddleware: - async def test_middleware(self, i18n: I18n, bot: MockedBot): + async def test_middleware(self, i18n: I18n, bot: MockedBot, extra): middleware = FSMI18nMiddleware(i18n=i18n) storage = MemoryStorage() state = FSMContext( @@ -160,3 +191,16 @@ class TestFSMI18nMiddleware: assert i18n.current_locale == "uk" result = await middleware(next_call, Update(update_id=42), data) assert result == "тест" + + async def test_without_state(self, i18n: I18n, bot: MockedBot, extra): + middleware = FSMI18nMiddleware(i18n=i18n) + data = { + "event_from_user": User(id=42, is_bot=False, language_code="it", first_name="Test"), + } + result = await middleware(next_call, Update(update_id=42), data) + assert i18n.current_locale == "en" + assert result == "test" + + assert i18n.current_locale == "en" + result = await middleware(next_call, Update(update_id=42), data) + assert i18n.current_locale == "en" diff --git a/tests/test_utils/test_keyboard.py b/tests/test_utils/test_keyboard.py index 3e8f3c7e..65bb97e4 100644 --- a/tests/test_utils/test_keyboard.py +++ b/tests/test_utils/test_keyboard.py @@ -7,7 +7,11 @@ from aiogram.types import ( KeyboardButton, ReplyKeyboardMarkup, ) -from aiogram.utils.keyboard import InlineKeyboardBuilder, KeyboardBuilder, ReplyKeyboardBuilder +from aiogram.utils.keyboard import ( + InlineKeyboardBuilder, + KeyboardBuilder, + ReplyKeyboardBuilder, +) class MyCallback(CallbackData, prefix="test"): diff --git a/tests/test_utils/test_text_decorations.py b/tests/test_utils/test_text_decorations.py index f19e2ae5..01fbabb6 100644 --- a/tests/test_utils/test_text_decorations.py +++ b/tests/test_utils/test_text_decorations.py @@ -3,7 +3,11 @@ from typing import List, Optional import pytest from aiogram.types import MessageEntity, User -from aiogram.utils.text_decorations import TextDecoration, html_decoration, markdown_decoration +from aiogram.utils.text_decorations import ( + TextDecoration, + html_decoration, + markdown_decoration, +) class TestTextDecoration: From fad45c66aa7833eab8c60d87cb2567c4012de655 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Thu, 12 Jan 2023 11:55:43 +0200 Subject: [PATCH 13/42] Update .readthedocs.yml 3.10 was missing at ReadTheDocs --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 56287c32..41b7a452 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,7 +1,7 @@ version: 2 python: - version: "3.10" + version: "3.8" install: - method: pip path: . From 3428924d63903ad4b4d3ca9986d4b97d0a4c2242 Mon Sep 17 00:00:00 2001 From: Alex <103587954+Shaonis@users.noreply.github.com> Date: Sat, 4 Feb 2023 19:52:36 +0200 Subject: [PATCH 14/42] ignore_case fix for aiogram.filters.command.Command() (#1107) * ignore_case fix * Create 1106.bugfix.rst * better fix, added tests * Update 1106.bugfix.rst * fix, attempt to satisfy the linter * not on purpose, single quotes in tests --- CHANGES/1106.bugfix.rst | 1 + aiogram/filters/command.py | 9 ++++++++- tests/test_filters/test_command.py | 24 +++++++++++++++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 CHANGES/1106.bugfix.rst diff --git a/CHANGES/1106.bugfix.rst b/CHANGES/1106.bugfix.rst new file mode 100644 index 00000000..c3b7154e --- /dev/null +++ b/CHANGES/1106.bugfix.rst @@ -0,0 +1 @@ +Bug fix, which made ignore_case parameter not work in aiogram.filters.command.Command diff --git a/aiogram/filters/command.py b/aiogram/filters/command.py index b590ba67..13997073 100644 --- a/aiogram/filters/command.py +++ b/aiogram/filters/command.py @@ -87,6 +87,8 @@ class Command(Filter): "Command filter only supports str, re.Pattern, BotCommand object" " or their Iterable" ) + if ignore_case and isinstance(command, str): + command = command.casefold() items.append(command) if not items: @@ -164,7 +166,12 @@ class Command(Filter): result = allowed_command.match(command.command) if result: return replace(command, regexp_match=result) - elif command.command == allowed_command: # String + + command_name = command.command + if self.ignore_case: + command_name = command_name.casefold() + + if command_name == allowed_command: # String return command raise CommandException("Command did not match pattern") diff --git a/tests/test_filters/test_command.py b/tests/test_filters/test_command.py index 1bb7d0a4..ec79098a 100644 --- a/tests/test_filters/test_command.py +++ b/tests/test_filters/test_command.py @@ -35,6 +35,23 @@ class TestCommandFilter: assert cmd.commands[0] == "start" # assert cmd == Command(commands=["start"]) + @pytest.mark.parametrize( + "commands,checklist", + [ + [("Test1", "tEst2", "teSt3"), ("test1", "test2", "test3")], + [("12TeSt", "3t4Est", "5TE6sT"), ("12test", "3t4est", "5te6st")], + [[BotCommand(command="Test", description="Test1")], ("test",)], + [[BotCommand(command="tEsT", description="Test2")], ("test",)], + [(re.compile(r"test(\d+)"), "TeSt"), (re.compile(r"test(\d+)"), "test")], + ], + ) + def test_init_casefold(self, commands, checklist): + command = Command(*commands, ignore_case=True) + assert command.commands == checklist + + command = Command(*commands, ignore_case=False) + assert command.commands != checklist + @pytest.mark.parametrize( "text,command,result", [ @@ -72,10 +89,15 @@ class TestCommandFilter: ["/start test", CommandStart(deep_link=True), True], ["/start test", CommandStart(deep_link=True, deep_link_encoded=True), False], ["/start dGVzdA", CommandStart(deep_link=True, deep_link_encoded=True), True], + ["/TeSt", Command("test", ignore_case=True), True], + ["/TeSt", Command("TeSt", ignore_case=True), True], + ["/test", Command("TeSt", ignore_case=True), True], + ["/TeSt", Command("test", ignore_case=False), False], + ["/test", Command("TeSt", ignore_case=False), False], + ["/TeSt", Command("TeSt", ignore_case=False), True], ], ) async def test_parse_command(self, bot: MockedBot, text: str, result: bool, command: Command): - # TODO: test ignore case # TODO: test ignore mention message = Message( From e59d4652bfe71a764e517c083fd1f58e7a2b64f2 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 4 Feb 2023 19:53:32 +0200 Subject: [PATCH 15/42] Added full support of Bot API 6.5 (#1112) * Added full support of Bot API 6.5 * Shut up, linters (Fixed errors) * Oops. Added lost files. * Fixed tests * Added changes description * Update description from docs * Fixed anchors * Update Butcher * Added danger zone to changelog * Type --- .butcher/methods/getChatMember/entity.json | 6 +- .../methods/promoteChatMember/entity.json | 6 +- .../methods/restrictChatMember/entity.json | 8 + .../methods/setChatPermissions/entity.json | 8 + .butcher/schema/schema.json | 442 +++++++++++++++--- .../types/ChatAdministratorRights/entity.json | 6 +- .butcher/types/ChatJoinRequest/entity.json | 8 + .../types/ChatMemberAdministrator/entity.json | 6 +- .../types/ChatMemberRestricted/entity.json | 120 +++-- .butcher/types/ChatPermissions/entity.json | 72 ++- .butcher/types/ChatShared/entity.json | 35 ++ .butcher/types/KeyboardButton/entity.json | 22 +- .../KeyboardButtonRequestChat/entity.json | 83 ++++ .../KeyboardButtonRequestUser/entity.json | 43 ++ .butcher/types/Message/entity.json | 16 + .butcher/types/UserShared/entity.json | 35 ++ CHANGES/1112.misc.rst | 6 + aiogram/__init__.py | 5 +- aiogram/client/bot.py | 212 ++++++++- aiogram/enums/content_type.py | 2 + aiogram/methods/get_chat_member.py | 2 +- aiogram/methods/promote_chat_member.py | 2 +- aiogram/methods/restrict_chat_member.py | 2 + aiogram/methods/set_chat_permissions.py | 4 +- aiogram/types/__init__.py | 8 + aiogram/types/chat.py | 10 +- aiogram/types/chat_administrator_rights.py | 2 +- aiogram/types/chat_join_request.py | 2 + aiogram/types/chat_member.py | 18 +- aiogram/types/chat_member_administrator.py | 2 +- aiogram/types/chat_member_restricted.py | 30 +- aiogram/types/chat_permissions.py | 22 +- aiogram/types/chat_shared.py | 14 + aiogram/types/keyboard_button.py | 10 +- aiogram/types/keyboard_button_request_chat.py | 33 ++ aiogram/types/keyboard_button_request_user.py | 18 + aiogram/types/message.py | 6 + aiogram/types/user_shared.py | 14 + docs/api/types/chat_shared.rst | 9 + docs/api/types/index.rst | 4 + .../types/keyboard_button_request_chat.rst | 9 + .../types/keyboard_button_request_user.rst | 9 + docs/api/types/user_shared.rst | 9 + pyproject.toml | 2 +- .../test_types/test_chat_join_request.py | 2 + tests/test_dispatcher/test_dispatcher.py | 6 +- .../test_filters/test_chat_member_updated.py | 12 +- 47 files changed, 1218 insertions(+), 184 deletions(-) create mode 100644 .butcher/types/ChatShared/entity.json create mode 100644 .butcher/types/KeyboardButtonRequestChat/entity.json create mode 100644 .butcher/types/KeyboardButtonRequestUser/entity.json create mode 100644 .butcher/types/UserShared/entity.json create mode 100644 CHANGES/1112.misc.rst create mode 100644 aiogram/types/chat_shared.py create mode 100644 aiogram/types/keyboard_button_request_chat.py create mode 100644 aiogram/types/keyboard_button_request_user.py create mode 100644 aiogram/types/user_shared.py create mode 100644 docs/api/types/chat_shared.rst create mode 100644 docs/api/types/keyboard_button_request_chat.rst create mode 100644 docs/api/types/keyboard_button_request_user.rst create mode 100644 docs/api/types/user_shared.rst diff --git a/.butcher/methods/getChatMember/entity.json b/.butcher/methods/getChatMember/entity.json index 57a4e1c2..767abf3e 100644 --- a/.butcher/methods/getChatMember/entity.json +++ b/.butcher/methods/getChatMember/entity.json @@ -9,9 +9,9 @@ "object": { "anchor": "getchatmember", "name": "getChatMember", - "description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.", - "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", - "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "description": "Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json index 4b3aa338..c02e98de 100644 --- a/.butcher/methods/promoteChatMember/entity.json +++ b/.butcher/methods/promoteChatMember/entity.json @@ -88,9 +88,9 @@ { "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", + "description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 they have 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 they have promoted, directly or indirectly (promoted by administrators that were appointed by him)\n", "name": "can_promote_members" }, { diff --git a/.butcher/methods/restrictChatMember/entity.json b/.butcher/methods/restrictChatMember/entity.json index 063d8b43..c6594507 100644 --- a/.butcher/methods/restrictChatMember/entity.json +++ b/.butcher/methods/restrictChatMember/entity.json @@ -37,6 +37,14 @@ "rst_description": "A JSON-serialized object for new user permissions\n", "name": "permissions" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "html_description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "rst_description": "Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.\n", + "name": "use_independent_chat_permissions" + }, { "type": "Integer", "required": false, diff --git a/.butcher/methods/setChatPermissions/entity.json b/.butcher/methods/setChatPermissions/entity.json index 12f871d9..dd14ad8c 100644 --- a/.butcher/methods/setChatPermissions/entity.json +++ b/.butcher/methods/setChatPermissions/entity.json @@ -28,6 +28,14 @@ "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "html_description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "rst_description": "Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.\n", + "name": "use_independent_chat_permissions" } ], "category": "methods" diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index 1594155f..32dbfdac 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "6.4", - "release_date": "2022-12-30" + "version": "6.5", + "release_date": "2023-02-03" }, "items": [ { @@ -1125,6 +1125,22 @@ "name": "successful_payment", "required": false }, + { + "type": "UserShared", + "description": "Service message: a user was shared with the bot", + "html_description": "Optional. Service message: a user was shared with the bot", + "rst_description": "*Optional*. Service message: a user was shared with the bot\n", + "name": "user_shared", + "required": false + }, + { + "type": "ChatShared", + "description": "Service message: a chat was shared with the bot", + "html_description": "Optional. Service message: a chat was shared with the bot", + "rst_description": "*Optional*. Service message: a chat was shared with the bot\n", + "name": "chat_shared", + "required": false + }, { "type": "String", "description": "The domain name of the website on which the user has logged in.", @@ -2350,6 +2366,58 @@ "annotations": [], "category": "types" }, + { + "anchor": "usershared", + "name": "UserShared", + "description": "This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.", + "html_description": "

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.

", + "rst_description": "This object contains information about the user whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Integer", + "description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.", + "html_description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.", + "rst_description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.\n", + "name": "user_id", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "chatshared", + "name": "ChatShared", + "description": "This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.", + "html_description": "

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.

", + "rst_description": "This object contains information about the chat whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Integer", + "description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.", + "html_description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.", + "rst_description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.\n", + "name": "chat_id", + "required": true + } + ], + "category": "types" + }, { "anchor": "writeaccessallowed", "name": "WriteAccessAllowed", @@ -2569,9 +2637,9 @@ { "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*.", + "description": "This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_user, request_chat, 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.\nNote: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. 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 the button text. The optional fields web_app, request_user, request_chat, 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.
\nNote: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. 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 the button text. The optional fields *web_app*, *request_user*, *request_chat*, *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*.\n\n**Note:** *request_user* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.", "annotations": [ { "type": "String", @@ -2581,6 +2649,22 @@ "name": "text", "required": true }, + { + "type": "KeyboardButtonRequestUser", + "description": "If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.", + "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only.", + "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.\n", + "name": "request_user", + "required": false + }, + { + "type": "KeyboardButtonRequestChat", + "description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.", + "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.", + "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n", + "name": "request_chat", + "required": false + }, { "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.", @@ -2616,6 +2700,114 @@ ], "category": "types" }, + { + "anchor": "keyboardbuttonrequestuser", + "name": "KeyboardButtonRequestUser", + "description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.", + "html_description": "

This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.

", + "rst_description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message", + "rst_description": "Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.user_shared.UserShared` object. Must be unique within the message\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.\n", + "name": "user_is_bot", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a premium user, pass :code:`False` to request a non-premium user. If not specified, no additional restrictions are applied.\n", + "name": "user_is_premium", + "required": false + } + ], + "category": "types" + }, + { + "anchor": "keyboardbuttonrequestchat", + "name": "KeyboardButtonRequestChat", + "description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.", + "html_description": "

This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.

", + "rst_description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "rst_description": "Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.chat_shared.ChatShared` object. Must be unique within the message\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "html_description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "rst_description": "Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.\n", + "name": "chat_is_channel", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a forum supergroup, pass :code:`False` to request a non-forum chat. If not specified, no additional restrictions are applied.\n", + "name": "chat_is_forum", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a supergroup or a channel with a username, pass :code:`False` to request a chat without a username. If not specified, no additional restrictions are applied.\n", + "name": "chat_has_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.\n", + "name": "chat_is_created", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.", + "html_description": "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of *bot_administrator_rights*. If not specified, no additional restrictions are applied.\n", + "name": "user_administrator_rights", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.", + "html_description": "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied.\n", + "name": "bot_administrator_rights", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.\n", + "name": "bot_is_member", + "required": false + } + ], + "category": "types" + }, { "anchor": "keyboardbuttonpolltype", "name": "KeyboardButtonPollType", @@ -3075,9 +3267,9 @@ }, { "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", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 they have 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 they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", "name": "can_promote_members", "required": true }, @@ -3256,9 +3448,9 @@ }, { "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", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 they have 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 they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", "name": "can_promote_members", "required": true }, @@ -3378,6 +3570,86 @@ "name": "is_member", "required": true }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "html_description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues\n", + "name": "can_send_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios", + "html_description": "True, if the user is allowed to send audios", + "rst_description": ":code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send documents", + "html_description": "True, if the user is allowed to send documents", + "rst_description": ":code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "True, if the user is allowed to send photos", + "rst_description": ":code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "True, if the user is allowed to send videos", + "rst_description": ":code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "True, if the user is allowed to send video notes", + "rst_description": ":code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "True, if the user is allowed to send voice notes", + "rst_description": ":code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "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": "Boolean", "description": "True, if the user is allowed to change the chat title, photo and other settings", @@ -3410,46 +3682,6 @@ "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", @@ -3602,6 +3834,14 @@ "name": "from", "required": true }, + { + "type": "Integer", + "description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.", + "html_description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.", + "rst_description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.\n", + "name": "user_chat_id", + "required": true + }, { "type": "Integer", "description": "Date the request was sent in Unix time", @@ -3638,41 +3878,81 @@ "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", + "description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "html_description": "Optional. True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, 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", + "description": "True, if the user is allowed to send audios", + "html_description": "Optional. True, if the user is allowed to send audios", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", "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", + "description": "True, if the user is allowed to send documents", + "html_description": "Optional. True, if the user is allowed to send documents", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "Optional. True, if the user is allowed to send photos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "Optional. True, if the user is allowed to send videos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "Optional. True, if the user is allowed to send video notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "Optional. True, if the user is allowed to send voice notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send polls", + "html_description": "Optional. True, if the user is allowed to send polls", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\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", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\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", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "Optional. True, if the user is allowed to add web page previews to their messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages\n", "name": "can_add_web_page_previews", "required": false }, @@ -6584,6 +6864,14 @@ "rst_description": "A JSON-serialized object for new user permissions\n", "name": "permissions" }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "html_description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "rst_description": "Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.\n", + "name": "use_independent_chat_permissions" + }, { "type": "Integer", "required": false, @@ -6677,9 +6965,9 @@ { "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", + "description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 they have 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 they have promoted, directly or indirectly (promoted by administrators that were appointed by him)\n", "name": "can_promote_members" }, { @@ -6825,6 +7113,14 @@ "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" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "html_description": "Pass True if chat permissions are set independently. Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.", + "rst_description": "Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.\n", + "name": "use_independent_chat_permissions" } ], "category": "methods" @@ -7282,9 +7578,9 @@ { "anchor": "getchatmember", "name": "getChatMember", - "description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.", - "html_description": "

Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a ChatMember object on success.

", - "rst_description": "Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", + "description": "Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success.", + "html_description": "

Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success.

", + "rst_description": "Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success.", "annotations": [ { "type": "Integer or String", diff --git a/.butcher/types/ChatAdministratorRights/entity.json b/.butcher/types/ChatAdministratorRights/entity.json index b4374b93..5fa75a33 100644 --- a/.butcher/types/ChatAdministratorRights/entity.json +++ b/.butcher/types/ChatAdministratorRights/entity.json @@ -55,9 +55,9 @@ }, { "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", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 they have 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 they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", "name": "can_promote_members", "required": true }, diff --git a/.butcher/types/ChatJoinRequest/entity.json b/.butcher/types/ChatJoinRequest/entity.json index 172bd5ab..9731c368 100644 --- a/.butcher/types/ChatJoinRequest/entity.json +++ b/.butcher/types/ChatJoinRequest/entity.json @@ -29,6 +29,14 @@ "name": "from", "required": true }, + { + "type": "Integer", + "description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.", + "html_description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.", + "rst_description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.\n", + "name": "user_chat_id", + "required": true + }, { "type": "Integer", "description": "Date the request was sent in Unix time", diff --git a/.butcher/types/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json index b6e6bd2e..dc8d03ae 100644 --- a/.butcher/types/ChatMemberAdministrator/entity.json +++ b/.butcher/types/ChatMemberAdministrator/entity.json @@ -79,9 +79,9 @@ }, { "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", + "description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 they have 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 they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n", "name": "can_promote_members", "required": true }, diff --git a/.butcher/types/ChatMemberRestricted/entity.json b/.butcher/types/ChatMemberRestricted/entity.json index f582df2f..b1eabbb5 100644 --- a/.butcher/types/ChatMemberRestricted/entity.json +++ b/.butcher/types/ChatMemberRestricted/entity.json @@ -37,6 +37,86 @@ "name": "is_member", "required": true }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "html_description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues\n", + "name": "can_send_messages", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send audios", + "html_description": "True, if the user is allowed to send audios", + "rst_description": ":code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send documents", + "html_description": "True, if the user is allowed to send documents", + "rst_description": ":code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "True, if the user is allowed to send photos", + "rst_description": ":code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "True, if the user is allowed to send videos", + "rst_description": ":code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "True, if the user is allowed to send video notes", + "rst_description": ":code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": true + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "True, if the user is allowed to send voice notes", + "rst_description": ":code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "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": "Boolean", "description": "True, if the user is allowed to change the chat title, photo and other settings", @@ -69,46 +149,6 @@ "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", diff --git a/.butcher/types/ChatPermissions/entity.json b/.butcher/types/ChatPermissions/entity.json index 0d7d2548..fee1d989 100644 --- a/.butcher/types/ChatPermissions/entity.json +++ b/.butcher/types/ChatPermissions/entity.json @@ -15,41 +15,81 @@ "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", + "description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "html_description": "Optional. True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, 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", + "description": "True, if the user is allowed to send audios", + "html_description": "Optional. True, if the user is allowed to send audios", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios\n", + "name": "can_send_audios", "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", + "description": "True, if the user is allowed to send documents", + "html_description": "Optional. True, if the user is allowed to send documents", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send documents\n", + "name": "can_send_documents", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send photos", + "html_description": "Optional. True, if the user is allowed to send photos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send photos\n", + "name": "can_send_photos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send videos", + "html_description": "Optional. True, if the user is allowed to send videos", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send videos\n", + "name": "can_send_videos", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send video notes", + "html_description": "Optional. True, if the user is allowed to send video notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send video notes\n", + "name": "can_send_video_notes", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send voice notes", + "html_description": "Optional. True, if the user is allowed to send voice notes", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send voice notes\n", + "name": "can_send_voice_notes", + "required": false + }, + { + "type": "Boolean", + "description": "True, if the user is allowed to send polls", + "html_description": "Optional. True, if the user is allowed to send polls", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\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", + "description": "True, if the user is allowed to send animations, games, stickers and use inline bots", + "html_description": "Optional. True, if the user is allowed to send animations, games, stickers and use inline bots", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\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", + "description": "True, if the user is allowed to add web page previews to their messages", + "html_description": "Optional. True, if the user is allowed to add web page previews to their messages", + "rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages\n", "name": "can_add_web_page_previews", "required": false }, diff --git a/.butcher/types/ChatShared/entity.json b/.butcher/types/ChatShared/entity.json new file mode 100644 index 00000000..6d343b9f --- /dev/null +++ b/.butcher/types/ChatShared/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "chatshared", + "name": "ChatShared", + "description": "This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.", + "html_description": "

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.

", + "rst_description": "This object contains information about the chat whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Integer", + "description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.", + "html_description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.", + "rst_description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.\n", + "name": "chat_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButton/entity.json b/.butcher/types/KeyboardButton/entity.json index 2ecfaca1..06009b90 100644 --- a/.butcher/types/KeyboardButton/entity.json +++ b/.butcher/types/KeyboardButton/entity.json @@ -9,9 +9,9 @@ "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*.", + "description": "This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_user, request_chat, 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.\nNote: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. 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 the button text. The optional fields web_app, request_user, request_chat, 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.
\nNote: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. 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 the button text. The optional fields *web_app*, *request_user*, *request_chat*, *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*.\n\n**Note:** *request_user* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.", "annotations": [ { "type": "String", @@ -21,6 +21,22 @@ "name": "text", "required": true }, + { + "type": "KeyboardButtonRequestUser", + "description": "If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.", + "html_description": "Optional. If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only.", + "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.\n", + "name": "request_user", + "required": false + }, + { + "type": "KeyboardButtonRequestChat", + "description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.", + "html_description": "Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.", + "rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n", + "name": "request_chat", + "required": false + }, { "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.", diff --git a/.butcher/types/KeyboardButtonRequestChat/entity.json b/.butcher/types/KeyboardButtonRequestChat/entity.json new file mode 100644 index 00000000..570fa963 --- /dev/null +++ b/.butcher/types/KeyboardButtonRequestChat/entity.json @@ -0,0 +1,83 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonrequestchat", + "name": "KeyboardButtonRequestChat", + "description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.", + "html_description": "

This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.

", + "rst_description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message", + "rst_description": "Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.chat_shared.ChatShared` object. Must be unique within the message\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "html_description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.", + "rst_description": "Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.\n", + "name": "chat_is_channel", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a forum supergroup, pass :code:`False` to request a non-forum chat. If not specified, no additional restrictions are applied.\n", + "name": "chat_is_forum", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a supergroup or a channel with a username, pass :code:`False` to request a chat without a username. If not specified, no additional restrictions are applied.\n", + "name": "chat_has_username", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.\n", + "name": "chat_is_created", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.", + "html_description": "Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of *bot_administrator_rights*. If not specified, no additional restrictions are applied.\n", + "name": "user_administrator_rights", + "required": false + }, + { + "type": "ChatAdministratorRights", + "description": "A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.", + "html_description": "Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied.\n", + "name": "bot_administrator_rights", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.\n", + "name": "bot_is_member", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/KeyboardButtonRequestUser/entity.json b/.butcher/types/KeyboardButtonRequestUser/entity.json new file mode 100644 index 00000000..ae6be60f --- /dev/null +++ b/.butcher/types/KeyboardButtonRequestUser/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "keyboardbuttonrequestuser", + "name": "KeyboardButtonRequestUser", + "description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.", + "html_description": "

This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.

", + "rst_description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.", + "annotations": [ + { + "type": "Integer", + "description": "Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message", + "html_description": "Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message", + "rst_description": "Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.user_shared.UserShared` object. Must be unique within the message\n", + "name": "request_id", + "required": true + }, + { + "type": "Boolean", + "description": "Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.\n", + "name": "user_is_bot", + "required": false + }, + { + "type": "Boolean", + "description": "Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.", + "html_description": "Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.", + "rst_description": "*Optional*. Pass :code:`True` to request a premium user, pass :code:`False` to request a non-premium user. If not specified, no additional restrictions are applied.\n", + "name": "user_is_premium", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json index 4613ecb7..0bf6c146 100644 --- a/.butcher/types/Message/entity.json +++ b/.butcher/types/Message/entity.json @@ -437,6 +437,22 @@ "name": "successful_payment", "required": false }, + { + "type": "UserShared", + "description": "Service message: a user was shared with the bot", + "html_description": "Optional. Service message: a user was shared with the bot", + "rst_description": "*Optional*. Service message: a user was shared with the bot\n", + "name": "user_shared", + "required": false + }, + { + "type": "ChatShared", + "description": "Service message: a chat was shared with the bot", + "html_description": "Optional. Service message: a chat was shared with the bot", + "rst_description": "*Optional*. Service message: a chat was shared with the bot\n", + "name": "chat_shared", + "required": false + }, { "type": "String", "description": "The domain name of the website on which the user has logged in.", diff --git a/.butcher/types/UserShared/entity.json b/.butcher/types/UserShared/entity.json new file mode 100644 index 00000000..71f5392e --- /dev/null +++ b/.butcher/types/UserShared/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "usershared", + "name": "UserShared", + "description": "This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.", + "html_description": "

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.

", + "rst_description": "This object contains information about the user whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.", + "annotations": [ + { + "type": "Integer", + "description": "Identifier of the request", + "html_description": "Identifier of the request", + "rst_description": "Identifier of the request\n", + "name": "request_id", + "required": true + }, + { + "type": "Integer", + "description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.", + "html_description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.", + "rst_description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.\n", + "name": "user_id", + "required": true + } + ], + "category": "types" + } +} diff --git a/CHANGES/1112.misc.rst b/CHANGES/1112.misc.rst new file mode 100644 index 00000000..ad78adc3 --- /dev/null +++ b/CHANGES/1112.misc.rst @@ -0,0 +1,6 @@ +Added full support of `Bot API 6.5 `_ + +.. danger:: + + Note that :obj:`aiogram.types.chat_permissions.ChatPermissions` is updated without + backward compatibility, so now this object has no :code:`can_send_media_messages` attribute diff --git a/aiogram/__init__.py b/aiogram/__init__.py index 2cf3c391..3e6f69e3 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -1,9 +1,8 @@ from contextlib import suppress from aiogram.dispatcher.flags import FlagGenerator -from . import methods -from . import types -from . import enums + +from . import enums, methods, types from .client import session from .client.bot import Bot from .dispatcher.dispatcher import Dispatcher diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index aa2e6aec..fc1198e3 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -401,6 +401,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -437,6 +439,8 @@ class Bot(ContextInstanceMixin["Bot"]): 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*. @@ -471,6 +475,8 @@ class Bot(ContextInstanceMixin["Bot"]): 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. @@ -503,6 +509,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. @@ -528,6 +536,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. @@ -553,6 +563,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -574,6 +586,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -597,6 +611,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. @@ -622,6 +638,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -641,6 +659,8 @@ 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: Requires no parameters. """ @@ -657,6 +677,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -690,6 +712,8 @@ 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* @@ -734,6 +758,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -763,6 +789,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F) @@ -806,6 +834,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. + 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. @@ -870,6 +900,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -905,6 +937,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -925,6 +959,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :code:`True` on success. @@ -943,6 +979,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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: Returns :code:`True` on success. @@ -962,6 +1000,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1001,6 +1041,8 @@ class Bot(ContextInstanceMixin["Bot"]): 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 @@ -1022,6 +1064,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1042,6 +1086,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :code:`True` on success. @@ -1060,6 +1106,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. + Source: https://core.telegram.org/bots/api#deletewebhook + :param drop_pending_updates: Pass :code:`True` to drop all pending updates :param request_timeout: Request timeout :return: Returns :code:`True` on success. @@ -1083,6 +1131,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1114,6 +1164,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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, 0-128 characters. If not specified or empty, the current name of the topic will be kept @@ -1144,6 +1196,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1182,6 +1236,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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`) @@ -1220,6 +1276,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1249,6 +1307,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1280,6 +1340,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1314,6 +1376,8 @@ class Bot(ContextInstanceMixin["Bot"]): 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: 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. @@ -1337,6 +1401,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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* @@ -1365,6 +1431,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.chat.Chat` object on success. @@ -1392,6 +1460,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.chat_member.ChatMember` objects. @@ -1416,7 +1486,9 @@ class Bot(ContextInstanceMixin["Bot"]): ChatMemberBanned, ]: """ - Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the 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 @@ -1438,6 +1510,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. @@ -1456,6 +1530,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.menu_button.MenuButton` on success. @@ -1474,6 +1550,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.sticker.Sticker` objects. @@ -1493,6 +1571,8 @@ class Bot(ContextInstanceMixin["Bot"]): 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: You should save the file's MIME type and name (if available) when the File object is received. @@ -1510,6 +1590,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.sticker.Sticker` objects. """ @@ -1530,6 +1612,8 @@ class Bot(ContextInstanceMixin["Bot"]): 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 @@ -1553,6 +1637,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.user.User` object. """ @@ -1569,6 +1655,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1589,6 +1677,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. @@ -1607,6 +1697,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :class:`aiogram.types.sticker_set.StickerSet` object is returned. @@ -1634,6 +1726,8 @@ class Bot(ContextInstanceMixin["Bot"]): **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. @@ -1660,6 +1754,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. @@ -1681,6 +1777,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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: If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. """ @@ -1696,6 +1794,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :code:`True` on success. @@ -1713,6 +1813,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 + :param request_timeout: Request timeout :return: Requires no parameters. """ @@ -1730,6 +1832,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. @@ -1765,6 +1869,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1774,7 +1880,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 @@ -1810,6 +1916,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1827,15 +1935,19 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id: Union[int, str], user_id: int, permissions: ChatPermissions, + use_independent_chat_permissions: Optional[bool] = None, 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 use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. :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. @@ -1845,6 +1957,7 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id=chat_id, user_id=user_id, permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, until_date=until_date, ) return await self(call, request_timeout=request_timeout) @@ -1858,6 +1971,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1895,6 +2010,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -1960,6 +2077,8 @@ 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 @@ -2012,6 +2131,8 @@ class Bot(ContextInstanceMixin["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 message_thread_id: Unique identifier for the target message thread; supergroups only @@ -2046,6 +2167,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2093,6 +2216,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 '🎲' @@ -2139,6 +2264,8 @@ 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 @@ -2188,6 +2315,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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#sendgame + :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 @@ -2247,6 +2376,8 @@ 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 @@ -2333,6 +2464,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2381,6 +2514,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2423,6 +2558,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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#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 @@ -2474,6 +2611,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 + :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 @@ -2534,6 +2673,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2597,6 +2738,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only @@ -2645,6 +2788,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to send information about a venue. 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 @@ -2709,6 +2854,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2771,6 +2918,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2822,6 +2971,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2864,6 +3015,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2887,6 +3040,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2910,6 +3065,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2926,13 +3083,17 @@ class Bot(ContextInstanceMixin["Bot"]): self, chat_id: Union[int, str], permissions: ChatPermissions, + use_independent_chat_permissions: Optional[bool] = None, 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 use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -2940,6 +3101,7 @@ class Bot(ContextInstanceMixin["Bot"]): call = SetChatPermissions( chat_id=chat_id, permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, ) return await self(call, request_timeout=request_timeout) @@ -2952,6 +3114,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2973,6 +3137,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -2994,6 +3160,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3020,6 +3188,8 @@ 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 @@ -3052,6 +3222,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3075,6 +3247,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3097,6 +3271,8 @@ class Bot(ContextInstanceMixin["Bot"]): 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 @@ -3118,6 +3294,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3140,6 +3318,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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. @@ -3178,6 +3358,8 @@ class Bot(ContextInstanceMixin["Bot"]): **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 @@ -3211,6 +3393,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3237,6 +3421,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 `_. @@ -3261,6 +3447,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3284,6 +3472,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3304,6 +3494,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 :code:`True` on success. @@ -3323,6 +3515,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3344,6 +3538,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3365,6 +3561,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ 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 @@ -3385,6 +3583,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to close an open 'General' 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 :code:`True` on success. + Source: https://core.telegram.org/bots/api#closegeneralforumtopic + :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. @@ -3404,6 +3604,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to edit the name of the 'General' 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. Returns :code:`True` on success. + Source: https://core.telegram.org/bots/api#editgeneralforumtopic + :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) :param name: New topic name, 1-128 characters :param request_timeout: Request timeout @@ -3424,6 +3626,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to hide the 'General' 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. The topic will be automatically closed if it was open. Returns :code:`True` on success. + Source: https://core.telegram.org/bots/api#hidegeneralforumtopic + :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. @@ -3442,6 +3646,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to reopen a closed 'General' 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. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success. + Source: https://core.telegram.org/bots/api#reopengeneralforumtopic + :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. @@ -3460,6 +3666,8 @@ class Bot(ContextInstanceMixin["Bot"]): """ Use this method to unhide the 'General' 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 :code:`True` on success. + Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic + :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. diff --git a/aiogram/enums/content_type.py b/aiogram/enums/content_type.py index 854fda85..52a9bfed 100644 --- a/aiogram/enums/content_type.py +++ b/aiogram/enums/content_type.py @@ -38,6 +38,8 @@ class ContentType(str, Enum): PINNED_MESSAGE = "pinned_message" INVOICE = "invoice" SUCCESSFUL_PAYMENT = "successful_payment" + USER_SHARED = "user_shared" + CHAT_SHARED = "chat_shared" CONNECTED_WEBSITE = "connected_website" WRITE_ACCESS_ALLOWED = "write_access_allowed" PASSPORT_DATA = "passport_data" diff --git a/aiogram/methods/get_chat_member.py b/aiogram/methods/get_chat_member.py index 2d4e9d0b..ee531e1c 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -29,7 +29,7 @@ class GetChatMember( ] ): """ - Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember """ diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index 3ae62cf0..5069d951 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -36,7 +36,7 @@ class PromoteChatMember(TelegramMethod[bool]): can_restrict_members: Optional[bool] = None """Pass :code:`True` if the administrator can restrict, ban or unban chat members""" can_promote_members: Optional[bool] = None - """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)""" + """Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)""" can_change_info: Optional[bool] = None """Pass :code:`True` if the administrator can change chat title, photo and other settings""" can_invite_users: Optional[bool] = None diff --git a/aiogram/methods/restrict_chat_member.py b/aiogram/methods/restrict_chat_member.py index e7ad4a75..2a8b9fbe 100644 --- a/aiogram/methods/restrict_chat_member.py +++ b/aiogram/methods/restrict_chat_member.py @@ -25,6 +25,8 @@ class RestrictChatMember(TelegramMethod[bool]): """Unique identifier of the target user""" permissions: ChatPermissions """A JSON-serialized object for new user permissions""" + use_independent_chat_permissions: Optional[bool] = None + """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """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""" diff --git a/aiogram/methods/set_chat_permissions.py b/aiogram/methods/set_chat_permissions.py index 9ca0267f..c68b441d 100644 --- a/aiogram/methods/set_chat_permissions.py +++ b/aiogram/methods/set_chat_permissions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Any, Dict, Optional, Union from ..types import ChatPermissions from .base import Request, TelegramMethod @@ -22,6 +22,8 @@ class SetChatPermissions(TelegramMethod[bool]): """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" permissions: ChatPermissions """A JSON-serialized object for new default chat permissions""" + use_independent_chat_permissions: Optional[bool] = None + """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" def build_request(self, bot: Bot) -> Request: data: Dict[str, Any] = self.dict() diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 923a1ef5..1d80489f 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -31,6 +31,7 @@ from .chat_member_restricted import ChatMemberRestricted from .chat_member_updated import ChatMemberUpdated from .chat_permissions import ChatPermissions from .chat_photo import ChatPhoto +from .chat_shared import ChatShared from .chosen_inline_result import ChosenInlineResult from .contact import Contact from .dice import Dice @@ -90,6 +91,8 @@ from .input_venue_message_content import InputVenueMessageContent from .invoice import Invoice from .keyboard_button import KeyboardButton from .keyboard_button_poll_type import KeyboardButtonPollType +from .keyboard_button_request_chat import KeyboardButtonRequestChat +from .keyboard_button_request_user import KeyboardButtonRequestUser from .labeled_price import LabeledPrice from .location import Location from .login_url import LoginUrl @@ -136,6 +139,7 @@ from .successful_payment import SuccessfulPayment from .update import Update from .user import User from .user_profile_photos import UserProfilePhotos +from .user_shared import UserShared from .venue import Venue from .video import Video from .video_chat_ended import VideoChatEnded @@ -179,6 +183,7 @@ __all__ = ( "ChatMemberUpdated", "ChatPermissions", "ChatPhoto", + "ChatShared", "ChosenInlineResult", "Contact", "ContentType", @@ -240,6 +245,8 @@ __all__ = ( "Invoice", "KeyboardButton", "KeyboardButtonPollType", + "KeyboardButtonRequestChat", + "KeyboardButtonRequestUser", "LabeledPrice", "Location", "LoginUrl", @@ -287,6 +294,7 @@ __all__ = ( "Update", "User", "UserProfilePhotos", + "UserShared", "Venue", "Video", "VideoChatEnded", diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 7dc9baf8..4bb6d688 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -506,7 +506,7 @@ class Chat(TelegramObject): - :code:`chat_id` - Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. + Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. Source: https://core.telegram.org/bots/api#getchatmember @@ -698,6 +698,7 @@ class Chat(TelegramObject): def set_permissions( self, permissions: ChatPermissions, + use_independent_chat_permissions: Optional[bool] = None, **kwargs: Any, ) -> SetChatPermissions: """ @@ -711,6 +712,7 @@ class Chat(TelegramObject): Source: https://core.telegram.org/bots/api#setchatpermissions :param permissions: A JSON-serialized object for new default chat permissions + :param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. :return: instance of method :class:`aiogram.methods.set_chat_permissions.SetChatPermissions` """ # DO NOT EDIT MANUALLY!!! @@ -721,6 +723,7 @@ class Chat(TelegramObject): return SetChatPermissions( chat_id=self.id, permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, **kwargs, ) @@ -759,7 +762,7 @@ class Chat(TelegramObject): :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_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have 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 @@ -793,6 +796,7 @@ class Chat(TelegramObject): self, user_id: int, permissions: ChatPermissions, + use_independent_chat_permissions: Optional[bool] = None, until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, **kwargs: Any, ) -> RestrictChatMember: @@ -808,6 +812,7 @@ class Chat(TelegramObject): :param user_id: Unique identifier of the target user :param permissions: A JSON-serialized object for new user permissions + :param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. :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 :return: instance of method :class:`aiogram.methods.restrict_chat_member.RestrictChatMember` """ @@ -820,6 +825,7 @@ class Chat(TelegramObject): chat_id=self.id, user_id=user_id, permissions=permissions, + use_independent_chat_permissions=use_independent_chat_permissions, until_date=until_date, **kwargs, ) diff --git a/aiogram/types/chat_administrator_rights.py b/aiogram/types/chat_administrator_rights.py index eb38b693..23519ced 100644 --- a/aiogram/types/chat_administrator_rights.py +++ b/aiogram/types/chat_administrator_rights.py @@ -26,7 +26,7 @@ class ChatAdministratorRights(TelegramObject): can_restrict_members: bool """:code:`True`, if the administrator can restrict, ban or unban chat members""" can_promote_members: bool - """: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)""" + """:code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)""" can_change_info: bool """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" can_invite_users: bool diff --git a/aiogram/types/chat_join_request.py b/aiogram/types/chat_join_request.py index a8a9f5a8..ca4f8bb7 100644 --- a/aiogram/types/chat_join_request.py +++ b/aiogram/types/chat_join_request.py @@ -27,6 +27,8 @@ class ChatJoinRequest(TelegramObject): """Chat to which the request was sent""" from_user: User = Field(..., alias="from") """User that sent the join request""" + user_chat_id: int + """Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.""" date: datetime.datetime """Date the request was sent in Unix time""" bio: Optional[str] = None diff --git a/aiogram/types/chat_member.py b/aiogram/types/chat_member.py index 4e8c38e7..6bf5b79e 100644 --- a/aiogram/types/chat_member.py +++ b/aiogram/types/chat_member.py @@ -42,7 +42,7 @@ class ChatMember(TelegramObject): can_restrict_members: Optional[bool] = None """*Optional*. :code:`True`, if the administrator can restrict, ban or unban chat members""" can_promote_members: Optional[bool] = None - """*Optional*. :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)""" + """*Optional*. :code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)""" can_change_info: Optional[bool] = None """*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings""" can_invite_users: Optional[bool] = None @@ -58,9 +58,19 @@ class ChatMember(TelegramObject): is_member: Optional[bool] = None """*Optional*. :code:`True`, if the user is a member of the chat at the moment of the request""" can_send_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues""" - can_send_media_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes""" + """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues""" + can_send_audios: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send audios""" + can_send_documents: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send documents""" + can_send_photos: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send photos""" + can_send_videos: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send videos""" + can_send_video_notes: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send video notes""" + can_send_voice_notes: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send voice notes""" can_send_polls: Optional[bool] = None """*Optional*. :code:`True`, if the user is allowed to send polls""" can_send_other_messages: Optional[bool] = None diff --git a/aiogram/types/chat_member_administrator.py b/aiogram/types/chat_member_administrator.py index 4692981d..94fc76c3 100644 --- a/aiogram/types/chat_member_administrator.py +++ b/aiogram/types/chat_member_administrator.py @@ -35,7 +35,7 @@ class ChatMemberAdministrator(ChatMember): can_restrict_members: bool """:code:`True`, if the administrator can restrict, ban or unban chat members""" can_promote_members: bool - """: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)""" + """:code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)""" can_change_info: bool """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" can_invite_users: bool diff --git a/aiogram/types/chat_member_restricted.py b/aiogram/types/chat_member_restricted.py index 916b343b..b6f4f556 100644 --- a/aiogram/types/chat_member_restricted.py +++ b/aiogram/types/chat_member_restricted.py @@ -25,6 +25,26 @@ class ChatMemberRestricted(ChatMember): """Information about the user""" is_member: bool """:code:`True`, if the user is a member of the chat at the moment of the request""" + can_send_messages: bool + """:code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues""" + can_send_audios: bool + """:code:`True`, if the user is allowed to send audios""" + can_send_documents: bool + """:code:`True`, if the user is allowed to send documents""" + can_send_photos: bool + """:code:`True`, if the user is allowed to send photos""" + can_send_videos: bool + """:code:`True`, if the user is allowed to send videos""" + can_send_video_notes: bool + """:code:`True`, if the user is allowed to send video notes""" + can_send_voice_notes: bool + """:code:`True`, if the user is allowed to send voice notes""" + can_send_polls: bool + """:code:`True`, if the user is allowed to send polls""" + can_send_other_messages: bool + """: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""" can_change_info: bool """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" can_invite_users: bool @@ -33,15 +53,5 @@ class ChatMemberRestricted(ChatMember): """:code:`True`, if the user is allowed to pin messages""" can_manage_topics: bool """:code:`True`, if the user is allowed to create forum topics""" - can_send_messages: bool - """:code:`True`, if the user is allowed to send text messages, contacts, locations and venues""" - can_send_media_messages: bool - """:code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes""" - can_send_polls: bool - """:code:`True`, if the user is allowed to send polls""" - can_send_other_messages: bool - """: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: 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/chat_permissions.py b/aiogram/types/chat_permissions.py index 0263ada2..762fe208 100644 --- a/aiogram/types/chat_permissions.py +++ b/aiogram/types/chat_permissions.py @@ -13,15 +13,25 @@ class ChatPermissions(MutableTelegramObject): """ can_send_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues""" - can_send_media_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages""" + """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues""" + can_send_audios: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send audios""" + can_send_documents: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send documents""" + can_send_photos: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send photos""" + can_send_videos: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send videos""" + can_send_video_notes: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send video notes""" + can_send_voice_notes: Optional[bool] = None + """*Optional*. :code:`True`, if the user is allowed to send voice notes""" can_send_polls: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send polls, implies can_send_messages""" + """*Optional*. :code:`True`, if the user is allowed to send polls""" can_send_other_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages""" + """*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, implies can_send_media_messages""" + """*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages""" can_change_info: Optional[bool] = None """*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups""" can_invite_users: Optional[bool] = None diff --git a/aiogram/types/chat_shared.py b/aiogram/types/chat_shared.py new file mode 100644 index 00000000..a3f3e7a8 --- /dev/null +++ b/aiogram/types/chat_shared.py @@ -0,0 +1,14 @@ +from aiogram.types import TelegramObject + + +class ChatShared(TelegramObject): + """ + This object contains information about the chat whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button. + + Source: https://core.telegram.org/bots/api#chatshared + """ + + request_id: int + """Identifier of the request""" + chat_id: int + """Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.""" diff --git a/aiogram/types/keyboard_button.py b/aiogram/types/keyboard_button.py index b69e9287..08d4ce37 100644 --- a/aiogram/types/keyboard_button.py +++ b/aiogram/types/keyboard_button.py @@ -6,23 +6,31 @@ from .base import MutableTelegramObject if TYPE_CHECKING: from .keyboard_button_poll_type import KeyboardButtonPollType + from .keyboard_button_request_chat import KeyboardButtonRequestChat + from .keyboard_button_request_user import KeyboardButtonRequestUser from .web_app_info import WebAppInfo class KeyboardButton(MutableTelegramObject): """ - 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. + This object represents one button of the reply keyboard. For simple text buttons, *String* can be used instead of this object to specify the button text. The optional fields *web_app*, *request_user*, *request_chat*, *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*. **Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*. **Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*. + **Note:** *request_user* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*. + Source: https://core.telegram.org/bots/api#keyboardbutton """ text: str """Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed""" + request_user: Optional[KeyboardButtonRequestUser] = None + """*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.""" + request_chat: Optional[KeyboardButtonRequestChat] = None + """*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.""" request_contact: Optional[bool] = None """*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.""" request_location: Optional[bool] = None diff --git a/aiogram/types/keyboard_button_request_chat.py b/aiogram/types/keyboard_button_request_chat.py new file mode 100644 index 00000000..f4ec059c --- /dev/null +++ b/aiogram/types/keyboard_button_request_chat.py @@ -0,0 +1,33 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Optional + +from aiogram.types import TelegramObject + +if TYPE_CHECKING: + from .chat_administrator_rights import ChatAdministratorRights + + +class KeyboardButtonRequestChat(TelegramObject): + """ + This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. + + Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat + """ + + request_id: int + """Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.chat_shared.ChatShared` object. Must be unique within the message""" + chat_is_channel: bool + """Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.""" + chat_is_forum: Optional[bool] = None + """*Optional*. Pass :code:`True` to request a forum supergroup, pass :code:`False` to request a non-forum chat. If not specified, no additional restrictions are applied.""" + chat_has_username: Optional[bool] = None + """*Optional*. Pass :code:`True` to request a supergroup or a channel with a username, pass :code:`False` to request a chat without a username. If not specified, no additional restrictions are applied.""" + chat_is_created: Optional[bool] = None + """*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.""" + user_administrator_rights: Optional[ChatAdministratorRights] = None + """*Optional*. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of *bot_administrator_rights*. If not specified, no additional restrictions are applied.""" + bot_administrator_rights: Optional[ChatAdministratorRights] = None + """*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied.""" + bot_is_member: Optional[bool] = None + """*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.""" diff --git a/aiogram/types/keyboard_button_request_user.py b/aiogram/types/keyboard_button_request_user.py new file mode 100644 index 00000000..5fce962a --- /dev/null +++ b/aiogram/types/keyboard_button_request_user.py @@ -0,0 +1,18 @@ +from typing import Optional + +from aiogram.types import TelegramObject + + +class KeyboardButtonRequestUser(TelegramObject): + """ + This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. + + Source: https://core.telegram.org/bots/api#keyboardbuttonrequestuser + """ + + request_id: int + """Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.user_shared.UserShared` object. Must be unique within the message""" + user_is_bot: Optional[bool] = None + """*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.""" + user_is_premium: Optional[bool] = None + """*Optional*. Pass :code:`True` to request a premium user, pass :code:`False` to request a non-premium user. If not specified, no additional restrictions are applied.""" diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 7aab1b55..9431f835 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -48,6 +48,7 @@ if TYPE_CHECKING: from .animation import Animation from .audio import Audio from .chat import Chat + from .chat_shared import ChatShared from .contact import Contact from .dice import Dice from .document import Document @@ -80,6 +81,7 @@ if TYPE_CHECKING: from .sticker import Sticker from .successful_payment import SuccessfulPayment from .user import User + from .user_shared import UserShared from .venue import Venue from .video import Video from .video_chat_ended import VideoChatEnded @@ -205,6 +207,10 @@ class Message(TelegramObject): """*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_""" successful_payment: Optional[SuccessfulPayment] = None """*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments » `_""" + user_shared: Optional[UserShared] = None + """*Optional*. Service message: a user was shared with the bot""" + chat_shared: Optional[ChatShared] = None + """*Optional*. Service message: a chat was shared with the bot""" connected_website: Optional[str] = None """*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login » `_""" write_access_allowed: Optional[WriteAccessAllowed] = None diff --git a/aiogram/types/user_shared.py b/aiogram/types/user_shared.py new file mode 100644 index 00000000..f9bf4fbb --- /dev/null +++ b/aiogram/types/user_shared.py @@ -0,0 +1,14 @@ +from aiogram.types import TelegramObject + + +class UserShared(TelegramObject): + """ + This object contains information about the user whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button. + + Source: https://core.telegram.org/bots/api#usershared + """ + + request_id: int + """Identifier of the request""" + user_id: int + """Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.""" diff --git a/docs/api/types/chat_shared.rst b/docs/api/types/chat_shared.rst new file mode 100644 index 00000000..fe6c4c4a --- /dev/null +++ b/docs/api/types/chat_shared.rst @@ -0,0 +1,9 @@ +########## +ChatShared +########## + + +.. automodule:: aiogram.types.chat_shared + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index c3b365a9..55a00dd4 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -75,6 +75,7 @@ Available types chat_member_updated chat_permissions chat_photo + chat_shared contact dice document @@ -98,6 +99,8 @@ Available types input_media_video keyboard_button keyboard_button_poll_type + keyboard_button_request_chat + keyboard_button_request_user location login_url menu_button @@ -118,6 +121,7 @@ Available types response_parameters user user_profile_photos + user_shared venue video video_chat_ended diff --git a/docs/api/types/keyboard_button_request_chat.rst b/docs/api/types/keyboard_button_request_chat.rst new file mode 100644 index 00000000..b47f1a8b --- /dev/null +++ b/docs/api/types/keyboard_button_request_chat.rst @@ -0,0 +1,9 @@ +######################### +KeyboardButtonRequestChat +######################### + + +.. automodule:: aiogram.types.keyboard_button_request_chat + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/keyboard_button_request_user.rst b/docs/api/types/keyboard_button_request_user.rst new file mode 100644 index 00000000..f216668a --- /dev/null +++ b/docs/api/types/keyboard_button_request_user.rst @@ -0,0 +1,9 @@ +######################### +KeyboardButtonRequestUser +######################### + + +.. automodule:: aiogram.types.keyboard_button_request_user + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/user_shared.rst b/docs/api/types/user_shared.rst new file mode 100644 index 00000000..55713049 --- /dev/null +++ b/docs/api/types/user_shared.rst @@ -0,0 +1,9 @@ +########## +UserShared +########## + + +.. automodule:: aiogram.types.user_shared + :members: + :member-order: bysource + :undoc-members: True diff --git a/pyproject.toml b/pyproject.toml index 9d7dae75..52ac8f95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,7 +147,7 @@ features = [ "test", ] extra-dependencies = [ - "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.9" + "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.10" ] [tool.hatch.envs.test] diff --git a/tests/test_api/test_types/test_chat_join_request.py b/tests/test_api/test_types/test_chat_join_request.py index b5d124a3..089520e4 100644 --- a/tests/test_api/test_types/test_chat_join_request.py +++ b/tests/test_api/test_types/test_chat_join_request.py @@ -9,6 +9,7 @@ class TestChatJoinRequest: chat_join_request = ChatJoinRequest( chat=Chat(id=-42, type="supergroup"), from_user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, date=datetime.datetime.now(), ) @@ -22,6 +23,7 @@ class TestChatJoinRequest: chat_join_request = ChatJoinRequest( chat=Chat(id=-42, type="supergroup"), from_user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, date=datetime.datetime.now(), ) diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 7c70ef68..cff39628 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -434,8 +434,9 @@ class TestDispatcher: Update( update_id=42, chat_join_request=ChatJoinRequest( - chat=Chat(id=42, type="private"), + chat=Chat(id=-42, type="private"), from_user=User(id=42, is_bot=False, first_name="Test"), + user_chat_id=42, date=datetime.datetime.now(), ), ), @@ -589,8 +590,7 @@ class TestDispatcher: "aiogram.dispatcher.dispatcher.Dispatcher.silent_call_request", new_callable=AsyncMock, ) as mocked_silent_call_request: - result = await dispatcher._process_update(bot=bot, update=Update(update_id=42)) - print(result) + await dispatcher._process_update(bot=bot, update=Update(update_id=42)) mocked_silent_call_request.assert_awaited() async def test_process_update_exception(self, bot: MockedBot, caplog): diff --git a/tests/test_filters/test_chat_member_updated.py b/tests/test_filters/test_chat_member_updated.py index 17b38762..f3fdce66 100644 --- a/tests/test_filters/test_chat_member_updated.py +++ b/tests/test_filters/test_chat_member_updated.py @@ -315,7 +315,8 @@ class TestChatMemberUpdatedStatusFilter: update = { "user": user, "until_date": datetime.now(), - "is_anonymous": False, + "is_anonymous": True, + "custom_title": True, "can_be_edited": True, "can_manage_chat": True, "can_delete_messages": True, @@ -327,12 +328,17 @@ class TestChatMemberUpdatedStatusFilter: "can_post_messages": True, "can_edit_messages": True, "can_pin_messages": True, + "can_manage_topics": True, "can_send_messages": True, - "can_send_media_messages": True, + "can_send_audios": True, + "can_send_documents": True, + "can_send_photos": True, + "can_send_videos": True, + "can_send_video_notes": True, + "can_send_voice_notes": True, "can_send_polls": True, "can_send_other_messages": True, "can_add_web_page_previews": True, - "can_manage_topics": True, } event = ChatMemberUpdated( chat=Chat(id=42, type="test"), From 8a9cabb3dff819defc267b479c1892188eca6015 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 4 Feb 2023 19:57:48 +0200 Subject: [PATCH 16/42] Update codecov action --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b2e6dc08..e5e85147 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,10 +93,10 @@ jobs: - name: Upload coverage data if: "env.IS_PYPY == 'false'" - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - file: coverage.xml + files: coverage.xml flags: unittests name: py-${{ matrix.python-version }}-${{ matrix.os }} fail_ci_if_error: true From f704922fe2139218cc4655a86e6ec87932e74e29 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 4 Feb 2023 20:09:51 +0200 Subject: [PATCH 17/42] Update changelog --- CHANGES/{1088.feature.rst => 1088.misc.rst} | 0 CHANGES/1106.bugfix.rst | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename CHANGES/{1088.feature.rst => 1088.misc.rst} (100%) diff --git a/CHANGES/1088.feature.rst b/CHANGES/1088.misc.rst similarity index 100% rename from CHANGES/1088.feature.rst rename to CHANGES/1088.misc.rst diff --git a/CHANGES/1106.bugfix.rst b/CHANGES/1106.bugfix.rst index c3b7154e..54b60843 100644 --- a/CHANGES/1106.bugfix.rst +++ b/CHANGES/1106.bugfix.rst @@ -1 +1 @@ -Bug fix, which made ignore_case parameter not work in aiogram.filters.command.Command +Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` filter From d07e8fc4071c5cd5a4c4ee5fe7e4b2002fe4cb7a Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 4 Feb 2023 20:14:15 +0200 Subject: [PATCH 18/42] Extended logic filter arguments --- aiogram/filters/logic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aiogram/filters/logic.py b/aiogram/filters/logic.py index b9c95de1..7cd2503c 100644 --- a/aiogram/filters/logic.py +++ b/aiogram/filters/logic.py @@ -59,16 +59,16 @@ class _OrFilter(_LogicFilter): return False -def and_f(target1: "CallbackType", target2: "CallbackType") -> _AndFilter: +def and_f(*targets: "CallbackType") -> _AndFilter: from aiogram.dispatcher.event.handler import FilterObject - return _AndFilter(FilterObject(target1), FilterObject(target2)) + return _AndFilter(*(FilterObject(target) for target in targets)) -def or_f(target1: "CallbackType", target2: "CallbackType") -> _OrFilter: +def or_f(*targets: "CallbackType") -> _OrFilter: from aiogram.dispatcher.event.handler import FilterObject - return _OrFilter(FilterObject(target1), FilterObject(target2)) + return _OrFilter(*(FilterObject(target) for target in targets)) def invert_f(target: "CallbackType") -> _InvertFilter: From 021ae5626fd9fa93b88e442a19589854b2bd6705 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 5 Feb 2023 16:13:06 +0200 Subject: [PATCH 19/42] Replaced error `TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument ''` with a more understandable (#1114) * Explain why keyword filters is not supported * Added changelog --- CHANGES/1114.misc.rst | 2 ++ aiogram/dispatcher/event/telegram.py | 20 +++++++++++++++---- aiogram/exceptions.py | 5 +++++ .../test_event/test_telegram.py | 7 +++++++ 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 CHANGES/1114.misc.rst diff --git a/CHANGES/1114.misc.rst b/CHANGES/1114.misc.rst new file mode 100644 index 00000000..ba1661ae --- /dev/null +++ b/CHANGES/1114.misc.rst @@ -0,0 +1,2 @@ +Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument ''` +with a more understandable one for developers and with a link to the documentation. diff --git a/aiogram/dispatcher/event/telegram.py b/aiogram/dispatcher/event/telegram.py index 8dd56a71..8005c418 100644 --- a/aiogram/dispatcher/event/telegram.py +++ b/aiogram/dispatcher/event/telegram.py @@ -3,11 +3,11 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional from aiogram.dispatcher.middlewares.manager import MiddlewareManager - -from ...filters.base import Filter -from ...types import TelegramObject from .bases import REJECTED, UNHANDLED, MiddlewareType, SkipHandler from .handler import CallbackType, FilterObject, HandlerObject +from ...exceptions import UnsupportedKeywordArgument +from ...filters.base import Filter +from ...types import TelegramObject if TYPE_CHECKING: from aiogram.dispatcher.router import Router @@ -58,10 +58,21 @@ class TelegramEventObserver: callback: CallbackType, *filters: CallbackType, flags: Optional[Dict[str, Any]] = None, + **kwargs: Any, ) -> CallbackType: """ Register event handler """ + if kwargs: + raise UnsupportedKeywordArgument( + "Passing any additional keyword arguments to the registrar method " + "is not supported.\n" + "This error may be caused when you are trying to register filters like in 2.x " + "version of this framework, if it's true just look at correspoding " + "documentation pages.\n" + f"Please remove the {set(kwargs.keys())} arguments from this call.\n" + ) + if flags is None: flags = {} @@ -118,13 +129,14 @@ class TelegramEventObserver: self, *filters: CallbackType, flags: Optional[Dict[str, Any]] = None, + **kwargs: Any, ) -> Callable[[CallbackType], CallbackType]: """ Decorator for registering event handlers """ def wrapper(callback: CallbackType) -> CallbackType: - self.register(callback, *filters, flags=flags) + self.register(callback, *filters, flags=flags, **kwargs) return callback return wrapper diff --git a/aiogram/exceptions.py b/aiogram/exceptions.py index 96d0c0db..dcf433c6 100644 --- a/aiogram/exceptions.py +++ b/aiogram/exceptions.py @@ -2,6 +2,7 @@ from typing import Any, Optional from aiogram.methods import TelegramMethod from aiogram.methods.base import TelegramType +from aiogram.utils.link import docs_url class AiogramError(Exception): @@ -28,6 +29,10 @@ class CallbackAnswerException(AiogramError): pass +class UnsupportedKeywordArgument(DetailedAiogramError): + url = docs_url("migration_2_to_3.html", fragment_="filtering-events") + + class TelegramAPIError(DetailedAiogramError): def __init__( self, diff --git a/tests/test_dispatcher/test_event/test_telegram.py b/tests/test_dispatcher/test_event/test_telegram.py index 37f66357..1f892de0 100644 --- a/tests/test_dispatcher/test_event/test_telegram.py +++ b/tests/test_dispatcher/test_event/test_telegram.py @@ -9,9 +9,11 @@ from aiogram.dispatcher.event.bases import REJECTED, SkipHandler from aiogram.dispatcher.event.handler import HandlerObject from aiogram.dispatcher.event.telegram import TelegramEventObserver from aiogram.dispatcher.router import Router +from aiogram.exceptions import UnsupportedKeywordArgument from aiogram.filters import Filter from aiogram.types import Chat, Message, User + # TODO: Test middlewares in routers tree @@ -82,6 +84,11 @@ class TestTelegramEventObserver: assert f2 in callbacks assert MyFilter1(test="PASS") in callbacks + def test_keyword_filters_is_not_supported(self): + router = Router() + with pytest.raises(UnsupportedKeywordArgument): + router.message.register(lambda e: True, commands=["test"]) + def test_register_decorator(self): router = Router() observer = router.message From e8d279c8f2d904390cb800c1a5a156aff5427f19 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Tue, 7 Feb 2023 22:42:57 +0200 Subject: [PATCH 20/42] Bump API version --- .apiversion | 2 +- README.rst | 4 ++-- aiogram/__init__.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.apiversion b/.apiversion index c596943a..7822c1ab 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -6.4 +6.5 diff --git a/README.rst b/README.rst index a5257566..55cb2ab3 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ aiogram |beta badge| :target: https://pypi.python.org/pypi/aiogram :alt: Supported python versions -.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.4-blue.svg?logo=telegram +.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.5-blue.svg?logo=telegram :target: https://core.telegram.org/bots/api :alt: Telegram Bot API @@ -67,7 +67,7 @@ Features - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ - Supports `PyPy `_ -- Supports `Telegram Bot API 6.4 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 6.5 `_ and gets fast updates to the latest versions of the Bot API - Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated - Updates router (Blueprints) - Has Finite State Machine diff --git a/aiogram/__init__.py b/aiogram/__init__.py index 3e6f69e3..a703578e 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -38,4 +38,4 @@ __all__ = ( ) __version__ = "3.0.0b7" -__api_version__ = "6.4" +__api_version__ = "6.5" From 56097d6b53bb2f307e65e4fad24bd8498ec5b6aa Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 12 Feb 2023 01:24:18 +0200 Subject: [PATCH 21/42] Bump dependencies --- aiogram/dispatcher/event/telegram.py | 5 +++-- pyproject.toml | 12 ++++++------ scripts/bump_versions.py | 15 ++++++--------- tests/test_api/test_methods/test_get_url.py | 1 - tests/test_dispatcher/test_event/test_telegram.py | 1 - 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/aiogram/dispatcher/event/telegram.py b/aiogram/dispatcher/event/telegram.py index 8005c418..bb943004 100644 --- a/aiogram/dispatcher/event/telegram.py +++ b/aiogram/dispatcher/event/telegram.py @@ -3,11 +3,12 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional from aiogram.dispatcher.middlewares.manager import MiddlewareManager -from .bases import REJECTED, UNHANDLED, MiddlewareType, SkipHandler -from .handler import CallbackType, FilterObject, HandlerObject + from ...exceptions import UnsupportedKeywordArgument from ...filters.base import Filter from ...types import TelegramObject +from .bases import REJECTED, UNHANDLED, MiddlewareType, SkipHandler +from .handler import CallbackType, FilterObject, HandlerObject if TYPE_CHECKING: from aiogram.dispatcher.router import Router diff --git a/pyproject.toml b/pyproject.toml index 52ac8f95..0c2d3a5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "magic-filter~=1.0.9", "aiohttp~=3.8.3", "pydantic~=1.10.4", - "aiofiles~=22.1.0", + "aiofiles~=23.1.0", "certifi>=2022.9.24", ] dynamic = ["version"] @@ -62,7 +62,7 @@ proxy = [ "aiohttp-socks~=0.7.1", ] i18n = [ - "Babel~=2.9.1", + "Babel~=2.11.0", ] test = [ "pytest~=7.1.3", @@ -91,13 +91,13 @@ docs = [ "sphinxcontrib-towncrier~=0.3.1a3", ] dev = [ - "black~=22.8", + "black~=23.1", "isort~=5.11", - "ruff~=0.0.215", + "ruff~=0.0.245", "mypy~=0.981", "toml~=0.10.2", "pre-commit~=2.20.0", - "packaging~=21.3", + "packaging~=23.0", "typing-extensions~=4.3.0", ] @@ -147,7 +147,7 @@ features = [ "test", ] extra-dependencies = [ - "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.10" + "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.11" ] [tool.hatch.envs.test] diff --git a/scripts/bump_versions.py b/scripts/bump_versions.py index 5995dae9..7459192a 100644 --- a/scripts/bump_versions.py +++ b/scripts/bump_versions.py @@ -45,18 +45,17 @@ def replace_line(content: str, pattern: re.Pattern, new_value: str) -> str: return result -def write_package_meta(package_version: str, api_version: str) -> None: +def write_package_meta(api_version: str) -> None: path = Path.cwd() / "aiogram" / "__init__.py" content = path.read_text() - content = replace_line(content, PACKAGE_VERSION, package_version) content = replace_line(content, API_VERSION, api_version) print(f"Write {path}") path.write_text(content) -def write_readme(package_version: str, api_version: str) -> None: +def write_readme(api_version: str) -> None: path = Path.cwd() / "README.rst" content = path.read_text() content = replace_line(content, API_VERSION_BADGE, api_version) @@ -65,7 +64,7 @@ def write_readme(package_version: str, api_version: str) -> None: path.write_text(content) -def write_docs_index(package_version: str, api_version: str) -> None: +def write_docs_index(api_version: str) -> None: path = Path.cwd() / "docs" / "index.rst" content = path.read_text() content = replace_line(content, API_VERSION_BADGE, api_version) @@ -74,14 +73,12 @@ def write_docs_index(package_version: str, api_version: str) -> None: def main(): - package_version = get_package_version() api_version = get_telegram_api_version() - print(f"Package version: {package_version}") print(f"Telegram Bot API version: {api_version}") - write_package_meta(package_version=package_version, api_version=api_version) - write_readme(package_version=package_version, api_version=api_version) - write_docs_index(package_version=package_version, api_version=api_version) + write_package_meta(api_version=api_version) + write_readme(api_version=api_version) + write_docs_index(api_version=api_version) if __name__ == "__main__": diff --git a/tests/test_api/test_methods/test_get_url.py b/tests/test_api/test_methods/test_get_url.py index 76b24200..9eec1017 100644 --- a/tests/test_api/test_methods/test_get_url.py +++ b/tests/test_api/test_methods/test_get_url.py @@ -35,7 +35,6 @@ class TestGetMessageUrl: force_private: bool, expected_result: Optional[str], ): - fake_chat = Chat(id=chat_id, username=chat_username, type=chat_type) fake_message_id = 10 fake_message = Message( diff --git a/tests/test_dispatcher/test_event/test_telegram.py b/tests/test_dispatcher/test_event/test_telegram.py index 1f892de0..973fa17c 100644 --- a/tests/test_dispatcher/test_event/test_telegram.py +++ b/tests/test_dispatcher/test_event/test_telegram.py @@ -13,7 +13,6 @@ from aiogram.exceptions import UnsupportedKeywordArgument from aiogram.filters import Filter from aiogram.types import Chat, Message, User - # TODO: Test middlewares in routers tree From bac90c8fa759ae0c780b9c0f08252c212aa18439 Mon Sep 17 00:00:00 2001 From: sheldy <85823514+sheldygg@users.noreply.github.com> Date: Sun, 12 Feb 2023 01:26:49 +0200 Subject: [PATCH 22/42] add new method for Router (#1117) * add new method for Router * add type hint, tests, changes file * update tests * Update aiogram/dispatcher/router.py * Update tests/test_dispatcher/test_router.py * Update router.py --------- Co-authored-by: Alex Root Junior --- CHANGES/1117.feature.rst | 1 + aiogram/dispatcher/router.py | 6 ++++++ tests/test_dispatcher/test_router.py | 14 ++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 CHANGES/1117.feature.rst diff --git a/CHANGES/1117.feature.rst b/CHANGES/1117.feature.rst new file mode 100644 index 00000000..cdcf0999 --- /dev/null +++ b/CHANGES/1117.feature.rst @@ -0,0 +1 @@ +Added a method that allows you to compactly register routers \ No newline at end of file diff --git a/aiogram/dispatcher/router.py b/aiogram/dispatcher/router.py index f1ddc1c4..86359ce0 100644 --- a/aiogram/dispatcher/router.py +++ b/aiogram/dispatcher/router.py @@ -179,6 +179,12 @@ class Router: self._parent_router = router router.sub_routers.append(self) + def include_routers(self, *routers: Router) -> None: + if not routers: + raise ValueError("At least one router must be provided") + for router in routers: + self.include_router(router) + def include_router(self, router: Router) -> Router: """ Attach another router. diff --git a/tests/test_dispatcher/test_router.py b/tests/test_dispatcher/test_router.py index 673bb46d..3404822d 100644 --- a/tests/test_dispatcher/test_router.py +++ b/tests/test_dispatcher/test_router.py @@ -33,6 +33,20 @@ class TestRouter: assert router3.parent_router is router2 assert router3.sub_routers == [] + def test_including_many_routers(self): + router = Router() + router1 = Router() + router2 = Router() + + router.include_routers(router1, router2) + + assert router.sub_routers == [router1, router2] + + def test_including_many_routers_bad_type(self): + router = Router() + with pytest.raises(ValueError, match="At least one router must be provided"): + router.include_routers() + def test_include_router_by_string_bad_type(self): router = Router() with pytest.raises(ValueError, match=r"router should be instance of Router"): From 58868ec6277cf274fdeb7466f3f837b9be4c922e Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 12 Feb 2023 02:00:42 +0200 Subject: [PATCH 23/42] Added possibility to reply into webhook with files (#1120) --- CHANGES/1120.misc.rst | 1 + aiogram/dispatcher/dispatcher.py | 7 +- aiogram/methods/base.py | 6 -- aiogram/webhook/aiohttp_server.py | 41 +++++++++-- tests/test_dispatcher/test_dispatcher.py | 8 +- tests/test_webhook/test_aiohtt_server.py | 93 +++++++++++++++++++++--- 6 files changed, 126 insertions(+), 30 deletions(-) create mode 100644 CHANGES/1120.misc.rst diff --git a/CHANGES/1120.misc.rst b/CHANGES/1120.misc.rst new file mode 100644 index 00000000..820b2b01 --- /dev/null +++ b/CHANGES/1120.misc.rst @@ -0,0 +1 @@ +Added possibility to reply into webhook with files diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 2c1a8cf5..7f058ec2 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -13,7 +13,7 @@ from ..fsm.middleware import FSMContextMiddleware from ..fsm.storage.base import BaseEventIsolation, BaseStorage from ..fsm.storage.memory import DisabledEventIsolation, MemoryStorage from ..fsm.strategy import FSMStrategy -from ..methods import GetUpdates, TelegramMethod +from ..methods import GetUpdates, Request, TelegramMethod from ..types import Update, User from ..types.update import UpdateTypeLookupError from ..utils.backoff import Backoff, BackoffConfig @@ -351,7 +351,7 @@ class Dispatcher(Router): async def feed_webhook_update( self, bot: Bot, update: Union[Update, Dict[str, Any]], _timeout: float = 55, **kwargs: Any - ) -> Optional[Dict[str, Any]]: + ) -> Optional[Request]: if not isinstance(update, Update): # Allow to use raw updates update = Update(**update) @@ -397,8 +397,7 @@ class Dispatcher(Router): # TODO: handle exceptions response: Any = process_updates.result() if isinstance(response, TelegramMethod): - request = response.build_request(bot=bot) - return request.render_webhook_request() + return response.build_request(bot=bot) else: process_updates.remove_done_callback(release_waiter) diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index 066fd434..699c10c7 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -33,12 +33,6 @@ class Request(BaseModel): class Config(BaseConfig): arbitrary_types_allowed = True - def render_webhook_request(self) -> Dict[str, Any]: - return { - "method": self.method, - **{key: value for key, value in self.data.items() if value is not None}, - } - class Response(GenericModel, Generic[TelegramType]): ok: bool diff --git a/aiogram/webhook/aiohttp_server.py b/aiogram/webhook/aiohttp_server.py index 4326f8db..c5e5f661 100644 --- a/aiogram/webhook/aiohttp_server.py +++ b/aiogram/webhook/aiohttp_server.py @@ -1,15 +1,17 @@ import asyncio +import secrets from abc import ABC, abstractmethod from asyncio import Transport from typing import Any, Awaitable, Callable, Dict, Optional, Tuple, cast -from aiohttp import web +from aiohttp import MultipartWriter, web from aiohttp.abc import Application from aiohttp.typedefs import Handler from aiohttp.web_middlewares import middleware from aiogram import Bot, Dispatcher, loggers -from aiogram.methods import TelegramMethod +from aiogram.methods import Request, TelegramMethod +from aiogram.types import UNSET from aiogram.webhook.security import IPFilter @@ -84,7 +86,10 @@ class BaseRequestHandler(ABC): """ def __init__( - self, dispatcher: Dispatcher, handle_in_background: bool = True, **data: Any + self, + dispatcher: Dispatcher, + handle_in_background: bool = False, + **data: Any, ) -> None: """ :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` @@ -138,15 +143,39 @@ class BaseRequestHandler(ABC): ) return web.json_response({}, dumps=bot.session.json_dumps) + def _build_response_writer(self, bot: Bot, result: Optional[Request]) -> MultipartWriter: + writer = MultipartWriter( + "form-data", + boundary=f"webhookBoundary{secrets.token_urlsafe(16)}", + ) + if not result: + return writer + + payload = writer.append(result.method) + payload.set_content_disposition("form-data", name="method") + + for key, value in result.data.items(): + if value is None or value is UNSET: + continue + payload = writer.append(bot.session.prepare_value(value)) + payload.set_content_disposition("form-data", name=key) + + if not result.files: + return writer + + for key, value in result.files.items(): + payload = writer.append(value) + payload.set_content_disposition("form-data", name=key, filename=value.filename) + + return writer + async def _handle_request(self, bot: Bot, request: web.Request) -> web.Response: result = await self.dispatcher.feed_webhook_update( bot, await request.json(loads=bot.session.json_loads), **self.data, ) - if result: - return web.json_response(result, dumps=bot.session.json_dumps) - return web.json_response({}, dumps=bot.session.json_dumps) + return web.Response(body=self._build_response_writer(bot=bot, result=result)) async def handle(self, request: web.Request) -> web.Response: bot = await self.resolve_bot(request) diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index cff39628..6d6fa1ab 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -12,7 +12,7 @@ from aiogram import Bot from aiogram.dispatcher.dispatcher import Dispatcher from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler from aiogram.dispatcher.router import Router -from aiogram.methods import GetMe, GetUpdates, SendMessage +from aiogram.methods import GetMe, GetUpdates, Request, SendMessage from aiogram.types import ( CallbackQuery, Chat, @@ -703,9 +703,9 @@ class TestDispatcher: dispatcher.message.register(simple_message_handler) response = await dispatcher.feed_webhook_update(bot, RAW_UPDATE, _timeout=0.3) - assert isinstance(response, dict) - assert response["method"] == "sendMessage" - assert response["text"] == "ok" + assert isinstance(response, Request) + assert response.method == "sendMessage" + assert response.data["text"] == "ok" async def test_feed_webhook_update_slow_process(self, bot: MockedBot, recwarn): warnings.simplefilter("always") diff --git a/tests/test_webhook/test_aiohtt_server.py b/tests/test_webhook/test_aiohtt_server.py index 5c9cbcc8..8bd2cf2d 100644 --- a/tests/test_webhook/test_aiohtt_server.py +++ b/tests/test_webhook/test_aiohtt_server.py @@ -6,13 +6,13 @@ from typing import Any, Dict from unittest.mock import AsyncMock, patch import pytest -from aiohttp import web +from aiohttp import MultipartReader, web from aiohttp.test_utils import TestClient from aiohttp.web_app import Application from aiogram import Dispatcher, F from aiogram.methods import GetMe, Request -from aiogram.types import Message, User +from aiogram.types import BufferedInputFile, Message, User from aiogram.webhook.aiohttp_server import ( SimpleRequestHandler, TokenBasedRequestHandler, @@ -73,16 +73,16 @@ class TestSimpleRequestHandler: }, ) - async def test(self, bot: MockedBot, aiohttp_client): + async def test_reply_into_webhook_file(self, bot: MockedBot, aiohttp_client): app = Application() dp = Dispatcher() - handler_event = Event() - @dp.message(F.text == "test") def handle_message(msg: Message): - handler_event.set() - return msg.answer("PASS") + return msg.answer_document( + caption="PASS", + document=BufferedInputFile(b"test", filename="test.txt"), + ) handler = SimpleRequestHandler( dispatcher=dp, @@ -94,15 +94,88 @@ class TestSimpleRequestHandler: resp = await self.make_reqest(client=client) assert resp.status == 200 - result = await resp.json() + assert resp.content_type == "multipart/form-data" + result = {} + reader = MultipartReader.from_response(resp) + while part := await reader.next(): + value = await part.read() + result[part.name] = value.decode() + assert result["method"] == "sendDocument" + assert result["caption"] == "PASS" + assert result["document"] == "test" + + async def test_reply_into_webhook_text(self, bot: MockedBot, aiohttp_client): + app = Application() + dp = Dispatcher() + + @dp.message(F.text == "test") + def handle_message(msg: Message): + return msg.answer(text="PASS") + + handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + handle_in_background=False, + ) + handler.register(app, path="/webhook") + client: TestClient = await aiohttp_client(app) + + resp = await self.make_reqest(client=client) + assert resp.status == 200 + assert resp.content_type == "multipart/form-data" + result = {} + reader = MultipartReader.from_response(resp) + while part := await reader.next(): + value = await part.read() + result[part.name] = value.decode() assert result["method"] == "sendMessage" + assert result["text"] == "PASS" + + async def test_reply_into_webhook_unhandled(self, bot: MockedBot, aiohttp_client): + app = Application() + dp = Dispatcher() + + @dp.message(F.text == "test") + def handle_message(msg: Message): + return msg.answer(text="PASS") + + handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + handle_in_background=False, + ) + handler.register(app, path="/webhook") + client: TestClient = await aiohttp_client(app) resp = await self.make_reqest(client=client, text="spam") assert resp.status == 200 - result = await resp.json() + assert resp.content_type == "multipart/form-data" + result = {} + reader = MultipartReader.from_response(resp) + while part := await reader.next(): + value = await part.read() + result[part.name] = value.decode() assert not result - handler.handle_in_background = True + async def test_reply_into_webhook_background(self, bot: MockedBot, aiohttp_client): + app = Application() + dp = Dispatcher() + + handler_event = Event() + + @dp.message(F.text == "test") + def handle_message(msg: Message): + handler_event.set() + return msg.answer(text="PASS") + + handler = SimpleRequestHandler( + dispatcher=dp, + bot=bot, + handle_in_background=True, + ) + handler.register(app, path="/webhook") + client: TestClient = await aiohttp_client(app) + with patch( "aiogram.dispatcher.dispatcher.Dispatcher.silent_call_request", new_callable=AsyncMock, From 94e11ce8e998c44203096d19e90c29a0e8eb79a7 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 12 Feb 2023 02:02:42 +0200 Subject: [PATCH 24/42] Small typo fix --- docs/contributing.rst | 2 +- docs/requirements.txt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/docs/contributing.rst b/docs/contributing.rst index 80709756..3feda269 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -77,7 +77,7 @@ After activating the environment install `aiogram` from sources and their depend .. code-block:: bash - pip install -e ."[dev,test,docs,fast,redis,proxy,i18n]" + pip install -e .[dev,test,docs,fast,redis,proxy,i18n] It will install :code:`aiogram` in editable mode into your virtual environment and all dependencies. diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 9003de3f..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx-intl -typing-extensions -Sphinx-Substitution-Extensions From 184ee1fbf859345fab13f2ac5bf8baa81405c6b9 Mon Sep 17 00:00:00 2001 From: Dmitry Anfimov Date: Sun, 12 Feb 2023 06:56:11 +0600 Subject: [PATCH 25/42] [3.x] Check status code when downloading file (#1079) * Check status code when downloading file and raise an error if someting bad happends * Style fixes * Add doc * Use "towncrier create ." for creating file --- CHANGES/816.bugfix | 1 + aiogram/client/bot.py | 7 ++++- aiogram/client/session/aiohttp.py | 4 +-- aiogram/client/session/base.py | 2 +- aiogram/types/input_file.py | 5 +++- tests/mocked_bot.py | 6 ++++- .../test_session/test_aiohttp_session.py | 27 ++++++++++++++++++- 7 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 CHANGES/816.bugfix diff --git a/CHANGES/816.bugfix b/CHANGES/816.bugfix new file mode 100644 index 00000000..22bfee8c --- /dev/null +++ b/CHANGES/816.bugfix @@ -0,0 +1 @@ +Check status code when downloading file diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index fc1198e3..d9ddc07a 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -304,7 +304,12 @@ class Bot(ContextInstanceMixin["Bot"]): close_stream = True else: url = self.session.api.file_url(self.__token, file_path) - stream = self.session.stream_content(url=url, timeout=timeout, chunk_size=chunk_size) + stream = self.session.stream_content( + url=url, + timeout=timeout, + chunk_size=chunk_size, + raise_for_status=True, + ) try: if isinstance(destination, (str, pathlib.Path)): diff --git a/aiogram/client/session/aiohttp.py b/aiogram/client/session/aiohttp.py index 66aae752..4d9dff06 100644 --- a/aiogram/client/session/aiohttp.py +++ b/aiogram/client/session/aiohttp.py @@ -162,11 +162,11 @@ class AiohttpSession(BaseSession): return cast(TelegramType, response.result) async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, url: str, timeout: int, chunk_size: int, raise_for_status: bool ) -> AsyncGenerator[bytes, None]: session = await self.create_session() - async with session.get(url, timeout=timeout) as resp: + async with session.get(url, timeout=timeout, raise_for_status=raise_for_status) as resp: async for chunk in resp.content.iter_chunked(chunk_size): yield chunk diff --git a/aiogram/client/session/base.py b/aiogram/client/session/base.py index 95392139..971d9a32 100644 --- a/aiogram/client/session/base.py +++ b/aiogram/client/session/base.py @@ -153,7 +153,7 @@ class BaseSession(abc.ABC): @abc.abstractmethod async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, url: str, timeout: int, chunk_size: int, raise_for_status: bool ) -> AsyncGenerator[bytes, None]: # pragma: no cover """ Stream reader diff --git a/aiogram/types/input_file.py b/aiogram/types/input_file.py index 102e365b..c4090505 100644 --- a/aiogram/types/input_file.py +++ b/aiogram/types/input_file.py @@ -135,7 +135,10 @@ class URLInputFile(InputFile): bot = Bot.get_current(no_error=False) stream = bot.session.stream_content( - url=self.url, timeout=self.timeout, chunk_size=self.chunk_size + url=self.url, + timeout=self.timeout, + chunk_size=self.chunk_size, + raise_for_status=True, ) async for chunk in stream: diff --git a/tests/mocked_bot.py b/tests/mocked_bot.py index 1783eb86..25a9b38e 100644 --- a/tests/mocked_bot.py +++ b/tests/mocked_bot.py @@ -37,7 +37,11 @@ class MockedSession(BaseSession): return response.result # type: ignore async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, + url: str, + timeout: int, + chunk_size: int, + raise_for_status: bool, ) -> AsyncGenerator[bytes, None]: # pragma: no cover yield b"" diff --git a/tests/test_api/test_client/test_session/test_aiohttp_session.py b/tests/test_api/test_client/test_session/test_aiohttp_session.py index 14c25ad3..651711cb 100644 --- a/tests/test_api/test_client/test_session/test_aiohttp_session.py +++ b/tests/test_api/test_client/test_session/test_aiohttp_session.py @@ -190,7 +190,10 @@ class TestAiohttpSession: session = AiohttpSession() stream = session.stream_content( - "https://www.python.org/static/img/python-logo.png", timeout=5, chunk_size=1 + "https://www.python.org/static/img/python-logo.png", + timeout=5, + chunk_size=1, + raise_for_status=True, ) assert isinstance(stream, AsyncGenerator) @@ -202,6 +205,28 @@ class TestAiohttpSession: size += chunk_size assert size == 10 + async def test_stream_content_404(self, aresponses: ResponsesMockServer): + aresponses.add( + aresponses.ANY, + aresponses.ANY, + "get", + aresponses.Response( + status=404, + body=b"File not found", + ), + ) + session = AiohttpSession() + stream = session.stream_content( + "https://www.python.org/static/img/python-logo.png", + timeout=5, + chunk_size=1, + raise_for_status=True, + ) + + with pytest.raises(ClientError): + async for _ in stream: + ... + async def test_context_manager(self): session = AiohttpSession() assert isinstance(session, AsyncContextManager) From 0cec389a327e40f2af3debf04f647b0e5e4f3544 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 12 Feb 2023 03:18:53 +0200 Subject: [PATCH 26/42] Update badges --- README.rst | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.rst b/README.rst index 55cb2ab3..c19f2476 100644 --- a/README.rst +++ b/README.rst @@ -5,37 +5,37 @@ aiogram |beta badge| .. danger:: This version is still in development! -.. image:: https://img.shields.io/pypi/l/aiogram.svg +.. image:: https://img.shields.io/pypi/l/aiogram.svg?style=flat-square :target: https://opensource.org/licenses/MIT :alt: MIT License -.. image:: https://img.shields.io/pypi/pyversions/aiogram.svg - :target: https://pypi.python.org/pypi/aiogram - :alt: Supported python versions - -.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-6.5-blue.svg?logo=telegram - :target: https://core.telegram.org/bots/api - :alt: Telegram Bot API - -.. image:: https://github.com/aiogram/aiogram/workflows/Tests/badge.svg?branch=dev-3.x - :target: https://github.com/aiogram/aiogram/actions - :alt: Tests - -.. image:: https://img.shields.io/pypi/v/aiogram.svg - :target: https://pypi.python.org/pypi/aiogram - :alt: PyPi Package Version - -.. image:: https://img.shields.io/pypi/status/aiogram.svg +.. image:: https://img.shields.io/pypi/status/aiogram.svg?style=flat-square :target: https://pypi.python.org/pypi/aiogram :alt: PyPi status -.. image:: https://img.shields.io/pypi/dm/aiogram.svg +.. image:: https://img.shields.io/pypi/v/aiogram.svg?style=flat-square + :target: https://pypi.python.org/pypi/aiogram + :alt: PyPi Package Version + +.. image:: https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square :target: https://pypi.python.org/pypi/aiogram :alt: Downloads -.. image:: https://img.shields.io/badge/telegram-aiogram-blue.svg - :target: https://t.me/aiogram_live - :alt: [Telegram] aiogram live +| + +.. image:: https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square + :target: https://pypi.python.org/pypi/aiogram + :alt: Supported python versions + +.. image:: https://img.shields.io/badge/dynamic/json?color=blue&logo=telegram&label=Telegram%20Bot%20API&query=%24.api.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Faiogram%2Faiogram%2Fdev-3.x%2F.butcher%2Fschema%2Fschema.json&style=flat-square + :target: https://core.telegram.org/bots/api + :alt: Telegram Bot API + +| + +.. image:: https://img.shields.io/github/actions/workflow/status/aiogram/aiogram/tests.yml?branch=dev-3.x&style=flat-square + :target: https://github.com/aiogram/aiogram/actions + :alt: Tests .. image:: https://img.shields.io/codecov/c/github/aiogram/aiogram?style=flat-square :target: https://app.codecov.io/gh/aiogram/aiogram From dc88a8c90358c2e6e555420f75b1c1c83f9a1a60 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 12 Feb 2023 03:19:31 +0200 Subject: [PATCH 27/42] Removeseparators in readme --- README.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.rst b/README.rst index c19f2476..bf5a7d11 100644 --- a/README.rst +++ b/README.rst @@ -21,8 +21,6 @@ aiogram |beta badge| :target: https://pypi.python.org/pypi/aiogram :alt: Downloads -| - .. image:: https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square :target: https://pypi.python.org/pypi/aiogram :alt: Supported python versions @@ -31,8 +29,6 @@ aiogram |beta badge| :target: https://core.telegram.org/bots/api :alt: Telegram Bot API -| - .. image:: https://img.shields.io/github/actions/workflow/status/aiogram/aiogram/tests.yml?branch=dev-3.x&style=flat-square :target: https://github.com/aiogram/aiogram/actions :alt: Tests From 157df969d359d1583aaa3dc8b67e5c7356e559e8 Mon Sep 17 00:00:00 2001 From: imsLmaooo <94536394+imsLmaooo@users.noreply.github.com> Date: Sun, 12 Feb 2023 14:02:40 +0200 Subject: [PATCH 28/42] UA translation of chat_action.po from Bot Api (#1123) * Update Ukrainian docs localization * Update Ukrainian docs localization --- .../LC_MESSAGES/api/enums/chat_action.po | 22 +- .../api/methods/get_chat_member.po | 21 +- .../api/methods/promote_chat_member.po | 17 +- .../api/methods/restrict_chat_member.po | 18 +- .../api/methods/set_chat_permissions.po | 18 +- .../uk_UA/LC_MESSAGES/api/types/chat.po | 49 ++- .../api/types/chat_administrator_rights.po | 17 +- .../api/types/chat_join_request.po | 17 +- .../LC_MESSAGES/api/types/chat_member.po | 63 +++- .../api/types/chat_member_administrator.po | 17 +- .../api/types/chat_member_restricted.po | 121 ++++--- .../LC_MESSAGES/api/types/chat_permissions.po | 80 ++++- .../LC_MESSAGES/api/types/chat_shared.po | 50 +++ .../LC_MESSAGES/api/types/keyboard_button.po | 55 ++- .../api/types/keyboard_button_request_chat.po | 105 ++++++ .../api/types/keyboard_button_request_user.po | 61 ++++ .../uk_UA/LC_MESSAGES/api/types/message.po | 13 +- .../LC_MESSAGES/api/types/user_shared.po | 50 +++ docs/locale/uk_UA/LC_MESSAGES/changelog.po | 77 ++++- docs/locale/uk_UA/LC_MESSAGES/contributing.po | 323 ++++++++++++++++++ docs/locale/uk_UA/LC_MESSAGES/index.po | 7 +- .../LC_MESSAGES/utils/callback_answer.po | 205 +++++++++++ 22 files changed, 1277 insertions(+), 129 deletions(-) create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_user.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/user_shared.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/contributing.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_action.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_action.po index 0ba8fec1..b73fa4b6 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_action.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_action.po @@ -23,44 +23,44 @@ msgstr "" #: aiogram.enums.chat_action.ChatAction:1 of msgid "This object represents bot actions." -msgstr "" +msgstr "Цей об’єкт представляє дії бота." #: aiogram.enums.chat_action.ChatAction:3 of msgid "Choose one, depending on what the user is about to receive:" -msgstr "" +msgstr "Виберіть один залежно від того, що користувач збирається отримати:" #: aiogram.enums.chat_action.ChatAction:5 of msgid "typing for text messages," -msgstr "" +msgstr "typing для текстових повідомлень," #: aiogram.enums.chat_action.ChatAction:6 of msgid "upload_photo for photos," -msgstr "" +msgstr "upload_photo для фотографій," #: aiogram.enums.chat_action.ChatAction:7 of msgid "record_video or upload_video for videos," -msgstr "" +msgstr "record_video або upload_video для відео," #: aiogram.enums.chat_action.ChatAction:8 of msgid "record_voice or upload_voice for voice notes," -msgstr "" +msgstr "record_voice або upload_voice для голосових повідомлень," #: aiogram.enums.chat_action.ChatAction:9 of msgid "upload_document for general files," -msgstr "" +msgstr "upload_document для загальних файлів," #: aiogram.enums.chat_action.ChatAction:10 of msgid "choose_sticker for stickers," -msgstr "" +msgstr "choose_sticker для наклейок," #: aiogram.enums.chat_action.ChatAction:11 of msgid "find_location for location data," -msgstr "" +msgstr "find_location для данних про місце знаходження," #: aiogram.enums.chat_action.ChatAction:12 of msgid "record_video_note or upload_video_note for video notes." -msgstr "" +msgstr "record_video_note або upload_video_note для відео кружків." #: aiogram.enums.chat_action.ChatAction:14 of msgid "Source: https://core.telegram.org/bots/api#sendchataction" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#sendchataction" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po index f882bd5a..d3bff554 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-07 23:01+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/methods/get_chat_member.rst:3 msgid "getChatMember" @@ -31,9 +31,9 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work for other users, only if the bot is an " -"administrator in the chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"is only guaranteed to work for other users if the bot is an administrator" +" in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` " +"object on success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -85,3 +85,14 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. The " +#~ "method is guaranteed to work for " +#~ "other users, only if the bot is" +#~ " an administrator in the chat. " +#~ "Returns a :class:`aiogram.types.chat_member.ChatMember`" +#~ " object on success." +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po index 2d9c0978..8c7dbc2b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/promote_chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/methods/promote_chat_member.rst:3 msgid "promoteChatMember" @@ -102,7 +102,7 @@ msgstr "" #: of msgid "" "Pass :code:`True` if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by him)" msgstr "" @@ -170,3 +170,14 @@ msgstr "" #: ../../api/methods/promote_chat_member.rst:50 msgid ":meth:`aiogram.types.chat.Chat.promote`" msgstr "" + +#~ msgid "" +#~ "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)" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/restrict_chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/restrict_chat_member.po index 9c0755b7..6ab0dc68 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/restrict_chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/restrict_chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/methods/restrict_chat_member.rst:3 msgid "restrictChatMember" @@ -54,6 +54,19 @@ msgstr "" msgid "A JSON-serialized object for new user permissions" msgstr "" +#: ../../docstring +#: aiogram.methods.restrict_chat_member.RestrictChatMember.use_independent_chat_permissions:1 +#: of +msgid "" +"Pass :code:`True` if chat permissions are set independently. Otherwise, " +"the *can_send_other_messages* and *can_add_web_page_previews* permissions" +" will imply the *can_send_messages*, *can_send_audios*, " +"*can_send_documents*, *can_send_photos*, *can_send_videos*, " +"*can_send_video_notes*, and *can_send_voice_notes* permissions; the " +"*can_send_polls* permission will imply the *can_send_messages* " +"permission." +msgstr "" + #: ../../docstring #: aiogram.methods.restrict_chat_member.RestrictChatMember.until_date:1 of msgid "" @@ -103,3 +116,4 @@ msgstr "" #: ../../api/methods/restrict_chat_member.rst:50 msgid ":meth:`aiogram.types.chat.Chat.restrict`" msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po index d27d7878..84b5a8aa 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_chat_permissions.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/methods/set_chat_permissions.rst:3 msgid "setChatPermissions" @@ -49,6 +49,19 @@ msgstr "" msgid "A JSON-serialized object for new default chat permissions" msgstr "" +#: ../../docstring +#: aiogram.methods.set_chat_permissions.SetChatPermissions.use_independent_chat_permissions:1 +#: of +msgid "" +"Pass :code:`True` if chat permissions are set independently. Otherwise, " +"the *can_send_other_messages* and *can_add_web_page_previews* permissions" +" will imply the *can_send_messages*, *can_send_audios*, " +"*can_send_documents*, *can_send_photos*, *can_send_videos*, " +"*can_send_video_notes*, and *can_send_voice_notes* permissions; the " +"*can_send_polls* permission will imply the *can_send_messages* " +"permission." +msgstr "" + #: ../../api/methods/set_chat_permissions.rst:14 msgid "Usage" msgstr "" @@ -90,3 +103,4 @@ msgstr "" #: ../../api/methods/set_chat_permissions.rst:50 msgid ":meth:`aiogram.types.chat.Chat.set_permissions`" msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po index c0f95110..df76afc2 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-07 23:01+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/chat.rst:3 msgid "Chat" @@ -733,9 +733,9 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work for other users, only if the bot is an " -"administrator in the chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"is only guaranteed to work for other users if the bot is an administrator" +" in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` " +"object on success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -944,8 +944,20 @@ msgstr "" msgid "A JSON-serialized object for new default chat permissions" msgstr "" +#: aiogram.types.chat.Chat.restrict:12 #: aiogram.types.chat.Chat.set_permissions:11 of msgid "" +"Pass :code:`True` if chat permissions are set independently. Otherwise, " +"the *can_send_other_messages* and *can_add_web_page_previews* permissions" +" will imply the *can_send_messages*, *can_send_audios*, " +"*can_send_documents*, *can_send_photos*, *can_send_videos*, " +"*can_send_video_notes*, and *can_send_voice_notes* permissions; the " +"*can_send_polls* permission will imply the *can_send_messages* " +"permission." +msgstr "" + +#: aiogram.types.chat.Chat.set_permissions:12 of +msgid "" "instance of method " ":class:`aiogram.methods.set_chat_permissions.SetChatPermissions`" msgstr "" @@ -1010,7 +1022,7 @@ msgstr "" #: aiogram.types.chat.Chat.promote:18 of msgid "" "Pass :code:`True` if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by him)" msgstr "" @@ -1064,14 +1076,14 @@ msgstr "" msgid "A JSON-serialized object for new user permissions" msgstr "" -#: aiogram.types.chat.Chat.restrict:12 of +#: aiogram.types.chat.Chat.restrict:13 of msgid "" "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" msgstr "" -#: aiogram.types.chat.Chat.restrict:13 of +#: aiogram.types.chat.Chat.restrict:14 of msgid "" "instance of method " ":class:`aiogram.methods.restrict_chat_member.RestrictChatMember`" @@ -1256,3 +1268,24 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. The " +#~ "method is guaranteed to work for " +#~ "other users, only if the bot is" +#~ " an administrator in the chat. " +#~ "Returns a :class:`aiogram.types.chat_member.ChatMember`" +#~ " object on success." +#~ msgstr "" + +#~ msgid "" +#~ "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)" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po index e792b43d..519189b1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_administrator_rights.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/chat_administrator_rights.rst:3 msgid "ChatAdministratorRights" @@ -68,7 +68,7 @@ msgstr "" #: of msgid "" ":code:`True`, if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by the user)" msgstr "" @@ -118,3 +118,14 @@ msgid "" "*Optional*. :code:`True`, if the user is allowed to create, rename, " "close, and reopen forum topics; supergroups only" msgstr "" + +#~ msgid "" +#~ ":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)" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po index 0349c899..beaee2ea 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_join_request.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/chat_join_request.rst:3 msgid "ChatJoinRequest" @@ -38,6 +38,18 @@ msgstr "" msgid "User that sent the join request" msgstr "" +#: ../../docstring +#: aiogram.types.chat_join_request.ChatJoinRequest.user_chat_id:1 of +msgid "" +"Identifier of a private chat with the user who sent the join request. " +"This number may have more than 32 significant bits and some programming " +"languages may have difficulty/silent defects in interpreting it. But it " +"has at most 52 significant bits, so a 64-bit integer or double-precision " +"float type are safe for storing this identifier. The bot can use this " +"identifier for 24 hours to send messages until the join request is " +"processed, assuming no other administrator contacted the user." +msgstr "" + #: ../../docstring aiogram.types.chat_join_request.ChatJoinRequest.date:1 of msgid "Date the request was sent in Unix time" msgstr "" @@ -121,3 +133,4 @@ msgstr "" #~ msgid "Use this method to decline a chat join request." #~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member.po index 87fe2331..6f46ae07 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/chat_member.rst:3 msgid "ChatMember" @@ -108,8 +108,8 @@ msgstr "" #: of msgid "" "*Optional*. :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 " +" with a subset of their own privileges or demote administrators that they" +" have promoted, directly or indirectly (promoted by administrators that " "were appointed by the user)" msgstr "" @@ -158,14 +158,33 @@ msgstr "" #: ../../docstring aiogram.types.chat_member.ChatMember.can_send_messages:1 of msgid "" "*Optional*. :code:`True`, if the user is allowed to send text messages, " -"contacts, locations and venues" +"contacts, invoices, locations and venues" msgstr "" -#: ../../docstring -#: aiogram.types.chat_member.ChatMember.can_send_media_messages:1 of -msgid "" -"*Optional*. :code:`True`, if the user is allowed to send audios, " -"documents, photos, videos, video notes and voice notes" +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_audios:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_documents:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_photos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_videos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_video_notes:1 +#: of +msgid "*Optional*. :code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_voice_notes:1 +#: of +msgid "*Optional*. :code:`True`, if the user is allowed to send voice notes" msgstr "" #: ../../docstring aiogram.types.chat_member.ChatMember.can_send_polls:1 of @@ -194,3 +213,27 @@ msgstr "" #~ msgid "..." #~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :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)" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send audios, documents, " +#~ "photos, videos, video notes and voice" +#~ " notes" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po index 0045c783..8d56701a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_administrator.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/chat_member_administrator.rst:3 msgid "ChatMemberAdministrator" @@ -89,7 +89,7 @@ msgstr "" #: of msgid "" ":code:`True`, if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by the user)" msgstr "" @@ -145,3 +145,14 @@ msgstr "" #: of msgid "*Optional*. Custom title for this user" msgstr "" + +#~ msgid "" +#~ ":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)" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_restricted.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_restricted.po index 79784f6d..052a4b20 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_restricted.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_member_restricted.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/chat_member_restricted.rst:3 msgid "ChatMemberRestricted" @@ -49,6 +49,72 @@ msgid "" "request" msgstr "" +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_messages:1 +#: of +msgid "" +":code:`True`, if the user is allowed to send text messages, contacts, " +"invoices, locations and venues" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_audios:1 +#: of +msgid ":code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_documents:1 +#: of +msgid ":code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_photos:1 +#: of +msgid ":code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_videos:1 +#: of +msgid ":code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_video_notes:1 +#: of +msgid ":code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_voice_notes:1 +#: of +msgid ":code:`True`, if the user is allowed to send voice notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_polls:1 +#: of +msgid ":code:`True`, if the user is allowed to send polls" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_other_messages:1 +#: of +msgid "" +":code:`True`, if the user is allowed to send animations, games, stickers " +"and use inline bots" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_add_web_page_previews:1 +#: of +msgid "" +":code:`True`, if the user is allowed to add web page previews to their " +"messages" +msgstr "" + #: ../../docstring #: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_change_info:1 #: of @@ -75,47 +141,22 @@ msgstr "" msgid ":code:`True`, if the user is allowed to create forum topics" msgstr "" -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_messages:1 -#: of -msgid "" -":code:`True`, if the user is allowed to send text messages, contacts, " -"locations and venues" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_media_messages:1 -#: of -msgid "" -":code:`True`, if the user is allowed to send audios, documents, photos, " -"videos, video notes and voice notes" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_polls:1 -#: of -msgid ":code:`True`, if the user is allowed to send polls" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_other_messages:1 -#: of -msgid "" -":code:`True`, if the user is allowed to send animations, games, stickers " -"and use inline bots" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_add_web_page_previews:1 -#: of -msgid "" -":code:`True`, if the user is allowed to add web page previews to their " -"messages" -msgstr "" - #: ../../docstring #: aiogram.types.chat_member_restricted.ChatMemberRestricted.until_date:1 of msgid "" "Date when restrictions will be lifted for this user; unix time. If 0, " "then the user is restricted forever" msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the user is allowed " +#~ "to send text messages, contacts, " +#~ "locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the user is allowed " +#~ "to send audios, documents, photos, " +#~ "videos, video notes and voice notes" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_permissions.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_permissions.po index d4bb052c..f3a97667 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_permissions.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_permissions.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/chat_permissions.rst:3 msgid "ChatPermissions" @@ -35,29 +35,49 @@ msgstr "" #: aiogram.types.chat_permissions.ChatPermissions.can_send_messages:1 of msgid "" "*Optional*. :code:`True`, if the user is allowed to send text messages, " -"contacts, locations and venues" +"contacts, invoices, locations and venues" msgstr "" #: ../../docstring -#: aiogram.types.chat_permissions.ChatPermissions.can_send_media_messages:1 of -msgid "" -"*Optional*. :code:`True`, if the user is allowed to send audios, " -"documents, photos, videos, video notes and voice notes, implies " -"can_send_messages" +#: aiogram.types.chat_permissions.ChatPermissions.can_send_audios:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_documents:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_photos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_videos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_video_notes:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_voice_notes:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send voice notes" msgstr "" #: ../../docstring #: aiogram.types.chat_permissions.ChatPermissions.can_send_polls:1 of -msgid "" -"*Optional*. :code:`True`, if the user is allowed to send polls, implies " -"can_send_messages" +msgid "*Optional*. :code:`True`, if the user is allowed to send polls" msgstr "" #: ../../docstring #: aiogram.types.chat_permissions.ChatPermissions.can_send_other_messages:1 of msgid "" "*Optional*. :code:`True`, if the user is allowed to send animations, " -"games, stickers and use inline bots, implies can_send_media_messages" +"games, stickers and use inline bots" msgstr "" #: ../../docstring @@ -65,7 +85,7 @@ msgstr "" #: of msgid "" "*Optional*. :code:`True`, if the user is allowed to add web page previews" -" to their messages, implies can_send_media_messages" +" to their messages" msgstr "" #: ../../docstring @@ -95,3 +115,37 @@ msgid "" "*Optional*. :code:`True`, if the user is allowed to create forum topics. " "If omitted defaults to the value of can_pin_messages" msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send audios, documents, " +#~ "photos, videos, video notes and voice" +#~ " notes, implies can_send_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send polls, implies " +#~ "can_send_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send animations, games, " +#~ "stickers and use inline bots, implies" +#~ " can_send_media_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to add web page previews " +#~ "to their messages, implies " +#~ "can_send_media_messages" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po new file mode 100644 index 00000000..21852254 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/chat_shared.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: ../../api/types/chat_shared.rst:3 +msgid "ChatShared" +msgstr "" + +#: aiogram.types.chat_shared.ChatShared:1 of +msgid "" +"This object contains information about the chat whose identifier was " +"shared with the bot using a " +":class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat`" +" button." +msgstr "" + +#: aiogram.types.chat_shared.ChatShared:3 of +msgid "Source: https://core.telegram.org/bots/api#chatshared" +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.request_id:1 of +msgid "Identifier of the request" +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.chat_id:1 of +msgid "" +"Identifier of the shared chat. This number may have more than 32 " +"significant bits and some programming languages may have " +"difficulty/silent defects in interpreting it. But it has at most 52 " +"significant bits, so a 64-bit integer or double-precision float type are " +"safe for storing this identifier. The bot may not have access to the chat" +" and could be unable to use this identifier, unless the chat is already " +"known to the bot by some other means." +msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po index 8a0ad540..446d54f3 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/keyboard_button.rst:3 msgid "KeyboardButton" @@ -24,12 +24,12 @@ msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:1 of msgid "" "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*." +"buttons, *String* can be used instead of this object to specify the " +"button text. The optional fields *web_app*, *request_user*, " +"*request_chat*, *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*." msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:4 of @@ -46,6 +46,13 @@ msgid "" msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:8 of +msgid "" +"**Note:** *request_user* and *request_chat* options will only work in " +"Telegram versions released after 3 February, 2023. Older clients will " +"display *unsupported message*." +msgstr "" + +#: aiogram.types.keyboard_button.KeyboardButton:10 of msgid "Source: https://core.telegram.org/bots/api#keyboardbutton" msgstr "" @@ -55,6 +62,22 @@ msgid "" "sent as a message when the button is pressed" msgstr "" +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_user:1 +#: of +msgid "" +"*Optional.* If specified, pressing the button will open a list of " +"suitable users. Tapping on any user will send their identifier to the bot" +" in a 'user_shared' service message. Available in private chats only." +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_chat:1 +#: of +msgid "" +"*Optional.* If specified, pressing the button will open a list of " +"suitable chats. Tapping on a chat will send its identifier to the bot in " +"a 'chat_shared' service message. Available in private chats only." +msgstr "" + #: ../../docstring #: aiogram.types.keyboard_button.KeyboardButton.request_contact:1 of msgid "" @@ -84,3 +107,19 @@ msgid "" "button is pressed. The Web App will be able to send a 'web_app_data' " "service message. Available in private chats only." msgstr "" + +#~ msgid "" +#~ "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*." +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po new file mode 100644 index 00000000..392f3b2e --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_chat.po @@ -0,0 +1,105 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: ../../api/types/keyboard_button_request_chat.rst:3 +msgid "KeyboardButtonRequestChat" +msgstr "" + +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat:1 of +msgid "" +"This object defines the criteria used to request a suitable chat. The " +"identifier of the selected chat will be shared with the bot when the " +"corresponding button is pressed." +msgstr "" + +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat:3 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.request_id:1 +#: of +msgid "" +"Signed 32-bit identifier of the request, which will be received back in " +"the :class:`aiogram.types.chat_shared.ChatShared` object. Must be unique " +"within the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_channel:1 +#: of +msgid "" +"Pass :code:`True` to request a channel chat, pass :code:`False` to " +"request a group or a supergroup chat." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_forum:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a forum supergroup, pass " +":code:`False` to request a non-forum chat. If not specified, no " +"additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_has_username:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a supergroup or a channel with a" +" username, pass :code:`False` to request a chat without a username. If " +"not specified, no additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_created:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a chat owned by the user. " +"Otherwise, no additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.user_administrator_rights:1 +#: of +msgid "" +"*Optional*. A JSON-serialized object listing the required administrator " +"rights of the user in the chat. The rights must be a superset of " +"*bot_administrator_rights*. If not specified, no additional restrictions " +"are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.bot_administrator_rights:1 +#: of +msgid "" +"*Optional*. A JSON-serialized object listing the required administrator " +"rights of the bot in the chat. The rights must be a subset of " +"*user_administrator_rights*. If not specified, no additional restrictions" +" are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.bot_is_member:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a chat with the bot as a member." +" Otherwise, no additional restrictions are applied." +msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_user.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_user.po new file mode 100644 index 00000000..a6b317ec --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/keyboard_button_request_user.po @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: ../../api/types/keyboard_button_request_user.rst:3 +msgid "KeyboardButtonRequestUser" +msgstr "" + +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser:1 of +msgid "" +"This object defines the criteria used to request a suitable user. The " +"identifier of the selected user will be shared with the bot when the " +"corresponding button is pressed." +msgstr "" + +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser:3 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonrequestuser" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.request_id:1 +#: of +msgid "" +"Signed 32-bit identifier of the request, which will be received back in " +"the :class:`aiogram.types.user_shared.UserShared` object. Must be unique " +"within the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.user_is_bot:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to " +"request a regular user. If not specified, no additional restrictions are " +"applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.user_is_premium:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a premium user, pass " +":code:`False` to request a non-premium user. If not specified, no " +"additional restrictions are applied." +msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po index 516aa013..416cf8e9 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../api/types/message.rst:3 msgid "Message" @@ -328,6 +328,14 @@ msgid "" "`_" msgstr "" +#: ../../docstring aiogram.types.message.Message.user_shared:1 of +msgid "*Optional*. Service message: a user was shared with the bot" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.chat_shared:1 of +msgid "*Optional*. Service message: a chat was shared with the bot" +msgstr "" + #: ../../docstring aiogram.types.message.Message.connected_website:1 of msgid "" "*Optional*. The domain name of the website on which the user has logged " @@ -2536,3 +2544,4 @@ msgstr "" #~ msgid "Copy message" #~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/user_shared.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_shared.po new file mode 100644 index 00000000..1f0e56d3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/user_shared.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: ../../api/types/user_shared.rst:3 +msgid "UserShared" +msgstr "" + +#: aiogram.types.user_shared.UserShared:1 of +msgid "" +"This object contains information about the user whose identifier was " +"shared with the bot using a " +":class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser`" +" button." +msgstr "" + +#: aiogram.types.user_shared.UserShared:3 of +msgid "Source: https://core.telegram.org/bots/api#usershared" +msgstr "" + +#: ../../docstring aiogram.types.user_shared.UserShared.request_id:1 of +msgid "Identifier of the request" +msgstr "" + +#: ../../docstring aiogram.types.user_shared.UserShared.user_id:1 of +msgid "" +"Identifier of the shared user. This number may have more than 32 " +"significant bits and some programming languages may have " +"difficulty/silent defects in interpreting it. But it has at most 52 " +"significant bits, so a 64-bit integer or double-precision float type are " +"safe for storing this identifier. The bot may not have access to the user" +" and could be unable to use this identifier, unless the user is already " +"known to the bot by some other means." +msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/changelog.po b/docs/locale/uk_UA/LC_MESSAGES/changelog.po index a8b8a071..975e4939 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/changelog.po +++ b/docs/locale/uk_UA/LC_MESSAGES/changelog.po @@ -8,21 +8,21 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-07 23:01+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../../CHANGES.rst:3 msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2023-01-07)" +msgid "\\ |release| [UNRELEASED DRAFT] (2023-02-12)" msgstr "" #: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 @@ -121,26 +121,77 @@ msgstr "" #: ../../[towncrier-fragments]:60 msgid "" -"Added full support of `Bot API 6.4 `_ `#1088 " -"`_" +"Added :ref:`callback answer ` feature `#1091 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:48 ../../../CHANGES.rst:97 ../../../CHANGES.rst:158 +#: ../../../CHANGES.rst:216 ../../../CHANGES.rst:262 ../../../CHANGES.rst:310 +#: ../../../CHANGES.rst:366 ../../../CHANGES.rst:451 ../../../CHANGES.rst:483 +#: ../../[towncrier-fragments]:65 +msgid "Bugfixes" +msgstr "" + +#: ../../[towncrier-fragments]:67 +msgid "" +"Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` " +"filter `#1106 `_" msgstr "" #: ../../../CHANGES.rst:71 ../../../CHANGES.rst:124 ../../../CHANGES.rst:175 #: ../../../CHANGES.rst:229 ../../../CHANGES.rst:271 ../../../CHANGES.rst:317 #: ../../../CHANGES.rst:377 ../../../CHANGES.rst:398 ../../../CHANGES.rst:421 #: ../../../CHANGES.rst:458 ../../../CHANGES.rst:497 -#: ../../[towncrier-fragments]:65 +#: ../../[towncrier-fragments]:72 msgid "Misc" msgstr "" -#: ../../[towncrier-fragments]:67 +#: ../../[towncrier-fragments]:74 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " "`_" msgstr "" +#: ../../[towncrier-fragments]:76 +msgid "" +"Added full support of `Bot API 6.4 `_ `#1088 " +"`_" +msgstr "" + +#: ../../[towncrier-fragments]:78 +msgid "" +"Updated package metadata, moved build internals from Poetry to Hatch, " +"added contributing guides. `#1095 " +"`_" +msgstr "" + +#: ../../[towncrier-fragments]:80 +msgid "" +"Added full support of `Bot API 6.5 `_" +msgstr "" + +#: ../../[towncrier-fragments]:84 +msgid "" +"Note that :obj:`aiogram.types.chat_permissions.ChatPermissions` is " +"updated without backward compatibility, so now this object has no " +":code:`can_send_media_messages` attribute" +msgstr "" + +#: ../../[towncrier-fragments]:86 +msgid "`#1112 `_" +msgstr "" + +#: ../../[towncrier-fragments]:87 +msgid "" +"Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an " +"unexpected keyword argument ''` with a more understandable one for " +"developers and with a link to the documentation. `#1114 " +"`_" +msgstr "" + #: ../../../CHANGES.rst:20 msgid "3.0.0b6 (2022-11-18)" msgstr "" @@ -213,12 +264,6 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:48 ../../../CHANGES.rst:97 ../../../CHANGES.rst:158 -#: ../../../CHANGES.rst:216 ../../../CHANGES.rst:262 ../../../CHANGES.rst:310 -#: ../../../CHANGES.rst:366 ../../../CHANGES.rst:451 ../../../CHANGES.rst:483 -msgid "Bugfixes" -msgstr "" - #: ../../../CHANGES.rst:50 msgid "" "Fixed :code:`Message.send_invoice` and :code:`Message.reply_invoice`, " @@ -2480,3 +2525,7 @@ msgstr "" #: ../../../HISTORY.rst:497 msgid "0.1 (2017-06-03)" msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2023-01-07)" +#~ msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/contributing.po b/docs/locale/uk_UA/LC_MESSAGES/contributing.po new file mode 100644 index 00000000..e71e4dda --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/contributing.po @@ -0,0 +1,323 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: ../../contributing.rst:3 +msgid "Contributing" +msgstr "" + +#: ../../contributing.rst:5 +msgid "You're welcome to contribute to aiogram!" +msgstr "" + +#: ../../contributing.rst:7 +msgid "" +"*aiogram* is an open-source project, and anyone can contribute to it in " +"any possible way" +msgstr "" + +#: ../../contributing.rst:11 +msgid "Developing" +msgstr "" + +#: ../../contributing.rst:13 +msgid "" +"Before making any changes in the framework code, it is necessary to fork " +"the project and clone the project to your PC and know how to do a pull-" +"request." +msgstr "" + +#: ../../contributing.rst:16 +msgid "" +"How to work with pull-request you can read in the `GitHub docs " +"`_" +msgstr "" + +#: ../../contributing.rst:18 +msgid "" +"Also in due to this project is written in Python, you will need Python to" +" be installed (is recommended to use latest Python versions, but any " +"version starting from 3.8 can be used)" +msgstr "" + +#: ../../contributing.rst:23 +msgid "Use virtualenv" +msgstr "" + +#: ../../contributing.rst:25 +msgid "" +"You can create a virtual environment in a directory using :code:`venv` " +"module (it should be pre-installed by default):" +msgstr "" + +#: ../../contributing.rst:31 +msgid "" +"This action will create a :code:`.venv` directory with the Python " +"binaries and then you will be able to install packages into that isolated" +" environment." +msgstr "" + +#: ../../contributing.rst:36 +msgid "Activate the environment" +msgstr "" + +#: ../../contributing.rst:38 +msgid "Linux/ macOS:" +msgstr "" + +#: ../../contributing.rst:44 +msgid "Windows PoweShell" +msgstr "" + +#: ../../contributing.rst:50 +msgid "" +"To check it worked, use described command, it should show the :code:`pip`" +" location inside the isolated environment" +msgstr "" + +#: ../../contributing.rst:53 +msgid "Linux, macOS:" +msgstr "" + +#: ../../contributing.rst:59 +msgid "Windows PowerShell" +msgstr "" + +#: ../../contributing.rst:65 +msgid "" +"Also make you shure you have the latest pip version in your virtual " +"environment to avoid errors on next steps:" +msgstr "" + +#: ../../contributing.rst:74 +msgid "Setup project" +msgstr "" + +#: ../../contributing.rst:76 +msgid "" +"After activating the environment install `aiogram` from sources and their" +" dependencies:" +msgstr "" + +#: ../../contributing.rst:82 +msgid "" +"It will install :code:`aiogram` in editable mode into your virtual " +"environment and all dependencies." +msgstr "" + +#: ../../contributing.rst:85 +msgid "Making changes in code" +msgstr "" + +#: ../../contributing.rst:87 +msgid "" +"At this point you can make any changes in the code that you want, it can " +"be any fixes, implementing new features or experimenting." +msgstr "" + +#: ../../contributing.rst:92 +msgid "Format the code (code-style)" +msgstr "" + +#: ../../contributing.rst:94 +msgid "" +"Note that this project is Black-formatted, so you should follow that " +"code-style, too be sure You're correctly doing this let's reformat the " +"code automatically:" +msgstr "" + +#: ../../contributing.rst:104 +msgid "Run tests" +msgstr "" + +#: ../../contributing.rst:106 +msgid "All changes should be tested:" +msgstr "" + +#: ../../contributing.rst:112 +msgid "" +"Also if you are doing something with Redis-storage, you will need to test" +" everything works with Redis:" +msgstr "" + +#: ../../contributing.rst:119 +msgid "Docs" +msgstr "" + +#: ../../contributing.rst:121 +msgid "" +"We are using `Sphinx` to render docs in different languages, all sources " +"located in `docs` directory, you can change the sources and to test it " +"you can start live-preview server and look what you are doing:" +msgstr "" + +#: ../../contributing.rst:130 +msgid "Docs translations" +msgstr "" + +#: ../../contributing.rst:132 +msgid "" +"Translation of the documentation is very necessary and cannot be done " +"without the help of the community from all over the world, so you are " +"welcome to translate the documentation into different languages." +msgstr "" + +#: ../../contributing.rst:136 +msgid "Before start, let's up to date all texts:" +msgstr "" + +#: ../../contributing.rst:144 +msgid "" +"Change the :code:`` in example below to the target " +"language code, after that you can modify texts inside " +":code:`docs/locale//LC_MESSAGES` as :code:`*.po` files by " +"using any text-editor or specialized utilites for GNU Gettext, for " +"example via `poedit `_." +msgstr "" + +#: ../../contributing.rst:149 +msgid "To view results:" +msgstr "" + +#: ../../contributing.rst:157 +msgid "Describe changes" +msgstr "" + +#: ../../contributing.rst:159 +msgid "" +"Describe your changes in one or more sentences so that bot developers " +"know what's changed in their favorite framework - create " +"`..rst` file and write the description." +msgstr "" + +#: ../../contributing.rst:162 +msgid "" +":code:`` is Issue or Pull-request number, after release link to " +"this issue will be published to the *Changelog* page." +msgstr "" + +#: ../../contributing.rst:165 +msgid ":code:`` is a changes category marker, it can be one of:" +msgstr "" + +#: ../../contributing.rst:167 +msgid ":code:`feature` - when you are implementing new feature" +msgstr "" + +#: ../../contributing.rst:168 +msgid ":code:`bugfix` - when you fix a bug" +msgstr "" + +#: ../../contributing.rst:169 +msgid ":code:`doc` - when you improve the docs" +msgstr "" + +#: ../../contributing.rst:170 +msgid ":code:`removal` - when you remove something from the framework" +msgstr "" + +#: ../../contributing.rst:171 +msgid "" +":code:`misc` - when changed something inside the Core or project " +"configuration" +msgstr "" + +#: ../../contributing.rst:173 +msgid "" +"If you have troubles with changing category feel free to ask Core-" +"contributors to help with choosing it." +msgstr "" + +#: ../../contributing.rst:176 +msgid "Complete" +msgstr "" + +#: ../../contributing.rst:178 +msgid "" +"After you have made all your changes, publish them to the repository and " +"create a pull request as mentioned at the beginning of the article and " +"wait for a review of these changes." +msgstr "" + +#: ../../contributing.rst:183 +msgid "Star on GitHub" +msgstr "" + +#: ../../contributing.rst:185 +msgid "" +"You can \"star\" repository on GitHub - " +"https://github.com/aiogram/aiogram (click the star button at the top " +"right)" +msgstr "" + +#: ../../contributing.rst:187 +msgid "" +"Adding stars makes it easier for other people to find this project and " +"understand how useful it is." +msgstr "" + +#: ../../contributing.rst:190 +msgid "Guides" +msgstr "" + +#: ../../contributing.rst:192 +msgid "" +"You can write guides how to develop Bots on top of aiogram and publish it" +" into YouTube, Medium, GitHub Books, any Courses platform or any other " +"platform that you know." +msgstr "" + +#: ../../contributing.rst:195 +msgid "" +"This will help more people learn about the framework and learn how to use" +" it" +msgstr "" + +#: ../../contributing.rst:199 +msgid "Take answers" +msgstr "" + +#: ../../contributing.rst:201 +msgid "" +"The developers is always asks for any question in our chats or any other " +"platforms like GitHub Discussions, StackOverflow and others, feel free to" +" answer to this questions." +msgstr "" + +#: ../../contributing.rst:205 +msgid "Funding" +msgstr "" + +#: ../../contributing.rst:207 +msgid "" +"The development of the project is free and not financed by commercial " +"organizations, it is my personal initiative (`@JRootJunior " +"`_) and I am engaged in the development of the " +"project in my free time." +msgstr "" + +#: ../../contributing.rst:211 +msgid "" +"So, if you want to financially support the project, or, for example, give" +" me a pizza or a beer, you can do it on `OpenCollective " +"`_ or `Patreon " +"`_." +msgstr "" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/index.po b/docs/locale/uk_UA/LC_MESSAGES/index.po index 1d6913cf..7add5fd0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/index.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.9.1\n" #: ../../../README.rst:3 msgid "aiogram |beta badge|" @@ -133,7 +133,7 @@ msgstr "Працює з `PyPy `_" #: ../../../README.rst:70 #, fuzzy msgid "" -"Supports `Telegram Bot API 6.4 `_ and" +"Supports `Telegram Bot API 6.5 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" "Підтримує `Telegram Bot API 6.3 `_ та" @@ -238,3 +238,4 @@ msgstr "Приклад використання" #: ../../index.rst:9 msgid "Contents" msgstr "Зміст" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po b/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po new file mode 100644 index 00000000..2adc4af9 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/utils/callback_answer.po @@ -0,0 +1,205 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: ../../utils/callback_answer.rst:4 +msgid "Callback answer" +msgstr "" + +#: ../../utils/callback_answer.rst:6 +msgid "" +"Helper for callback query handlers, can be useful in bots with a lot of " +"callback handlers to automatically take answer to all requests." +msgstr "" + +#: ../../utils/callback_answer.rst:10 +msgid "Simple usage" +msgstr "" + +#: ../../utils/callback_answer.rst:12 +msgid "" +"For use, it is enough to register the inner middleware " +":class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` in " +"dispatcher or specific router:" +msgstr "" + +#: ../../utils/callback_answer.rst:18 +msgid "" +"After that all handled callback queries will be answered automatically " +"after processing the handler." +msgstr "" + +#: ../../utils/callback_answer.rst:21 +msgid "Advanced usage" +msgstr "" + +#: ../../utils/callback_answer.rst:23 +msgid "" +"In some cases you need to have some non-standard response parameters, " +"this can be done in several ways:" +msgstr "" + +#: ../../utils/callback_answer.rst:26 +msgid "Global defaults" +msgstr "" + +#: ../../utils/callback_answer.rst:28 +msgid "" +"Change default parameters while initializing middleware, for example " +"change answer to `pre` mode and text \"OK\":" +msgstr "" + +#: ../../utils/callback_answer.rst:35 +msgid "" +"Look at :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` " +"to get all available parameters" +msgstr "" + +#: ../../utils/callback_answer.rst:39 +msgid "Handler specific" +msgstr "" + +#: ../../utils/callback_answer.rst:41 +msgid "" +"By using :ref:`flags ` you can change the behavior for specific " +"handler" +msgstr "" + +#: ../../utils/callback_answer.rst:50 +msgid "" +"Flag arguments is the same as in " +":class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` with " +"additional one :code:`disabled` to disable answer." +msgstr "" + +#: ../../utils/callback_answer.rst:54 +msgid "A special case" +msgstr "" + +#: ../../utils/callback_answer.rst:56 +msgid "" +"It is not always correct to answer the same in every case, so there is an" +" option to change the answer inside the handler. You can get an instance " +"of :class:`aiogram.utils.callback_answer.CallbackAnswer` object inside " +"handler and change whatever you want." +msgstr "" + +#: ../../utils/callback_answer.rst:61 +msgid "" +"Note that is impossible to change callback answer attributes when you use" +" :code:`pre=True` mode." +msgstr "" + +#: ../../utils/callback_answer.rst:76 +msgid "Combine that all at once" +msgstr "" + +#: ../../utils/callback_answer.rst:78 +msgid "" +"For example you want to answer in most of cases before handler with text " +"\"🤔\" but at some cases need to answer after the handler with custom " +"text, so you can do it:" +msgstr "" + +#: ../../utils/callback_answer.rst:94 +msgid "Description of objects" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware:1 of +msgid "Bases: :py:class:`~aiogram.dispatcher.middlewares.base.BaseMiddleware`" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:1 of +msgid "" +"Inner middleware for callback query handlers, can be useful in bots with " +"a lot of callback handlers to automatically take answer to all requests" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__ +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__ of +msgid "Parameters" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:4 of +msgid "send answer before execute handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:5 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:5 of +msgid "answer with text" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:6 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:6 of +msgid "show alert" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:7 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:7 of +msgid "game url" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:8 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:8 of +msgid "cache answer for some time" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer:1 of +msgid "Bases: :py:class:`object`" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:1 of +msgid "Callback answer configuration" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:3 of +msgid "this request is already answered by middleware" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:4 of +msgid "answer will not be performed" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.disable:1 of +msgid "Deactivate answering for this handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.disabled:1 of +msgid "Indicates that automatic answer is disabled in this handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.answered:1 of +msgid "Indicates that request is already answered by middleware" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.text:1 of +msgid "Response text :return:" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.show_alert:1 of +msgid "Whether to display an alert" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.url:1 of +msgid "Game url" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.cache_time:1 of +msgid "Response cache time" +msgstr "" + From dc7c99763eb4d4111cc04efad6b51f12be4d142b Mon Sep 17 00:00:00 2001 From: imsLmaooo <94536394+imsLmaooo@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:05:17 +0200 Subject: [PATCH 29/42] update ua docs: patch api/enums/*.po (#1126) --- .../uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po | 4 ++-- .../locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po | 2 +- docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po | 2 +- .../uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po | 4 ++-- .../uk_UA/LC_MESSAGES/api/enums/mask_position_point.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po | 4 ++-- .../uk_UA/LC_MESSAGES/api/enums/message_entity_type.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/parse_mode.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po | 4 ++-- docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po | 5 ++++- docs/locale/uk_UA/LC_MESSAGES/api/enums/update_type.po | 4 ++-- 16 files changed, 32 insertions(+), 29 deletions(-) diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po index 2d7153f4..e2dbf236 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/bot_command_scope_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.bot_command_scope_type.BotCommandScopeType:1 of msgid "This object represents the scope to which bot commands are applied." -msgstr "" +msgstr "Цей об’єкт представляє область, до якої застосовуються команди бота." #: aiogram.enums.bot_command_scope_type.BotCommandScopeType:3 of msgid "Source: https://core.telegram.org/bots/api#botcommandscope" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#botcommandscope" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po index d5455e57..645348ca 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_member_status.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.chat_member_status.ChatMemberStatus:1 of msgid "This object represents chat member status." -msgstr "" +msgstr "Цей об’єкт представляє статус учасника чату." #: aiogram.enums.chat_member_status.ChatMemberStatus:3 of msgid "Source: https://core.telegram.org/bots/api#chatmember" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#chatmember" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po index daa15092..adcfba27 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/chat_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.chat_type.ChatType:1 of msgid "This object represents a chat type" -msgstr "" +msgstr "Цей об’єкт представляє тип чату." #: aiogram.enums.chat_type.ChatType:3 of msgid "Source: https://core.telegram.org/bots/api#chat" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#chat" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po index b8d27ec9..6360494b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/content_type.po @@ -23,4 +23,4 @@ msgstr "" #: aiogram.enums.content_type.ContentType:1 of msgid "This object represents a type of content in message" -msgstr "" +msgstr "Цей об’єкт представляє тип вмісту в повідомленні." diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po index eacb9567..1d5a2903 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/dice_emoji.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.dice_emoji.DiceEmoji:1 of msgid "Emoji on which the dice throw animation is based" -msgstr "" +msgstr "Емоджі, на яких базується анімація кидка кубика." #: aiogram.enums.dice_emoji.DiceEmoji:3 of msgid "Source: https://core.telegram.org/bots/api#dice" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#dice" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po index ad64f7f1..0bab4898 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/index.po @@ -23,7 +23,7 @@ msgstr "" #: ../../api/enums/index.rst:5 msgid "Here is list of all available enums:" -msgstr "" +msgstr "Ось список усіх доступних переліків:" #~ msgid "Types" #~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po index 27a5da7e..0baa2869 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.inline_query_result_type.InlineQueryResultType:1 of msgid "The part of the face relative to which the mask should be placed." -msgstr "" +msgstr "Частина обличчя, щодо якої слід розмістити маску." #: aiogram.enums.inline_query_result_type.InlineQueryResultType:3 of msgid "Source: https://core.telegram.org/bots/api#maskposition" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#maskposition" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po index 2115e592..395d9a97 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/input_media_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.input_media_type.InputMediaType:1 of msgid "This object represents input media type" -msgstr "" +msgstr "Цей об’єкт представляє тип вхідного медіа." #: aiogram.enums.input_media_type.InputMediaType:3 of msgid "Source: https://core.telegram.org/bots/api#inputmedia" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#inputmedia" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/mask_position_point.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/mask_position_point.po index fde3a771..4b9b9262 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/mask_position_point.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/mask_position_point.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.mask_position_point.MaskPositionPoint:1 of msgid "The part of the face relative to which the mask should be placed." -msgstr "" +msgstr "Частина обличчя, щодо якої слід розмістити маску." #: aiogram.enums.mask_position_point.MaskPositionPoint:3 of msgid "Source: https://core.telegram.org/bots/api#maskposition" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#maskposition" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po index d7c0adc8..bf4d119e 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/menu_button_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.menu_button_type.MenuButtonType:1 of msgid "This object represents an type of Menu button" -msgstr "" +msgstr "Цей об’єкт представляє тип кнопки меню." #: aiogram.enums.menu_button_type.MenuButtonType:3 of msgid "Source: https://core.telegram.org/bots/api#menubuttondefault" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#menubuttondefault" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_entity_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_entity_type.po index 3704373b..d8b6068c 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_entity_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/message_entity_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.message_entity_type.MessageEntityType:1 of msgid "This object represents type of message entity" -msgstr "" +msgstr "Цей об’єкт представляє тип сутності повідомлення." #: aiogram.enums.message_entity_type.MessageEntityType:3 of msgid "Source: https://core.telegram.org/bots/api#messageentity" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#messageentity" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/parse_mode.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/parse_mode.po index cc565d5d..e1d8448b 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/parse_mode.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/parse_mode.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.parse_mode.ParseMode:1 of msgid "Formatting options" -msgstr "" +msgstr "Параметри форматування." #: aiogram.enums.parse_mode.ParseMode:3 of msgid "Source: https://core.telegram.org/bots/api#formatting-options" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#formatting-options" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po index 42d2ab15..9d931e48 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/poll_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.poll_type.PollType:1 of msgid "This object represents poll type" -msgstr "" +msgstr "Цей об'єкт представляє тип опитування." #: aiogram.enums.poll_type.PollType:3 of msgid "Source: https://core.telegram.org/bots/api#poll" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#poll" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po index 41da8cbb..ff70ad15 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.sticker_type.StickerType:1 of msgid "The part of the face relative to which the mask should be placed." -msgstr "" +msgstr "Частина обличчя, щодо якої слід розмістити маску." #: aiogram.enums.sticker_type.StickerType:3 of msgid "Source: https://core.telegram.org/bots/api#maskposition" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#maskposition" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po index f1a6c288..636bf54a 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/topic_icon_color.po @@ -23,10 +23,13 @@ msgstr "" #: aiogram.enums.topic_icon_color.TopicIconColor:1 of msgid "Color of the topic icon in RGB format." -msgstr "" +msgstr "Колір значка теми у форматі RGB." #: aiogram.enums.topic_icon_color.TopicIconColor:3 of msgid "" "Source: " "https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56" msgstr "" +"Джерело: " +"https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56" + diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/update_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/update_type.po index 1a191276..7485bd4d 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/update_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/update_type.po @@ -23,8 +23,8 @@ msgstr "" #: aiogram.enums.update_type.UpdateType:1 of msgid "This object represents the complete list of allowed update types" -msgstr "" +msgstr "Цей об’єкт представляє повний список дозволених типів оновлення." #: aiogram.enums.update_type.UpdateType:3 of msgid "Source: https://core.telegram.org/bots/api#update" -msgstr "" +msgstr "Джерело: https://core.telegram.org/bots/api#update" From a332e88bc324ef0696a0255c4e3ad180f2d26fda Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Mon, 13 Feb 2023 00:53:11 +0200 Subject: [PATCH 30/42] Fixed lines in FSM example --- .../dispatcher/finite_state_machine/index.rst | 43 +++++-------------- examples/finite_state_machine.py | 4 +- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/docs/dispatcher/finite_state_machine/index.rst b/docs/dispatcher/finite_state_machine/index.rst index 4971fae1..353d5f75 100644 --- a/docs/dispatcher/finite_state_machine/index.rst +++ b/docs/dispatcher/finite_state_machine/index.rst @@ -36,70 +36,49 @@ Step by step Before handle any states you will need to specify what kind of states you want to handle .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 15 - :lines: 15-18 + :pyobject: Form And then write handler for each state separately from the start of dialog Here is dialog can be started only via command :code:`/start`, so lets handle it and make transition user to state :code:`Form.name` .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 21 - :lines: 21-27 + :pyobject: command_start After that you will need to save some data to the storage and make transition to next step. .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 48 - :lines: 48-63 + :pyobject: process_name At the next steps user can make different answers, it can be `yes`, `no` or any other Handle :code:`yes` and soon we need to handle :code:`Form.language` state .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 77 - :lines: 77-84 + :pyobject: process_like_write_bots Handle :code:`no` .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 66 - :lines: 66-74 + :pyobject: process_dont_like_write_bots And handle any other answers .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 87 - :lines: 87-89 + :pyobject: process_unknown_write_bots All possible cases of `like_bots` step was covered, let's implement finally step .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 92 - :lines: 92-102 + :pyobject: process_language + +.. literalinclude:: ../../../examples/finite_state_machine.py + :pyobject: show_summary And now you have covered all steps from the image, but you can make possibility to cancel conversation, lets do that via command or text .. literalinclude:: ../../../examples/finite_state_machine.py - :language: python - :linenos: - :lineno-start: 30 - :lines: 30-45 + :pyobject: cancel_handler Complete example ---------------- diff --git a/examples/finite_state_machine.py b/examples/finite_state_machine.py index 79872bbf..8539015c 100644 --- a/examples/finite_state_machine.py +++ b/examples/finite_state_machine.py @@ -24,7 +24,7 @@ class Form(StatesGroup): language = State() -@form_router.message(Command(commands=["start"])) +@form_router.message(Command("start")) async def command_start(message: Message, state: FSMContext) -> None: await state.set_state(Form.name) await message.answer( @@ -33,7 +33,7 @@ async def command_start(message: Message, state: FSMContext) -> None: ) -@form_router.message(Command(commands=["cancel"])) +@form_router.message(Command("cancel")) @form_router.message(F.text.casefold() == "cancel") async def cancel_handler(message: Message, state: FSMContext) -> None: """ From d0b7135ca698f4ebf30f42c5af1ba0bc0ed07d4f Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 18 Feb 2023 15:46:28 +0200 Subject: [PATCH 31/42] Reworked graceful shutdown (#1124) * Reworked graceful shutdown * Remove special errors from polling process * Update dependencies * Coverage * Added changelog --- CHANGES/1124.misc.rst | 2 + Makefile | 2 +- aiogram/dispatcher/dispatcher.py | 141 +++++++++++++++++------ aiogram/dispatcher/flags.py | 6 +- aiogram/exceptions.py | 4 + pyproject.toml | 20 ++-- tests/test_dispatcher/test_dispatcher.py | 72 ++++++++++++ 7 files changed, 197 insertions(+), 50 deletions(-) create mode 100644 CHANGES/1124.misc.rst diff --git a/CHANGES/1124.misc.rst b/CHANGES/1124.misc.rst new file mode 100644 index 00000000..4a6e6221 --- /dev/null +++ b/CHANGES/1124.misc.rst @@ -0,0 +1,2 @@ +Reworked graceful shutdown. Added method to stop polling. +Now polling started from dispatcher can be stopped by signals gracefully without errors (on Linux and Mac). diff --git a/Makefile b/Makefile index cbe5c333..5696616b 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ clean: rm -rf *.egg-info rm -f report.html rm -f .coverage - rm -rf {build,dist,site,.cache,.mypy_cache,reports} + rm -rf {build,dist,site,.cache,.mypy_cache,.ruff_cache,reports} # ================================================================================================= # Code quality diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 7f058ec2..63eb9a3a 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -2,8 +2,10 @@ from __future__ import annotations import asyncio import contextvars +import signal import warnings -from asyncio import CancelledError, Future, Lock +from asyncio import CancelledError, Event, Future, Lock +from contextlib import suppress from typing import Any, AsyncGenerator, Dict, List, Optional, Union from .. import loggers @@ -89,6 +91,8 @@ class Dispatcher(Router): self.workflow_data: Dict[str, Any] = kwargs self._running_lock = Lock() + self._stop_signal = Event() + self._stopped_signal = Event() def __getitem__(self, item: str) -> Any: return self.workflow_data[item] @@ -321,17 +325,26 @@ class Dispatcher(Router): :param kwargs: :return: """ - async for update in self._listen_updates( - bot, - polling_timeout=polling_timeout, - backoff_config=backoff_config, - allowed_updates=allowed_updates, - ): - handle_update = self._process_update(bot=bot, update=update, **kwargs) - if handle_as_tasks: - asyncio.create_task(handle_update) - else: - await handle_update + user: User = await bot.me() + loggers.dispatcher.info( + "Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name + ) + try: + async for update in self._listen_updates( + bot, + polling_timeout=polling_timeout, + backoff_config=backoff_config, + allowed_updates=allowed_updates, + ): + handle_update = self._process_update(bot=bot, update=update, **kwargs) + if handle_as_tasks: + asyncio.create_task(handle_update) + else: + await handle_update + finally: + loggers.dispatcher.info( + "Polling stopped for bot @%s id=%d - %r", user.username, bot.id, user.full_name + ) async def _feed_webhook_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any: """ @@ -408,6 +421,24 @@ class Dispatcher(Router): return None + async def stop_polling(self) -> None: + """ + Execute this method if you want to stop polling programmatically + + :return: + """ + if not self._running_lock.locked(): + raise RuntimeError("Polling is not started") + self._stop_signal.set() + await self._stopped_signal.wait() + + def _signal_stop_polling(self, sig: signal.Signals) -> None: + if not self._running_lock.locked(): + return + + loggers.dispatcher.warning("Received %s signal", sig.name) + self._stop_signal.set() + async def start_polling( self, *bots: Bot, @@ -415,32 +446,54 @@ class Dispatcher(Router): handle_as_tasks: bool = True, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, allowed_updates: Optional[List[str]] = None, + handle_signals: bool = True, + close_bot_session: bool = True, **kwargs: Any, ) -> None: """ Polling runner - :param bots: - :param polling_timeout: - :param handle_as_tasks: - :param kwargs: - :param backoff_config: - :param allowed_updates: + :param bots: Bot instances (one or mre) + :param polling_timeout: Long-polling wait time + :param handle_as_tasks: Run task for each event and no wait result + :param backoff_config: backoff-retry config + :param allowed_updates: List of the update types you want your bot to receive + :param handle_signals: handle signals (SIGINT/SIGTERM) + :param close_bot_session: close bot sessions on shutdown + :param kwargs: contextual data :return: """ + if not bots: + raise ValueError("At least one bot instance is required to start polling") + if "bot" in kwargs: + raise ValueError( + "Keyword argument 'bot' is not acceptable, " + "the bot instance should be passed as positional argument" + ) + async with self._running_lock: # Prevent to run this method twice at a once + self._stop_signal.clear() + self._stopped_signal.clear() + + if handle_signals: + loop = asyncio.get_running_loop() + with suppress(NotImplementedError): # pragma: no cover + # Signals handling is not supported on Windows + # It also can't be covered on Windows + loop.add_signal_handler( + signal.SIGTERM, self._signal_stop_polling, signal.SIGTERM + ) + loop.add_signal_handler( + signal.SIGINT, self._signal_stop_polling, signal.SIGINT + ) + workflow_data = {"dispatcher": self, "bots": bots, "bot": bots[-1]} workflow_data.update(kwargs) await self.emit_startup(**workflow_data) loggers.dispatcher.info("Start polling") try: - coro_list = [] - for bot in bots: - user: User = await bot.me() - loggers.dispatcher.info( - "Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name - ) - coro_list.append( + tasks: List[asyncio.Task[Any]] = [ + asyncio.create_task( self._polling( bot=bot, handle_as_tasks=handle_as_tasks, @@ -450,36 +503,53 @@ class Dispatcher(Router): **kwargs, ) ) - await asyncio.gather(*coro_list) + for bot in bots + ] + tasks.append(asyncio.create_task(self._stop_signal.wait())) + done, pending = await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED) + + for task in pending: + # (mostly) Graceful shutdown unfinished tasks + task.cancel() + with suppress(CancelledError): + await task + # Wait finished tasks to propagate unhandled exceptions + await asyncio.gather(*done) + finally: loggers.dispatcher.info("Polling stopped") try: await self.emit_shutdown(**workflow_data) finally: - for bot in bots: # Close sessions - await bot.session.close() + if close_bot_session: + await asyncio.gather(*(bot.session.close() for bot in bots)) + self._stopped_signal.set() def run_polling( self, *bots: Bot, - polling_timeout: int = 30, + polling_timeout: int = 10, handle_as_tasks: bool = True, backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, allowed_updates: Optional[List[str]] = None, + handle_signals: bool = True, + close_bot_session: bool = True, **kwargs: Any, ) -> None: """ Run many bots with polling - :param bots: Bot instances - :param polling_timeout: Poling timeout - :param backoff_config: + :param bots: Bot instances (one or mre) + :param polling_timeout: Long-polling wait time :param handle_as_tasks: Run task for each event and no wait result + :param backoff_config: backoff-retry config :param allowed_updates: List of the update types you want your bot to receive + :param handle_signals: handle signals (SIGINT/SIGTERM) + :param close_bot_session: close bot sessions on shutdown :param kwargs: contextual data :return: """ - try: + with suppress(KeyboardInterrupt): return asyncio.run( self.start_polling( *bots, @@ -488,8 +558,7 @@ class Dispatcher(Router): handle_as_tasks=handle_as_tasks, backoff_config=backoff_config, allowed_updates=allowed_updates, + handle_signals=handle_signals, + close_bot_session=close_bot_session, ) ) - except (KeyboardInterrupt, SystemExit): # pragma: no cover - # Allow to graceful shutdown - pass diff --git a/aiogram/dispatcher/flags.py b/aiogram/dispatcher/flags.py index 82cdbc04..aad8a29f 100644 --- a/aiogram/dispatcher/flags.py +++ b/aiogram/dispatcher/flags.py @@ -92,9 +92,9 @@ def extract_flags(handler: Union["HandlerObject", Dict[str, Any]]) -> Dict[str, """ if isinstance(handler, dict) and "handler" in handler: handler = handler["handler"] - if not hasattr(handler, "flags"): - return {} - return handler.flags + if hasattr(handler, "flags"): + return handler.flags + return {} def get_flag( diff --git a/aiogram/exceptions.py b/aiogram/exceptions.py index dcf433c6..1c1e59fb 100644 --- a/aiogram/exceptions.py +++ b/aiogram/exceptions.py @@ -42,6 +42,10 @@ class TelegramAPIError(DetailedAiogramError): super().__init__(message=message) self.method = method + def __str__(self) -> str: + original_message = super().__str__() + return f"Telegram server says {original_message}" + class TelegramNetworkError(TelegramAPIError): pass diff --git a/pyproject.toml b/pyproject.toml index 0c2d3a5e..45809b52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ classifiers = [ ] dependencies = [ "magic-filter~=1.0.9", - "aiohttp~=3.8.3", + "aiohttp~=3.8.4", "pydantic~=1.10.4", "aiofiles~=23.1.0", "certifi>=2022.9.24", @@ -56,7 +56,7 @@ fast = [ "uvloop>=0.17.0; (sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy'", ] redis = [ - "redis~=4.3.4", + "redis~=4.5.1", ] proxy = [ "aiohttp-socks~=0.7.1", @@ -65,11 +65,11 @@ i18n = [ "Babel~=2.11.0", ] test = [ - "pytest~=7.1.3", - "pytest-html~=3.1.1", - "pytest-asyncio~=0.19.0", + "pytest~=7.2.1", + "pytest-html~=3.2.0", + "pytest-asyncio~=0.20.3", "pytest-lazy-fixture~=0.6.3", - "pytest-mock~=3.9.0", + "pytest-mock~=3.10.0", "pytest-mypy~=0.10.0", "pytest-cov~=4.0.0", "pytest-aiohttp~=1.0.4", @@ -93,12 +93,12 @@ docs = [ dev = [ "black~=23.1", "isort~=5.11", - "ruff~=0.0.245", - "mypy~=0.981", + "ruff~=0.0.246", + "mypy~=1.0.0", "toml~=0.10.2", - "pre-commit~=2.20.0", + "pre-commit~=3.0.4", "packaging~=23.0", - "typing-extensions~=4.3.0", + "typing-extensions~=4.4.0", ] [project.urls] diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 6d6fa1ab..509bff35 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -1,7 +1,9 @@ import asyncio import datetime +import signal import time import warnings +from asyncio import Event from collections import Counter from typing import Any from unittest.mock import AsyncMock, patch @@ -667,6 +669,17 @@ class TestDispatcher: async def test_start_polling(self, bot: MockedBot): dispatcher = Dispatcher() + with pytest.raises( + ValueError, match="At least one bot instance is required to start polling" + ): + await dispatcher.start_polling() + with pytest.raises( + ValueError, + match="Keyword argument 'bot' is not acceptable, " + "the bot instance should be passed as positional argument", + ): + await dispatcher.start_polling(bot, bot=bot) + bot.add_result_for( GetMe, ok=True, result=User(id=42, is_bot=True, first_name="The bot", username="tbot") ) @@ -690,6 +703,65 @@ class TestDispatcher: mocked_process_update.assert_awaited() mocked_emit_shutdown.assert_awaited() + async def test_stop_polling(self): + dispatcher = Dispatcher() + with pytest.raises(RuntimeError): + await dispatcher.stop_polling() + + assert not dispatcher._stop_signal.is_set() + assert not dispatcher._stopped_signal.is_set() + with patch("asyncio.locks.Event.wait", new_callable=AsyncMock) as mocked_wait: + async with dispatcher._running_lock: + await dispatcher.stop_polling() + assert dispatcher._stop_signal.is_set() + mocked_wait.assert_awaited() + + async def test_signal_stop_polling(self): + dispatcher = Dispatcher() + with patch("asyncio.locks.Event.set") as mocked_set: + dispatcher._signal_stop_polling(signal.SIGINT) + mocked_set.assert_not_called() + + async with dispatcher._running_lock: + dispatcher._signal_stop_polling(signal.SIGINT) + mocked_set.assert_called() + + async def test_stop_polling_by_method(self, bot: MockedBot): + dispatcher = Dispatcher() + bot.add_result_for( + GetMe, ok=True, result=User(id=42, is_bot=True, first_name="The bot", username="tbot") + ) + running = Event() + + async def _mock_updates(*_): + running.set() + while True: + yield Update(update_id=42) + await asyncio.sleep(1) + + with patch( + "aiogram.dispatcher.dispatcher.Dispatcher._process_update", new_callable=AsyncMock + ) as mocked_process_update, patch( + "aiogram.dispatcher.dispatcher.Dispatcher._listen_updates", + return_value=_mock_updates(), + ): + task = asyncio.ensure_future(dispatcher.start_polling(bot)) + await running.wait() + + assert not dispatcher._stop_signal.is_set() + assert not dispatcher._stopped_signal.is_set() + + await dispatcher.stop_polling() + assert dispatcher._stop_signal.is_set() + assert dispatcher._stopped_signal.is_set() + assert not task.exception() + + mocked_process_update.assert_awaited() + + @pytest.mark.skip("Stopping by signal should also be tested as the same as stopping by method") + async def test_stop_polling_by_signal(self, bot: MockedBot): + pass + def test_run_polling(self, bot: MockedBot): dispatcher = Dispatcher() with patch( From 753954adb0cb2fffb80279034ab6fe710cc0224a Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 18 Feb 2023 15:52:39 +0200 Subject: [PATCH 32/42] Update changelog --- CHANGES/{816.bugfix => 816.bugfix.rst} | 0 CHANGES/952.feature.rst | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename CHANGES/{816.bugfix => 816.bugfix.rst} (100%) diff --git a/CHANGES/816.bugfix b/CHANGES/816.bugfix.rst similarity index 100% rename from CHANGES/816.bugfix rename to CHANGES/816.bugfix.rst diff --git a/CHANGES/952.feature.rst b/CHANGES/952.feature.rst index 86135dc8..fb206222 100644 --- a/CHANGES/952.feature.rst +++ b/CHANGES/952.feature.rst @@ -4,7 +4,7 @@ Added missing shortcuts, new enums, reworked old stuff All previously added enums is re-generated in new place - `aiogram.enums` instead of `aiogram.types` **Added enums:** :class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`, - :class:`aiogram.enums.chat_action.ChatActions`, + :class:`aiogram.enums.chat_action.ChatAction`, :class:`aiogram.enums.chat_member_status.ChatMemberStatus`, :class:`aiogram.enums.chat_type.ChatType`, :class:`aiogram.enums.content_type.ContentType`, From 7efec4a5df5ab41f1bfde89ed5074767a8620a13 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 18 Feb 2023 15:54:31 +0200 Subject: [PATCH 33/42] Towncrier build --- CHANGES.rst | 100 +++++++++++++++++++++++++++++++++++++++ CHANGES/1069.misc.rst | 1 - CHANGES/1088.misc.rst | 1 - CHANGES/1091.feature.rst | 1 - CHANGES/1095.misc.rst | 1 - CHANGES/1106.bugfix.rst | 1 - CHANGES/1112.misc.rst | 6 --- CHANGES/1114.misc.rst | 2 - CHANGES/1117.feature.rst | 1 - CHANGES/1120.misc.rst | 1 - CHANGES/1124.misc.rst | 2 - CHANGES/816.bugfix.rst | 1 - CHANGES/952.feature.rst | 52 -------------------- pyproject.toml | 1 + 14 files changed, 101 insertions(+), 70 deletions(-) delete mode 100644 CHANGES/1069.misc.rst delete mode 100644 CHANGES/1088.misc.rst delete mode 100644 CHANGES/1091.feature.rst delete mode 100644 CHANGES/1095.misc.rst delete mode 100644 CHANGES/1106.bugfix.rst delete mode 100644 CHANGES/1112.misc.rst delete mode 100644 CHANGES/1114.misc.rst delete mode 100644 CHANGES/1117.feature.rst delete mode 100644 CHANGES/1120.misc.rst delete mode 100644 CHANGES/1124.misc.rst delete mode 100644 CHANGES/816.bugfix.rst delete mode 100644 CHANGES/952.feature.rst diff --git a/CHANGES.rst b/CHANGES.rst index 86ad5552..048d5509 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,6 +16,106 @@ Changelog .. towncrier release notes start +3.0.0b7 (2023-02-18) +===================== + +Features +-------- + +- Added missing shortcuts, new enums, reworked old stuff + + **Breaking** + All previously added enums is re-generated in new place - `aiogram.enums` instead of `aiogram.types` + + **Added enums:** :class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`, + :class:`aiogram.enums.chat_action.ChatAction`, + :class:`aiogram.enums.chat_member_status.ChatMemberStatus`, + :class:`aiogram.enums.chat_type.ChatType`, + :class:`aiogram.enums.content_type.ContentType`, + :class:`aiogram.enums.dice_emoji.DiceEmoji`, + :class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, + :class:`aiogram.enums.input_media_type.InputMediaType`, + :class:`aiogram.enums.mask_position_point.MaskPositionPoint`, + :class:`aiogram.enums.menu_button_type.MenuButtonType`, + :class:`aiogram.enums.message_entity_type.MessageEntityType`, + :class:`aiogram.enums.parse_mode.ParseMode`, + :class:`aiogram.enums.poll_type.PollType`, + :class:`aiogram.enums.sticker_type.StickerType`, + :class:`aiogram.enums.topic_icon_color.TopicIconColor`, + :class:`aiogram.enums.update_type.UpdateType`, + + **Added shortcuts**: + + - *Chat* :meth:`aiogram.types.chat.Chat.get_administrators`, + :meth:`aiogram.types.chat.Chat.delete_message`, + :meth:`aiogram.types.chat.Chat.revoke_invite_link`, + :meth:`aiogram.types.chat.Chat.edit_invite_link`, + :meth:`aiogram.types.chat.Chat.create_invite_link`, + :meth:`aiogram.types.chat.Chat.export_invite_link`, + :meth:`aiogram.types.chat.Chat.do`, + :meth:`aiogram.types.chat.Chat.delete_sticker_set`, + :meth:`aiogram.types.chat.Chat.set_sticker_set`, + :meth:`aiogram.types.chat.Chat.get_member`, + :meth:`aiogram.types.chat.Chat.get_member_count`, + :meth:`aiogram.types.chat.Chat.leave`, + :meth:`aiogram.types.chat.Chat.unpin_all_messages`, + :meth:`aiogram.types.chat.Chat.unpin_message`, + :meth:`aiogram.types.chat.Chat.pin_message`, + :meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, + :meth:`aiogram.types.chat.Chat.set_permissions`, + :meth:`aiogram.types.chat.Chat.promote`, + :meth:`aiogram.types.chat.Chat.restrict`, + :meth:`aiogram.types.chat.Chat.unban`, + :meth:`aiogram.types.chat.Chat.ban`, + :meth:`aiogram.types.chat.Chat.set_description`, + :meth:`aiogram.types.chat.Chat.set_title`, + :meth:`aiogram.types.chat.Chat.delete_photo`, + :meth:`aiogram.types.chat.Chat.set_photo`, + - *Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`, + :meth:`aiogram.types.sticker.Sticker.delete_from_set`, + - *User*: :meth:`aiogram.types.user.User.get_profile_photos` + `#952 `_ +- Added :ref:`callback answer ` feature + `#1091 `_ +- Added a method that allows you to compactly register routers + `#1117 `_ + + +Bugfixes +-------- + +- Check status code when downloading file + `#816 `_ +- Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` filter + `#1106 `_ + + +Misc +---- + +- Added integration with new code-generator named `Butcher `_ + `#1069 `_ +- Added full support of `Bot API 6.4 `_ + `#1088 `_ +- Updated package metadata, moved build internals from Poetry to Hatch, added contributing guides. + `#1095 `_ +- Added full support of `Bot API 6.5 `_ + + .. danger:: + + Note that :obj:`aiogram.types.chat_permissions.ChatPermissions` is updated without + backward compatibility, so now this object has no :code:`can_send_media_messages` attribute + `#1112 `_ +- Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument ''` + with a more understandable one for developers and with a link to the documentation. + `#1114 `_ +- Added possibility to reply into webhook with files + `#1120 `_ +- Reworked graceful shutdown. Added method to stop polling. + Now polling started from dispatcher can be stopped by signals gracefully without errors (on Linux and Mac). + `#1124 `_ + + 3.0.0b6 (2022-11-18) ===================== diff --git a/CHANGES/1069.misc.rst b/CHANGES/1069.misc.rst deleted file mode 100644 index a5a1730b..00000000 --- a/CHANGES/1069.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added integration with new code-generator named `Butcher `_ diff --git a/CHANGES/1088.misc.rst b/CHANGES/1088.misc.rst deleted file mode 100644 index 2671fbed..00000000 --- a/CHANGES/1088.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added full support of `Bot API 6.4 `_ diff --git a/CHANGES/1091.feature.rst b/CHANGES/1091.feature.rst deleted file mode 100644 index b3e773ce..00000000 --- a/CHANGES/1091.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Added :ref:`callback answer ` feature diff --git a/CHANGES/1095.misc.rst b/CHANGES/1095.misc.rst deleted file mode 100644 index 87de48c8..00000000 --- a/CHANGES/1095.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Updated package metadata, moved build internals from Poetry to Hatch, added contributing guides. diff --git a/CHANGES/1106.bugfix.rst b/CHANGES/1106.bugfix.rst deleted file mode 100644 index 54b60843..00000000 --- a/CHANGES/1106.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` filter diff --git a/CHANGES/1112.misc.rst b/CHANGES/1112.misc.rst deleted file mode 100644 index ad78adc3..00000000 --- a/CHANGES/1112.misc.rst +++ /dev/null @@ -1,6 +0,0 @@ -Added full support of `Bot API 6.5 `_ - -.. danger:: - - Note that :obj:`aiogram.types.chat_permissions.ChatPermissions` is updated without - backward compatibility, so now this object has no :code:`can_send_media_messages` attribute diff --git a/CHANGES/1114.misc.rst b/CHANGES/1114.misc.rst deleted file mode 100644 index ba1661ae..00000000 --- a/CHANGES/1114.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument ''` -with a more understandable one for developers and with a link to the documentation. diff --git a/CHANGES/1117.feature.rst b/CHANGES/1117.feature.rst deleted file mode 100644 index cdcf0999..00000000 --- a/CHANGES/1117.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Added a method that allows you to compactly register routers \ No newline at end of file diff --git a/CHANGES/1120.misc.rst b/CHANGES/1120.misc.rst deleted file mode 100644 index 820b2b01..00000000 --- a/CHANGES/1120.misc.rst +++ /dev/null @@ -1 +0,0 @@ -Added possibility to reply into webhook with files diff --git a/CHANGES/1124.misc.rst b/CHANGES/1124.misc.rst deleted file mode 100644 index 4a6e6221..00000000 --- a/CHANGES/1124.misc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Reworked graceful shutdown. Added method to stop polling. -Now polling started from dispatcher can be stopped by signals gracefully without errors (on Linux and Mac). diff --git a/CHANGES/816.bugfix.rst b/CHANGES/816.bugfix.rst deleted file mode 100644 index 22bfee8c..00000000 --- a/CHANGES/816.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Check status code when downloading file diff --git a/CHANGES/952.feature.rst b/CHANGES/952.feature.rst deleted file mode 100644 index fb206222..00000000 --- a/CHANGES/952.feature.rst +++ /dev/null @@ -1,52 +0,0 @@ -Added missing shortcuts, new enums, reworked old stuff - -**Breaking** -All previously added enums is re-generated in new place - `aiogram.enums` instead of `aiogram.types` - -**Added enums:** :class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`, - :class:`aiogram.enums.chat_action.ChatAction`, - :class:`aiogram.enums.chat_member_status.ChatMemberStatus`, - :class:`aiogram.enums.chat_type.ChatType`, - :class:`aiogram.enums.content_type.ContentType`, - :class:`aiogram.enums.dice_emoji.DiceEmoji`, - :class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`, - :class:`aiogram.enums.input_media_type.InputMediaType`, - :class:`aiogram.enums.mask_position_point.MaskPositionPoint`, - :class:`aiogram.enums.menu_button_type.MenuButtonType`, - :class:`aiogram.enums.message_entity_type.MessageEntityType`, - :class:`aiogram.enums.parse_mode.ParseMode`, - :class:`aiogram.enums.poll_type.PollType`, - :class:`aiogram.enums.sticker_type.StickerType`, - :class:`aiogram.enums.topic_icon_color.TopicIconColor`, - :class:`aiogram.enums.update_type.UpdateType`, - -**Added shortcuts**: - -- *Chat* :meth:`aiogram.types.chat.Chat.get_administrators`, - :meth:`aiogram.types.chat.Chat.delete_message`, - :meth:`aiogram.types.chat.Chat.revoke_invite_link`, - :meth:`aiogram.types.chat.Chat.edit_invite_link`, - :meth:`aiogram.types.chat.Chat.create_invite_link`, - :meth:`aiogram.types.chat.Chat.export_invite_link`, - :meth:`aiogram.types.chat.Chat.do`, - :meth:`aiogram.types.chat.Chat.delete_sticker_set`, - :meth:`aiogram.types.chat.Chat.set_sticker_set`, - :meth:`aiogram.types.chat.Chat.get_member`, - :meth:`aiogram.types.chat.Chat.get_member_count`, - :meth:`aiogram.types.chat.Chat.leave`, - :meth:`aiogram.types.chat.Chat.unpin_all_messages`, - :meth:`aiogram.types.chat.Chat.unpin_message`, - :meth:`aiogram.types.chat.Chat.pin_message`, - :meth:`aiogram.types.chat.Chat.set_administrator_custom_title`, - :meth:`aiogram.types.chat.Chat.set_permissions`, - :meth:`aiogram.types.chat.Chat.promote`, - :meth:`aiogram.types.chat.Chat.restrict`, - :meth:`aiogram.types.chat.Chat.unban`, - :meth:`aiogram.types.chat.Chat.ban`, - :meth:`aiogram.types.chat.Chat.set_description`, - :meth:`aiogram.types.chat.Chat.set_title`, - :meth:`aiogram.types.chat.Chat.delete_photo`, - :meth:`aiogram.types.chat.Chat.set_photo`, -- *Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`, - :meth:`aiogram.types.sticker.Sticker.delete_from_set`, -- *User*: :meth:`aiogram.types.user.User.get_profile_photos` diff --git a/pyproject.toml b/pyproject.toml index 45809b52..3855ca10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,6 +97,7 @@ dev = [ "mypy~=1.0.0", "toml~=0.10.2", "pre-commit~=3.0.4", + "towncrier~=22.12.0", "packaging~=23.0", "typing-extensions~=4.4.0", ] From 46218b869677cba65e53e2edde965689a10f4716 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 19 Feb 2023 18:10:11 +0200 Subject: [PATCH 34/42] Towncrier build --- CHANGES.rst | 29 +++++++++++++++++++++++++++++ Makefile | 2 +- examples/echo_bot.py | 26 +++++++++++++++++--------- examples/specify_updates.py | 22 +++++++++++++--------- 4 files changed, 60 insertions(+), 19 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 048d5509..37174798 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -19,6 +19,35 @@ Changelog 3.0.0b7 (2023-02-18) ===================== +.. warning:: + + Note that this version has incompatibility with Python 3.8-3.10 in case when you create an instance of Dispatcher outside of the any coroutine. + + Sorry for the inconvenience, it will be fixed in the next version. + + This code will not work: + + .. code-block:: python + dp = Dispatcher() + + def main(): + dp.run_polling() + + main() + + But if you change it like this it should works as well: + + .. code-block:: python + + router = Router() + + async def main(): + dp = Dispatcher() + dp.include_router(router) + + asyncio.run(main()) + + Features -------- diff --git a/Makefile b/Makefile index 5696616b..66dd4eba 100644 --- a/Makefile +++ b/Makefile @@ -119,4 +119,4 @@ prepare-release: bump towncrier-build release: git add . git commit -m "Release $(shell poetry version -s)" - git tag v$(shell poetry version -s) + git tag v$(shell hatch version -s) diff --git a/examples/echo_bot.py b/examples/echo_bot.py index 29cf3b52..d51a0eeb 100644 --- a/examples/echo_bot.py +++ b/examples/echo_bot.py @@ -1,16 +1,18 @@ +import asyncio import logging -from aiogram import Bot, Dispatcher, types +from aiogram import Bot, Dispatcher, Router, types from aiogram.filters import Command from aiogram.types import Message +# Bot token can be obtained via https://t.me/BotFahter TOKEN = "42:TOKEN" -dp = Dispatcher() -logger = logging.getLogger(__name__) +# All handlers should be attached to the Router (or Dispatcher) +router = Router() -@dp.message(Command(commands=["start"])) +@router.message(Command(commands=["start"])) async def command_start_handler(message: Message) -> None: """ This handler receive messages with `/start` command @@ -23,7 +25,7 @@ async def command_start_handler(message: Message) -> None: await message.answer(f"Hello, {message.from_user.full_name}!") -@dp.message() +@router.message() async def echo_handler(message: types.Message) -> None: """ Handler will forward received message back to the sender @@ -38,12 +40,18 @@ async def echo_handler(message: types.Message) -> None: await message.answer("Nice try!") -def main() -> None: - # Initialize Bot instance with an default parse mode which will be passed to all API calls +async def main() -> None: + # Dispatcher is a root router + dp = Dispatcher() + # ... and all other routers should be attached to Dispatcher + dp.include_router(router) + + # Initialize Bot instance with a default parse mode which will be passed to all API calls bot = Bot(TOKEN, parse_mode="HTML") # And the run events dispatching - dp.run_polling(bot) + await dp.start_polling(bot) if __name__ == "__main__": - main() + logging.basicConfig(level=logging.INFO) + asyncio.run(main()) diff --git a/examples/specify_updates.py b/examples/specify_updates.py index 6a6abb65..f9380b91 100644 --- a/examples/specify_updates.py +++ b/examples/specify_updates.py @@ -1,3 +1,4 @@ +import asyncio import logging from aiogram import Bot, Dispatcher, Router @@ -11,13 +12,14 @@ from aiogram.types import ( ) TOKEN = "6wo" -dp = Dispatcher() logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) +router = Router() -@dp.message(Command(commands=["start"])) + +@router.message(Command(commands=["start"])) async def command_start_handler(message: Message) -> None: """ This handler receive messages with `/start` command @@ -31,7 +33,7 @@ async def command_start_handler(message: Message) -> None: ) -@dp.chat_member() +@router.chat_member() async def chat_member_update(chat_member: ChatMemberUpdated, bot: Bot) -> None: await bot.send_message( chat_member.chat.id, @@ -71,20 +73,22 @@ async def my_chat_member_change(chat_member: ChatMemberUpdated, bot: Bot) -> Non ) -def main() -> None: +async def main() -> None: # Initialize Bot instance with a default parse mode which will be passed to all API calls bot = Bot(TOKEN, parse_mode="HTML") + dp = Dispatcher() + dp.include_router(router) sub_router.include_router(deep_dark_router) - - dp.include_router(sub_router) - dp.include_router(sub_sub_router) + router.include_router(sub_router) + router.include_router(sub_sub_router) useful_updates = dp.resolve_used_update_types() # And the run events dispatching - dp.run_polling(bot, allowed_updates=useful_updates) + await dp.start_polling(bot, allowed_updates=useful_updates) if __name__ == "__main__": - main() + logging.basicConfig(level=logging.INFO) + asyncio.run(main()) From 295fae6905d193f811f4fd6a03459ff7577eb73b Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 19 Feb 2023 18:20:10 +0200 Subject: [PATCH 35/42] Reformat disclaimer in changelog --- CHANGES.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 37174798..e81a120a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -28,6 +28,7 @@ Changelog This code will not work: .. code-block:: python + dp = Dispatcher() def main(): @@ -39,13 +40,13 @@ Changelog .. code-block:: python - router = Router() + router = Router() - async def main(): - dp = Dispatcher() - dp.include_router(router) + async def main(): + dp = Dispatcher() + dp.include_router(router) - asyncio.run(main()) + asyncio.run(main()) Features From eb7a9f5cc8bede01e4347cd2c5496e113f2ec74a Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 19 Feb 2023 18:24:15 +0200 Subject: [PATCH 36/42] Change version number in disclaimer --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index e81a120a..de942c93 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -21,7 +21,7 @@ Changelog .. warning:: - Note that this version has incompatibility with Python 3.8-3.10 in case when you create an instance of Dispatcher outside of the any coroutine. + Note that this version has incompatibility with Python 3.8-3.9 in case when you create an instance of Dispatcher outside of the any coroutine. Sorry for the inconvenience, it will be fixed in the next version. From 1098ac547b62f681295a34075ecd9bd3566b97d2 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 19 Feb 2023 19:13:30 +0200 Subject: [PATCH 37/42] Prettify disclaimer --- CHANGES.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index de942c93..afbb2d4a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -32,7 +32,8 @@ Changelog dp = Dispatcher() def main(): - dp.run_polling() + ... + dp.run_polling(...) main() @@ -45,6 +46,8 @@ Changelog async def main(): dp = Dispatcher() dp.include_router(router) + ... + dp.start_polling(...) asyncio.run(main()) From 5adaf7a567e976da64e418eee5df31682ad2496c Mon Sep 17 00:00:00 2001 From: Evgenii Petrovich <30520643+Parapheen@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:51:54 +0300 Subject: [PATCH 38/42] Update upload_file.rst | tiny grammar typos (#1133) * Update upload_file.rst small grammar typos * changelog --- CHANGES/1133.doc.rst | 1 + docs/api/upload_file.rst | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 CHANGES/1133.doc.rst diff --git a/CHANGES/1133.doc.rst b/CHANGES/1133.doc.rst new file mode 100644 index 00000000..a5ab681d --- /dev/null +++ b/CHANGES/1133.doc.rst @@ -0,0 +1 @@ +Changed small grammar typos for `upload_file` diff --git a/docs/api/upload_file.rst b/docs/api/upload_file.rst index f28bdcf4..9399f1dd 100644 --- a/docs/api/upload_file.rst +++ b/docs/api/upload_file.rst @@ -10,9 +10,9 @@ there are three ways to send files (photos, stickers, audio, media, etc.): If the file is already stored somewhere on the Telegram servers or file is available by the URL, you don't need to reupload it. -But if you need to upload new file just use subclasses of `InputFile `__. +But if you need to upload a new file just use subclasses of `InputFile `__. -Here is available three different builtin types of input file: +Here are the three different available builtin types of input file: - :class:`aiogram.types.input_file.FSInputFile` - `uploading from file system <#upload-from-file-system>`__ - :class:`aiogram.types.input_file.BufferedInputFile` - `uploading from buffer <#upload-from-buffer>`__ @@ -22,9 +22,9 @@ Here is available three different builtin types of input file: **Be respectful with Telegram** - Instances of `InputFile` is reusable. + Instances of `InputFile` are reusable. That's mean you can create instance of InputFile and sent this file multiple times but Telegram - is not recommend to do that and when you upload file once just save their `file_id` + does not recommend to do that and when you upload file once just save their `file_id` and use it in next times. Upload from file system @@ -53,7 +53,7 @@ Upload from buffer Files can be also passed from buffer (For example you generate image using `Pillow `_ -and the want's to sent it to the Telegram): +and you want to send it to Telegram): Import wrapper: From 6570d0bab102e0fcfa06c5490ded50ca0cffe2ee Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 11 Mar 2023 02:17:47 +0200 Subject: [PATCH 39/42] Bot API 6.6 (#1139) * Added basic support of Bot API 6.6 * Update descriptions * Added StickerFormat enum * Bump version * Refresh from docs * Fixed CommandStart * Fixed files uploading * Cover new functionality * Added changelog * Update texts --- .apiversion | 2 +- .butcher/enums/InlineQueryResultType.yml | 4 +- .butcher/enums/StickerFormat.yml | 10 + .butcher/methods/addStickerToSet/entity.json | 48 +- .../methods/createNewStickerSet/entity.json | 68 +- .butcher/methods/deleteStickerSet/entity.json | 27 + .../editMessageLiveLocation/entity.json | 4 +- .butcher/methods/getMyDescription/entity.json | 27 + .../methods/getMyShortDescription/entity.json | 27 + .butcher/methods/sendAnimation/entity.json | 2 +- .butcher/methods/sendAudio/entity.json | 2 +- .butcher/methods/sendDocument/entity.json | 2 +- .butcher/methods/sendSticker/entity.json | 14 +- .butcher/methods/sendVideo/entity.json | 2 +- .butcher/methods/sendVideoNote/entity.json | 2 +- .../entity.json | 35 + .../entity.json | 6 +- .butcher/methods/setMyDescription/entity.json | 35 + .../methods/setMyShortDescription/entity.json | 35 + .../methods/setStickerEmojiList/entity.json | 35 + .../methods/setStickerKeywords/entity.json | 35 + .../setStickerMaskPosition/entity.json | 35 + .../methods/setStickerSetThumb/entity.json | 43 - .../setStickerSetThumbnail/entity.json | 43 + .../methods/setStickerSetTitle/entity.json | 35 + .../stopMessageLiveLocation/entity.json | 4 +- .../methods/uploadStickerFile/entity.json | 22 +- .butcher/schema/schema.json | 824 ++++++++++++------ .butcher/types/Animation/entity.json | 2 +- .butcher/types/Audio/entity.json | 2 +- .butcher/types/BotDescription/entity.json | 27 + .../types/BotShortDescription/entity.json | 27 + .butcher/types/Document/entity.json | 2 +- .../InlineQueryResultArticle/entity.json | 6 +- .../InlineQueryResultContact/entity.json | 6 +- .../InlineQueryResultDocument/entity.json | 6 +- .../types/InlineQueryResultGif/entity.json | 4 +- .../InlineQueryResultLocation/entity.json | 6 +- .../InlineQueryResultMpeg4Gif/entity.json | 4 +- .../types/InlineQueryResultPhoto/entity.json | 2 +- .../types/InlineQueryResultVenue/entity.json | 6 +- .../types/InlineQueryResultVideo/entity.json | 2 +- .../types/InputMediaAnimation/entity.json | 2 +- .butcher/types/InputMediaAudio/entity.json | 2 +- .butcher/types/InputMediaDocument/entity.json | 2 +- .butcher/types/InputMediaVideo/entity.json | 2 +- .butcher/types/InputSticker/entity.json | 51 ++ .butcher/types/Sticker/entity.json | 10 +- .butcher/types/StickerSet/entity.json | 2 +- .butcher/types/Video/entity.json | 2 +- .butcher/types/VideoNote/entity.json | 2 +- CHANGES/1139.misc.rst | 7 + README.rst | 2 +- aiogram/__init__.py | 4 +- aiogram/client/bot.py | 384 ++++++-- aiogram/client/session/aiohttp.py | 1 + aiogram/enums/__init__.py | 2 + aiogram/enums/inline_query_result_type.py | 4 +- aiogram/enums/sticker_format.py | 13 + aiogram/filters/command.py | 4 +- aiogram/methods/__init__.py | 24 +- aiogram/methods/add_sticker_to_set.py | 26 +- aiogram/methods/base.py | 20 +- aiogram/methods/create_new_sticker_set.py | 34 +- aiogram/methods/delete_sticker_set.py | 26 + aiogram/methods/get_my_description.py | 27 + aiogram/methods/get_my_short_description.py | 27 + aiogram/methods/send_animation.py | 4 +- aiogram/methods/send_audio.py | 4 +- aiogram/methods/send_document.py | 4 +- aiogram/methods/send_sticker.py | 4 +- aiogram/methods/send_video.py | 4 +- aiogram/methods/send_video_note.py | 4 +- .../set_custom_emoji_sticker_set_thumbnail.py | 28 + .../set_my_default_administrator_rights.py | 2 +- aiogram/methods/set_my_description.py | 28 + aiogram/methods/set_my_short_description.py | 28 + aiogram/methods/set_sticker_emoji_list.py | 28 + aiogram/methods/set_sticker_keywords.py | 28 + aiogram/methods/set_sticker_mask_position.py | 29 + aiogram/methods/set_sticker_set_thumb.py | 34 - aiogram/methods/set_sticker_set_thumbnail.py | 34 + aiogram/methods/set_sticker_set_title.py | 28 + aiogram/methods/upload_sticker_file.py | 12 +- aiogram/types/__init__.py | 6 + aiogram/types/animation.py | 2 +- aiogram/types/audio.py | 2 +- aiogram/types/bot_description.py | 12 + aiogram/types/bot_short_description.py | 12 + aiogram/types/document.py | 2 +- aiogram/types/inline_query_result_article.py | 6 +- aiogram/types/inline_query_result_contact.py | 6 +- aiogram/types/inline_query_result_document.py | 6 +- aiogram/types/inline_query_result_gif.py | 4 +- aiogram/types/inline_query_result_location.py | 6 +- .../types/inline_query_result_mpeg4_gif.py | 4 +- aiogram/types/inline_query_result_photo.py | 2 +- aiogram/types/inline_query_result_venue.py | 6 +- aiogram/types/inline_query_result_video.py | 2 +- aiogram/types/input_media_animation.py | 2 +- aiogram/types/input_media_audio.py | 2 +- aiogram/types/input_media_document.py | 2 +- aiogram/types/input_media_video.py | 2 +- aiogram/types/input_sticker.py | 26 + aiogram/types/message.py | 70 +- aiogram/types/sticker.py | 4 +- aiogram/types/sticker_set.py | 2 +- aiogram/types/video.py | 2 +- aiogram/types/video_note.py | 2 +- docs/api/enums/index.rst | 1 + docs/api/enums/sticker_format.rst | 9 + docs/api/methods/delete_sticker_set.rst | 44 + docs/api/methods/get_my_description.rst | 37 + docs/api/methods/get_my_short_description.rst | 37 + docs/api/methods/index.rst | 16 +- ...set_custom_emoji_sticker_set_thumbnail.rst | 44 + docs/api/methods/set_my_description.rst | 44 + docs/api/methods/set_my_short_description.rst | 44 + docs/api/methods/set_sticker_emoji_list.rst | 44 + docs/api/methods/set_sticker_keywords.rst | 44 + .../api/methods/set_sticker_mask_position.rst | 44 + .../api/methods/set_sticker_set_thumbnail.rst | 44 + docs/api/methods/set_sticker_set_title.rst | 44 + docs/api/types/bot_description.rst | 9 + docs/api/types/bot_short_description.rst | 9 + docs/api/types/index.rst | 3 + docs/api/types/input_sticker.rst | 9 + .../api/enums/inline_query_result_type.po | 14 +- .../LC_MESSAGES/api/enums/sticker_format.po | 30 + .../api/methods/add_sticker_to_set.po | 121 +-- .../api/methods/create_new_sticker_set.po | 128 ++- .../api/methods/delete_sticker_set.po | 73 ++ .../api/methods/get_chat_member.po | 20 +- .../api/methods/get_my_description.po | 70 ++ .../api/methods/get_my_short_description.po | 74 ++ .../api/methods/promote_chat_member.po | 16 +- .../api/methods/restrict_chat_member.po | 17 +- .../LC_MESSAGES/api/methods/send_sticker.po | 27 +- .../api/methods/set_chat_permissions.po | 17 +- .../set_custom_emoji_sticker_set_thumbnail.po | 90 ++ .../set_my_default_administrator_rights.po | 19 +- .../api/methods/set_my_description.po | 83 ++ .../api/methods/set_my_short_description.po | 88 ++ .../api/methods/set_sticker_emoji_list.po | 81 ++ .../api/methods/set_sticker_keywords.po | 83 ++ .../api/methods/set_sticker_mask_position.po | 86 ++ .../api/methods/set_sticker_set_thumb.po | 104 ++- .../api/methods/set_sticker_set_thumbnail.po | 108 +++ .../api/methods/set_sticker_set_title.po | 80 ++ .../api/methods/upload_sticker_file.po | 46 +- .../LC_MESSAGES/api/types/bot_description.po | 35 + .../api/types/bot_short_description.po | 36 + docs/locale/en/LC_MESSAGES/api/types/chat.po | 48 +- .../api/types/chat_administrator_rights.po | 16 +- .../api/types/chat_join_request.po | 16 +- .../en/LC_MESSAGES/api/types/chat_member.po | 62 +- .../api/types/chat_member_administrator.po | 16 +- .../api/types/chat_member_restricted.po | 120 ++- .../LC_MESSAGES/api/types/chat_permissions.po | 79 +- .../en/LC_MESSAGES/api/types/chat_shared.po | 49 ++ .../en/LC_MESSAGES/api/types/input_sticker.po | 56 ++ .../LC_MESSAGES/api/types/keyboard_button.po | 54 +- .../api/types/keyboard_button_request_chat.po | 104 +++ .../api/types/keyboard_button_request_user.po | 60 ++ .../en/LC_MESSAGES/api/types/message.po | 58 +- .../en/LC_MESSAGES/api/types/sticker.po | 14 +- .../en/LC_MESSAGES/api/types/user_shared.po | 49 ++ docs/locale/en/LC_MESSAGES/api/upload_file.po | 47 +- docs/locale/en/LC_MESSAGES/changelog.po | 512 +++++++---- docs/locale/en/LC_MESSAGES/contributing.po | 322 +++++++ .../en/LC_MESSAGES/dispatcher/dispatcher.po | 44 +- docs/locale/en/LC_MESSAGES/index.po | 106 +-- .../en/LC_MESSAGES/utils/callback_answer.po | 204 +++++ .../api/enums/inline_query_result_type.po | 14 +- .../LC_MESSAGES/api/enums/sticker_format.po | 30 + .../api/methods/add_sticker_to_set.po | 121 +-- .../api/methods/create_new_sticker_set.po | 128 ++- .../api/methods/delete_sticker_set.po | 73 ++ .../api/methods/get_my_description.po | 70 ++ .../api/methods/get_my_short_description.po | 74 ++ .../LC_MESSAGES/api/methods/send_sticker.po | 27 +- .../set_custom_emoji_sticker_set_thumbnail.po | 90 ++ .../set_my_default_administrator_rights.po | 19 +- .../api/methods/set_my_description.po | 83 ++ .../api/methods/set_my_short_description.po | 88 ++ .../api/methods/set_sticker_emoji_list.po | 81 ++ .../api/methods/set_sticker_keywords.po | 83 ++ .../api/methods/set_sticker_mask_position.po | 86 ++ .../api/methods/set_sticker_set_thumb.po | 104 ++- .../api/methods/set_sticker_set_thumbnail.po | 108 +++ .../api/methods/set_sticker_set_title.po | 80 ++ .../api/methods/upload_sticker_file.po | 46 +- .../LC_MESSAGES/api/types/bot_description.po | 35 + .../api/types/bot_short_description.po | 36 + .../LC_MESSAGES/api/types/input_sticker.po | 56 ++ .../uk_UA/LC_MESSAGES/api/types/message.po | 49 +- .../uk_UA/LC_MESSAGES/api/types/sticker.po | 14 +- .../uk_UA/LC_MESSAGES/api/upload_file.po | 71 +- docs/locale/uk_UA/LC_MESSAGES/changelog.po | 474 ++++++---- .../LC_MESSAGES/dispatcher/dispatcher.po | 63 +- docs/locale/uk_UA/LC_MESSAGES/index.po | 98 +-- .../test_methods/test_add_sticker_to_set.py | 9 +- .../test_methods/test_answer_inline_query.py | 6 +- .../test_create_new_sticker_set.py | 20 +- .../test_methods/test_delete_sticker_set.py | 20 + .../test_methods/test_get_my_description.py | 25 + .../test_get_my_short_description.py | 25 + .../test_methods/test_send_video_note.py | 8 +- ..._set_custom_emoji_sticker_set_thumbnail.py | 28 + .../test_methods/test_set_my_description.py | 20 + .../test_set_my_short_description.py | 20 + .../test_set_sticker_emoji_list.py | 20 + .../test_methods/test_set_sticker_keywords.py | 20 + .../test_set_sticker_mask_position.py | 20 + .../test_set_sticker_set_thumb.py | 22 - .../test_set_sticker_set_thumbnail.py | 22 + .../test_set_sticker_set_title.py | 20 + .../test_methods/test_upload_sticker_file.py | 9 +- 218 files changed, 7687 insertions(+), 1741 deletions(-) create mode 100644 .butcher/enums/StickerFormat.yml create mode 100644 .butcher/methods/deleteStickerSet/entity.json create mode 100644 .butcher/methods/getMyDescription/entity.json create mode 100644 .butcher/methods/getMyShortDescription/entity.json create mode 100644 .butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json create mode 100644 .butcher/methods/setMyDescription/entity.json create mode 100644 .butcher/methods/setMyShortDescription/entity.json create mode 100644 .butcher/methods/setStickerEmojiList/entity.json create mode 100644 .butcher/methods/setStickerKeywords/entity.json create mode 100644 .butcher/methods/setStickerMaskPosition/entity.json delete mode 100644 .butcher/methods/setStickerSetThumb/entity.json create mode 100644 .butcher/methods/setStickerSetThumbnail/entity.json create mode 100644 .butcher/methods/setStickerSetTitle/entity.json create mode 100644 .butcher/types/BotDescription/entity.json create mode 100644 .butcher/types/BotShortDescription/entity.json create mode 100644 .butcher/types/InputSticker/entity.json create mode 100644 CHANGES/1139.misc.rst create mode 100644 aiogram/enums/sticker_format.py create mode 100644 aiogram/methods/delete_sticker_set.py create mode 100644 aiogram/methods/get_my_description.py create mode 100644 aiogram/methods/get_my_short_description.py create mode 100644 aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py create mode 100644 aiogram/methods/set_my_description.py create mode 100644 aiogram/methods/set_my_short_description.py create mode 100644 aiogram/methods/set_sticker_emoji_list.py create mode 100644 aiogram/methods/set_sticker_keywords.py create mode 100644 aiogram/methods/set_sticker_mask_position.py delete mode 100644 aiogram/methods/set_sticker_set_thumb.py create mode 100644 aiogram/methods/set_sticker_set_thumbnail.py create mode 100644 aiogram/methods/set_sticker_set_title.py create mode 100644 aiogram/types/bot_description.py create mode 100644 aiogram/types/bot_short_description.py create mode 100644 aiogram/types/input_sticker.py create mode 100644 docs/api/enums/sticker_format.rst create mode 100644 docs/api/methods/delete_sticker_set.rst create mode 100644 docs/api/methods/get_my_description.rst create mode 100644 docs/api/methods/get_my_short_description.rst create mode 100644 docs/api/methods/set_custom_emoji_sticker_set_thumbnail.rst create mode 100644 docs/api/methods/set_my_description.rst create mode 100644 docs/api/methods/set_my_short_description.rst create mode 100644 docs/api/methods/set_sticker_emoji_list.rst create mode 100644 docs/api/methods/set_sticker_keywords.rst create mode 100644 docs/api/methods/set_sticker_mask_position.rst create mode 100644 docs/api/methods/set_sticker_set_thumbnail.rst create mode 100644 docs/api/methods/set_sticker_set_title.rst create mode 100644 docs/api/types/bot_description.rst create mode 100644 docs/api/types/bot_short_description.rst create mode 100644 docs/api/types/input_sticker.rst create mode 100644 docs/locale/en/LC_MESSAGES/api/enums/sticker_format.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/delete_sticker_set.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/get_my_description.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/get_my_short_description.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_my_description.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_my_short_description.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_sticker_emoji_list.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_sticker_keywords.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_sticker_mask_position.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po create mode 100644 docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_title.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/bot_description.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/bot_short_description.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/chat_shared.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/input_sticker.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_chat.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_user.po create mode 100644 docs/locale/en/LC_MESSAGES/api/types/user_shared.po create mode 100644 docs/locale/en/LC_MESSAGES/contributing.po create mode 100644 docs/locale/en/LC_MESSAGES/utils/callback_answer.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_format.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_set.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_description.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_short_description.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_description.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_short_description.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_emoji_list.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_keywords.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_mask_position.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_title.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/bot_description.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/bot_short_description.po create mode 100644 docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po create mode 100644 tests/test_api/test_methods/test_delete_sticker_set.py create mode 100644 tests/test_api/test_methods/test_get_my_description.py create mode 100644 tests/test_api/test_methods/test_get_my_short_description.py create mode 100644 tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py create mode 100644 tests/test_api/test_methods/test_set_my_description.py create mode 100644 tests/test_api/test_methods/test_set_my_short_description.py create mode 100644 tests/test_api/test_methods/test_set_sticker_emoji_list.py create mode 100644 tests/test_api/test_methods/test_set_sticker_keywords.py create mode 100644 tests/test_api/test_methods/test_set_sticker_mask_position.py delete mode 100644 tests/test_api/test_methods/test_set_sticker_set_thumb.py create mode 100644 tests/test_api/test_methods/test_set_sticker_set_thumbnail.py create mode 100644 tests/test_api/test_methods/test_set_sticker_set_title.py diff --git a/.apiversion b/.apiversion index 7822c1ab..4074fe20 100644 --- a/.apiversion +++ b/.apiversion @@ -1 +1 @@ -6.5 +6.6 diff --git a/.butcher/enums/InlineQueryResultType.yml b/.butcher/enums/InlineQueryResultType.yml index 8ff8ee0c..74428a3c 100644 --- a/.butcher/enums/InlineQueryResultType.yml +++ b/.butcher/enums/InlineQueryResultType.yml @@ -1,8 +1,8 @@ name: InlineQueryResultType description: | - The part of the face relative to which the mask should be placed. + Type of inline query result - Source: https://core.telegram.org/bots/api#maskposition + Source: https://core.telegram.org/bots/api#inlinequeryresult multi_parse: attribute: type regexp: "must be ([a-z_]+)" diff --git a/.butcher/enums/StickerFormat.yml b/.butcher/enums/StickerFormat.yml new file mode 100644 index 00000000..acfbb00c --- /dev/null +++ b/.butcher/enums/StickerFormat.yml @@ -0,0 +1,10 @@ +name: StickerFormat +description: | + Format of the sticker + + Source: https://core.telegram.org/bots/api#createnewstickerset +parse: + category: methods + entity: createNewStickerSet + attribute: sticker_format + regexp: "'([a-z_]+)'" diff --git a/.butcher/methods/addStickerToSet/entity.json b/.butcher/methods/addStickerToSet/entity.json index 99217457..cab8f7af 100644 --- a/.butcher/methods/addStickerToSet/entity.json +++ b/.butcher/methods/addStickerToSet/entity.json @@ -9,9 +9,9 @@ "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.", + "description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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", @@ -30,44 +30,12 @@ "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", + "type": "InputSticker", "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" + "description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.", + "html_description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.", + "rst_description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.\n", + "name": "sticker" } ], "category": "methods" diff --git a/.butcher/methods/createNewStickerSet/entity.json b/.butcher/methods/createNewStickerSet/entity.json index 8589f80d..34fcbfc5 100644 --- a/.butcher/methods/createNewStickerSet/entity.json +++ b/.butcher/methods/createNewStickerSet/entity.json @@ -9,9 +9,9 @@ "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.", + "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. 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. 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. Returns :code:`True` on success.", "annotations": [ { "type": "Integer", @@ -38,52 +38,36 @@ "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": "Array of InputSticker", + "required": true, + "description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "html_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n", + "name": "stickers" }, { "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" + "description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'", + "html_description": "Format of stickers in the set, must be one of “static”, “animated”, “video”", + "rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n", + "name": "sticker_format" }, { - "type": "MaskPosition", + "type": "String", "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" + "description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.", + "html_description": "Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.", + "rst_description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.\n", + "name": "sticker_type" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only", + "html_description": "Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only", + "rst_description": "Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only\n", + "name": "needs_repainting" } ], "category": "methods" diff --git a/.butcher/methods/deleteStickerSet/entity.json b/.butcher/methods/deleteStickerSet/entity.json new file mode 100644 index 00000000..1ae6f1ba --- /dev/null +++ b/.butcher/methods/deleteStickerSet/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "deletestickerset", + "name": "deleteStickerSet", + "description": "Use this method to delete a sticker set that was created by the bot. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to delete a sticker set that was created by the bot. 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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/editMessageLiveLocation/entity.json b/.butcher/methods/editMessageLiveLocation/entity.json index 7605f142..77e1beb1 100644 --- a/.butcher/methods/editMessageLiveLocation/entity.json +++ b/.butcher/methods/editMessageLiveLocation/entity.json @@ -3,8 +3,8 @@ "deprecated": false }, "group": { - "title": "Available methods", - "anchor": "available-methods" + "title": "Updating messages", + "anchor": "updating-messages" }, "object": { "anchor": "editmessagelivelocation", diff --git a/.butcher/methods/getMyDescription/entity.json b/.butcher/methods/getMyDescription/entity.json new file mode 100644 index 00000000..7b231729 --- /dev/null +++ b/.butcher/methods/getMyDescription/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmydescription", + "name": "getMyDescription", + "description": "Use this method to get the current bot description for the given user language. Returns BotDescription on success.", + "html_description": "

Use this method to get the current bot description for the given user language. Returns BotDescription on success.

", + "rst_description": "Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.", + "annotations": [ + { + "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/getMyShortDescription/entity.json b/.butcher/methods/getMyShortDescription/entity.json new file mode 100644 index 00000000..10f51d1b --- /dev/null +++ b/.butcher/methods/getMyShortDescription/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "getmyshortdescription", + "name": "getMyShortDescription", + "description": "Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.", + "html_description": "

Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.

", + "rst_description": "Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success.", + "annotations": [ + { + "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/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json index 92ebaa2d..5a11b343 100644 --- a/.butcher/methods/sendAnimation/entity.json +++ b/.butcher/methods/sendAnimation/entity.json @@ -67,7 +67,7 @@ "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" + "name": "thumbnail" }, { "type": "String", diff --git a/.butcher/methods/sendAudio/entity.json b/.butcher/methods/sendAudio/entity.json index a2a3ff84..84eec416 100644 --- a/.butcher/methods/sendAudio/entity.json +++ b/.butcher/methods/sendAudio/entity.json @@ -91,7 +91,7 @@ "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" + "name": "thumbnail" }, { "type": "Boolean", diff --git a/.butcher/methods/sendDocument/entity.json b/.butcher/methods/sendDocument/entity.json index e6295586..31680179 100644 --- a/.butcher/methods/sendDocument/entity.json +++ b/.butcher/methods/sendDocument/entity.json @@ -43,7 +43,7 @@ "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" + "name": "thumbnail" }, { "type": "String", diff --git a/.butcher/methods/sendSticker/entity.json b/.butcher/methods/sendSticker/entity.json index eb7e35a9..aca9254c 100644 --- a/.butcher/methods/sendSticker/entity.json +++ b/.butcher/methods/sendSticker/entity.json @@ -32,11 +32,19 @@ { "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", + "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 sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.", + "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 sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files ». Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.", + "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 sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.\n", "name": "sticker" }, + { + "type": "String", + "required": false, + "description": "Emoji associated with the sticker; only for just uploaded stickers", + "html_description": "Emoji associated with the sticker; only for just uploaded stickers", + "rst_description": "Emoji associated with the sticker; only for just uploaded stickers\n", + "name": "emoji" + }, { "type": "Boolean", "required": false, diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json index 9343c43f..b19e2201 100644 --- a/.butcher/methods/sendVideo/entity.json +++ b/.butcher/methods/sendVideo/entity.json @@ -67,7 +67,7 @@ "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" + "name": "thumbnail" }, { "type": "String", diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json index 2822e49c..ea382889 100644 --- a/.butcher/methods/sendVideoNote/entity.json +++ b/.butcher/methods/sendVideoNote/entity.json @@ -59,7 +59,7 @@ "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" + "name": "thumbnail" }, { "type": "Boolean", diff --git a/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json b/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json new file mode 100644 index 00000000..a4b0e265 --- /dev/null +++ b/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setcustomemojistickersetthumbnail", + "name": "setCustomEmojiStickerSetThumbnail", + "description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a custom emoji sticker set. 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": "String", + "required": false, + "description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.", + "html_description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.", + "rst_description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.\n", + "name": "custom_emoji_id" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyDefaultAdministratorRights/entity.json b/.butcher/methods/setMyDefaultAdministratorRights/entity.json index 687b8f3d..503198d7 100644 --- a/.butcher/methods/setMyDefaultAdministratorRights/entity.json +++ b/.butcher/methods/setMyDefaultAdministratorRights/entity.json @@ -9,9 +9,9 @@ "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.", + "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 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 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 free to modify the list before adding the bot. Returns :code:`True` on success.", "annotations": [ { "type": "ChatAdministratorRights", diff --git a/.butcher/methods/setMyDescription/entity.json b/.butcher/methods/setMyDescription/entity.json new file mode 100644 index 00000000..9487c34b --- /dev/null +++ b/.butcher/methods/setMyDescription/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmydescription", + "name": "setMyDescription", + "description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.", + "html_description": "

Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.

", + "rst_description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "html_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "rst_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.\n", + "name": "description" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.", + "html_description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.", + "rst_description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setMyShortDescription/entity.json b/.butcher/methods/setMyShortDescription/entity.json new file mode 100644 index 00000000..0bb47047 --- /dev/null +++ b/.butcher/methods/setMyShortDescription/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available methods", + "anchor": "available-methods" + }, + "object": { + "anchor": "setmyshortdescription", + "name": "setMyShortDescription", + "description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.", + "html_description": "

Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.

", + "rst_description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "html_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "rst_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.\n", + "name": "short_description" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.", + "html_description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.", + "rst_description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.\n", + "name": "language_code" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerEmojiList/entity.json b/.butcher/methods/setStickerEmojiList/entity.json new file mode 100644 index 00000000..92d1fd39 --- /dev/null +++ b/.butcher/methods/setStickerEmojiList/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickeremojilist", + "name": "setStickerEmojiList", + "description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.", + "html_description": "

Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.

", + "rst_description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker 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" + }, + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "html_description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "rst_description": "A JSON-serialized list of 1-20 emoji associated with the sticker\n", + "name": "emoji_list" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerKeywords/entity.json b/.butcher/methods/setStickerKeywords/entity.json new file mode 100644 index 00000000..cabf2fbe --- /dev/null +++ b/.butcher/methods/setStickerKeywords/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickerkeywords", + "name": "setStickerKeywords", + "description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.", + "html_description": "

Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.

", + "rst_description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker 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" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "html_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "rst_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters\n", + "name": "keywords" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerMaskPosition/entity.json b/.butcher/methods/setStickerMaskPosition/entity.json new file mode 100644 index 00000000..e18fbd04 --- /dev/null +++ b/.butcher/methods/setStickerMaskPosition/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickermaskposition", + "name": "setStickerMaskPosition", + "description": "Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.", + "html_description": "

Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.

", + "rst_description": "Use this method to change the `mask position `_ of a mask sticker. The sticker must belong to a sticker set that was 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" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "html_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "rst_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.\n", + "name": "mask_position" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerSetThumb/entity.json b/.butcher/methods/setStickerSetThumb/entity.json deleted file mode 100644 index cc7739b3..00000000 --- a/.butcher/methods/setStickerSetThumb/entity.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "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/setStickerSetThumbnail/entity.json b/.butcher/methods/setStickerSetThumbnail/entity.json new file mode 100644 index 00000000..b5eac7cf --- /dev/null +++ b/.butcher/methods/setStickerSetThumbnail/entity.json @@ -0,0 +1,43 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickersetthumbnail", + "name": "setStickerSetThumbnail", + "description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. 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 .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "html_description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n", + "name": "thumbnail" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/setStickerSetTitle/entity.json b/.butcher/methods/setStickerSetTitle/entity.json new file mode 100644 index 00000000..757f508a --- /dev/null +++ b/.butcher/methods/setStickerSetTitle/entity.json @@ -0,0 +1,35 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "setstickersettitle", + "name": "setStickerSetTitle", + "description": "Use this method to set the title of a created sticker set. Returns True on success.", + "html_description": "

Use this method to set the title of a created sticker set. Returns True on success.

", + "rst_description": "Use this method to set the title of a created sticker set. 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": "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" + } + ], + "category": "methods" + } +} diff --git a/.butcher/methods/stopMessageLiveLocation/entity.json b/.butcher/methods/stopMessageLiveLocation/entity.json index 3ede9d40..6f1cb51c 100644 --- a/.butcher/methods/stopMessageLiveLocation/entity.json +++ b/.butcher/methods/stopMessageLiveLocation/entity.json @@ -3,8 +3,8 @@ "deprecated": false }, "group": { - "title": "Available methods", - "anchor": "available-methods" + "title": "Updating messages", + "anchor": "updating-messages" }, "object": { "anchor": "stopmessagelivelocation", diff --git a/.butcher/methods/uploadStickerFile/entity.json b/.butcher/methods/uploadStickerFile/entity.json index 445de997..687ae2cb 100644 --- a/.butcher/methods/uploadStickerFile/entity.json +++ b/.butcher/methods/uploadStickerFile/entity.json @@ -9,9 +9,9 @@ "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.", + "description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.", + "html_description": "

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

", + "rst_description": "Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.", "annotations": [ { "type": "Integer", @@ -24,10 +24,18 @@ { "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" + "description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files", + "html_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files »", + "rst_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `\n", + "name": "sticker" + }, + { + "type": "String", + "required": true, + "description": "Format of the sticker, must be one of 'static', 'animated', 'video'", + "html_description": "Format of the sticker, must be one of “static”, “animated”, “video”", + "rst_description": "Format of the sticker, must be one of 'static', 'animated', 'video'\n", + "name": "sticker_format" } ], "category": "methods" diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index 32dbfdac..02015146 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -1,7 +1,7 @@ { "api": { - "version": "6.5", - "release_date": "2023-02-03" + "version": "6.6", + "release_date": "2023-03-09" }, "items": [ { @@ -1458,7 +1458,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -1564,7 +1564,7 @@ "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", + "name": "thumbnail", "required": false } ], @@ -1598,7 +1598,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -1680,7 +1680,7 @@ "description": "Video thumbnail", "html_description": "Optional. Video thumbnail", "rst_description": "*Optional*. Video thumbnail\n", - "name": "thumb", + "name": "thumbnail", "required": false }, { @@ -1754,7 +1754,7 @@ "description": "Video thumbnail", "html_description": "Optional. Video thumbnail", "rst_description": "*Optional*. Video thumbnail\n", - "name": "thumb", + "name": "thumbnail", "required": false }, { @@ -4252,6 +4252,42 @@ ], "category": "types" }, + { + "anchor": "botdescription", + "name": "BotDescription", + "description": "This object represents the bot's description.", + "html_description": "

This object represents the bot's description.

", + "rst_description": "This object represents the bot's description.", + "annotations": [ + { + "type": "String", + "description": "The bot's description", + "html_description": "The bot's description", + "rst_description": "The bot's description\n", + "name": "description", + "required": true + } + ], + "category": "types" + }, + { + "anchor": "botshortdescription", + "name": "BotShortDescription", + "description": "This object represents the bot's short description.", + "html_description": "

This object represents the bot's short description.

", + "rst_description": "This object represents the bot's short description.", + "annotations": [ + { + "type": "String", + "description": "The bot's short description", + "html_description": "The bot's short description", + "rst_description": "The bot's short description\n", + "name": "short_description", + "required": true + } + ], + "category": "types" + }, { "anchor": "menubutton", "name": "MenuButton", @@ -4452,7 +4488,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -4550,7 +4586,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -4640,7 +4676,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -4722,7 +4758,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -5256,7 +5292,7 @@ "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" + "name": "thumbnail" }, { "type": "Boolean", @@ -5338,7 +5374,7 @@ "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" + "name": "thumbnail" }, { "type": "String", @@ -5476,7 +5512,7 @@ "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" + "name": "thumbnail" }, { "type": "String", @@ -5622,7 +5658,7 @@ "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" + "name": "thumbnail" }, { "type": "String", @@ -5858,7 +5894,7 @@ "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" + "name": "thumbnail" }, { "type": "Boolean", @@ -6083,130 +6119,6 @@ ], "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", @@ -8076,6 +7988,94 @@ ], "category": "methods" }, + { + "anchor": "setmydescription", + "name": "setMyDescription", + "description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.", + "html_description": "

Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.

", + "rst_description": "Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "html_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.", + "rst_description": "New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.\n", + "name": "description" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.", + "html_description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.", + "rst_description": "A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "getmydescription", + "name": "getMyDescription", + "description": "Use this method to get the current bot description for the given user language. Returns BotDescription on success.", + "html_description": "

Use this method to get the current bot description for the given user language. Returns BotDescription on success.

", + "rst_description": "Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success.", + "annotations": [ + { + "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": "setmyshortdescription", + "name": "setMyShortDescription", + "description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.", + "html_description": "

Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.

", + "rst_description": "Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success.", + "annotations": [ + { + "type": "String", + "required": false, + "description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "html_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.", + "rst_description": "New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.\n", + "name": "short_description" + }, + { + "type": "String", + "required": false, + "description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.", + "html_description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.", + "rst_description": "A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.\n", + "name": "language_code" + } + ], + "category": "methods" + }, + { + "anchor": "getmyshortdescription", + "name": "getMyShortDescription", + "description": "Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.", + "html_description": "

Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.

", + "rst_description": "Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success.", + "annotations": [ + { + "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", @@ -8123,9 +8123,9 @@ { "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.", + "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 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 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 free to modify the list before adding the bot. Returns :code:`True` on success.", "annotations": [ { "type": "ChatAdministratorRights", @@ -8361,6 +8361,130 @@ ], "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": "editmessagereplymarkup", "name": "editMessageReplyMarkup", @@ -8538,7 +8662,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -8581,6 +8705,14 @@ "name": "custom_emoji_id", "required": false }, + { + "type": "True", + "description": "True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places", + "html_description": "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places", + "rst_description": "*Optional*. :code:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places\n", + "name": "needs_repainting", + "required": false + }, { "type": "Integer", "description": "File size in bytes", @@ -8652,7 +8784,7 @@ "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", + "name": "thumbnail", "required": false } ], @@ -8700,6 +8832,48 @@ ], "category": "types" }, + { + "anchor": "inputsticker", + "name": "InputSticker", + "description": "This object describes a sticker to be added to a sticker set.", + "html_description": "

This object describes a sticker to be added to a sticker set.

", + "rst_description": "This object describes a sticker to be added to a sticker set.", + "annotations": [ + { + "type": "InputFile or String", + "description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files", + "html_description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »", + "rst_description": "The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `\n", + "name": "sticker", + "required": true + }, + { + "type": "Array of String", + "description": "List of 1-20 emoji associated with the sticker", + "html_description": "List of 1-20 emoji associated with the sticker", + "rst_description": "List of 1-20 emoji associated with the sticker\n", + "name": "emoji_list", + "required": true + }, + { + "type": "MaskPosition", + "description": "Position where the mask should be placed on faces. For 'mask' stickers only.", + "html_description": "Optional. Position where the mask should be placed on faces. For “mask” stickers only.", + "rst_description": "*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.\n", + "name": "mask_position", + "required": false + }, + { + "type": "Array of String", + "description": "List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.", + "html_description": "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom_emoji” stickers only.", + "rst_description": "*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.\n", + "name": "keywords", + "required": false + } + ], + "category": "types" + }, { "anchor": "sendsticker", "name": "sendSticker", @@ -8726,11 +8900,19 @@ { "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", + "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 sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.", + "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 sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files ». Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.", + "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 sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.\n", "name": "sticker" }, + { + "type": "String", + "required": false, + "description": "Emoji associated with the sticker; only for just uploaded stickers", + "html_description": "Emoji associated with the sticker; only for just uploaded stickers", + "rst_description": "Emoji associated with the sticker; only for just uploaded stickers\n", + "name": "emoji" + }, { "type": "Boolean", "required": false, @@ -8813,9 +8995,9 @@ { "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.", + "description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.", + "html_description": "

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

", + "rst_description": "Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.", "annotations": [ { "type": "Integer", @@ -8828,10 +9010,18 @@ { "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" + "description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files", + "html_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. More information on Sending Files »", + "rst_description": "A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `\n", + "name": "sticker" + }, + { + "type": "String", + "required": true, + "description": "Format of the sticker, must be one of 'static', 'animated', 'video'", + "html_description": "Format of the sticker, must be one of “static”, “animated”, “video”", + "rst_description": "Format of the sticker, must be one of 'static', 'animated', 'video'\n", + "name": "sticker_format" } ], "category": "methods" @@ -8839,9 +9029,9 @@ { "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.", + "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. 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. 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. Returns :code:`True` on success.", "annotations": [ { "type": "Integer", @@ -8868,52 +9058,36 @@ "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": "Array of InputSticker", + "required": true, + "description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "html_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set", + "rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n", + "name": "stickers" }, { "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" + "description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'", + "html_description": "Format of stickers in the set, must be one of “static”, “animated”, “video”", + "rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n", + "name": "sticker_format" }, { - "type": "MaskPosition", + "type": "String", "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" + "description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.", + "html_description": "Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.", + "rst_description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.\n", + "name": "sticker_type" + }, + { + "type": "Boolean", + "required": false, + "description": "Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only", + "html_description": "Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only", + "rst_description": "Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only\n", + "name": "needs_repainting" } ], "category": "methods" @@ -8921,9 +9095,9 @@ { "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.", + "description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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", @@ -8942,44 +9116,12 @@ "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", + "type": "InputSticker", "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" + "description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.", + "html_description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.", + "rst_description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.\n", + "name": "sticker" } ], "category": "methods" @@ -9029,11 +9171,115 @@ "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.", + "anchor": "setstickeremojilist", + "name": "setStickerEmojiList", + "description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.", + "html_description": "

Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.

", + "rst_description": "Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker 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" + }, + { + "type": "Array of String", + "required": true, + "description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "html_description": "A JSON-serialized list of 1-20 emoji associated with the sticker", + "rst_description": "A JSON-serialized list of 1-20 emoji associated with the sticker\n", + "name": "emoji_list" + } + ], + "category": "methods" + }, + { + "anchor": "setstickerkeywords", + "name": "setStickerKeywords", + "description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.", + "html_description": "

Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.

", + "rst_description": "Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker 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" + }, + { + "type": "Array of String", + "required": false, + "description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "html_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters", + "rst_description": "A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters\n", + "name": "keywords" + } + ], + "category": "methods" + }, + { + "anchor": "setstickermaskposition", + "name": "setStickerMaskPosition", + "description": "Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.", + "html_description": "

Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.

", + "rst_description": "Use this method to change the `mask position `_ of a mask sticker. The sticker must belong to a sticker set that was 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" + }, + { + "type": "MaskPosition", + "required": false, + "description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "html_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.", + "rst_description": "A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.\n", + "name": "mask_position" + } + ], + "category": "methods" + }, + { + "anchor": "setstickersettitle", + "name": "setStickerSetTitle", + "description": "Use this method to set the title of a created sticker set. Returns True on success.", + "html_description": "

Use this method to set the title of a created sticker set. Returns True on success.

", + "rst_description": "Use this method to set the title of a created sticker set. 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": "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" + } + ], + "category": "methods" + }, + { + "anchor": "setstickersetthumbnail", + "name": "setStickerSetThumbnail", + "description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success.", "annotations": [ { "type": "String", @@ -9054,10 +9300,54 @@ { "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" + "description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "html_description": "A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.", + "rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n", + "name": "thumbnail" + } + ], + "category": "methods" + }, + { + "anchor": "setcustomemojistickersetthumbnail", + "name": "setCustomEmojiStickerSetThumbnail", + "description": "Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.", + "html_description": "

Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.

", + "rst_description": "Use this method to set the thumbnail of a custom emoji sticker set. 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": "String", + "required": false, + "description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.", + "html_description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.", + "rst_description": "Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.\n", + "name": "custom_emoji_id" + } + ], + "category": "methods" + }, + { + "anchor": "deletestickerset", + "name": "deleteStickerSet", + "description": "Use this method to delete a sticker set that was created by the bot. Returns True on success.", + "html_description": "

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

", + "rst_description": "Use this method to delete a sticker set that was created by the bot. 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" } ], "category": "methods" @@ -9278,7 +9568,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -9286,7 +9576,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -9294,7 +9584,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], @@ -9336,7 +9626,7 @@ "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", + "name": "thumbnail_url", "required": true }, { @@ -9474,7 +9764,7 @@ "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", + "name": "thumbnail_url", "required": true }, { @@ -9482,7 +9772,7 @@ "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", + "name": "thumbnail_mime_type", "required": false }, { @@ -9596,7 +9886,7 @@ "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", + "name": "thumbnail_url", "required": true }, { @@ -9604,7 +9894,7 @@ "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", + "name": "thumbnail_mime_type", "required": false }, { @@ -9702,7 +9992,7 @@ "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", + "name": "thumbnail_url", "required": true }, { @@ -10076,7 +10366,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -10084,7 +10374,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -10092,7 +10382,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], @@ -10198,7 +10488,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -10206,7 +10496,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -10214,7 +10504,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], @@ -10328,7 +10618,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -10336,7 +10626,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -10344,7 +10634,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], @@ -10426,7 +10716,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -10434,7 +10724,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -10442,7 +10732,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], diff --git a/.butcher/types/Animation/entity.json b/.butcher/types/Animation/entity.json index 2de45c1b..db471f53 100644 --- a/.butcher/types/Animation/entity.json +++ b/.butcher/types/Animation/entity.json @@ -58,7 +58,7 @@ "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", + "name": "thumbnail", "required": false }, { diff --git a/.butcher/types/Audio/entity.json b/.butcher/types/Audio/entity.json index 4b94b3a1..c65b9118 100644 --- a/.butcher/types/Audio/entity.json +++ b/.butcher/types/Audio/entity.json @@ -82,7 +82,7 @@ "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", + "name": "thumbnail", "required": false } ], diff --git a/.butcher/types/BotDescription/entity.json b/.butcher/types/BotDescription/entity.json new file mode 100644 index 00000000..6d47a69d --- /dev/null +++ b/.butcher/types/BotDescription/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botdescription", + "name": "BotDescription", + "description": "This object represents the bot's description.", + "html_description": "

This object represents the bot's description.

", + "rst_description": "This object represents the bot's description.", + "annotations": [ + { + "type": "String", + "description": "The bot's description", + "html_description": "The bot's description", + "rst_description": "The bot's description\n", + "name": "description", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/BotShortDescription/entity.json b/.butcher/types/BotShortDescription/entity.json new file mode 100644 index 00000000..dcd3e80c --- /dev/null +++ b/.butcher/types/BotShortDescription/entity.json @@ -0,0 +1,27 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Available types", + "anchor": "available-types" + }, + "object": { + "anchor": "botshortdescription", + "name": "BotShortDescription", + "description": "This object represents the bot's short description.", + "html_description": "

This object represents the bot's short description.

", + "rst_description": "This object represents the bot's short description.", + "annotations": [ + { + "type": "String", + "description": "The bot's short description", + "html_description": "The bot's short description", + "rst_description": "The bot's short description\n", + "name": "short_description", + "required": true + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Document/entity.json b/.butcher/types/Document/entity.json index 65e0386d..036df2c4 100644 --- a/.butcher/types/Document/entity.json +++ b/.butcher/types/Document/entity.json @@ -34,7 +34,7 @@ "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", + "name": "thumbnail", "required": false }, { diff --git a/.butcher/types/InlineQueryResultArticle/entity.json b/.butcher/types/InlineQueryResultArticle/entity.json index 93c397e7..74b635ff 100644 --- a/.butcher/types/InlineQueryResultArticle/entity.json +++ b/.butcher/types/InlineQueryResultArticle/entity.json @@ -82,7 +82,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -90,7 +90,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -98,7 +98,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], diff --git a/.butcher/types/InlineQueryResultContact/entity.json b/.butcher/types/InlineQueryResultContact/entity.json index 3b9b65fa..2445e5d7 100644 --- a/.butcher/types/InlineQueryResultContact/entity.json +++ b/.butcher/types/InlineQueryResultContact/entity.json @@ -82,7 +82,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -90,7 +90,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -98,7 +98,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], diff --git a/.butcher/types/InlineQueryResultDocument/entity.json b/.butcher/types/InlineQueryResultDocument/entity.json index 76a1bb70..1eda8583 100644 --- a/.butcher/types/InlineQueryResultDocument/entity.json +++ b/.butcher/types/InlineQueryResultDocument/entity.json @@ -106,7 +106,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -114,7 +114,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -122,7 +122,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], diff --git a/.butcher/types/InlineQueryResultGif/entity.json b/.butcher/types/InlineQueryResultGif/entity.json index 89f56afc..b6ab8d8f 100644 --- a/.butcher/types/InlineQueryResultGif/entity.json +++ b/.butcher/types/InlineQueryResultGif/entity.json @@ -66,7 +66,7 @@ "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", + "name": "thumbnail_url", "required": true }, { @@ -74,7 +74,7 @@ "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", + "name": "thumbnail_mime_type", "required": false }, { diff --git a/.butcher/types/InlineQueryResultLocation/entity.json b/.butcher/types/InlineQueryResultLocation/entity.json index 7f14565f..c4cdf8e7 100644 --- a/.butcher/types/InlineQueryResultLocation/entity.json +++ b/.butcher/types/InlineQueryResultLocation/entity.json @@ -106,7 +106,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -114,7 +114,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -122,7 +122,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json index 27ebd1e3..69916a5b 100644 --- a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json +++ b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json @@ -66,7 +66,7 @@ "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", + "name": "thumbnail_url", "required": true }, { @@ -74,7 +74,7 @@ "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", + "name": "thumbnail_mime_type", "required": false }, { diff --git a/.butcher/types/InlineQueryResultPhoto/entity.json b/.butcher/types/InlineQueryResultPhoto/entity.json index 9aa12a16..a216aacf 100644 --- a/.butcher/types/InlineQueryResultPhoto/entity.json +++ b/.butcher/types/InlineQueryResultPhoto/entity.json @@ -42,7 +42,7 @@ "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", + "name": "thumbnail_url", "required": true }, { diff --git a/.butcher/types/InlineQueryResultVenue/entity.json b/.butcher/types/InlineQueryResultVenue/entity.json index af6c2d22..3bf6bebe 100644 --- a/.butcher/types/InlineQueryResultVenue/entity.json +++ b/.butcher/types/InlineQueryResultVenue/entity.json @@ -114,7 +114,7 @@ "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", + "name": "thumbnail_url", "required": false }, { @@ -122,7 +122,7 @@ "description": "Thumbnail width", "html_description": "Optional. Thumbnail width", "rst_description": "*Optional*. Thumbnail width\n", - "name": "thumb_width", + "name": "thumbnail_width", "required": false }, { @@ -130,7 +130,7 @@ "description": "Thumbnail height", "html_description": "Optional. Thumbnail height", "rst_description": "*Optional*. Thumbnail height\n", - "name": "thumb_height", + "name": "thumbnail_height", "required": false } ], diff --git a/.butcher/types/InlineQueryResultVideo/entity.json b/.butcher/types/InlineQueryResultVideo/entity.json index 784a8728..abc82746 100644 --- a/.butcher/types/InlineQueryResultVideo/entity.json +++ b/.butcher/types/InlineQueryResultVideo/entity.json @@ -50,7 +50,7 @@ "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", + "name": "thumbnail_url", "required": true }, { diff --git a/.butcher/types/InputMediaAnimation/entity.json b/.butcher/types/InputMediaAnimation/entity.json index 80dd5629..4d694d1b 100644 --- a/.butcher/types/InputMediaAnimation/entity.json +++ b/.butcher/types/InputMediaAnimation/entity.json @@ -34,7 +34,7 @@ "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", + "name": "thumbnail", "required": false }, { diff --git a/.butcher/types/InputMediaAudio/entity.json b/.butcher/types/InputMediaAudio/entity.json index 43963950..e16a0a7d 100644 --- a/.butcher/types/InputMediaAudio/entity.json +++ b/.butcher/types/InputMediaAudio/entity.json @@ -34,7 +34,7 @@ "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", + "name": "thumbnail", "required": false }, { diff --git a/.butcher/types/InputMediaDocument/entity.json b/.butcher/types/InputMediaDocument/entity.json index cd51dea9..97bcbcd3 100644 --- a/.butcher/types/InputMediaDocument/entity.json +++ b/.butcher/types/InputMediaDocument/entity.json @@ -34,7 +34,7 @@ "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", + "name": "thumbnail", "required": false }, { diff --git a/.butcher/types/InputMediaVideo/entity.json b/.butcher/types/InputMediaVideo/entity.json index 97ceb6b7..1f5e6487 100644 --- a/.butcher/types/InputMediaVideo/entity.json +++ b/.butcher/types/InputMediaVideo/entity.json @@ -34,7 +34,7 @@ "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", + "name": "thumbnail", "required": false }, { diff --git a/.butcher/types/InputSticker/entity.json b/.butcher/types/InputSticker/entity.json new file mode 100644 index 00000000..819f81f9 --- /dev/null +++ b/.butcher/types/InputSticker/entity.json @@ -0,0 +1,51 @@ +{ + "meta": { + "deprecated": false + }, + "group": { + "title": "Stickers", + "anchor": "stickers" + }, + "object": { + "anchor": "inputsticker", + "name": "InputSticker", + "description": "This object describes a sticker to be added to a sticker set.", + "html_description": "

This object describes a sticker to be added to a sticker set.

", + "rst_description": "This object describes a sticker to be added to a sticker set.", + "annotations": [ + { + "type": "InputFile or String", + "description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files", + "html_description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »", + "rst_description": "The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `\n", + "name": "sticker", + "required": true + }, + { + "type": "Array of String", + "description": "List of 1-20 emoji associated with the sticker", + "html_description": "List of 1-20 emoji associated with the sticker", + "rst_description": "List of 1-20 emoji associated with the sticker\n", + "name": "emoji_list", + "required": true + }, + { + "type": "MaskPosition", + "description": "Position where the mask should be placed on faces. For 'mask' stickers only.", + "html_description": "Optional. Position where the mask should be placed on faces. For “mask” stickers only.", + "rst_description": "*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.\n", + "name": "mask_position", + "required": false + }, + { + "type": "Array of String", + "description": "List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.", + "html_description": "Optional. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom_emoji” stickers only.", + "rst_description": "*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.\n", + "name": "keywords", + "required": false + } + ], + "category": "types" + } +} diff --git a/.butcher/types/Sticker/entity.json b/.butcher/types/Sticker/entity.json index 8d0f1d88..cd3d092b 100644 --- a/.butcher/types/Sticker/entity.json +++ b/.butcher/types/Sticker/entity.json @@ -74,7 +74,7 @@ "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", + "name": "thumbnail", "required": false }, { @@ -117,6 +117,14 @@ "name": "custom_emoji_id", "required": false }, + { + "type": "True", + "description": "True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places", + "html_description": "Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places", + "rst_description": "*Optional*. :code:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places\n", + "name": "needs_repainting", + "required": false + }, { "type": "Integer", "description": "File size in bytes", diff --git a/.butcher/types/StickerSet/entity.json b/.butcher/types/StickerSet/entity.json index 4e370e93..b766cd7d 100644 --- a/.butcher/types/StickerSet/entity.json +++ b/.butcher/types/StickerSet/entity.json @@ -66,7 +66,7 @@ "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", + "name": "thumbnail", "required": false } ], diff --git a/.butcher/types/Video/entity.json b/.butcher/types/Video/entity.json index 65c5594f..52bb1439 100644 --- a/.butcher/types/Video/entity.json +++ b/.butcher/types/Video/entity.json @@ -58,7 +58,7 @@ "description": "Video thumbnail", "html_description": "Optional. Video thumbnail", "rst_description": "*Optional*. Video thumbnail\n", - "name": "thumb", + "name": "thumbnail", "required": false }, { diff --git a/.butcher/types/VideoNote/entity.json b/.butcher/types/VideoNote/entity.json index 85dbf566..a27d9a7d 100644 --- a/.butcher/types/VideoNote/entity.json +++ b/.butcher/types/VideoNote/entity.json @@ -50,7 +50,7 @@ "description": "Video thumbnail", "html_description": "Optional. Video thumbnail", "rst_description": "*Optional*. Video thumbnail\n", - "name": "thumb", + "name": "thumbnail", "required": false }, { diff --git a/CHANGES/1139.misc.rst b/CHANGES/1139.misc.rst new file mode 100644 index 00000000..432607e0 --- /dev/null +++ b/CHANGES/1139.misc.rst @@ -0,0 +1,7 @@ +Added full support of `Bot API 6.6 `_ + +.. danger:: + + Note that this issue has breaking changes described in in the Bot API changelog, + this changes is not breaking in the API but breaking inside aiogram because + Beta stage is not finished. diff --git a/README.rst b/README.rst index bf5a7d11..3c2297a8 100644 --- a/README.rst +++ b/README.rst @@ -63,7 +63,7 @@ Features - Asynchronous (`asyncio docs `_, :pep:`492`) - Has type hints (:pep:`484`) and can be used with `mypy `_ - Supports `PyPy `_ -- Supports `Telegram Bot API 6.5 `_ and gets fast updates to the latest versions of the Bot API +- Supports `Telegram Bot API 6.6 `_ and gets fast updates to the latest versions of the Bot API - Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated - Updates router (Blueprints) - Has Finite State Machine diff --git a/aiogram/__init__.py b/aiogram/__init__.py index a703578e..4ed355fc 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -37,5 +37,5 @@ __all__ = ( "flags", ) -__version__ = "3.0.0b7" -__api_version__ = "6.5" +__version__ = "3.0.0b8" +__api_version__ = "6.6" diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index d9ddc07a..91dd91fa 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -46,6 +46,7 @@ from ..methods import ( DeleteMessage, DeleteMyCommands, DeleteStickerFromSet, + DeleteStickerSet, DeleteWebhook, EditChatInviteLink, EditForumTopic, @@ -69,6 +70,8 @@ from ..methods import ( GetMe, GetMyCommands, GetMyDefaultAdministratorRights, + GetMyDescription, + GetMyShortDescription, GetStickerSet, GetUpdates, GetUserProfilePhotos, @@ -107,12 +110,19 @@ from ..methods import ( SetChatPhoto, SetChatStickerSet, SetChatTitle, + SetCustomEmojiStickerSetThumbnail, SetGameScore, SetMyCommands, SetMyDefaultAdministratorRights, + SetMyDescription, + SetMyShortDescription, SetPassportDataErrors, + SetStickerEmojiList, + SetStickerKeywords, + SetStickerMaskPosition, SetStickerPositionInSet, - SetStickerSetThumb, + SetStickerSetThumbnail, + SetStickerSetTitle, SetWebhook, StopMessageLiveLocation, StopPoll, @@ -129,6 +139,8 @@ from ..types import ( UNSET, BotCommand, BotCommandScope, + BotDescription, + BotShortDescription, Chat, ChatAdministratorRights, ChatInviteLink, @@ -152,6 +164,7 @@ from ..types import ( InputMediaDocument, InputMediaPhoto, InputMediaVideo, + InputSticker, LabeledPrice, MaskPosition, MenuButtonCommands, @@ -396,25 +409,17 @@ class Bot(ContextInstanceMixin["Bot"]): 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, + sticker: InputSticker, 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. + Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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 sticker: A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed. :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -422,11 +427,7 @@ class Bot(ContextInstanceMixin["Bot"]): 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, + sticker=sticker, ) return await self(call, request_timeout=request_timeout) @@ -894,28 +895,24 @@ class Bot(ContextInstanceMixin["Bot"]): 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, + stickers: List[InputSticker], + sticker_format: str, sticker_type: Optional[str] = None, - mask_position: Optional[MaskPosition] = None, + needs_repainting: Optional[bool] = 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. + 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. 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 stickers: A JSON-serialized list of 1-50 initial stickers to be added to the sticker set + :param sticker_format: Format of stickers in the set, must be one of 'static', 'animated', 'video' + :param sticker_type: Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created. + :param needs_repainting: Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only :param request_timeout: Request timeout :return: Returns :code:`True` on success. """ @@ -924,12 +921,10 @@ class Bot(ContextInstanceMixin["Bot"]): user_id=user_id, name=name, title=title, - emojis=emojis, - png_sticker=png_sticker, - tgs_sticker=tgs_sticker, - webm_sticker=webm_sticker, + stickers=stickers, + sticker_format=sticker_format, sticker_type=sticker_type, - mask_position=mask_position, + needs_repainting=needs_repainting, ) return await self(call, request_timeout=request_timeout) @@ -1998,7 +1993,7 @@ class Bot(ContextInstanceMixin["Bot"]): duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -2023,7 +2018,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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* @@ -2044,7 +2039,7 @@ class Bot(ContextInstanceMixin["Bot"]): duration=duration, width=width, height=height, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2068,7 +2063,7 @@ class Bot(ContextInstanceMixin["Bot"]): duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -2093,7 +2088,7 @@ class Bot(ContextInstanceMixin["Bot"]): :param duration: Duration of the audio in seconds :param performer: Performer :param title: Track name - :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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 @@ -2113,7 +2108,7 @@ class Bot(ContextInstanceMixin["Bot"]): duration=duration, performer=performer, title=title, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -2252,7 +2247,7 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id: Union[int, str], document: Union[InputFile, str], message_thread_id: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -2274,7 +2269,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 - :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document 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* @@ -2292,7 +2287,7 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id=chat_id, document=document, message_thread_id=message_thread_id, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2731,6 +2726,7 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id: Union[int, str], sticker: Union[InputFile, 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, @@ -2746,8 +2742,9 @@ class Bot(ContextInstanceMixin["Bot"]): 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 sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL. :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only + :param emoji: Emoji associated with the sticker; only for just uploaded stickers :param disable_notification: Sends the message `silently `_. 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 @@ -2761,6 +2758,7 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id=chat_id, sticker=sticker, message_thread_id=message_thread_id, + emoji=emoji, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -2841,7 +2839,7 @@ class Bot(ContextInstanceMixin["Bot"]): duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -2867,7 +2865,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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* @@ -2889,7 +2887,7 @@ class Bot(ContextInstanceMixin["Bot"]): duration=duration, width=width, height=height, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2910,7 +2908,7 @@ class Bot(ContextInstanceMixin["Bot"]): message_thread_id: Optional[int] = None, duration: Optional[int] = None, length: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -2930,7 +2928,7 @@ class Bot(ContextInstanceMixin["Bot"]): :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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 @@ -2946,7 +2944,7 @@ class Bot(ContextInstanceMixin["Bot"]): message_thread_id=message_thread_id, duration=duration, length=length, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -3250,7 +3248,7 @@ class Bot(ContextInstanceMixin["Bot"]): 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. + 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 free to modify the list before adding the bot. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights @@ -3313,32 +3311,6 @@ class Bot(ContextInstanceMixin["Bot"]): ) 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 :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, @@ -3560,23 +3532,26 @@ class Bot(ContextInstanceMixin["Bot"]): async def upload_sticker_file( self, user_id: int, - png_sticker: InputFile, + sticker: InputFile, + sticker_format: str, 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. + Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file 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 sticker: A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » ` + :param sticker_format: Format of the sticker, must be one of 'static', 'animated', 'video' :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, + sticker=sticker, + sticker_format=sticker_format, ) return await self(call, request_timeout=request_timeout) @@ -3682,3 +3657,250 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id=chat_id, ) return await self(call, request_timeout=request_timeout) + + async def delete_sticker_set( + self, + name: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletestickerset + + :param name: Sticker set name + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = DeleteStickerSet( + name=name, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_description( + self, + language_code: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> BotDescription: + """ + Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success. + + Source: https://core.telegram.org/bots/api#getmydescription + + :param language_code: A two-letter ISO 639-1 language code or an empty string + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.bot_description.BotDescription` on success. + """ + + call = GetMyDescription( + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def get_my_short_description( + self, + language_code: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> BotShortDescription: + """ + Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. + + Source: https://core.telegram.org/bots/api#getmyshortdescription + + :param language_code: A two-letter ISO 639-1 language code or an empty string + :param request_timeout: Request timeout + :return: Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. + """ + + call = GetMyShortDescription( + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_custom_emoji_sticker_set_thumbnail( + self, + name: str, + custom_emoji_id: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail + + :param name: Sticker set name + :param custom_emoji_id: Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetCustomEmojiStickerSetThumbnail( + name=name, + custom_emoji_id=custom_emoji_id, + ) + return await self(call, request_timeout=request_timeout) + + async def set_my_description( + self, + description: Optional[str] = None, + language_code: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setmydescription + + :param description: New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language. + :param language_code: A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyDescription( + description=description, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_my_short_description( + self, + short_description: Optional[str] = None, + language_code: Optional[str] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setmyshortdescription + + :param short_description: New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language. + :param language_code: A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetMyShortDescription( + short_description=short_description, + language_code=language_code, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_emoji_list( + self, + sticker: str, + emoji_list: List[str], + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickeremojilist + + :param sticker: File identifier of the sticker + :param emoji_list: A JSON-serialized list of 1-20 emoji associated with the sticker + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerEmojiList( + sticker=sticker, + emoji_list=emoji_list, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_keywords( + self, + sticker: str, + keywords: Optional[List[str]] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickerkeywords + + :param sticker: File identifier of the sticker + :param keywords: A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerKeywords( + sticker=sticker, + keywords=keywords, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_mask_position( + self, + sticker: str, + mask_position: Optional[MaskPosition] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to change the `mask position `_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickermaskposition + + :param sticker: File identifier of the sticker + :param mask_position: A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerMaskPosition( + sticker=sticker, + mask_position=mask_position, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_set_thumbnail( + self, + name: str, + user_id: int, + thumbnail: Optional[Union[InputFile, str]] = None, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickersetthumbnail + + :param name: Sticker set name + :param user_id: User identifier of the sticker set owner + :param thumbnail: A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerSetThumbnail( + name=name, + user_id=user_id, + thumbnail=thumbnail, + ) + return await self(call, request_timeout=request_timeout) + + async def set_sticker_set_title( + self, + name: str, + title: str, + request_timeout: Optional[int] = None, + ) -> bool: + """ + Use this method to set the title of a created sticker set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickersettitle + + :param name: Sticker set name + :param title: Sticker set title, 1-64 characters + :param request_timeout: Request timeout + :return: Returns :code:`True` on success. + """ + + call = SetStickerSetTitle( + name=name, + title=title, + ) + return await self(call, request_timeout=request_timeout) diff --git a/aiogram/client/session/aiohttp.py b/aiogram/client/session/aiohttp.py index 4d9dff06..3f35a0e0 100644 --- a/aiogram/client/session/aiohttp.py +++ b/aiogram/client/session/aiohttp.py @@ -23,6 +23,7 @@ from aiogram.methods import Request, TelegramMethod from ...exceptions import TelegramNetworkError from ...methods.base import TelegramType +from ...types import InputFile from .base import UNSET, BaseSession if TYPE_CHECKING: diff --git a/aiogram/enums/__init__.py b/aiogram/enums/__init__.py index a744ba55..73422378 100644 --- a/aiogram/enums/__init__.py +++ b/aiogram/enums/__init__.py @@ -11,6 +11,7 @@ from .menu_button_type import MenuButtonType from .message_entity_type import MessageEntityType from .parse_mode import ParseMode from .poll_type import PollType +from .sticker_format import StickerFormat from .sticker_type import StickerType from .topic_icon_color import TopicIconColor from .update_type import UpdateType @@ -29,6 +30,7 @@ __all__ = ( "MessageEntityType", "ParseMode", "PollType", + "StickerFormat", "StickerType", "TopicIconColor", "UpdateType", diff --git a/aiogram/enums/inline_query_result_type.py b/aiogram/enums/inline_query_result_type.py index fa063fcb..771dc498 100644 --- a/aiogram/enums/inline_query_result_type.py +++ b/aiogram/enums/inline_query_result_type.py @@ -3,9 +3,9 @@ from enum import Enum class InlineQueryResultType(str, Enum): """ - The part of the face relative to which the mask should be placed. + Type of inline query result - Source: https://core.telegram.org/bots/api#maskposition + Source: https://core.telegram.org/bots/api#inlinequeryresult """ AUDIO = "audio" diff --git a/aiogram/enums/sticker_format.py b/aiogram/enums/sticker_format.py new file mode 100644 index 00000000..6c9441d9 --- /dev/null +++ b/aiogram/enums/sticker_format.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class StickerFormat(str, Enum): + """ + Format of the sticker + + Source: https://core.telegram.org/bots/api#createnewstickerset + """ + + STATIC = "static" + ANIMATED = "animated" + VIDEO = "video" diff --git a/aiogram/filters/command.py b/aiogram/filters/command.py index 13997073..85ff4de6 100644 --- a/aiogram/filters/command.py +++ b/aiogram/filters/command.py @@ -279,8 +279,8 @@ class CommandStart(Command): await self.validate_mention(bot=bot, command=command) command = self.validate_command(command) command = self.validate_deeplink(command=command) - self.do_magic(command=command) - return command + command = self.do_magic(command=command) + return command # noqa: RET504 def validate_deeplink(self, command: CommandObject) -> CommandObject: if not self.deep_link: diff --git a/aiogram/methods/__init__.py b/aiogram/methods/__init__.py index d50e99a0..5bf0edf5 100644 --- a/aiogram/methods/__init__.py +++ b/aiogram/methods/__init__.py @@ -23,6 +23,7 @@ from .delete_forum_topic import DeleteForumTopic from .delete_message import DeleteMessage from .delete_my_commands import DeleteMyCommands from .delete_sticker_from_set import DeleteStickerFromSet +from .delete_sticker_set import DeleteStickerSet from .delete_webhook import DeleteWebhook from .edit_chat_invite_link import EditChatInviteLink from .edit_forum_topic import EditForumTopic @@ -46,6 +47,8 @@ from .get_game_high_scores import GetGameHighScores from .get_me import GetMe from .get_my_commands import GetMyCommands from .get_my_default_administrator_rights import GetMyDefaultAdministratorRights +from .get_my_description import GetMyDescription +from .get_my_short_description import GetMyShortDescription from .get_sticker_set import GetStickerSet from .get_updates import GetUpdates from .get_user_profile_photos import GetUserProfilePhotos @@ -84,12 +87,19 @@ from .set_chat_permissions import SetChatPermissions from .set_chat_photo import SetChatPhoto from .set_chat_sticker_set import SetChatStickerSet from .set_chat_title import SetChatTitle +from .set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail from .set_game_score import SetGameScore from .set_my_commands import SetMyCommands from .set_my_default_administrator_rights import SetMyDefaultAdministratorRights +from .set_my_description import SetMyDescription +from .set_my_short_description import SetMyShortDescription from .set_passport_data_errors import SetPassportDataErrors +from .set_sticker_emoji_list import SetStickerEmojiList +from .set_sticker_keywords import SetStickerKeywords +from .set_sticker_mask_position import SetStickerMaskPosition from .set_sticker_position_in_set import SetStickerPositionInSet -from .set_sticker_set_thumb import SetStickerSetThumb +from .set_sticker_set_thumbnail import SetStickerSetThumbnail +from .set_sticker_set_title import SetStickerSetTitle from .set_webhook import SetWebhook from .stop_message_live_location import StopMessageLiveLocation from .stop_poll import StopPoll @@ -126,6 +136,7 @@ __all__ = ( "DeleteMessage", "DeleteMyCommands", "DeleteStickerFromSet", + "DeleteStickerSet", "DeleteWebhook", "EditChatInviteLink", "EditForumTopic", @@ -149,6 +160,8 @@ __all__ = ( "GetMe", "GetMyCommands", "GetMyDefaultAdministratorRights", + "GetMyDescription", + "GetMyShortDescription", "GetStickerSet", "GetUpdates", "GetUserProfilePhotos", @@ -189,12 +202,19 @@ __all__ = ( "SetChatPhoto", "SetChatStickerSet", "SetChatTitle", + "SetCustomEmojiStickerSetThumbnail", "SetGameScore", "SetMyCommands", "SetMyDefaultAdministratorRights", + "SetMyDescription", + "SetMyShortDescription", "SetPassportDataErrors", + "SetStickerEmojiList", + "SetStickerKeywords", + "SetStickerMaskPosition", "SetStickerPositionInSet", - "SetStickerSetThumb", + "SetStickerSetThumbnail", + "SetStickerSetTitle", "SetWebhook", "StopMessageLiveLocation", "StopPoll", diff --git a/aiogram/methods/add_sticker_to_set.py b/aiogram/methods/add_sticker_to_set.py index 6fe7b7a1..75b8387a 100644 --- a/aiogram/methods/add_sticker_to_set.py +++ b/aiogram/methods/add_sticker_to_set.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any, Dict -from ..types import InputFile, MaskPosition -from .base import Request, TelegramMethod, prepare_file +from ..types import InputFile, InputSticker +from .base import Request, TelegramMethod, prepare_input_sticker if TYPE_CHECKING: from ..client.bot import Bot @@ -11,7 +11,7 @@ if TYPE_CHECKING: class AddStickerToSet(TelegramMethod[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. + Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video 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 """ @@ -22,23 +22,13 @@ class AddStickerToSet(TelegramMethod[bool]): """User identifier of sticker set owner""" name: str """Sticker set name""" - emojis: str - """One or more emoji corresponding to the sticker""" - png_sticker: Optional[Union[InputFile, str]] = None - """**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 » `""" - tgs_sticker: Optional[InputFile] = None - """**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""" - webm_sticker: Optional[InputFile] = None - """**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""" - mask_position: Optional[MaskPosition] = None - """A JSON-serialized object for position where the mask should be placed on faces""" + sticker: InputSticker + """A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.""" def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"png_sticker", "tgs_sticker", "webm_sticker"}) + data: Dict[str, Any] = self.dict() files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker) - prepare_file(data=data, files=files, name="tgs_sticker", value=self.tgs_sticker) - prepare_file(data=data, files=files, name="webm_sticker", value=self.webm_sticker) + prepare_input_sticker(input_sticker=data["sticker"], files=files) return Request(method="addStickerToSet", data=data, files=files) diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index 699c10c7..8f9db0d4 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -100,10 +100,10 @@ class TelegramMethod(abc.ABC, BaseModel, Generic[TelegramType]): def prepare_file(name: str, value: Any, data: Dict[str, Any], files: Dict[str, Any]) -> None: if not value: return - if name == "thumb": + if name == "thumbnail": tag = secrets.token_urlsafe(10) files[tag] = value - data["thumb"] = f"attach://{tag}" + data["thumbnail"] = f"attach://{tag}" elif isinstance(value, InputFile): files[name] = value else: @@ -122,6 +122,22 @@ def prepare_input_media(data: Dict[str, Any], files: Dict[str, InputFile]) -> No input_media["media"] = f"attach://{tag}" +def prepare_input_sticker(input_sticker: Dict[str, Any], files: Dict[str, InputFile]) -> None: + if ( + "sticker" in input_sticker + and input_sticker["sticker"] + and isinstance(input_sticker["sticker"], InputFile) + ): + tag = secrets.token_urlsafe(10) + files[tag] = input_sticker.pop("sticker") + input_sticker["sticker"] = f"attach://{tag}" + + +def prepare_input_stickers(data: Dict[str, Any], files: Dict[str, InputFile]) -> None: + for input_sticker in data["stickers"]: + prepare_input_sticker(input_sticker, files=files) + + def prepare_media_file(data: Dict[str, Any], files: Dict[str, InputFile]) -> None: if ( data["media"] diff --git a/aiogram/methods/create_new_sticker_set.py b/aiogram/methods/create_new_sticker_set.py index 00ae4052..651c6672 100644 --- a/aiogram/methods/create_new_sticker_set.py +++ b/aiogram/methods/create_new_sticker_set.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any, Dict, List, Optional -from ..types import InputFile, MaskPosition -from .base import Request, TelegramMethod, prepare_file +from ..types import InputFile, InputSticker +from .base import Request, TelegramMethod, prepare_input_sticker, prepare_input_stickers if TYPE_CHECKING: from ..client.bot import Bot @@ -11,7 +11,7 @@ if TYPE_CHECKING: class CreateNewStickerSet(TelegramMethod[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. + 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. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#createnewstickerset """ @@ -24,25 +24,19 @@ class CreateNewStickerSet(TelegramMethod[bool]): """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.""" title: str """Sticker set title, 1-64 characters""" - emojis: str - """One or more emoji corresponding to the sticker""" - png_sticker: Optional[Union[InputFile, str]] = None - """**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 » `""" - tgs_sticker: Optional[InputFile] = None - """**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""" - webm_sticker: Optional[InputFile] = None - """**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""" + stickers: List[InputSticker] + """A JSON-serialized list of 1-50 initial stickers to be added to the sticker set""" + sticker_format: str + """Format of stickers in the set, must be one of 'static', 'animated', 'video'""" sticker_type: Optional[str] = None - """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.""" - mask_position: Optional[MaskPosition] = None - """A JSON-serialized object for position where the mask should be placed on faces""" + """Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.""" + needs_repainting: Optional[bool] = None + """Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only""" def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"png_sticker", "tgs_sticker", "webm_sticker"}) - + data: Dict[str, Any] = self.dict() files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker) - prepare_file(data=data, files=files, name="tgs_sticker", value=self.tgs_sticker) - prepare_file(data=data, files=files, name="webm_sticker", value=self.webm_sticker) + + prepare_input_stickers(data=data, files=files) return Request(method="createNewStickerSet", data=data, files=files) diff --git a/aiogram/methods/delete_sticker_set.py b/aiogram/methods/delete_sticker_set.py new file mode 100644 index 00000000..2ffa48f2 --- /dev/null +++ b/aiogram/methods/delete_sticker_set.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class DeleteStickerSet(TelegramMethod[bool]): + """ + Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#deletestickerset + """ + + __returning__ = bool + + name: str + """Sticker set name""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="deleteStickerSet", data=data) diff --git a/aiogram/methods/get_my_description.py b/aiogram/methods/get_my_description.py new file mode 100644 index 00000000..770e6263 --- /dev/null +++ b/aiogram/methods/get_my_description.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional + +from ..types import BotDescription +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class GetMyDescription(TelegramMethod[BotDescription]): + """ + Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success. + + Source: https://core.telegram.org/bots/api#getmydescription + """ + + __returning__ = BotDescription + + language_code: Optional[str] = None + """A two-letter ISO 639-1 language code or an empty string""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="getMyDescription", data=data) diff --git a/aiogram/methods/get_my_short_description.py b/aiogram/methods/get_my_short_description.py new file mode 100644 index 00000000..a38d4ecc --- /dev/null +++ b/aiogram/methods/get_my_short_description.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional + +from ..types import BotShortDescription +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class GetMyShortDescription(TelegramMethod[BotShortDescription]): + """ + Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. + + Source: https://core.telegram.org/bots/api#getmyshortdescription + """ + + __returning__ = BotShortDescription + + language_code: Optional[str] = None + """A two-letter ISO 639-1 language code or an empty string""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="getMyShortDescription", data=data) diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 3bebdc78..7528d8be 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -39,7 +39,7 @@ class SendAnimation(TelegramMethod[Message]): """Animation width""" height: Optional[int] = None """Animation height""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """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 » `""" caption: Optional[str] = None """Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing""" @@ -71,6 +71,6 @@ class SendAnimation(TelegramMethod[Message]): files: Dict[str, InputFile] = {} prepare_file(data=data, files=files, name="animation", value=self.animation) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) return Request(method="sendAnimation", data=data, files=files) diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py index 1786f751..6557a5c1 100644 --- a/aiogram/methods/send_audio.py +++ b/aiogram/methods/send_audio.py @@ -46,7 +46,7 @@ class SendAudio(TelegramMethod[Message]): """Performer""" title: Optional[str] = None """Track name""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """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 » `""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" @@ -70,6 +70,6 @@ class SendAudio(TelegramMethod[Message]): files: Dict[str, InputFile] = {} prepare_file(data=data, files=files, name="audio", value=self.audio) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) return Request(method="sendAudio", data=data, files=files) diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py index 6f99e756..9b81b88f 100644 --- a/aiogram/methods/send_document.py +++ b/aiogram/methods/send_document.py @@ -33,7 +33,7 @@ class SendDocument(TelegramMethod[Message]): """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 » `""" message_thread_id: Optional[int] = None """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """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 » `""" caption: Optional[str] = None """Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing""" @@ -65,6 +65,6 @@ class SendDocument(TelegramMethod[Message]): files: Dict[str, InputFile] = {} prepare_file(data=data, files=files, name="document", value=self.document) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) return Request(method="sendDocument", data=data, files=files) diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py index 81ab698d..e707cd2f 100644 --- a/aiogram/methods/send_sticker.py +++ b/aiogram/methods/send_sticker.py @@ -28,9 +28,11 @@ class SendSticker(TelegramMethod[Message]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sticker: Union[InputFile, str] - """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 » `""" + """Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.""" message_thread_id: Optional[int] = None """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" + emoji: Optional[str] = None + """Emoji associated with the sticker; only for just uploaded stickers""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" protect_content: Optional[bool] = None diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py index b144d090..8075b1fb 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -39,7 +39,7 @@ class SendVideo(TelegramMethod[Message]): """Video width""" height: Optional[int] = None """Video height""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """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 » `""" caption: Optional[str] = None """Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing""" @@ -73,6 +73,6 @@ class SendVideo(TelegramMethod[Message]): files: Dict[str, InputFile] = {} prepare_file(data=data, files=files, name="video", value=self.video) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) return Request(method="sendVideo", data=data, files=files) diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py index 19776e62..3db3a142 100644 --- a/aiogram/methods/send_video_note.py +++ b/aiogram/methods/send_video_note.py @@ -35,7 +35,7 @@ class SendVideoNote(TelegramMethod[Message]): """Duration of sent video in seconds""" length: Optional[int] = None """Video width and height, i.e. diameter of the video message""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """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 » `""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" @@ -55,6 +55,6 @@ class SendVideoNote(TelegramMethod[Message]): files: Dict[str, InputFile] = {} prepare_file(data=data, files=files, name="video_note", value=self.video_note) - prepare_file(data=data, files=files, name="thumb", value=self.thumb) + prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) return Request(method="sendVideoNote", data=data, files=files) diff --git a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py new file mode 100644 index 00000000..35b047a2 --- /dev/null +++ b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): + """ + Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail + """ + + __returning__ = bool + + name: str + """Sticker set name""" + custom_emoji_id: Optional[str] = None + """Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="setCustomEmojiStickerSetThumbnail", data=data) diff --git a/aiogram/methods/set_my_default_administrator_rights.py b/aiogram/methods/set_my_default_administrator_rights.py index 84341180..f8177958 100644 --- a/aiogram/methods/set_my_default_administrator_rights.py +++ b/aiogram/methods/set_my_default_administrator_rights.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: class SetMyDefaultAdministratorRights(TelegramMethod[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. + 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 free to modify the list before adding the bot. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights """ diff --git a/aiogram/methods/set_my_description.py b/aiogram/methods/set_my_description.py new file mode 100644 index 00000000..a05440ef --- /dev/null +++ b/aiogram/methods/set_my_description.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetMyDescription(TelegramMethod[bool]): + """ + Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setmydescription + """ + + __returning__ = bool + + description: Optional[str] = None + """New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.""" + language_code: Optional[str] = None + """A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="setMyDescription", data=data) diff --git a/aiogram/methods/set_my_short_description.py b/aiogram/methods/set_my_short_description.py new file mode 100644 index 00000000..c759d1ed --- /dev/null +++ b/aiogram/methods/set_my_short_description.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetMyShortDescription(TelegramMethod[bool]): + """ + Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setmyshortdescription + """ + + __returning__ = bool + + short_description: Optional[str] = None + """New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.""" + language_code: Optional[str] = None + """A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="setMyShortDescription", data=data) diff --git a/aiogram/methods/set_sticker_emoji_list.py b/aiogram/methods/set_sticker_emoji_list.py new file mode 100644 index 00000000..d6ef31f2 --- /dev/null +++ b/aiogram/methods/set_sticker_emoji_list.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, List + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetStickerEmojiList(TelegramMethod[bool]): + """ + Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickeremojilist + """ + + __returning__ = bool + + sticker: str + """File identifier of the sticker""" + emoji_list: List[str] + """A JSON-serialized list of 1-20 emoji associated with the sticker""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="setStickerEmojiList", data=data) diff --git a/aiogram/methods/set_sticker_keywords.py b/aiogram/methods/set_sticker_keywords.py new file mode 100644 index 00000000..2fd5b1c4 --- /dev/null +++ b/aiogram/methods/set_sticker_keywords.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, List, Optional + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetStickerKeywords(TelegramMethod[bool]): + """ + Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickerkeywords + """ + + __returning__ = bool + + sticker: str + """File identifier of the sticker""" + keywords: Optional[List[str]] = None + """A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="setStickerKeywords", data=data) diff --git a/aiogram/methods/set_sticker_mask_position.py b/aiogram/methods/set_sticker_mask_position.py new file mode 100644 index 00000000..95aa8ca3 --- /dev/null +++ b/aiogram/methods/set_sticker_mask_position.py @@ -0,0 +1,29 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional + +from ..types import MaskPosition +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetStickerMaskPosition(TelegramMethod[bool]): + """ + Use this method to change the `mask position `_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickermaskposition + """ + + __returning__ = bool + + sticker: str + """File identifier of the sticker""" + mask_position: Optional[MaskPosition] = None + """A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="setStickerMaskPosition", data=data) diff --git a/aiogram/methods/set_sticker_set_thumb.py b/aiogram/methods/set_sticker_set_thumb.py deleted file mode 100644 index cbab57e4..00000000 --- a/aiogram/methods/set_sticker_set_thumb.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Dict, Optional, Union - -from ..types import InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot - - -class SetStickerSetThumb(TelegramMethod[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 - """ - - __returning__ = bool - - name: str - """Sticker set name""" - user_id: int - """User identifier of the sticker set owner""" - thumb: Optional[Union[InputFile, str]] = None - """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"thumb"}) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="thumb", value=self.thumb) - - return Request(method="setStickerSetThumb", data=data, files=files) diff --git a/aiogram/methods/set_sticker_set_thumbnail.py b/aiogram/methods/set_sticker_set_thumbnail.py new file mode 100644 index 00000000..829aa192 --- /dev/null +++ b/aiogram/methods/set_sticker_set_thumbnail.py @@ -0,0 +1,34 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict, Optional, Union + +from ..types import InputFile +from .base import Request, TelegramMethod, prepare_file + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetStickerSetThumbnail(TelegramMethod[bool]): + """ + Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickersetthumbnail + """ + + __returning__ = bool + + name: str + """Sticker set name""" + user_id: int + """User identifier of the sticker set owner""" + thumbnail: Optional[Union[InputFile, str]] = None + """A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + files: Dict[str, InputFile] = {} + prepare_file("thumbnail", value=self.thumbnail, data=data, files=files) + + return Request(method="setStickerSetThumbnail", data=data) diff --git a/aiogram/methods/set_sticker_set_title.py b/aiogram/methods/set_sticker_set_title.py new file mode 100644 index 00000000..e699c082 --- /dev/null +++ b/aiogram/methods/set_sticker_set_title.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Dict + +from .base import Request, TelegramMethod + +if TYPE_CHECKING: + from ..client.bot import Bot + + +class SetStickerSetTitle(TelegramMethod[bool]): + """ + Use this method to set the title of a created sticker set. Returns :code:`True` on success. + + Source: https://core.telegram.org/bots/api#setstickersettitle + """ + + __returning__ = bool + + name: str + """Sticker set name""" + title: str + """Sticker set title, 1-64 characters""" + + def build_request(self, bot: Bot) -> Request: + data: Dict[str, Any] = self.dict() + + return Request(method="setStickerSetTitle", data=data) diff --git a/aiogram/methods/upload_sticker_file.py b/aiogram/methods/upload_sticker_file.py index cb36ae4d..d0fcbc44 100644 --- a/aiogram/methods/upload_sticker_file.py +++ b/aiogram/methods/upload_sticker_file.py @@ -11,7 +11,7 @@ if TYPE_CHECKING: class UploadStickerFile(TelegramMethod[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. + Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. Source: https://core.telegram.org/bots/api#uploadstickerfile """ @@ -20,13 +20,15 @@ class UploadStickerFile(TelegramMethod[File]): user_id: int """User identifier of sticker file owner""" - png_sticker: InputFile - """**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 » `""" + sticker: InputFile + """A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `""" + sticker_format: str + """Format of the sticker, must be one of 'static', 'animated', 'video'""" def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"png_sticker"}) + data: Dict[str, Any] = self.dict(exclude={"sticker"}) files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="png_sticker", value=self.png_sticker) + prepare_file(data=data, files=files, name="sticker", value=self.sticker) return Request(method="uploadStickerFile", data=data, files=files) diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 1d80489f..3fc98953 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -14,6 +14,8 @@ from .bot_command_scope_chat import BotCommandScopeChat from .bot_command_scope_chat_administrators import BotCommandScopeChatAdministrators from .bot_command_scope_chat_member import BotCommandScopeChatMember from .bot_command_scope_default import BotCommandScopeDefault +from .bot_description import BotDescription +from .bot_short_description import BotShortDescription from .callback_game import CallbackGame from .callback_query import CallbackQuery from .chat import Chat @@ -86,6 +88,7 @@ from .input_media_document import InputMediaDocument from .input_media_photo import InputMediaPhoto from .input_media_video import InputMediaVideo from .input_message_content import InputMessageContent +from .input_sticker import InputSticker from .input_text_message_content import InputTextMessageContent from .input_venue_message_content import InputVenueMessageContent from .invoice import Invoice @@ -165,6 +168,8 @@ __all__ = ( "BotCommandScopeChatAdministrators", "BotCommandScopeChatMember", "BotCommandScopeDefault", + "BotDescription", + "BotShortDescription", "BufferedInputFile", "CallbackGame", "CallbackQuery", @@ -240,6 +245,7 @@ __all__ = ( "InputMediaPhoto", "InputMediaVideo", "InputMessageContent", + "InputSticker", "InputTextMessageContent", "InputVenueMessageContent", "Invoice", diff --git a/aiogram/types/animation.py b/aiogram/types/animation.py index ce3c034e..15354156 100644 --- a/aiogram/types/animation.py +++ b/aiogram/types/animation.py @@ -25,7 +25,7 @@ class Animation(TelegramObject): """Video height as defined by sender""" duration: int """Duration of the video in seconds as defined by sender""" - thumb: Optional[PhotoSize] = None + thumbnail: Optional[PhotoSize] = None """*Optional*. Animation thumbnail as defined by sender""" file_name: Optional[str] = None """*Optional*. Original animation filename as defined by sender""" diff --git a/aiogram/types/audio.py b/aiogram/types/audio.py index fa0557cd..0a147c36 100644 --- a/aiogram/types/audio.py +++ b/aiogram/types/audio.py @@ -31,5 +31,5 @@ class Audio(TelegramObject): """*Optional*. MIME type of the file as defined by sender""" file_size: Optional[int] = None """*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.""" - thumb: Optional[PhotoSize] = None + thumbnail: Optional[PhotoSize] = None """*Optional*. Thumbnail of the album cover to which the music file belongs""" diff --git a/aiogram/types/bot_description.py b/aiogram/types/bot_description.py new file mode 100644 index 00000000..a69d492f --- /dev/null +++ b/aiogram/types/bot_description.py @@ -0,0 +1,12 @@ +from aiogram.types import TelegramObject + + +class BotDescription(TelegramObject): + """ + This object represents the bot's description. + + Source: https://core.telegram.org/bots/api#botdescription + """ + + description: str + """The bot's description""" diff --git a/aiogram/types/bot_short_description.py b/aiogram/types/bot_short_description.py new file mode 100644 index 00000000..46d5c1c3 --- /dev/null +++ b/aiogram/types/bot_short_description.py @@ -0,0 +1,12 @@ +from aiogram.types import TelegramObject + + +class BotShortDescription(TelegramObject): + """ + This object represents the bot's short description. + + Source: https://core.telegram.org/bots/api#botshortdescription + """ + + short_description: str + """The bot's short description""" diff --git a/aiogram/types/document.py b/aiogram/types/document.py index db2433a8..837bf4ec 100644 --- a/aiogram/types/document.py +++ b/aiogram/types/document.py @@ -19,7 +19,7 @@ class Document(TelegramObject): """Identifier for this file, which can be used to download or reuse the file""" file_unique_id: str """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.""" - thumb: Optional[PhotoSize] = None + thumbnail: Optional[PhotoSize] = None """*Optional*. Document thumbnail as defined by sender""" file_name: Optional[str] = None """*Optional*. Original filename as defined by sender""" diff --git a/aiogram/types/inline_query_result_article.py b/aiogram/types/inline_query_result_article.py index 611733c6..dd65b595 100644 --- a/aiogram/types/inline_query_result_article.py +++ b/aiogram/types/inline_query_result_article.py @@ -35,9 +35,9 @@ class InlineQueryResultArticle(InlineQueryResult): """*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message""" description: Optional[str] = None """*Optional*. Short description of the result""" - thumb_url: Optional[str] = None + thumbnail_url: Optional[str] = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: Optional[int] = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" diff --git a/aiogram/types/inline_query_result_contact.py b/aiogram/types/inline_query_result_contact.py index 04ea46fb..0f88bb9f 100644 --- a/aiogram/types/inline_query_result_contact.py +++ b/aiogram/types/inline_query_result_contact.py @@ -36,9 +36,9 @@ class InlineQueryResultContact(InlineQueryResult): """*Optional*. `Inline keyboard `_ attached to the message""" input_message_content: Optional[InputMessageContent] = None """*Optional*. Content of the message to be sent instead of the contact""" - thumb_url: Optional[str] = None + thumbnail_url: Optional[str] = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: Optional[int] = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" diff --git a/aiogram/types/inline_query_result_document.py b/aiogram/types/inline_query_result_document.py index 941e1de8..d1c577cf 100644 --- a/aiogram/types/inline_query_result_document.py +++ b/aiogram/types/inline_query_result_document.py @@ -44,9 +44,9 @@ class InlineQueryResultDocument(InlineQueryResult): """*Optional*. Inline keyboard attached to the message""" input_message_content: Optional[InputMessageContent] = None """*Optional*. Content of the message to be sent instead of the file""" - thumb_url: Optional[str] = None + thumbnail_url: Optional[str] = None """*Optional*. URL of the thumbnail (JPEG only) for the file""" - thumb_width: Optional[int] = None + thumbnail_width: Optional[int] = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" diff --git a/aiogram/types/inline_query_result_gif.py b/aiogram/types/inline_query_result_gif.py index d674b55a..ac4e0c05 100644 --- a/aiogram/types/inline_query_result_gif.py +++ b/aiogram/types/inline_query_result_gif.py @@ -27,7 +27,7 @@ class InlineQueryResultGif(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" gif_url: str """A valid URL for the GIF file. File size must not exceed 1MB""" - thumb_url: str + thumbnail_url: str """URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result""" gif_width: Optional[int] = None """*Optional*. Width of the GIF""" @@ -35,7 +35,7 @@ class InlineQueryResultGif(InlineQueryResult): """*Optional*. Height of the GIF""" gif_duration: Optional[int] = None """*Optional*. Duration of the GIF in seconds""" - thumb_mime_type: Optional[str] = None + thumbnail_mime_type: Optional[str] = None """*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'""" title: Optional[str] = None """*Optional*. Title for the result""" diff --git a/aiogram/types/inline_query_result_location.py b/aiogram/types/inline_query_result_location.py index 395724ff..aa1f6d88 100644 --- a/aiogram/types/inline_query_result_location.py +++ b/aiogram/types/inline_query_result_location.py @@ -42,9 +42,9 @@ class InlineQueryResultLocation(InlineQueryResult): """*Optional*. `Inline keyboard `_ attached to the message""" input_message_content: Optional[InputMessageContent] = None """*Optional*. Content of the message to be sent instead of the location""" - thumb_url: Optional[str] = None + thumbnail_url: Optional[str] = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: Optional[int] = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" diff --git a/aiogram/types/inline_query_result_mpeg4_gif.py b/aiogram/types/inline_query_result_mpeg4_gif.py index d846aeb3..260ae839 100644 --- a/aiogram/types/inline_query_result_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_mpeg4_gif.py @@ -27,7 +27,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" mpeg4_url: str """A valid URL for the MPEG4 file. File size must not exceed 1MB""" - thumb_url: str + thumbnail_url: str """URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result""" mpeg4_width: Optional[int] = None """*Optional*. Video width""" @@ -35,7 +35,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): """*Optional*. Video height""" mpeg4_duration: Optional[int] = None """*Optional*. Video duration in seconds""" - thumb_mime_type: Optional[str] = None + thumbnail_mime_type: Optional[str] = None """*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'""" title: Optional[str] = None """*Optional*. Title for the result""" diff --git a/aiogram/types/inline_query_result_photo.py b/aiogram/types/inline_query_result_photo.py index b63e0819..6ef09fc3 100644 --- a/aiogram/types/inline_query_result_photo.py +++ b/aiogram/types/inline_query_result_photo.py @@ -27,7 +27,7 @@ class InlineQueryResultPhoto(InlineQueryResult): """Unique identifier for this result, 1-64 bytes""" photo_url: str """A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB""" - thumb_url: str + thumbnail_url: str """URL of the thumbnail for the photo""" photo_width: Optional[int] = None """*Optional*. Width of the photo""" diff --git a/aiogram/types/inline_query_result_venue.py b/aiogram/types/inline_query_result_venue.py index 761886d8..0c92a008 100644 --- a/aiogram/types/inline_query_result_venue.py +++ b/aiogram/types/inline_query_result_venue.py @@ -44,9 +44,9 @@ class InlineQueryResultVenue(InlineQueryResult): """*Optional*. `Inline keyboard `_ attached to the message""" input_message_content: Optional[InputMessageContent] = None """*Optional*. Content of the message to be sent instead of the venue""" - thumb_url: Optional[str] = None + thumbnail_url: Optional[str] = None """*Optional*. Url of the thumbnail for the result""" - thumb_width: Optional[int] = None + thumbnail_width: Optional[int] = None """*Optional*. Thumbnail width""" - thumb_height: Optional[int] = None + thumbnail_height: Optional[int] = None """*Optional*. Thumbnail height""" diff --git a/aiogram/types/inline_query_result_video.py b/aiogram/types/inline_query_result_video.py index 1a1843ee..f35c55cb 100644 --- a/aiogram/types/inline_query_result_video.py +++ b/aiogram/types/inline_query_result_video.py @@ -31,7 +31,7 @@ class InlineQueryResultVideo(InlineQueryResult): """A valid URL for the embedded video player or video file""" mime_type: str """MIME type of the content of the video URL, 'text/html' or 'video/mp4'""" - thumb_url: str + thumbnail_url: str """URL of the thumbnail (JPEG only) for the video""" title: str """Title for the result""" diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index 326438d5..9b94f0c1 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -24,7 +24,7 @@ class InputMediaAnimation(InputMedia): """Type of the result, must be *animation*""" media: Union[str, InputFile] """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 » `""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing""" diff --git a/aiogram/types/input_media_audio.py b/aiogram/types/input_media_audio.py index a9d69610..3d149dc8 100644 --- a/aiogram/types/input_media_audio.py +++ b/aiogram/types/input_media_audio.py @@ -24,7 +24,7 @@ class InputMediaAudio(InputMedia): """Type of the result, must be *audio*""" media: Union[str, InputFile] """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 » `""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing""" diff --git a/aiogram/types/input_media_document.py b/aiogram/types/input_media_document.py index 22aea188..6eb6acfa 100644 --- a/aiogram/types/input_media_document.py +++ b/aiogram/types/input_media_document.py @@ -24,7 +24,7 @@ class InputMediaDocument(InputMedia): """Type of the result, must be *document*""" media: Union[str, InputFile] """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 » `""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" diff --git a/aiogram/types/input_media_video.py b/aiogram/types/input_media_video.py index bf701d9c..21379d5f 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -24,7 +24,7 @@ class InputMediaVideo(InputMedia): """Type of the result, must be *video*""" media: Union[str, InputFile] """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 » `""" - thumb: Optional[Union[InputFile, str]] = None + thumbnail: Optional[Union[InputFile, str]] = None """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" diff --git a/aiogram/types/input_sticker.py b/aiogram/types/input_sticker.py new file mode 100644 index 00000000..46bec15c --- /dev/null +++ b/aiogram/types/input_sticker.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, List, Optional, Union + +from .base import TelegramObject + +if TYPE_CHECKING: + from .input_file import InputFile + from .mask_position import MaskPosition + + +class InputSticker(TelegramObject): + """ + This object describes a sticker to be added to a sticker set. + + Source: https://core.telegram.org/bots/api#inputsticker + """ + + sticker: Union[InputFile, str] + """The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `""" + emoji_list: List[str] + """List of 1-20 emoji associated with the sticker""" + mask_position: Optional[MaskPosition] = None + """*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.""" + keywords: Optional[List[str]] = None + """*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.""" diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 9431f835..bd18740a 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -348,7 +348,7 @@ class Message(TelegramObject): duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -377,7 +377,7 @@ class Message(TelegramObject): :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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* @@ -401,7 +401,7 @@ class Message(TelegramObject): duration=duration, width=width, height=height, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -419,7 +419,7 @@ class Message(TelegramObject): duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -448,7 +448,7 @@ class Message(TelegramObject): :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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* @@ -472,7 +472,7 @@ class Message(TelegramObject): duration=duration, width=width, height=height, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -494,7 +494,7 @@ class Message(TelegramObject): duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None, @@ -523,7 +523,7 @@ class Message(TelegramObject): :param duration: Duration of the audio in seconds :param performer: Performer :param title: Track name - :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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 allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -546,7 +546,7 @@ class Message(TelegramObject): duration=duration, performer=performer, title=title, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, protect_content=protect_content, allow_sending_without_reply=allow_sending_without_reply, @@ -563,7 +563,7 @@ class Message(TelegramObject): duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -592,7 +592,7 @@ class Message(TelegramObject): :param duration: Duration of the audio in seconds :param performer: Performer :param title: Track name - :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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 @@ -615,7 +615,7 @@ class Message(TelegramObject): duration=duration, performer=performer, title=title, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -740,7 +740,7 @@ class Message(TelegramObject): def reply_document( self, document: Union[InputFile, str], - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -766,7 +766,7 @@ class Message(TelegramObject): Source: https://core.telegram.org/bots/api#senddocument :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document 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* @@ -787,7 +787,7 @@ class Message(TelegramObject): message_thread_id=self.message_thread_id if self.is_topic_message else None, reply_to_message_id=self.message_id, document=document, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -802,7 +802,7 @@ class Message(TelegramObject): def answer_document( self, document: Union[InputFile, str], - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -828,7 +828,7 @@ class Message(TelegramObject): Source: https://core.telegram.org/bots/api#senddocument :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing :param parse_mode: Mode for parsing entities in the document 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* @@ -849,7 +849,7 @@ class Message(TelegramObject): chat_id=self.chat.id, message_thread_id=self.message_thread_id if self.is_topic_message else None, document=document, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -1865,6 +1865,7 @@ class Message(TelegramObject): def reply_sticker( self, sticker: Union[InputFile, str], + emoji: Optional[str] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None, @@ -1885,7 +1886,8 @@ class Message(TelegramObject): Source: https://core.telegram.org/bots/api#sendsticker - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` + :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL. + :param emoji: Emoji associated with the sticker; only for just uploaded stickers :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. :param protect_content: Protects the contents of the sent message from forwarding and saving :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -1902,6 +1904,7 @@ class Message(TelegramObject): message_thread_id=self.message_thread_id if self.is_topic_message else None, reply_to_message_id=self.message_id, sticker=sticker, + emoji=emoji, disable_notification=disable_notification, protect_content=protect_content, allow_sending_without_reply=allow_sending_without_reply, @@ -1912,6 +1915,7 @@ class Message(TelegramObject): def answer_sticker( self, sticker: Union[InputFile, str], + emoji: Optional[str] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -1932,7 +1936,8 @@ class Message(TelegramObject): Source: https://core.telegram.org/bots/api#sendsticker - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` + :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL. + :param emoji: Emoji associated with the sticker; only for just uploaded stickers :param disable_notification: Sends the message `silently `_. 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 @@ -1949,6 +1954,7 @@ class Message(TelegramObject): chat_id=self.chat.id, message_thread_id=self.message_thread_id if self.is_topic_message else None, sticker=sticker, + emoji=emoji, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, @@ -2100,7 +2106,7 @@ class Message(TelegramObject): duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -2130,7 +2136,7 @@ class Message(TelegramObject): :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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* @@ -2155,7 +2161,7 @@ class Message(TelegramObject): duration=duration, width=width, height=height, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2174,7 +2180,7 @@ class Message(TelegramObject): duration: Optional[int] = None, width: Optional[int] = None, height: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, parse_mode: Optional[str] = UNSET, caption_entities: Optional[List[MessageEntity]] = None, @@ -2204,7 +2210,7 @@ class Message(TelegramObject): :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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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* @@ -2229,7 +2235,7 @@ class Message(TelegramObject): duration=duration, width=width, height=height, - thumb=thumb, + thumbnail=thumbnail, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, @@ -2248,7 +2254,7 @@ class Message(TelegramObject): video_note: Union[InputFile, str], duration: Optional[int] = None, length: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, allow_sending_without_reply: Optional[bool] = None, @@ -2272,7 +2278,7 @@ class Message(TelegramObject): :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 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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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 allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found @@ -2291,7 +2297,7 @@ class Message(TelegramObject): video_note=video_note, duration=duration, length=length, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, protect_content=protect_content, allow_sending_without_reply=allow_sending_without_reply, @@ -2304,7 +2310,7 @@ class Message(TelegramObject): video_note: Union[InputFile, str], duration: Optional[int] = None, length: Optional[int] = None, - thumb: Optional[Union[InputFile, str]] = None, + thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, protect_content: Optional[bool] = None, reply_to_message_id: Optional[int] = None, @@ -2328,7 +2334,7 @@ class Message(TelegramObject): :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 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 thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' 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 @@ -2347,7 +2353,7 @@ class Message(TelegramObject): video_note=video_note, duration=duration, length=length, - thumb=thumb, + thumbnail=thumbnail, disable_notification=disable_notification, protect_content=protect_content, reply_to_message_id=reply_to_message_id, diff --git a/aiogram/types/sticker.py b/aiogram/types/sticker.py index 770dd204..1bac276f 100644 --- a/aiogram/types/sticker.py +++ b/aiogram/types/sticker.py @@ -32,7 +32,7 @@ class Sticker(TelegramObject): """:code:`True`, if the sticker is `animated `_""" is_video: bool """:code:`True`, if the sticker is a `video sticker `_""" - thumb: Optional[PhotoSize] = None + thumbnail: Optional[PhotoSize] = None """*Optional*. Sticker thumbnail in the .WEBP or .JPG format""" emoji: Optional[str] = None """*Optional*. Emoji associated with the sticker""" @@ -44,6 +44,8 @@ class Sticker(TelegramObject): """*Optional*. For mask stickers, the position where the mask should be placed""" custom_emoji_id: Optional[str] = None """*Optional*. For custom emoji stickers, unique identifier of the custom emoji""" + needs_repainting: Optional[bool] = None + """*Optional*. :code:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places""" file_size: Optional[int] = None """*Optional*. File size in bytes""" diff --git a/aiogram/types/sticker_set.py b/aiogram/types/sticker_set.py index 8f2b264e..d212acd0 100644 --- a/aiogram/types/sticker_set.py +++ b/aiogram/types/sticker_set.py @@ -28,5 +28,5 @@ class StickerSet(TelegramObject): """:code:`True`, if the sticker set contains `video stickers `_""" stickers: List[Sticker] """List of all set stickers""" - thumb: Optional[PhotoSize] = None + thumbnail: Optional[PhotoSize] = None """*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format""" diff --git a/aiogram/types/video.py b/aiogram/types/video.py index 473527d1..ca43493a 100644 --- a/aiogram/types/video.py +++ b/aiogram/types/video.py @@ -25,7 +25,7 @@ class Video(TelegramObject): """Video height as defined by sender""" duration: int """Duration of the video in seconds as defined by sender""" - thumb: Optional[PhotoSize] = None + thumbnail: Optional[PhotoSize] = None """*Optional*. Video thumbnail""" file_name: Optional[str] = None """*Optional*. Original filename as defined by sender""" diff --git a/aiogram/types/video_note.py b/aiogram/types/video_note.py index c2488336..03654824 100644 --- a/aiogram/types/video_note.py +++ b/aiogram/types/video_note.py @@ -23,7 +23,7 @@ class VideoNote(TelegramObject): """Video width and height (diameter of the video message) as defined by sender""" duration: int """Duration of the video in seconds as defined by sender""" - thumb: Optional[PhotoSize] = None + thumbnail: Optional[PhotoSize] = None """*Optional*. Video thumbnail""" file_size: Optional[int] = None """*Optional*. File size in bytes""" diff --git a/docs/api/enums/index.rst b/docs/api/enums/index.rst index 0e208fce..84a4b837 100644 --- a/docs/api/enums/index.rst +++ b/docs/api/enums/index.rst @@ -21,6 +21,7 @@ Here is list of all available enums: message_entity_type parse_mode poll_type + sticker_format sticker_type topic_icon_color update_type diff --git a/docs/api/enums/sticker_format.rst b/docs/api/enums/sticker_format.rst new file mode 100644 index 00000000..278602a0 --- /dev/null +++ b/docs/api/enums/sticker_format.rst @@ -0,0 +1,9 @@ +############# +StickerFormat +############# + + +.. automodule:: aiogram.enums.sticker_format + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/methods/delete_sticker_set.rst b/docs/api/methods/delete_sticker_set.rst new file mode 100644 index 00000000..dc9be624 --- /dev/null +++ b/docs/api/methods/delete_sticker_set.rst @@ -0,0 +1,44 @@ +################ +deleteStickerSet +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.delete_sticker_set + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.delete_sticker_set(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.delete_sticker_set import DeleteStickerSet` +- alias: :code:`from aiogram.methods import DeleteStickerSet` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(DeleteStickerSet(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return DeleteStickerSet(...) diff --git a/docs/api/methods/get_my_description.rst b/docs/api/methods/get_my_description.rst new file mode 100644 index 00000000..c68bda0d --- /dev/null +++ b/docs/api/methods/get_my_description.rst @@ -0,0 +1,37 @@ +################ +getMyDescription +################ + +Returns: :obj:`BotDescription` + +.. automodule:: aiogram.methods.get_my_description + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: BotDescription = await bot.get_my_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_description import GetMyDescription` +- alias: :code:`from aiogram.methods import GetMyDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: BotDescription = await bot(GetMyDescription(...)) diff --git a/docs/api/methods/get_my_short_description.rst b/docs/api/methods/get_my_short_description.rst new file mode 100644 index 00000000..967d3318 --- /dev/null +++ b/docs/api/methods/get_my_short_description.rst @@ -0,0 +1,37 @@ +##################### +getMyShortDescription +##################### + +Returns: :obj:`BotShortDescription` + +.. automodule:: aiogram.methods.get_my_short_description + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: BotShortDescription = await bot.get_my_short_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.get_my_short_description import GetMyShortDescription` +- alias: :code:`from aiogram.methods import GetMyShortDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: BotShortDescription = await bot(GetMyShortDescription(...)) diff --git a/docs/api/methods/index.rst b/docs/api/methods/index.rst index 7bb7d2b8..17626855 100644 --- a/docs/api/methods/index.rst +++ b/docs/api/methods/index.rst @@ -29,7 +29,6 @@ Available methods edit_chat_invite_link edit_forum_topic edit_general_forum_topic - edit_message_live_location export_chat_invite_link forward_message get_chat @@ -42,6 +41,8 @@ Available methods get_me get_my_commands get_my_default_administrator_rights + get_my_description + get_my_short_description get_user_profile_photos hide_general_forum_topic leave_chat @@ -76,7 +77,8 @@ Available methods set_chat_title set_my_commands set_my_default_administrator_rights - stop_message_live_location + set_my_description + set_my_short_description unban_chat_member unban_chat_sender_chat unhide_general_forum_topic @@ -104,11 +106,17 @@ Stickers add_sticker_to_set create_new_sticker_set delete_sticker_from_set + delete_sticker_set get_custom_emoji_stickers get_sticker_set send_sticker + set_custom_emoji_sticker_set_thumbnail + set_sticker_emoji_list + set_sticker_keywords + set_sticker_mask_position set_sticker_position_in_set - set_sticker_set_thumb + set_sticker_set_thumbnail + set_sticker_set_title upload_sticker_file Games @@ -148,9 +156,11 @@ Updating messages delete_message edit_message_caption + edit_message_live_location edit_message_media edit_message_reply_markup edit_message_text + stop_message_live_location stop_poll Inline mode diff --git a/docs/api/methods/set_custom_emoji_sticker_set_thumbnail.rst b/docs/api/methods/set_custom_emoji_sticker_set_thumbnail.rst new file mode 100644 index 00000000..093e30c9 --- /dev/null +++ b/docs/api/methods/set_custom_emoji_sticker_set_thumbnail.rst @@ -0,0 +1,44 @@ +################################# +setCustomEmojiStickerSetThumbnail +################################# + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_custom_emoji_sticker_set_thumbnail + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_custom_emoji_sticker_set_thumbnail(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail` +- alias: :code:`from aiogram.methods import SetCustomEmojiStickerSetThumbnail` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetCustomEmojiStickerSetThumbnail(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetCustomEmojiStickerSetThumbnail(...) diff --git a/docs/api/methods/set_my_description.rst b/docs/api/methods/set_my_description.rst new file mode 100644 index 00000000..126199ee --- /dev/null +++ b/docs/api/methods/set_my_description.rst @@ -0,0 +1,44 @@ +################ +setMyDescription +################ + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_my_description + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_my_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_my_description import SetMyDescription` +- alias: :code:`from aiogram.methods import SetMyDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMyDescription(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMyDescription(...) diff --git a/docs/api/methods/set_my_short_description.rst b/docs/api/methods/set_my_short_description.rst new file mode 100644 index 00000000..f7f250d7 --- /dev/null +++ b/docs/api/methods/set_my_short_description.rst @@ -0,0 +1,44 @@ +##################### +setMyShortDescription +##################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_my_short_description + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_my_short_description(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_my_short_description import SetMyShortDescription` +- alias: :code:`from aiogram.methods import SetMyShortDescription` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetMyShortDescription(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetMyShortDescription(...) diff --git a/docs/api/methods/set_sticker_emoji_list.rst b/docs/api/methods/set_sticker_emoji_list.rst new file mode 100644 index 00000000..c8602f0f --- /dev/null +++ b/docs/api/methods/set_sticker_emoji_list.rst @@ -0,0 +1,44 @@ +################### +setStickerEmojiList +################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_emoji_list + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_emoji_list(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_emoji_list import SetStickerEmojiList` +- alias: :code:`from aiogram.methods import SetStickerEmojiList` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerEmojiList(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerEmojiList(...) diff --git a/docs/api/methods/set_sticker_keywords.rst b/docs/api/methods/set_sticker_keywords.rst new file mode 100644 index 00000000..d15c11ac --- /dev/null +++ b/docs/api/methods/set_sticker_keywords.rst @@ -0,0 +1,44 @@ +################## +setStickerKeywords +################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_keywords + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_keywords(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_keywords import SetStickerKeywords` +- alias: :code:`from aiogram.methods import SetStickerKeywords` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerKeywords(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerKeywords(...) diff --git a/docs/api/methods/set_sticker_mask_position.rst b/docs/api/methods/set_sticker_mask_position.rst new file mode 100644 index 00000000..48041877 --- /dev/null +++ b/docs/api/methods/set_sticker_mask_position.rst @@ -0,0 +1,44 @@ +###################### +setStickerMaskPosition +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_mask_position + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_mask_position(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_mask_position import SetStickerMaskPosition` +- alias: :code:`from aiogram.methods import SetStickerMaskPosition` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerMaskPosition(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerMaskPosition(...) diff --git a/docs/api/methods/set_sticker_set_thumbnail.rst b/docs/api/methods/set_sticker_set_thumbnail.rst new file mode 100644 index 00000000..218c1012 --- /dev/null +++ b/docs/api/methods/set_sticker_set_thumbnail.rst @@ -0,0 +1,44 @@ +###################### +setStickerSetThumbnail +###################### + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_set_thumbnail + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_set_thumbnail(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_set_thumbnail import SetStickerSetThumbnail` +- alias: :code:`from aiogram.methods import SetStickerSetThumbnail` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerSetThumbnail(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerSetThumbnail(...) diff --git a/docs/api/methods/set_sticker_set_title.rst b/docs/api/methods/set_sticker_set_title.rst new file mode 100644 index 00000000..f6924dd4 --- /dev/null +++ b/docs/api/methods/set_sticker_set_title.rst @@ -0,0 +1,44 @@ +################## +setStickerSetTitle +################## + +Returns: :obj:`bool` + +.. automodule:: aiogram.methods.set_sticker_set_title + :members: + :member-order: bysource + :undoc-members: True + + +Usage +===== + +As bot method +------------- + +.. code-block:: + + result: bool = await bot.set_sticker_set_title(...) + + +Method as object +---------------- + +Imports: + +- :code:`from aiogram.methods.set_sticker_set_title import SetStickerSetTitle` +- alias: :code:`from aiogram.methods import SetStickerSetTitle` + +With specific bot +~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + result: bool = await bot(SetStickerSetTitle(...)) + +As reply into Webhook in handler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + return SetStickerSetTitle(...) diff --git a/docs/api/types/bot_description.rst b/docs/api/types/bot_description.rst new file mode 100644 index 00000000..f3ea6d7a --- /dev/null +++ b/docs/api/types/bot_description.rst @@ -0,0 +1,9 @@ +############## +BotDescription +############## + + +.. automodule:: aiogram.types.bot_description + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/bot_short_description.rst b/docs/api/types/bot_short_description.rst new file mode 100644 index 00000000..e9812e64 --- /dev/null +++ b/docs/api/types/bot_short_description.rst @@ -0,0 +1,9 @@ +################### +BotShortDescription +################### + + +.. automodule:: aiogram.types.bot_short_description + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index 55a00dd4..400af0d9 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -59,6 +59,8 @@ Available types bot_command_scope_chat_administrators bot_command_scope_chat_member bot_command_scope_default + bot_description + bot_short_description callback_query chat chat_administrator_rights @@ -170,6 +172,7 @@ Stickers .. toctree:: :maxdepth: 1 + input_sticker mask_position sticker sticker_set diff --git a/docs/api/types/input_sticker.rst b/docs/api/types/input_sticker.rst new file mode 100644 index 00000000..176a0e15 --- /dev/null +++ b/docs/api/types/input_sticker.rst @@ -0,0 +1,9 @@ +############ +InputSticker +############ + + +.. automodule:: aiogram.types.input_sticker + :members: + :member-order: bysource + :undoc-members: True diff --git a/docs/locale/en/LC_MESSAGES/api/enums/inline_query_result_type.po b/docs/locale/en/LC_MESSAGES/api/enums/inline_query_result_type.po index 27a5da7e..b5a7a240 100644 --- a/docs/locale/en/LC_MESSAGES/api/enums/inline_query_result_type.po +++ b/docs/locale/en/LC_MESSAGES/api/enums/inline_query_result_type.po @@ -8,23 +8,29 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/enums/inline_query_result_type.rst:3 msgid "InlineQueryResultType" msgstr "" #: aiogram.enums.inline_query_result_type.InlineQueryResultType:1 of -msgid "The part of the face relative to which the mask should be placed." +msgid "Type of inline query result" msgstr "" #: aiogram.enums.inline_query_result_type.InlineQueryResultType:3 of -msgid "Source: https://core.telegram.org/bots/api#maskposition" +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresult" msgstr "" + +#~ msgid "The part of the face relative to which the mask should be placed." +#~ msgstr "" + +#~ msgid "Source: https://core.telegram.org/bots/api#maskposition" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/enums/sticker_format.po b/docs/locale/en/LC_MESSAGES/api/enums/sticker_format.po new file mode 100644 index 00000000..57a8b198 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/enums/sticker_format.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/enums/sticker_format.rst:3 +msgid "StickerFormat" +msgstr "" + +#: aiogram.enums.sticker_format.StickerFormat:1 of +msgid "Format of the sticker" +msgstr "" + +#: aiogram.enums.sticker_format.StickerFormat:3 of +msgid "Source: https://core.telegram.org/bots/api#createnewstickerset" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/add_sticker_to_set.po b/docs/locale/en/LC_MESSAGES/api/methods/add_sticker_to_set.po index f3b81bcd..483b44cd 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/add_sticker_to_set.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/add_sticker_to_set.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/add_sticker_to_set.rst:3 msgid "addStickerToSet" @@ -27,12 +27,11 @@ msgstr "" #: aiogram.methods.add_sticker_to_set.AddStickerToSet:1 of msgid "" -"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." +"Use this method to add a new sticker to a set created by the bot. The " +"format of the added sticker must match the format of the other stickers " +"in the set. Emoji sticker sets can have up to 200 stickers. Animated and " +"video sticker sets can have up to 50 stickers. Static sticker sets can " +"have up to 120 stickers. Returns :code:`True` on success." msgstr "" #: aiogram.methods.add_sticker_to_set.AddStickerToSet:3 of @@ -48,49 +47,12 @@ msgstr "" msgid "Sticker set name" msgstr "" -#: ../../docstring aiogram.methods.add_sticker_to_set.AddStickerToSet.emojis:1 +#: ../../docstring aiogram.methods.add_sticker_to_set.AddStickerToSet.sticker:1 #: of -msgid "One or more emoji corresponding to the sticker" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.png_sticker:1 of msgid "" -"**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 » `" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.tgs_sticker:1 of -msgid "" -"**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" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.webm_sticker:1 of -msgid "" -"**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" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.mask_position:1 of -msgid "" -"A JSON-serialized object for position where the mask should be placed on " -"faces" +"A JSON-serialized object with information about the added sticker. If " +"exactly the same sticker had already been added to the set, then the set " +"isn't changed." msgstr "" #: ../../api/methods/add_sticker_to_set.rst:14 @@ -124,3 +86,64 @@ msgstr "" #: ../../api/methods/add_sticker_to_set.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "One or more emoji corresponding to the sticker" +#~ msgstr "" + +#~ msgid "" +#~ "**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 " +#~ "» `" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for position" +#~ " where the mask should be placed " +#~ "on faces" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/create_new_sticker_set.po b/docs/locale/en/LC_MESSAGES/api/methods/create_new_sticker_set.po index 1d3789be..045ca8f0 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/create_new_sticker_set.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/create_new_sticker_set.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/create_new_sticker_set.rst:3 msgid "createNewStickerSet" @@ -28,9 +28,8 @@ msgstr "" #: aiogram.methods.create_new_sticker_set.CreateNewStickerSet:1 of msgid "" "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." +" be able to edit the sticker set thus created. Returns :code:`True` on " +"success." msgstr "" #: aiogram.methods.create_new_sticker_set.CreateNewStickerSet:3 of @@ -58,57 +57,35 @@ msgid "Sticker set title, 1-64 characters" msgstr "" #: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.emojis:1 of -msgid "One or more emoji corresponding to the sticker" +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.stickers:1 of +msgid "" +"A JSON-serialized list of 1-50 initial stickers to be added to the " +"sticker set" msgstr "" #: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.png_sticker:1 of +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_format:1 +#: of msgid "" -"**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 » `" -msgstr "" - -#: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.tgs_sticker:1 of -msgid "" -"**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" -msgstr "" - -#: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.webm_sticker:1 of -msgid "" -"**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" +"Format of stickers in the set, must be one of 'static', 'animated', " +"'video'" msgstr "" #: ../../docstring #: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_type:1 of msgid "" -"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." +"Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. " +"By default, a regular sticker set is created." msgstr "" #: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.mask_position:1 +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.needs_repainting:1 #: of msgid "" -"A JSON-serialized object for position where the mask should be placed on " -"faces" +"Pass :code:`True` if stickers in the sticker set must be repainted to the" +" color of text when used in messages, the accent color if used as emoji " +"status, white on chat photos, or another appropriate color based on " +"context; for custom emoji sticker sets only" msgstr "" #: ../../api/methods/create_new_sticker_set.rst:14 @@ -144,3 +121,70 @@ msgstr "" #: ../../api/methods/create_new_sticker_set.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "One or more emoji corresponding to the sticker" +#~ msgstr "" + +#~ msgid "" +#~ "**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 " +#~ "» `" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for position" +#~ " where the mask should be placed " +#~ "on faces" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/delete_sticker_set.po b/docs/locale/en/LC_MESSAGES/api/methods/delete_sticker_set.po new file mode 100644 index 00000000..b0d56a23 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/delete_sticker_set.po @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/delete_sticker_set.rst:3 +msgid "deleteStickerSet" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_sticker_set.DeleteStickerSet:1 of +msgid "" +"Use this method to delete a sticker set that was created by the bot. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.delete_sticker_set.DeleteStickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#deletestickerset" +msgstr "" + +#: ../../docstring aiogram.methods.delete_sticker_set.DeleteStickerSet.name:1 +#: of +msgid "Sticker set name" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:29 +msgid ":code:`from aiogram.methods.delete_sticker_set import DeleteStickerSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteStickerSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po index f882bd5a..0f6b9c1b 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/get_chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-07 23:01+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/get_chat_member.rst:3 msgid "getChatMember" @@ -31,9 +31,9 @@ msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:1 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work for other users, only if the bot is an " -"administrator in the chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"is only guaranteed to work for other users if the bot is an administrator" +" in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` " +"object on success." msgstr "" #: aiogram.methods.get_chat_member.GetChatMember:3 of @@ -85,3 +85,13 @@ msgstr "" #: ../../api/methods/get_chat_member.rst:45 msgid ":meth:`aiogram.types.chat.Chat.get_member`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. The " +#~ "method is guaranteed to work for " +#~ "other users, only if the bot is" +#~ " an administrator in the chat. " +#~ "Returns a :class:`aiogram.types.chat_member.ChatMember`" +#~ " object on success." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/get_my_description.po b/docs/locale/en/LC_MESSAGES/api/methods/get_my_description.po new file mode 100644 index 00000000..b7ae81ab --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/get_my_description.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/get_my_description.rst:3 +msgid "getMyDescription" +msgstr "" + +#: ../../api/methods/get_my_description.rst:5 +msgid "Returns: :obj:`BotDescription`" +msgstr "" + +#: aiogram.methods.get_my_description.GetMyDescription:1 of +msgid "" +"Use this method to get the current bot description for the given user " +"language. Returns :class:`aiogram.types.bot_description.BotDescription` " +"on success." +msgstr "" + +#: aiogram.methods.get_my_description.GetMyDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#getmydescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_description.GetMyDescription.language_code:1 of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_description.rst:29 +msgid ":code:`from aiogram.methods.get_my_description import GetMyDescription`" +msgstr "" + +#: ../../api/methods/get_my_description.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyDescription`" +msgstr "" + +#: ../../api/methods/get_my_description.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/get_my_short_description.po b/docs/locale/en/LC_MESSAGES/api/methods/get_my_short_description.po new file mode 100644 index 00000000..0d4e2e77 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/get_my_short_description.po @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/get_my_short_description.rst:3 +msgid "getMyShortDescription" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:5 +msgid "Returns: :obj:`BotShortDescription`" +msgstr "" + +#: aiogram.methods.get_my_short_description.GetMyShortDescription:1 of +msgid "" +"Use this method to get the current bot short description for the given " +"user language. Returns " +":class:`aiogram.types.bot_short_description.BotShortDescription` on " +"success." +msgstr "" + +#: aiogram.methods.get_my_short_description.GetMyShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#getmyshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_short_description.GetMyShortDescription.language_code:1 +#: of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:29 +msgid "" +":code:`from aiogram.methods.get_my_short_description import " +"GetMyShortDescription`" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyShortDescription`" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/promote_chat_member.po b/docs/locale/en/LC_MESSAGES/api/methods/promote_chat_member.po index 2d9c0978..04ff8a9f 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/promote_chat_member.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/promote_chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/promote_chat_member.rst:3 msgid "promoteChatMember" @@ -102,7 +102,7 @@ msgstr "" #: of msgid "" "Pass :code:`True` if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by him)" msgstr "" @@ -170,3 +170,13 @@ msgstr "" #: ../../api/methods/promote_chat_member.rst:50 msgid ":meth:`aiogram.types.chat.Chat.promote`" msgstr "" + +#~ msgid "" +#~ "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)" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/restrict_chat_member.po b/docs/locale/en/LC_MESSAGES/api/methods/restrict_chat_member.po index 9c0755b7..5bc53fcb 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/restrict_chat_member.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/restrict_chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/restrict_chat_member.rst:3 msgid "restrictChatMember" @@ -54,6 +54,19 @@ msgstr "" msgid "A JSON-serialized object for new user permissions" msgstr "" +#: ../../docstring +#: aiogram.methods.restrict_chat_member.RestrictChatMember.use_independent_chat_permissions:1 +#: of +msgid "" +"Pass :code:`True` if chat permissions are set independently. Otherwise, " +"the *can_send_other_messages* and *can_add_web_page_previews* permissions" +" will imply the *can_send_messages*, *can_send_audios*, " +"*can_send_documents*, *can_send_photos*, *can_send_videos*, " +"*can_send_video_notes*, and *can_send_voice_notes* permissions; the " +"*can_send_polls* permission will imply the *can_send_messages* " +"permission." +msgstr "" + #: ../../docstring #: aiogram.methods.restrict_chat_member.RestrictChatMember.until_date:1 of msgid "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/send_sticker.po b/docs/locale/en/LC_MESSAGES/api/methods/send_sticker.po index b1e8bcb0..24650fbd 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/send_sticker.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/send_sticker.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/send_sticker.rst:3 msgid "sendSticker" @@ -48,9 +48,10 @@ msgstr "" msgid "" "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 » `" +"Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP " +"or .TGS sticker using multipart/form-data. :ref:`More information on " +"Sending Files » `. Video stickers can only be sent by a " +"file_id. Animated stickers can't be sent via an HTTP URL." msgstr "" #: ../../docstring aiogram.methods.send_sticker.SendSticker.message_thread_id:1 @@ -60,6 +61,10 @@ msgid "" " forum supergroups only" msgstr "" +#: ../../docstring aiogram.methods.send_sticker.SendSticker.emoji:1 of +msgid "Emoji associated with the sticker; only for just uploaded stickers" +msgstr "" + #: ../../docstring #: aiogram.methods.send_sticker.SendSticker.disable_notification:1 of msgid "" @@ -147,3 +152,15 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "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 » `" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_chat_permissions.po b/docs/locale/en/LC_MESSAGES/api/methods/set_chat_permissions.po index d27d7878..ff34fff6 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/set_chat_permissions.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_chat_permissions.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/set_chat_permissions.rst:3 msgid "setChatPermissions" @@ -49,6 +49,19 @@ msgstr "" msgid "A JSON-serialized object for new default chat permissions" msgstr "" +#: ../../docstring +#: aiogram.methods.set_chat_permissions.SetChatPermissions.use_independent_chat_permissions:1 +#: of +msgid "" +"Pass :code:`True` if chat permissions are set independently. Otherwise, " +"the *can_send_other_messages* and *can_add_web_page_previews* permissions" +" will imply the *can_send_messages*, *can_send_audios*, " +"*can_send_documents*, *can_send_photos*, *can_send_videos*, " +"*can_send_video_notes*, and *can_send_voice_notes* permissions; the " +"*can_send_polls* permission will imply the *can_send_messages* " +"permission." +msgstr "" + #: ../../api/methods/set_chat_permissions.rst:14 msgid "Usage" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po b/docs/locale/en/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po new file mode 100644 index 00000000..afadc9a2 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po @@ -0,0 +1,90 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:3 +msgid "setCustomEmojiStickerSetThumbnail" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail:1 +#: of +msgid "" +"Use this method to set the thumbnail of a custom emoji sticker set. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail.name:1 +#: of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail.custom_emoji_id:1 +#: of +msgid "" +"Custom emoji identifier of a sticker from the sticker set; pass an empty " +"string to drop the thumbnail and use the first sticker as the thumbnail." +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:29 +msgid "" +":code:`from aiogram.methods.set_custom_emoji_sticker_set_thumbnail import" +" SetCustomEmojiStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:30 +msgid "" +"alias: :code:`from aiogram.methods import " +"SetCustomEmojiStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po b/docs/locale/en/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po index 93f19f31..87382f51 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/set_my_default_administrator_rights.rst:3 msgid "setMyDefaultAdministratorRights" @@ -30,8 +30,8 @@ msgstr "" msgid "" "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." +"rights will be suggested to users, but they are free to modify the list " +"before adding the bot. Returns :code:`True` on success." msgstr "" #: aiogram.methods.set_my_default_administrator_rights.SetMyDefaultAdministratorRights:3 @@ -89,3 +89,14 @@ msgstr "" #: ../../api/methods/set_my_default_administrator_rights.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_my_description.po b/docs/locale/en/LC_MESSAGES/api/methods/set_my_description.po new file mode 100644 index 00000000..b266de07 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_my_description.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_my_description.rst:3 +msgid "setMyDescription" +msgstr "" + +#: ../../api/methods/set_my_description.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_description.SetMyDescription:1 of +msgid "" +"Use this method to change the bot's description, which is shown in the " +"chat with the bot if the chat is empty. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_my_description.SetMyDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#setmydescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_description.SetMyDescription.description:1 of +msgid "" +"New bot description; 0-512 characters. Pass an empty string to remove the" +" dedicated description for the given language." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_description.SetMyDescription.language_code:1 of +msgid "" +"A two-letter ISO 639-1 language code. If empty, the description will be " +"applied to all users for whose language there is no dedicated " +"description." +msgstr "" + +#: ../../api/methods/set_my_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_description.rst:29 +msgid ":code:`from aiogram.methods.set_my_description import SetMyDescription`" +msgstr "" + +#: ../../api/methods/set_my_description.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyDescription`" +msgstr "" + +#: ../../api/methods/set_my_description.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_description.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_my_short_description.po b/docs/locale/en/LC_MESSAGES/api/methods/set_my_short_description.po new file mode 100644 index 00000000..eb4e343b --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_my_short_description.po @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_my_short_description.rst:3 +msgid "setMyShortDescription" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_short_description.SetMyShortDescription:1 of +msgid "" +"Use this method to change the bot's short description, which is shown on " +"the bot's profile page and is sent together with the link when users " +"share the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_my_short_description.SetMyShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#setmyshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_short_description.SetMyShortDescription.short_description:1 +#: of +msgid "" +"New short description for the bot; 0-120 characters. Pass an empty string" +" to remove the dedicated short description for the given language." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_short_description.SetMyShortDescription.language_code:1 +#: of +msgid "" +"A two-letter ISO 639-1 language code. If empty, the short description " +"will be applied to all users for whose language there is no dedicated " +"short description." +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:29 +msgid "" +":code:`from aiogram.methods.set_my_short_description import " +"SetMyShortDescription`" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyShortDescription`" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_emoji_list.po b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_emoji_list.po new file mode 100644 index 00000000..ad3536b3 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_emoji_list.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_emoji_list.rst:3 +msgid "setStickerEmojiList" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList:1 of +msgid "" +"Use this method to change the list of emoji assigned to a regular or " +"custom emoji sticker. The sticker must belong to a sticker set created by" +" the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickeremojilist" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList.sticker:1 of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList.emoji_list:1 of +msgid "A JSON-serialized list of 1-20 emoji associated with the sticker" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_emoji_list import " +"SetStickerEmojiList`" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerEmojiList`" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_keywords.po b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_keywords.po new file mode 100644 index 00000000..22dfb120 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_keywords.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_keywords.rst:3 +msgid "setStickerKeywords" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords:1 of +msgid "" +"Use this method to change search keywords assigned to a regular or custom" +" emoji sticker. The sticker must belong to a sticker set created by the " +"bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickerkeywords" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords.sticker:1 of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords.keywords:1 of +msgid "" +"A JSON-serialized list of 0-20 search keywords for the sticker with total" +" length of up to 64 characters" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_keywords import " +"SetStickerKeywords`" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerKeywords`" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_mask_position.po b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_mask_position.po new file mode 100644 index 00000000..8efc08ba --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_mask_position.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_mask_position.rst:3 +msgid "setStickerMaskPosition" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition:1 of +msgid "" +"Use this method to change the `mask position " +"`_ of a mask sticker. " +"The sticker must belong to a sticker set that was created by the bot. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickermaskposition" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition.sticker:1 +#: of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition.mask_position:1 +#: of +msgid "" +"A JSON-serialized object with the position where the mask should be " +"placed on faces. Omit the parameter to remove the mask position." +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_mask_position import " +"SetStickerMaskPosition`" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerMaskPosition`" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumb.po b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumb.po index cb1608e8..8e279db0 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumb.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumb.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/set_sticker_set_thumb.rst:3 msgid "setStickerSetThumb" @@ -25,52 +25,6 @@ msgstr "" msgid "Returns: :obj:`bool`" msgstr "" -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb:3 of -msgid "Source: https://core.telegram.org/bots/api#setstickersetthumb" -msgstr "" - -#: ../../docstring -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb.name:1 of -msgid "Sticker set name" -msgstr "" - -#: ../../docstring -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb.user_id:1 of -msgid "User identifier of the sticker set owner" -msgstr "" - -#: ../../docstring -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb.thumb:1 of -msgid "" -"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." -msgstr "" - #: ../../api/methods/set_sticker_set_thumb.rst:14 msgid "Usage" msgstr "" @@ -104,3 +58,57 @@ msgstr "" #: ../../api/methods/set_sticker_set_thumb.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "Source: https://core.telegram.org/bots/api#setstickersetthumb" +#~ msgstr "" + +#~ msgid "Sticker set name" +#~ msgstr "" + +#~ msgid "User identifier of the sticker set owner" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po new file mode 100644 index 00000000..c0d9b5ee --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:3 +msgid "setStickerSetThumbnail" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail:1 of +msgid "" +"Use this method to set the thumbnail of a regular or mask sticker set. " +"The format of the thumbnail file must match the format of the stickers in" +" the set. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickersetthumbnail" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.user_id:1 +#: of +msgid "User identifier of the sticker set owner" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.thumbnail:1 +#: of +msgid "" +"A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 " +"kilobytes in size and have a width and height of exactly 100px, or a " +"**.TGS** animation with a 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 and video " +"sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then " +"the thumbnail is dropped and the first sticker is used as the thumbnail." +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_set_thumbnail import " +"SetStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_title.po b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_title.po new file mode 100644 index 00000000..fb27fdfc --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/methods/set_sticker_set_title.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_set_title.rst:3 +msgid "setStickerSetTitle" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle:1 of +msgid "" +"Use this method to set the title of a created sticker set. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickersettitle" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle.title:1 of +msgid "Sticker set title, 1-64 characters" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_set_title import " +"SetStickerSetTitle`" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerSetTitle`" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/methods/upload_sticker_file.po b/docs/locale/en/LC_MESSAGES/api/methods/upload_sticker_file.po index 5a9d256a..4e909bd1 100644 --- a/docs/locale/en/LC_MESSAGES/api/methods/upload_sticker_file.po +++ b/docs/locale/en/LC_MESSAGES/api/methods/upload_sticker_file.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/upload_sticker_file.rst:3 msgid "uploadStickerFile" @@ -27,10 +27,11 @@ msgstr "" #: aiogram.methods.upload_sticker_file.UploadStickerFile:1 of msgid "" -"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." +"Use this method to upload a file with a sticker for later use in the " +":class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and " +":class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the " +"file can be used multiple times). Returns the uploaded " +":class:`aiogram.types.file.File` on success." msgstr "" #: aiogram.methods.upload_sticker_file.UploadStickerFile:3 of @@ -43,11 +44,18 @@ msgid "User identifier of sticker file owner" msgstr "" #: ../../docstring -#: aiogram.methods.upload_sticker_file.UploadStickerFile.png_sticker:1 of +#: aiogram.methods.upload_sticker_file.UploadStickerFile.sticker:1 of msgid "" -"**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 » `" +"A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See " +"`https://core.telegram.org/stickers " +"`_`https://core.telegram.org/stickers" +" `_ for technical requirements. " +":ref:`More information on Sending Files » `" +msgstr "" + +#: ../../docstring +#: aiogram.methods.upload_sticker_file.UploadStickerFile.sticker_format:1 of +msgid "Format of the sticker, must be one of 'static', 'animated', 'video'" msgstr "" #: ../../api/methods/upload_sticker_file.rst:14 @@ -77,3 +85,21 @@ msgstr "" #: ../../api/methods/upload_sticker_file.rst:33 msgid "With specific bot" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "**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 » `" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/bot_description.po b/docs/locale/en/LC_MESSAGES/api/types/bot_description.po new file mode 100644 index 00000000..2f295229 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/bot_description.po @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/bot_description.rst:3 +msgid "BotDescription" +msgstr "" + +#: aiogram.types.bot_description.BotDescription:1 of +msgid "This object represents the bot's description." +msgstr "" + +#: aiogram.types.bot_description.BotDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#botdescription" +msgstr "" + +#: ../../docstring aiogram.types.bot_description.BotDescription.description:1 +#: of +msgid "The bot's description" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/bot_short_description.po b/docs/locale/en/LC_MESSAGES/api/types/bot_short_description.po new file mode 100644 index 00000000..8855dc52 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/bot_short_description.po @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/bot_short_description.rst:3 +msgid "BotShortDescription" +msgstr "" + +#: aiogram.types.bot_short_description.BotShortDescription:1 of +msgid "This object represents the bot's short description." +msgstr "" + +#: aiogram.types.bot_short_description.BotShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#botshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_short_description.BotShortDescription.short_description:1 +#: of +msgid "The bot's short description" +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat.po b/docs/locale/en/LC_MESSAGES/api/types/chat.po index c0f95110..05363683 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-07 23:01+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/chat.rst:3 msgid "Chat" @@ -733,9 +733,9 @@ msgstr "" #: aiogram.types.chat.Chat.get_member:6 of msgid "" "Use this method to get information about a member of a chat. The method " -"is guaranteed to work for other users, only if the bot is an " -"administrator in the chat. Returns a " -":class:`aiogram.types.chat_member.ChatMember` object on success." +"is only guaranteed to work for other users if the bot is an administrator" +" in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` " +"object on success." msgstr "" #: aiogram.types.chat.Chat.get_member:8 of @@ -944,8 +944,20 @@ msgstr "" msgid "A JSON-serialized object for new default chat permissions" msgstr "" +#: aiogram.types.chat.Chat.restrict:12 #: aiogram.types.chat.Chat.set_permissions:11 of msgid "" +"Pass :code:`True` if chat permissions are set independently. Otherwise, " +"the *can_send_other_messages* and *can_add_web_page_previews* permissions" +" will imply the *can_send_messages*, *can_send_audios*, " +"*can_send_documents*, *can_send_photos*, *can_send_videos*, " +"*can_send_video_notes*, and *can_send_voice_notes* permissions; the " +"*can_send_polls* permission will imply the *can_send_messages* " +"permission." +msgstr "" + +#: aiogram.types.chat.Chat.set_permissions:12 of +msgid "" "instance of method " ":class:`aiogram.methods.set_chat_permissions.SetChatPermissions`" msgstr "" @@ -1010,7 +1022,7 @@ msgstr "" #: aiogram.types.chat.Chat.promote:18 of msgid "" "Pass :code:`True` if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by him)" msgstr "" @@ -1064,14 +1076,14 @@ msgstr "" msgid "A JSON-serialized object for new user permissions" msgstr "" -#: aiogram.types.chat.Chat.restrict:12 of +#: aiogram.types.chat.Chat.restrict:13 of msgid "" "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" msgstr "" -#: aiogram.types.chat.Chat.restrict:13 of +#: aiogram.types.chat.Chat.restrict:14 of msgid "" "instance of method " ":class:`aiogram.methods.restrict_chat_member.RestrictChatMember`" @@ -1256,3 +1268,23 @@ msgstr "" #: aiogram.types.chat.Chat.set_photo:11 of msgid "instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto`" msgstr "" + +#~ msgid "" +#~ "Use this method to get information " +#~ "about a member of a chat. The " +#~ "method is guaranteed to work for " +#~ "other users, only if the bot is" +#~ " an administrator in the chat. " +#~ "Returns a :class:`aiogram.types.chat_member.ChatMember`" +#~ " object on success." +#~ msgstr "" + +#~ msgid "" +#~ "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)" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat_administrator_rights.po b/docs/locale/en/LC_MESSAGES/api/types/chat_administrator_rights.po index e792b43d..fc696d31 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat_administrator_rights.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat_administrator_rights.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/chat_administrator_rights.rst:3 msgid "ChatAdministratorRights" @@ -68,7 +68,7 @@ msgstr "" #: of msgid "" ":code:`True`, if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by the user)" msgstr "" @@ -118,3 +118,13 @@ msgid "" "*Optional*. :code:`True`, if the user is allowed to create, rename, " "close, and reopen forum topics; supergroups only" msgstr "" + +#~ msgid "" +#~ ":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)" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat_join_request.po b/docs/locale/en/LC_MESSAGES/api/types/chat_join_request.po index 0349c899..f1035f20 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat_join_request.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat_join_request.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/chat_join_request.rst:3 msgid "ChatJoinRequest" @@ -38,6 +38,18 @@ msgstr "" msgid "User that sent the join request" msgstr "" +#: ../../docstring +#: aiogram.types.chat_join_request.ChatJoinRequest.user_chat_id:1 of +msgid "" +"Identifier of a private chat with the user who sent the join request. " +"This number may have more than 32 significant bits and some programming " +"languages may have difficulty/silent defects in interpreting it. But it " +"has at most 52 significant bits, so a 64-bit integer or double-precision " +"float type are safe for storing this identifier. The bot can use this " +"identifier for 24 hours to send messages until the join request is " +"processed, assuming no other administrator contacted the user." +msgstr "" + #: ../../docstring aiogram.types.chat_join_request.ChatJoinRequest.date:1 of msgid "Date the request was sent in Unix time" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat_member.po b/docs/locale/en/LC_MESSAGES/api/types/chat_member.po index 87fe2331..6c775a80 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat_member.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat_member.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/chat_member.rst:3 msgid "ChatMember" @@ -108,8 +108,8 @@ msgstr "" #: of msgid "" "*Optional*. :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 " +" with a subset of their own privileges or demote administrators that they" +" have promoted, directly or indirectly (promoted by administrators that " "were appointed by the user)" msgstr "" @@ -158,14 +158,33 @@ msgstr "" #: ../../docstring aiogram.types.chat_member.ChatMember.can_send_messages:1 of msgid "" "*Optional*. :code:`True`, if the user is allowed to send text messages, " -"contacts, locations and venues" +"contacts, invoices, locations and venues" msgstr "" -#: ../../docstring -#: aiogram.types.chat_member.ChatMember.can_send_media_messages:1 of -msgid "" -"*Optional*. :code:`True`, if the user is allowed to send audios, " -"documents, photos, videos, video notes and voice notes" +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_audios:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_documents:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_photos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_videos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_video_notes:1 +#: of +msgid "*Optional*. :code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring aiogram.types.chat_member.ChatMember.can_send_voice_notes:1 +#: of +msgid "*Optional*. :code:`True`, if the user is allowed to send voice notes" msgstr "" #: ../../docstring aiogram.types.chat_member.ChatMember.can_send_polls:1 of @@ -194,3 +213,26 @@ msgstr "" #~ msgid "..." #~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :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)" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send audios, documents, " +#~ "photos, videos, video notes and voice" +#~ " notes" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat_member_administrator.po b/docs/locale/en/LC_MESSAGES/api/types/chat_member_administrator.po index 0045c783..9b51540f 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat_member_administrator.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat_member_administrator.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/chat_member_administrator.rst:3 msgid "ChatMemberAdministrator" @@ -89,7 +89,7 @@ msgstr "" #: of msgid "" ":code:`True`, if the administrator can add new administrators with a " -"subset of their own privileges or demote administrators that he has " +"subset of their own privileges or demote administrators that they have " "promoted, directly or indirectly (promoted by administrators that were " "appointed by the user)" msgstr "" @@ -145,3 +145,13 @@ msgstr "" #: of msgid "*Optional*. Custom title for this user" msgstr "" + +#~ msgid "" +#~ ":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)" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat_member_restricted.po b/docs/locale/en/LC_MESSAGES/api/types/chat_member_restricted.po index 79784f6d..a0f2f184 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat_member_restricted.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat_member_restricted.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/chat_member_restricted.rst:3 msgid "ChatMemberRestricted" @@ -49,6 +49,72 @@ msgid "" "request" msgstr "" +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_messages:1 +#: of +msgid "" +":code:`True`, if the user is allowed to send text messages, contacts, " +"invoices, locations and venues" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_audios:1 +#: of +msgid ":code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_documents:1 +#: of +msgid ":code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_photos:1 +#: of +msgid ":code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_videos:1 +#: of +msgid ":code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_video_notes:1 +#: of +msgid ":code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_voice_notes:1 +#: of +msgid ":code:`True`, if the user is allowed to send voice notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_polls:1 +#: of +msgid ":code:`True`, if the user is allowed to send polls" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_other_messages:1 +#: of +msgid "" +":code:`True`, if the user is allowed to send animations, games, stickers " +"and use inline bots" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_add_web_page_previews:1 +#: of +msgid "" +":code:`True`, if the user is allowed to add web page previews to their " +"messages" +msgstr "" + #: ../../docstring #: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_change_info:1 #: of @@ -75,47 +141,21 @@ msgstr "" msgid ":code:`True`, if the user is allowed to create forum topics" msgstr "" -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_messages:1 -#: of -msgid "" -":code:`True`, if the user is allowed to send text messages, contacts, " -"locations and venues" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_media_messages:1 -#: of -msgid "" -":code:`True`, if the user is allowed to send audios, documents, photos, " -"videos, video notes and voice notes" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_polls:1 -#: of -msgid ":code:`True`, if the user is allowed to send polls" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_send_other_messages:1 -#: of -msgid "" -":code:`True`, if the user is allowed to send animations, games, stickers " -"and use inline bots" -msgstr "" - -#: ../../docstring -#: aiogram.types.chat_member_restricted.ChatMemberRestricted.can_add_web_page_previews:1 -#: of -msgid "" -":code:`True`, if the user is allowed to add web page previews to their " -"messages" -msgstr "" - #: ../../docstring #: aiogram.types.chat_member_restricted.ChatMemberRestricted.until_date:1 of msgid "" "Date when restrictions will be lifted for this user; unix time. If 0, " "then the user is restricted forever" msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the user is allowed " +#~ "to send text messages, contacts, " +#~ "locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ ":code:`True`, if the user is allowed " +#~ "to send audios, documents, photos, " +#~ "videos, video notes and voice notes" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat_permissions.po b/docs/locale/en/LC_MESSAGES/api/types/chat_permissions.po index d4bb052c..8dd59fb3 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/chat_permissions.po +++ b/docs/locale/en/LC_MESSAGES/api/types/chat_permissions.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-06 14:18+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/chat_permissions.rst:3 msgid "ChatPermissions" @@ -35,29 +35,49 @@ msgstr "" #: aiogram.types.chat_permissions.ChatPermissions.can_send_messages:1 of msgid "" "*Optional*. :code:`True`, if the user is allowed to send text messages, " -"contacts, locations and venues" +"contacts, invoices, locations and venues" msgstr "" #: ../../docstring -#: aiogram.types.chat_permissions.ChatPermissions.can_send_media_messages:1 of -msgid "" -"*Optional*. :code:`True`, if the user is allowed to send audios, " -"documents, photos, videos, video notes and voice notes, implies " -"can_send_messages" +#: aiogram.types.chat_permissions.ChatPermissions.can_send_audios:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send audios" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_documents:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send documents" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_photos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send photos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_videos:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send videos" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_video_notes:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send video notes" +msgstr "" + +#: ../../docstring +#: aiogram.types.chat_permissions.ChatPermissions.can_send_voice_notes:1 of +msgid "*Optional*. :code:`True`, if the user is allowed to send voice notes" msgstr "" #: ../../docstring #: aiogram.types.chat_permissions.ChatPermissions.can_send_polls:1 of -msgid "" -"*Optional*. :code:`True`, if the user is allowed to send polls, implies " -"can_send_messages" +msgid "*Optional*. :code:`True`, if the user is allowed to send polls" msgstr "" #: ../../docstring #: aiogram.types.chat_permissions.ChatPermissions.can_send_other_messages:1 of msgid "" "*Optional*. :code:`True`, if the user is allowed to send animations, " -"games, stickers and use inline bots, implies can_send_media_messages" +"games, stickers and use inline bots" msgstr "" #: ../../docstring @@ -65,7 +85,7 @@ msgstr "" #: of msgid "" "*Optional*. :code:`True`, if the user is allowed to add web page previews" -" to their messages, implies can_send_media_messages" +" to their messages" msgstr "" #: ../../docstring @@ -95,3 +115,36 @@ msgid "" "*Optional*. :code:`True`, if the user is allowed to create forum topics. " "If omitted defaults to the value of can_pin_messages" msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send text messages, " +#~ "contacts, locations and venues" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send audios, documents, " +#~ "photos, videos, video notes and voice" +#~ " notes, implies can_send_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send polls, implies " +#~ "can_send_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to send animations, games, " +#~ "stickers and use inline bots, implies" +#~ " can_send_media_messages" +#~ msgstr "" + +#~ msgid "" +#~ "*Optional*. :code:`True`, if the user is" +#~ " allowed to add web page previews " +#~ "to their messages, implies " +#~ "can_send_media_messages" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/chat_shared.po b/docs/locale/en/LC_MESSAGES/api/types/chat_shared.po new file mode 100644 index 00000000..def83f98 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/chat_shared.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/chat_shared.rst:3 +msgid "ChatShared" +msgstr "" + +#: aiogram.types.chat_shared.ChatShared:1 of +msgid "" +"This object contains information about the chat whose identifier was " +"shared with the bot using a " +":class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat`" +" button." +msgstr "" + +#: aiogram.types.chat_shared.ChatShared:3 of +msgid "Source: https://core.telegram.org/bots/api#chatshared" +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.request_id:1 of +msgid "Identifier of the request" +msgstr "" + +#: ../../docstring aiogram.types.chat_shared.ChatShared.chat_id:1 of +msgid "" +"Identifier of the shared chat. This number may have more than 32 " +"significant bits and some programming languages may have " +"difficulty/silent defects in interpreting it. But it has at most 52 " +"significant bits, so a 64-bit integer or double-precision float type are " +"safe for storing this identifier. The bot may not have access to the chat" +" and could be unable to use this identifier, unless the chat is already " +"known to the bot by some other means." +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/input_sticker.po b/docs/locale/en/LC_MESSAGES/api/types/input_sticker.po new file mode 100644 index 00000000..3bbc8b33 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/input_sticker.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/input_sticker.rst:3 +msgid "InputSticker" +msgstr "" + +#: aiogram.types.input_sticker.InputSticker:1 of +msgid "This object describes a sticker to be added to a sticker set." +msgstr "" + +#: aiogram.types.input_sticker.InputSticker:3 of +msgid "Source: https://core.telegram.org/bots/api#inputsticker" +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.sticker:1 of +msgid "" +"The added sticker. Pass a *file_id* as a String to send a file that " +"already exists on the Telegram servers, pass an HTTP URL as a String for " +"Telegram to get a file from the Internet, or upload a new one using " +"multipart/form-data. Animated and video stickers can't be uploaded via " +"HTTP URL. :ref:`More information on Sending Files » `" +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.emoji_list:1 of +msgid "List of 1-20 emoji associated with the sticker" +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.mask_position:1 of +msgid "" +"*Optional*. Position where the mask should be placed on faces. For 'mask'" +" stickers only." +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.keywords:1 of +msgid "" +"*Optional*. List of 0-20 search keywords for the sticker with total " +"length of up to 64 characters. For 'regular' and 'custom_emoji' stickers " +"only." +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/keyboard_button.po b/docs/locale/en/LC_MESSAGES/api/types/keyboard_button.po index 8a0ad540..a2578af9 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/keyboard_button.po +++ b/docs/locale/en/LC_MESSAGES/api/types/keyboard_button.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/keyboard_button.rst:3 msgid "KeyboardButton" @@ -24,12 +24,12 @@ msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:1 of msgid "" "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*." +"buttons, *String* can be used instead of this object to specify the " +"button text. The optional fields *web_app*, *request_user*, " +"*request_chat*, *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*." msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:4 of @@ -46,6 +46,13 @@ msgid "" msgstr "" #: aiogram.types.keyboard_button.KeyboardButton:8 of +msgid "" +"**Note:** *request_user* and *request_chat* options will only work in " +"Telegram versions released after 3 February, 2023. Older clients will " +"display *unsupported message*." +msgstr "" + +#: aiogram.types.keyboard_button.KeyboardButton:10 of msgid "Source: https://core.telegram.org/bots/api#keyboardbutton" msgstr "" @@ -55,6 +62,22 @@ msgid "" "sent as a message when the button is pressed" msgstr "" +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_user:1 +#: of +msgid "" +"*Optional.* If specified, pressing the button will open a list of " +"suitable users. Tapping on any user will send their identifier to the bot" +" in a 'user_shared' service message. Available in private chats only." +msgstr "" + +#: ../../docstring aiogram.types.keyboard_button.KeyboardButton.request_chat:1 +#: of +msgid "" +"*Optional.* If specified, pressing the button will open a list of " +"suitable chats. Tapping on a chat will send its identifier to the bot in " +"a 'chat_shared' service message. Available in private chats only." +msgstr "" + #: ../../docstring #: aiogram.types.keyboard_button.KeyboardButton.request_contact:1 of msgid "" @@ -84,3 +107,18 @@ msgid "" "button is pressed. The Web App will be able to send a 'web_app_data' " "service message. Available in private chats only." msgstr "" + +#~ msgid "" +#~ "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*." +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_chat.po b/docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_chat.po new file mode 100644 index 00000000..69f4736f --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_chat.po @@ -0,0 +1,104 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/keyboard_button_request_chat.rst:3 +msgid "KeyboardButtonRequestChat" +msgstr "" + +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat:1 of +msgid "" +"This object defines the criteria used to request a suitable chat. The " +"identifier of the selected chat will be shared with the bot when the " +"corresponding button is pressed." +msgstr "" + +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat:3 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.request_id:1 +#: of +msgid "" +"Signed 32-bit identifier of the request, which will be received back in " +"the :class:`aiogram.types.chat_shared.ChatShared` object. Must be unique " +"within the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_channel:1 +#: of +msgid "" +"Pass :code:`True` to request a channel chat, pass :code:`False` to " +"request a group or a supergroup chat." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_forum:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a forum supergroup, pass " +":code:`False` to request a non-forum chat. If not specified, no " +"additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_has_username:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a supergroup or a channel with a" +" username, pass :code:`False` to request a chat without a username. If " +"not specified, no additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.chat_is_created:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a chat owned by the user. " +"Otherwise, no additional restrictions are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.user_administrator_rights:1 +#: of +msgid "" +"*Optional*. A JSON-serialized object listing the required administrator " +"rights of the user in the chat. The rights must be a superset of " +"*bot_administrator_rights*. If not specified, no additional restrictions " +"are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.bot_administrator_rights:1 +#: of +msgid "" +"*Optional*. A JSON-serialized object listing the required administrator " +"rights of the bot in the chat. The rights must be a subset of " +"*user_administrator_rights*. If not specified, no additional restrictions" +" are applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat.bot_is_member:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a chat with the bot as a member." +" Otherwise, no additional restrictions are applied." +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_user.po b/docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_user.po new file mode 100644 index 00000000..faf737b0 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/keyboard_button_request_user.po @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/keyboard_button_request_user.rst:3 +msgid "KeyboardButtonRequestUser" +msgstr "" + +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser:1 of +msgid "" +"This object defines the criteria used to request a suitable user. The " +"identifier of the selected user will be shared with the bot when the " +"corresponding button is pressed." +msgstr "" + +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser:3 of +msgid "Source: https://core.telegram.org/bots/api#keyboardbuttonrequestuser" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.request_id:1 +#: of +msgid "" +"Signed 32-bit identifier of the request, which will be received back in " +"the :class:`aiogram.types.user_shared.UserShared` object. Must be unique " +"within the message" +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.user_is_bot:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to " +"request a regular user. If not specified, no additional restrictions are " +"applied." +msgstr "" + +#: ../../docstring +#: aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser.user_is_premium:1 +#: of +msgid "" +"*Optional*. Pass :code:`True` to request a premium user, pass " +":code:`False` to request a non-premium user. If not specified, no " +"additional restrictions are applied." +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/message.po b/docs/locale/en/LC_MESSAGES/api/types/message.po index 516aa013..b3f65085 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/message.po +++ b/docs/locale/en/LC_MESSAGES/api/types/message.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/message.rst:3 msgid "Message" @@ -328,6 +328,14 @@ msgid "" "`_" msgstr "" +#: ../../docstring aiogram.types.message.Message.user_shared:1 of +msgid "*Optional*. Service message: a user was shared with the bot" +msgstr "" + +#: ../../docstring aiogram.types.message.Message.chat_shared:1 of +msgid "*Optional*. Service message: a chat was shared with the bot" +msgstr "" + #: ../../docstring aiogram.types.message.Message.connected_website:1 of msgid "" "*Optional*. The domain name of the website on which the user has logged " @@ -671,7 +679,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:17 #: aiogram.types.message.Message.answer_photo:16 #: aiogram.types.message.Message.answer_poll:23 -#: aiogram.types.message.Message.answer_sticker:12 +#: aiogram.types.message.Message.answer_sticker:13 #: aiogram.types.message.Message.answer_venue:19 #: aiogram.types.message.Message.answer_video:21 #: aiogram.types.message.Message.answer_video_note:15 @@ -689,7 +697,7 @@ msgstr "" #: aiogram.types.message.Message.reply_location:18 #: aiogram.types.message.Message.reply_photo:17 #: aiogram.types.message.Message.reply_poll:24 -#: aiogram.types.message.Message.reply_sticker:13 +#: aiogram.types.message.Message.reply_sticker:14 #: aiogram.types.message.Message.reply_venue:20 #: aiogram.types.message.Message.reply_video:22 #: aiogram.types.message.Message.reply_video_note:16 @@ -709,7 +717,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:18 #: aiogram.types.message.Message.answer_photo:17 #: aiogram.types.message.Message.answer_poll:24 -#: aiogram.types.message.Message.answer_sticker:13 +#: aiogram.types.message.Message.answer_sticker:14 #: aiogram.types.message.Message.answer_venue:20 #: aiogram.types.message.Message.answer_video:22 #: aiogram.types.message.Message.answer_video_note:16 @@ -725,7 +733,7 @@ msgstr "" #: aiogram.types.message.Message.reply_location:19 #: aiogram.types.message.Message.reply_photo:18 #: aiogram.types.message.Message.reply_poll:25 -#: aiogram.types.message.Message.reply_sticker:14 +#: aiogram.types.message.Message.reply_sticker:15 #: aiogram.types.message.Message.reply_venue:21 #: aiogram.types.message.Message.reply_video:23 #: aiogram.types.message.Message.reply_video_note:17 @@ -745,7 +753,7 @@ msgstr "" #: aiogram.types.message.Message.answer_media_group:15 #: aiogram.types.message.Message.answer_photo:19 #: aiogram.types.message.Message.answer_poll:26 -#: aiogram.types.message.Message.answer_sticker:15 +#: aiogram.types.message.Message.answer_sticker:16 #: aiogram.types.message.Message.answer_venue:22 #: aiogram.types.message.Message.answer_video:24 #: aiogram.types.message.Message.answer_video_note:18 @@ -763,7 +771,7 @@ msgstr "" #: aiogram.types.message.Message.reply_media_group:15 #: aiogram.types.message.Message.reply_photo:19 #: aiogram.types.message.Message.reply_poll:26 -#: aiogram.types.message.Message.reply_sticker:15 +#: aiogram.types.message.Message.reply_sticker:16 #: aiogram.types.message.Message.reply_venue:22 #: aiogram.types.message.Message.reply_video:24 #: aiogram.types.message.Message.reply_video_note:18 @@ -782,7 +790,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:21 #: aiogram.types.message.Message.answer_photo:20 #: aiogram.types.message.Message.answer_poll:27 -#: aiogram.types.message.Message.answer_sticker:16 +#: aiogram.types.message.Message.answer_sticker:17 #: aiogram.types.message.Message.answer_venue:23 #: aiogram.types.message.Message.answer_video:25 #: aiogram.types.message.Message.answer_video_note:19 @@ -797,7 +805,7 @@ msgstr "" #: aiogram.types.message.Message.reply_location:21 #: aiogram.types.message.Message.reply_photo:20 #: aiogram.types.message.Message.reply_poll:27 -#: aiogram.types.message.Message.reply_sticker:16 +#: aiogram.types.message.Message.reply_sticker:17 #: aiogram.types.message.Message.reply_venue:23 #: aiogram.types.message.Message.reply_video:25 #: aiogram.types.message.Message.reply_video_note:19 @@ -873,7 +881,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:19 #: aiogram.types.message.Message.answer_photo:18 #: aiogram.types.message.Message.answer_poll:25 -#: aiogram.types.message.Message.answer_sticker:14 +#: aiogram.types.message.Message.answer_sticker:15 #: aiogram.types.message.Message.answer_venue:21 #: aiogram.types.message.Message.answer_video:23 #: aiogram.types.message.Message.answer_video_note:17 @@ -1666,13 +1674,19 @@ msgstr "" msgid "" "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 » `" +"Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP " +"or .TGS sticker using multipart/form-data. :ref:`More information on " +"Sending Files » `. Video stickers can only be sent by a " +"file_id. Animated stickers can't be sent via an HTTP URL." msgstr "" -#: aiogram.types.message.Message.answer_sticker:17 -#: aiogram.types.message.Message.reply_sticker:17 of +#: aiogram.types.message.Message.answer_sticker:12 +#: aiogram.types.message.Message.reply_sticker:13 of +msgid "Emoji associated with the sticker; only for just uploaded stickers" +msgstr "" + +#: aiogram.types.message.Message.answer_sticker:18 +#: aiogram.types.message.Message.reply_sticker:18 of msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" msgstr "" @@ -2536,3 +2550,15 @@ msgstr "" #~ msgid "Copy message" #~ msgstr "" + +#~ msgid "" +#~ "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 » `" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/sticker.po b/docs/locale/en/LC_MESSAGES/api/types/sticker.po index 4f8fc38b..fe98cecc 100644 --- a/docs/locale/en/LC_MESSAGES/api/types/sticker.po +++ b/docs/locale/en/LC_MESSAGES/api/types/sticker.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/sticker.rst:3 msgid "Sticker" @@ -66,7 +66,7 @@ msgid "" "`_" msgstr "" -#: ../../docstring aiogram.types.sticker.Sticker.thumb:1 of +#: ../../docstring aiogram.types.sticker.Sticker.thumbnail:1 of msgid "*Optional*. Sticker thumbnail in the .WEBP or .JPG format" msgstr "" @@ -96,6 +96,14 @@ msgid "" "emoji" msgstr "" +#: ../../docstring aiogram.types.sticker.Sticker.needs_repainting:1 of +msgid "" +"*Optional*. :code:`True`, if the sticker must be repainted to a text " +"color in messages, the color of the Telegram Premium badge in emoji " +"status, white color on chat photos, or another appropriate color in other" +" places" +msgstr "" + #: ../../docstring aiogram.types.sticker.Sticker.file_size:1 of msgid "*Optional*. File size in bytes" msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/types/user_shared.po b/docs/locale/en/LC_MESSAGES/api/types/user_shared.po new file mode 100644 index 00000000..d725744c --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/api/types/user_shared.po @@ -0,0 +1,49 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/user_shared.rst:3 +msgid "UserShared" +msgstr "" + +#: aiogram.types.user_shared.UserShared:1 of +msgid "" +"This object contains information about the user whose identifier was " +"shared with the bot using a " +":class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser`" +" button." +msgstr "" + +#: aiogram.types.user_shared.UserShared:3 of +msgid "Source: https://core.telegram.org/bots/api#usershared" +msgstr "" + +#: ../../docstring aiogram.types.user_shared.UserShared.request_id:1 of +msgid "Identifier of the request" +msgstr "" + +#: ../../docstring aiogram.types.user_shared.UserShared.user_id:1 of +msgid "" +"Identifier of the shared user. This number may have more than 32 " +"significant bits and some programming languages may have " +"difficulty/silent defects in interpreting it. But it has at most 52 " +"significant bits, so a 64-bit integer or double-precision float type are " +"safe for storing this identifier. The bot may not have access to the user" +" and could be unable to use this identifier, unless the user is already " +"known to the bot by some other means." +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/api/upload_file.po b/docs/locale/en/LC_MESSAGES/api/upload_file.po index 3d0bea45..8e01cf9e 100644 --- a/docs/locale/en/LC_MESSAGES/api/upload_file.po +++ b/docs/locale/en/LC_MESSAGES/api/upload_file.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-03 01:03+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/upload_file.rst:5 msgid "How to upload file?" @@ -36,12 +36,12 @@ msgstr "" #: ../../api/upload_file.rst:13 msgid "" -"But if you need to upload new file just use subclasses of `InputFile " +"But if you need to upload a new file just use subclasses of `InputFile " "`__." msgstr "" #: ../../api/upload_file.rst:15 -msgid "Here is available three different builtin types of input file:" +msgid "Here are the three different available builtin types of input file:" msgstr "" #: ../../api/upload_file.rst:17 @@ -68,9 +68,9 @@ msgstr "" #: ../../api/upload_file.rst:25 msgid "" -"Instances of `InputFile` is reusable. That's mean you can create instance" -" of InputFile and sent this file multiple times but Telegram is not " -"recommend to do that and when you upload file once just save their " +"Instances of `InputFile` are reusable. That's mean you can create " +"instance of InputFile and sent this file multiple times but Telegram does" +" not recommend to do that and when you upload file once just save their " "`file_id` and use it in next times." msgstr "" @@ -118,8 +118,8 @@ msgstr "" #: ../../api/upload_file.rst:54 msgid "" "Files can be also passed from buffer (For example you generate image " -"using `Pillow `_ and the want's" -" to sent it to the Telegram):" +"using `Pillow `_ and you want " +"to send it to Telegram):" msgstr "" #: ../../api/upload_file.rst:58 ../../api/upload_file.rst:80 @@ -158,3 +158,32 @@ msgstr "" #~ msgid "instance of :obj:`BufferedInputFile`" #~ msgstr "" + +#~ msgid "" +#~ "But if you need to upload new " +#~ "file just use subclasses of `InputFile" +#~ " `__." +#~ msgstr "" + +#~ msgid "Here is available three different builtin types of input file:" +#~ msgstr "" + +#~ msgid "" +#~ "Instances of `InputFile` is reusable. " +#~ "That's mean you can create instance " +#~ "of InputFile and sent this file " +#~ "multiple times but Telegram is not " +#~ "recommend to do that and when you" +#~ " upload file once just save their " +#~ "`file_id` and use it in next " +#~ "times." +#~ msgstr "" + +#~ msgid "" +#~ "Files can be also passed from " +#~ "buffer (For example you generate image" +#~ " using `Pillow " +#~ "`_ and the " +#~ "want's to sent it to the " +#~ "Telegram):" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/changelog.po b/docs/locale/en/LC_MESSAGES/changelog.po index a8b8a071..ec08c2fa 100644 --- a/docs/locale/en/LC_MESSAGES/changelog.po +++ b/docs/locale/en/LC_MESSAGES/changelog.po @@ -8,49 +8,107 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-07 23:01+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../../CHANGES.rst:3 msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2023-01-07)" +msgid "\\ |release| [UNRELEASED DRAFT] (2023-03-11)" msgstr "" -#: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 -#: ../../../CHANGES.rst:207 ../../../CHANGES.rst:248 ../../../CHANGES.rst:286 -#: ../../../CHANGES.rst:334 ../../../CHANGES.rst:410 ../../../CHANGES.rst:443 -#: ../../../CHANGES.rst:474 ../../[towncrier-fragments]:5 -msgid "Features" +#: ../../../CHANGES.rst:193 ../../../CHANGES.rst:243 ../../../CHANGES.rst:623 +#: ../../[towncrier-fragments]:5 +msgid "Improved Documentation" msgstr "" #: ../../[towncrier-fragments]:7 +msgid "" +"Changed small grammar typos for `upload_file` `#1133 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:127 ../../../CHANGES.rst:204 ../../../CHANGES.rst:257 +#: ../../../CHANGES.rst:308 ../../../CHANGES.rst:362 ../../../CHANGES.rst:404 +#: ../../../CHANGES.rst:450 ../../../CHANGES.rst:510 ../../../CHANGES.rst:531 +#: ../../../CHANGES.rst:554 ../../../CHANGES.rst:591 ../../../CHANGES.rst:630 +#: ../../[towncrier-fragments]:12 +msgid "Misc" +msgstr "" + +#: ../../[towncrier-fragments]:14 +msgid "" +"Added full support of `Bot API 6.6 `_" +msgstr "" + +#: ../../[towncrier-fragments]:18 +msgid "" +"Note that this issue has breaking changes described in in the Bot API " +"changelog, this changes is not breaking in the API but breaking inside " +"aiogram because Beta stage is not finished." +msgstr "" + +#: ../../[towncrier-fragments]:21 +msgid "`#1139 `_" +msgstr "" + +#: ../../../CHANGES.rst:20 +msgid "3.0.0b7 (2023-02-18)" +msgstr "" + +#: ../../../CHANGES.rst:24 +msgid "" +"Note that this version has incompatibility with Python 3.8-3.9 in case " +"when you create an instance of Dispatcher outside of the any coroutine." +msgstr "" + +#: ../../../CHANGES.rst:26 +msgid "Sorry for the inconvenience, it will be fixed in the next version." +msgstr "" + +#: ../../../CHANGES.rst:28 +msgid "This code will not work:" +msgstr "" + +#: ../../../CHANGES.rst:40 +msgid "But if you change it like this it should works as well:" +msgstr "" + +#: ../../../CHANGES.rst:56 ../../../CHANGES.rst:156 ../../../CHANGES.rst:216 +#: ../../../CHANGES.rst:267 ../../../CHANGES.rst:340 ../../../CHANGES.rst:381 +#: ../../../CHANGES.rst:419 ../../../CHANGES.rst:467 ../../../CHANGES.rst:543 +#: ../../../CHANGES.rst:576 ../../../CHANGES.rst:607 +msgid "Features" +msgstr "" + +#: ../../../CHANGES.rst:58 msgid "Added missing shortcuts, new enums, reworked old stuff" msgstr "" -#: ../../[towncrier-fragments]:9 +#: ../../../CHANGES.rst:60 msgid "" "**Breaking** All previously added enums is re-generated in new place - " "`aiogram.enums` instead of `aiogram.types`" msgstr "" -#: ../../[towncrier-fragments]:27 +#: ../../../CHANGES.rst:78 msgid "" "**Added enums:** " ":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," msgstr "" -#: ../../[towncrier-fragments]:13 +#: ../../../CHANGES.rst:64 msgid "" -":class:`aiogram.enums.chat_action.ChatActions`, " +":class:`aiogram.enums.chat_action.ChatAction`, " ":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " ":class:`aiogram.enums.chat_type.ChatType`, " ":class:`aiogram.enums.content_type.ContentType`, " @@ -67,15 +125,15 @@ msgid "" ":class:`aiogram.enums.update_type.UpdateType`," msgstr "" -#: ../../[towncrier-fragments]:29 +#: ../../../CHANGES.rst:80 msgid "**Added shortcuts**:" msgstr "" -#: ../../[towncrier-fragments]:54 +#: ../../../CHANGES.rst:105 msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," msgstr "" -#: ../../[towncrier-fragments]:32 +#: ../../../CHANGES.rst:83 msgid "" ":meth:`aiogram.types.chat.Chat.delete_message`, " ":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " @@ -103,175 +161,234 @@ msgid "" ":meth:`aiogram.types.chat.Chat.set_photo`," msgstr "" -#: ../../[towncrier-fragments]:56 +#: ../../../CHANGES.rst:107 msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," msgstr "" -#: ../../[towncrier-fragments]:57 +#: ../../../CHANGES.rst:108 msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," msgstr "" -#: ../../[towncrier-fragments]:58 +#: ../../../CHANGES.rst:109 msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" msgstr "" -#: ../../[towncrier-fragments]:59 +#: ../../../CHANGES.rst:110 msgid "`#952 `_" msgstr "" -#: ../../[towncrier-fragments]:60 +#: ../../../CHANGES.rst:111 msgid "" -"Added full support of `Bot API 6.4 `_ `#1088 " -"`_" +"Added :ref:`callback answer ` feature `#1091 " +"`_" msgstr "" -#: ../../../CHANGES.rst:71 ../../../CHANGES.rst:124 ../../../CHANGES.rst:175 -#: ../../../CHANGES.rst:229 ../../../CHANGES.rst:271 ../../../CHANGES.rst:317 -#: ../../../CHANGES.rst:377 ../../../CHANGES.rst:398 ../../../CHANGES.rst:421 -#: ../../../CHANGES.rst:458 ../../../CHANGES.rst:497 -#: ../../[towncrier-fragments]:65 -msgid "Misc" +#: ../../../CHANGES.rst:113 +msgid "" +"Added a method that allows you to compactly register routers `#1117 " +"`_" msgstr "" -#: ../../[towncrier-fragments]:67 +#: ../../../CHANGES.rst:118 ../../../CHANGES.rst:181 ../../../CHANGES.rst:230 +#: ../../../CHANGES.rst:291 ../../../CHANGES.rst:349 ../../../CHANGES.rst:395 +#: ../../../CHANGES.rst:443 ../../../CHANGES.rst:499 ../../../CHANGES.rst:584 +#: ../../../CHANGES.rst:616 +msgid "Bugfixes" +msgstr "" + +#: ../../../CHANGES.rst:120 +msgid "" +"Check status code when downloading file `#816 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:122 +msgid "" +"Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` " +"filter `#1106 `_" +msgstr "" + +#: ../../../CHANGES.rst:129 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " "`_" msgstr "" -#: ../../../CHANGES.rst:20 +#: ../../../CHANGES.rst:131 +msgid "" +"Added full support of `Bot API 6.4 `_ `#1088 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:133 +msgid "" +"Updated package metadata, moved build internals from Poetry to Hatch, " +"added contributing guides. `#1095 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:135 +msgid "" +"Added full support of `Bot API 6.5 `_" +msgstr "" + +#: ../../../CHANGES.rst:139 +msgid "" +"Note that :obj:`aiogram.types.chat_permissions.ChatPermissions` is " +"updated without backward compatibility, so now this object has no " +":code:`can_send_media_messages` attribute" +msgstr "" + +#: ../../../CHANGES.rst:141 +msgid "`#1112 `_" +msgstr "" + +#: ../../../CHANGES.rst:142 +msgid "" +"Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an " +"unexpected keyword argument ''` with a more understandable one for " +"developers and with a link to the documentation. `#1114 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:145 +msgid "" +"Added possibility to reply into webhook with files `#1120 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:147 +msgid "" +"Reworked graceful shutdown. Added method to stop polling. Now polling " +"started from dispatcher can be stopped by signals gracefully without " +"errors (on Linux and Mac). `#1124 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:153 msgid "3.0.0b6 (2022-11-18)" msgstr "" -#: ../../../CHANGES.rst:25 +#: ../../../CHANGES.rst:158 msgid "" "(again) Added possibility to combine filters with an *and*/*or* " "operations." msgstr "" -#: ../../../CHANGES.rst:27 +#: ../../../CHANGES.rst:160 msgid "" "Read more in \":ref:`Combining filters `\" " "documentation section `#1018 " "`_" msgstr "" -#: ../../../CHANGES.rst:29 +#: ../../../CHANGES.rst:162 msgid "Added following methods to ``Message`` class:" msgstr "" -#: ../../../CHANGES.rst:31 +#: ../../../CHANGES.rst:164 msgid ":code:`Message.forward(...)`" msgstr "" -#: ../../../CHANGES.rst:32 +#: ../../../CHANGES.rst:165 msgid ":code:`Message.edit_media(...)`" msgstr "" -#: ../../../CHANGES.rst:33 +#: ../../../CHANGES.rst:166 msgid ":code:`Message.edit_live_location(...)`" msgstr "" -#: ../../../CHANGES.rst:34 +#: ../../../CHANGES.rst:167 msgid ":code:`Message.stop_live_location(...)`" msgstr "" -#: ../../../CHANGES.rst:35 +#: ../../../CHANGES.rst:168 msgid ":code:`Message.pin(...)`" msgstr "" -#: ../../../CHANGES.rst:36 +#: ../../../CHANGES.rst:169 msgid ":code:`Message.unpin()`" msgstr "" -#: ../../../CHANGES.rst:37 +#: ../../../CHANGES.rst:170 msgid "`#1030 `_" msgstr "" -#: ../../../CHANGES.rst:38 +#: ../../../CHANGES.rst:171 msgid "Added following methods to :code:`User` class:" msgstr "" -#: ../../../CHANGES.rst:40 +#: ../../../CHANGES.rst:173 msgid ":code:`User.mention_markdown(...)`" msgstr "" -#: ../../../CHANGES.rst:41 +#: ../../../CHANGES.rst:174 msgid ":code:`User.mention_html(...)`" msgstr "" -#: ../../../CHANGES.rst:42 +#: ../../../CHANGES.rst:175 msgid "`#1049 `_" msgstr "" -#: ../../../CHANGES.rst:43 +#: ../../../CHANGES.rst:176 msgid "" "Added full support of `Bot API 6.3 `_ `#1057 " "`_" msgstr "" -#: ../../../CHANGES.rst:48 ../../../CHANGES.rst:97 ../../../CHANGES.rst:158 -#: ../../../CHANGES.rst:216 ../../../CHANGES.rst:262 ../../../CHANGES.rst:310 -#: ../../../CHANGES.rst:366 ../../../CHANGES.rst:451 ../../../CHANGES.rst:483 -msgid "Bugfixes" -msgstr "" - -#: ../../../CHANGES.rst:50 +#: ../../../CHANGES.rst:183 msgid "" "Fixed :code:`Message.send_invoice` and :code:`Message.reply_invoice`, " "added missing arguments `#1047 " "`_" msgstr "" -#: ../../../CHANGES.rst:52 +#: ../../../CHANGES.rst:185 msgid "Fixed copy and forward in:" msgstr "" -#: ../../../CHANGES.rst:54 +#: ../../../CHANGES.rst:187 msgid ":code:`Message.answer(...)`" msgstr "" -#: ../../../CHANGES.rst:55 +#: ../../../CHANGES.rst:188 msgid ":code:`Message.copy_to(...)`" msgstr "" -#: ../../../CHANGES.rst:56 +#: ../../../CHANGES.rst:189 msgid "`#1064 `_" msgstr "" -#: ../../../CHANGES.rst:60 ../../../CHANGES.rst:110 ../../../CHANGES.rst:490 -msgid "Improved Documentation" -msgstr "" - -#: ../../../CHANGES.rst:62 +#: ../../../CHANGES.rst:195 msgid "" "Fixed UA translations in index.po `#1017 " "`_" msgstr "" -#: ../../../CHANGES.rst:64 +#: ../../../CHANGES.rst:197 msgid "" "Fix typehints for :code:`Message`, :code:`reply_media_group` and " ":code:`answer_media_group` methods `#1029 " "`_" msgstr "" -#: ../../../CHANGES.rst:66 +#: ../../../CHANGES.rst:199 msgid "" "Removed an old now non-working feature `#1060 " "`_" msgstr "" -#: ../../../CHANGES.rst:73 +#: ../../../CHANGES.rst:206 msgid "" "Enabled testing on Python 3.11 `#1044 " "`_" msgstr "" -#: ../../../CHANGES.rst:75 +#: ../../../CHANGES.rst:208 msgid "" "Added a mandatory dependency :code:`certifi` in due to in some cases on " "systems that doesn't have updated ca-certificates the requests to Bot API" @@ -280,23 +397,23 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:80 +#: ../../../CHANGES.rst:213 msgid "3.0.0b5 (2022-10-02)" msgstr "" -#: ../../../CHANGES.rst:85 +#: ../../../CHANGES.rst:218 msgid "" "Add PyPy support and run tests under PyPy `#985 " "`_" msgstr "" -#: ../../../CHANGES.rst:87 +#: ../../../CHANGES.rst:220 msgid "" "Added message text to aiogram exceptions representation `#988 " "`_" msgstr "" -#: ../../../CHANGES.rst:89 +#: ../../../CHANGES.rst:222 msgid "" "Added warning about using magic filter from `magic_filter` instead of " "`aiogram`'s ones. Is recommended to use `from aiogram import F` instead " @@ -304,65 +421,65 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:92 +#: ../../../CHANGES.rst:225 msgid "" "Added more detailed error when server response can't be deserialized. " "This feature will help to debug unexpected responses from the Server " "`#1014 `_" msgstr "" -#: ../../../CHANGES.rst:99 +#: ../../../CHANGES.rst:232 msgid "" "Reworked error event, introduced " ":class:`aiogram.types.error_event.ErrorEvent` object. `#898 " "`_" msgstr "" -#: ../../../CHANGES.rst:101 +#: ../../../CHANGES.rst:234 msgid "" "Fixed escaping markdown in `aiogram.utils.markdown` module `#903 " "`_" msgstr "" -#: ../../../CHANGES.rst:103 +#: ../../../CHANGES.rst:236 msgid "" "Fixed polling crash when Telegram Bot API raises HTTP 429 status-code. " "`#995 `_" msgstr "" -#: ../../../CHANGES.rst:105 +#: ../../../CHANGES.rst:238 msgid "" "Fixed empty mention in command parsing, now it will be None instead of an" " empty string `#1013 `_" msgstr "" -#: ../../../CHANGES.rst:112 +#: ../../../CHANGES.rst:245 msgid "" "Initialized Docs translation (added Ukrainian language) `#925 " "`_" msgstr "" -#: ../../../CHANGES.rst:117 +#: ../../../CHANGES.rst:250 msgid "Deprecations and Removals" msgstr "" -#: ../../../CHANGES.rst:119 +#: ../../../CHANGES.rst:252 msgid "" "Removed filters factory as described in corresponding issue. `#942 " "`_" msgstr "" -#: ../../../CHANGES.rst:126 +#: ../../../CHANGES.rst:259 msgid "" "Now Router/Dispatcher accepts only keyword arguments. `#982 " "`_" msgstr "" -#: ../../../CHANGES.rst:131 +#: ../../../CHANGES.rst:264 msgid "3.0.0b4 (2022-08-14)" msgstr "" -#: ../../../CHANGES.rst:136 +#: ../../../CHANGES.rst:269 msgid "" "Add class helper ChatAction for constants that Telegram BotAPI uses in " "sendChatAction request. In my opinion, this will help users and will also" @@ -370,198 +487,198 @@ msgid "" "\"ChatActions\". `#803 `_" msgstr "" -#: ../../../CHANGES.rst:140 +#: ../../../CHANGES.rst:273 msgid "Added possibility to combine filters or invert result" msgstr "" -#: ../../../CHANGES.rst:142 +#: ../../../CHANGES.rst:275 msgid "Example:" msgstr "" -#: ../../../CHANGES.rst:150 +#: ../../../CHANGES.rst:283 msgid "`#894 `_" msgstr "" -#: ../../../CHANGES.rst:151 +#: ../../../CHANGES.rst:284 msgid "" "Fixed type hints for redis TTL params. `#922 " "`_" msgstr "" -#: ../../../CHANGES.rst:153 +#: ../../../CHANGES.rst:286 msgid "" "Added `full_name` shortcut for `Chat` object `#929 " "`_" msgstr "" -#: ../../../CHANGES.rst:160 +#: ../../../CHANGES.rst:293 msgid "" "Fixed false-positive coercing of Union types in API methods `#901 " "`_" msgstr "" -#: ../../../CHANGES.rst:162 +#: ../../../CHANGES.rst:295 msgid "Added 3 missing content types:" msgstr "" -#: ../../../CHANGES.rst:164 +#: ../../../CHANGES.rst:297 msgid "proximity_alert_triggered" msgstr "" -#: ../../../CHANGES.rst:165 +#: ../../../CHANGES.rst:298 msgid "supergroup_chat_created" msgstr "" -#: ../../../CHANGES.rst:166 +#: ../../../CHANGES.rst:299 msgid "channel_chat_created" msgstr "" -#: ../../../CHANGES.rst:167 +#: ../../../CHANGES.rst:300 msgid "`#906 `_" msgstr "" -#: ../../../CHANGES.rst:168 +#: ../../../CHANGES.rst:301 msgid "" "Fixed the ability to compare the state, now comparison to copy of the " "state will return `True`. `#927 " "`_" msgstr "" -#: ../../../CHANGES.rst:170 +#: ../../../CHANGES.rst:303 msgid "" "Fixed default lock kwargs in RedisEventIsolation. `#972 " "`_" msgstr "" -#: ../../../CHANGES.rst:177 +#: ../../../CHANGES.rst:310 msgid "" "Restrict including routers with strings `#896 " "`_" msgstr "" -#: ../../../CHANGES.rst:179 +#: ../../../CHANGES.rst:312 msgid "" "Changed CommandPatterType to CommandPatternType in " "`aiogram/dispatcher/filters/command.py` `#907 " "`_" msgstr "" -#: ../../../CHANGES.rst:181 +#: ../../../CHANGES.rst:314 msgid "" "Added full support of `Bot API 6.1 `_ `#936 " "`_" msgstr "" -#: ../../../CHANGES.rst:183 +#: ../../../CHANGES.rst:316 msgid "**Breaking!** More flat project structure" msgstr "" -#: ../../../CHANGES.rst:185 +#: ../../../CHANGES.rst:318 msgid "These packages was moved, imports in your code should be fixed:" msgstr "" -#: ../../../CHANGES.rst:187 +#: ../../../CHANGES.rst:320 msgid ":code:`aiogram.dispatcher.filters` -> :code:`aiogram.filters`" msgstr "" -#: ../../../CHANGES.rst:188 +#: ../../../CHANGES.rst:321 msgid ":code:`aiogram.dispatcher.fsm` -> :code:`aiogram.fsm`" msgstr "" -#: ../../../CHANGES.rst:189 +#: ../../../CHANGES.rst:322 msgid ":code:`aiogram.dispatcher.handler` -> :code:`aiogram.handler`" msgstr "" -#: ../../../CHANGES.rst:190 +#: ../../../CHANGES.rst:323 msgid ":code:`aiogram.dispatcher.webhook` -> :code:`aiogram.webhook`" msgstr "" -#: ../../../CHANGES.rst:191 +#: ../../../CHANGES.rst:324 msgid "" ":code:`aiogram.dispatcher.flags/*` -> :code:`aiogram.dispatcher.flags` " "(single module instead of package)" msgstr "" -#: ../../../CHANGES.rst:192 +#: ../../../CHANGES.rst:325 msgid "`#938 `_" msgstr "" -#: ../../../CHANGES.rst:193 +#: ../../../CHANGES.rst:326 msgid "" "Removed deprecated :code:`router._handler` and " ":code:`router.register__handler` methods. `#941 " "`_" msgstr "" -#: ../../../CHANGES.rst:195 +#: ../../../CHANGES.rst:328 msgid "" "Deprecated filters factory. It will be removed in next Beta (3.0b5) `#942" " `_" msgstr "" -#: ../../../CHANGES.rst:197 +#: ../../../CHANGES.rst:330 msgid "" "`MessageEntity` method `get_text` was removed and `extract` was renamed " "to `extract_from` `#944 `_" msgstr "" -#: ../../../CHANGES.rst:199 +#: ../../../CHANGES.rst:332 msgid "" "Added full support of `Bot API 6.2 `_ `#975 " "`_" msgstr "" -#: ../../../CHANGES.rst:204 +#: ../../../CHANGES.rst:337 msgid "3.0.0b3 (2022-04-19)" msgstr "" -#: ../../../CHANGES.rst:209 +#: ../../../CHANGES.rst:342 msgid "" "Added possibility to get command magic result as handler argument `#889 " "`_" msgstr "" -#: ../../../CHANGES.rst:211 +#: ../../../CHANGES.rst:344 msgid "" "Added full support of `Telegram Bot API 6.0 " "`_ `#890 " "`_" msgstr "" -#: ../../../CHANGES.rst:218 +#: ../../../CHANGES.rst:351 msgid "" "Fixed I18n lazy-proxy. Disabled caching. `#839 " "`_" msgstr "" -#: ../../../CHANGES.rst:220 +#: ../../../CHANGES.rst:353 msgid "" "Added parsing of spoiler message entity `#865 " "`_" msgstr "" -#: ../../../CHANGES.rst:222 +#: ../../../CHANGES.rst:355 msgid "" "Fixed default `parse_mode` for `Message.copy_to()` method. `#876 " "`_" msgstr "" -#: ../../../CHANGES.rst:224 +#: ../../../CHANGES.rst:357 msgid "" "Fixed CallbackData factory parsing IntEnum's `#885 " "`_" msgstr "" -#: ../../../CHANGES.rst:231 +#: ../../../CHANGES.rst:364 msgid "" "Added automated check that pull-request adds a changes description to " "**CHANGES** directory `#873 " "`_" msgstr "" -#: ../../../CHANGES.rst:233 +#: ../../../CHANGES.rst:366 msgid "" "Changed :code:`Message.html_text` and :code:`Message.md_text` attributes " "behaviour when message has no text. The empty string will be used instead" @@ -569,14 +686,14 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:236 +#: ../../../CHANGES.rst:369 msgid "" "Used `redis-py` instead of `aioredis` package in due to this packages was" " merged into single one `#882 " "`_" msgstr "" -#: ../../../CHANGES.rst:238 +#: ../../../CHANGES.rst:371 msgid "" "Solved common naming problem with middlewares that confusing too much " "developers - now you can't see the `middleware` and `middlewares` " @@ -585,113 +702,113 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:245 +#: ../../../CHANGES.rst:378 msgid "3.0.0b2 (2022-02-19)" msgstr "" -#: ../../../CHANGES.rst:250 +#: ../../../CHANGES.rst:383 msgid "" "Added possibility to pass additional arguments into the aiohttp webhook " "handler to use this arguments inside handlers as the same as it possible " "in polling mode. `#785 `_" msgstr "" -#: ../../../CHANGES.rst:253 +#: ../../../CHANGES.rst:386 msgid "" "Added possibility to add handler flags via decorator (like `pytest.mark` " "decorator but `aiogram.flags`) `#836 " "`_" msgstr "" -#: ../../../CHANGES.rst:255 +#: ../../../CHANGES.rst:388 msgid "" "Added :code:`ChatActionSender` utility to automatically sends chat action" " while long process is running." msgstr "" -#: ../../../CHANGES.rst:257 +#: ../../../CHANGES.rst:390 msgid "" "It also can be used as message middleware and can be customized via " ":code:`chat_action` flag. `#837 " "`_" msgstr "" -#: ../../../CHANGES.rst:264 +#: ../../../CHANGES.rst:397 msgid "" "Fixed unexpected behavior of sequences in the StateFilter. `#791 " "`_" msgstr "" -#: ../../../CHANGES.rst:266 +#: ../../../CHANGES.rst:399 msgid "" "Fixed exceptions filters `#827 " "`_" msgstr "" -#: ../../../CHANGES.rst:273 +#: ../../../CHANGES.rst:406 msgid "" "Logger name for processing events is changed to :code:`aiogram.events`. " "`#830 `_" msgstr "" -#: ../../../CHANGES.rst:275 +#: ../../../CHANGES.rst:408 msgid "" "Added full support of Telegram Bot API 5.6 and 5.7 `#835 " "`_" msgstr "" -#: ../../../CHANGES.rst:277 +#: ../../../CHANGES.rst:410 msgid "" "**BREAKING** Events isolation mechanism is moved from FSM storages to " "standalone managers `#838 " "`_" msgstr "" -#: ../../../CHANGES.rst:283 +#: ../../../CHANGES.rst:416 msgid "3.0.0b1 (2021-12-12)" msgstr "" -#: ../../../CHANGES.rst:288 +#: ../../../CHANGES.rst:421 msgid "Added new custom operation for MagicFilter named :code:`as_`" msgstr "" -#: ../../../CHANGES.rst:290 +#: ../../../CHANGES.rst:423 msgid "Now you can use it to get magic filter result as handler argument" msgstr "" -#: ../../../CHANGES.rst:306 +#: ../../../CHANGES.rst:439 msgid "`#759 `_" msgstr "" -#: ../../../CHANGES.rst:312 +#: ../../../CHANGES.rst:445 msgid "" "Fixed: Missing :code:`ChatMemberHandler` import in " ":code:`aiogram/dispatcher/handler` `#751 " "`_" msgstr "" -#: ../../../CHANGES.rst:319 +#: ../../../CHANGES.rst:452 msgid "" "Check :code:`destiny` in case of no :code:`with_destiny` enabled in " "RedisStorage key builder `#776 " "`_" msgstr "" -#: ../../../CHANGES.rst:321 +#: ../../../CHANGES.rst:454 msgid "" "Added full support of `Bot API 5.5 `_ `#777 " "`_" msgstr "" -#: ../../../CHANGES.rst:323 +#: ../../../CHANGES.rst:456 msgid "" "Stop using feature from #336. From now settings of client-session should " "be placed as initializer arguments instead of changing instance " "attributes. `#778 `_" msgstr "" -#: ../../../CHANGES.rst:325 +#: ../../../CHANGES.rst:458 msgid "" "Make TelegramAPIServer files wrapper in local mode bi-directional " "(server-client, client-server) Now you can convert local path to server " @@ -699,11 +816,11 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:331 +#: ../../../CHANGES.rst:464 msgid "3.0.0a18 (2021-11-10)" msgstr "" -#: ../../../CHANGES.rst:336 +#: ../../../CHANGES.rst:469 msgid "" "Breaking: Changed the signature of the session middlewares Breaking: " "Renamed AiohttpSession.make_request method parameter from call to method " @@ -711,258 +828,258 @@ msgid "" "outgoing requests `#716 `_" msgstr "" -#: ../../../CHANGES.rst:340 +#: ../../../CHANGES.rst:473 msgid "" "Improved description of filters resolving error. For example when you try" " to pass wrong type of argument to the filter but don't know why filter " "is not resolved now you can get error like this:" msgstr "" -#: ../../../CHANGES.rst:350 +#: ../../../CHANGES.rst:483 msgid "`#717 `_" msgstr "" -#: ../../../CHANGES.rst:351 +#: ../../../CHANGES.rst:484 msgid "" "**Breaking internal API change** Reworked FSM Storage record keys " "propagation `#723 `_" msgstr "" -#: ../../../CHANGES.rst:354 +#: ../../../CHANGES.rst:487 msgid "" "Implemented new filter named :code:`MagicData(magic_data)` that helps to " "filter event by data from middlewares or other filters" msgstr "" -#: ../../../CHANGES.rst:356 +#: ../../../CHANGES.rst:489 msgid "" "For example your bot is running with argument named :code:`config` that " "contains the application config then you can filter event by value from " "this config:" msgstr "" -#: ../../../CHANGES.rst:362 +#: ../../../CHANGES.rst:495 msgid "`#724 `_" msgstr "" -#: ../../../CHANGES.rst:368 +#: ../../../CHANGES.rst:501 msgid "" "Fixed I18n context inside error handlers `#726 " "`_" msgstr "" -#: ../../../CHANGES.rst:370 +#: ../../../CHANGES.rst:503 msgid "" "Fixed bot session closing before emit shutdown `#734 " "`_" msgstr "" -#: ../../../CHANGES.rst:372 +#: ../../../CHANGES.rst:505 msgid "" "Fixed: bound filter resolving does not require children routers `#736 " "`_" msgstr "" -#: ../../../CHANGES.rst:379 +#: ../../../CHANGES.rst:512 msgid "" "Enabled testing on Python 3.10 Removed `async_lru` dependency (is " "incompatible with Python 3.10) and replaced usage with protected property" " `#719 `_" msgstr "" -#: ../../../CHANGES.rst:382 +#: ../../../CHANGES.rst:515 msgid "" "Converted README.md to README.rst and use it as base file for docs `#725 " "`_" msgstr "" -#: ../../../CHANGES.rst:384 +#: ../../../CHANGES.rst:517 msgid "Rework filters resolving:" msgstr "" -#: ../../../CHANGES.rst:386 +#: ../../../CHANGES.rst:519 msgid "Automatically apply Bound Filters with default values to handlers" msgstr "" -#: ../../../CHANGES.rst:387 +#: ../../../CHANGES.rst:520 msgid "Fix data transfer from parent to included routers filters" msgstr "" -#: ../../../CHANGES.rst:388 +#: ../../../CHANGES.rst:521 msgid "`#727 `_" msgstr "" -#: ../../../CHANGES.rst:389 +#: ../../../CHANGES.rst:522 msgid "" "Added full support of Bot API 5.4 https://core.telegram.org/bots/api-" "changelog#november-5-2021 `#744 " "`_" msgstr "" -#: ../../../CHANGES.rst:395 +#: ../../../CHANGES.rst:528 msgid "3.0.0a17 (2021-09-24)" msgstr "" -#: ../../../CHANGES.rst:400 +#: ../../../CHANGES.rst:533 msgid "" "Added :code:`html_text` and :code:`md_text` to Message object `#708 " "`_" msgstr "" -#: ../../../CHANGES.rst:402 +#: ../../../CHANGES.rst:535 msgid "" "Refactored I18n, added context managers for I18n engine and current " "locale `#709 `_" msgstr "" -#: ../../../CHANGES.rst:407 +#: ../../../CHANGES.rst:540 msgid "3.0.0a16 (2021-09-22)" msgstr "" -#: ../../../CHANGES.rst:412 +#: ../../../CHANGES.rst:545 msgid "Added support of local Bot API server files downloading" msgstr "" -#: ../../../CHANGES.rst:414 +#: ../../../CHANGES.rst:547 msgid "" "When Local API is enabled files can be downloaded via " "`bot.download`/`bot.download_file` methods. `#698 " "`_" msgstr "" -#: ../../../CHANGES.rst:416 +#: ../../../CHANGES.rst:549 msgid "" "Implemented I18n & L10n support `#701 " "`_" msgstr "" -#: ../../../CHANGES.rst:423 +#: ../../../CHANGES.rst:556 msgid "" "Covered by tests and docs KeyboardBuilder util `#699 " "`_" msgstr "" -#: ../../../CHANGES.rst:425 +#: ../../../CHANGES.rst:558 msgid "**Breaking!!!**. Refactored and renamed exceptions." msgstr "" -#: ../../../CHANGES.rst:427 +#: ../../../CHANGES.rst:560 msgid "" "Exceptions module was moved from :code:`aiogram.utils.exceptions` to " ":code:`aiogram.exceptions`" msgstr "" -#: ../../../CHANGES.rst:428 +#: ../../../CHANGES.rst:561 msgid "Added prefix `Telegram` for all error classes" msgstr "" -#: ../../../CHANGES.rst:429 +#: ../../../CHANGES.rst:562 msgid "`#700 `_" msgstr "" -#: ../../../CHANGES.rst:430 +#: ../../../CHANGES.rst:563 msgid "" "Replaced all :code:`pragma: no cover` marks via global " ":code:`.coveragerc` config `#702 " "`_" msgstr "" -#: ../../../CHANGES.rst:432 +#: ../../../CHANGES.rst:565 msgid "Updated dependencies." msgstr "" -#: ../../../CHANGES.rst:434 +#: ../../../CHANGES.rst:567 msgid "" "**Breaking for framework developers** Now all optional dependencies " "should be installed as extra: `poetry install -E fast -E redis -E proxy " "-E i18n -E docs` `#703 `_" msgstr "" -#: ../../../CHANGES.rst:440 +#: ../../../CHANGES.rst:573 msgid "3.0.0a15 (2021-09-10)" msgstr "" -#: ../../../CHANGES.rst:445 +#: ../../../CHANGES.rst:578 msgid "" "Ability to iterate over all states in StatesGroup. Aiogram already had in" " check for states group so this is relative feature. `#666 " "`_" msgstr "" -#: ../../../CHANGES.rst:453 +#: ../../../CHANGES.rst:586 msgid "" "Fixed incorrect type checking in the " ":class:`aiogram.utils.keyboard.KeyboardBuilder` `#674 " "`_" msgstr "" -#: ../../../CHANGES.rst:460 +#: ../../../CHANGES.rst:593 msgid "" "Disable ContentType filter by default `#668 " "`_" msgstr "" -#: ../../../CHANGES.rst:462 +#: ../../../CHANGES.rst:595 msgid "" "Moved update type detection from Dispatcher to Update object `#669 " "`_" msgstr "" -#: ../../../CHANGES.rst:464 +#: ../../../CHANGES.rst:597 msgid "" "Updated **pre-commit** config `#681 " "`_" msgstr "" -#: ../../../CHANGES.rst:466 +#: ../../../CHANGES.rst:599 msgid "" "Reworked **handlers_in_use** util. Function moved to Router as method " "**.resolve_used_update_types()** `#682 " "`_" msgstr "" -#: ../../../CHANGES.rst:471 +#: ../../../CHANGES.rst:604 msgid "3.0.0a14 (2021-08-17)" msgstr "" -#: ../../../CHANGES.rst:476 +#: ../../../CHANGES.rst:609 msgid "" "add aliases for edit/delete reply markup to Message `#662 " "`_" msgstr "" -#: ../../../CHANGES.rst:478 +#: ../../../CHANGES.rst:611 msgid "" "Reworked outer middleware chain. Prevent to call many times the outer " "middleware for each nested router `#664 " "`_" msgstr "" -#: ../../../CHANGES.rst:485 +#: ../../../CHANGES.rst:618 msgid "" "Prepare parse mode for InputMessageContent in AnswerInlineQuery method " "`#660 `_" msgstr "" -#: ../../../CHANGES.rst:492 +#: ../../../CHANGES.rst:625 msgid "" "Added integration with :code:`towncrier` `#602 " "`_" msgstr "" -#: ../../../CHANGES.rst:499 +#: ../../../CHANGES.rst:632 msgid "" "Added `.editorconfig` `#650 " "`_" msgstr "" -#: ../../../CHANGES.rst:501 +#: ../../../CHANGES.rst:634 msgid "" "Redis storage speedup globals `#651 " "`_" msgstr "" -#: ../../../CHANGES.rst:503 +#: ../../../CHANGES.rst:636 msgid "" "add allow_sending_without_reply param to Message reply aliases `#663 " "`_" @@ -2480,3 +2597,24 @@ msgstr "" #: ../../../HISTORY.rst:497 msgid "0.1 (2017-06-03)" msgstr "" + +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2023-01-07)" +#~ msgstr "" + +#~ msgid "" +#~ ":class:`aiogram.enums.chat_action.ChatActions`, " +#~ ":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " +#~ ":class:`aiogram.enums.chat_type.ChatType`, " +#~ ":class:`aiogram.enums.content_type.ContentType`, " +#~ ":class:`aiogram.enums.dice_emoji.DiceEmoji`, " +#~ ":class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`," +#~ " :class:`aiogram.enums.input_media_type.InputMediaType`, " +#~ ":class:`aiogram.enums.mask_position_point.MaskPositionPoint`, " +#~ ":class:`aiogram.enums.menu_button_type.MenuButtonType`, " +#~ ":class:`aiogram.enums.message_entity_type.MessageEntityType`, " +#~ ":class:`aiogram.enums.parse_mode.ParseMode`, " +#~ ":class:`aiogram.enums.poll_type.PollType`, " +#~ ":class:`aiogram.enums.sticker_type.StickerType`, " +#~ ":class:`aiogram.enums.topic_icon_color.TopicIconColor`, " +#~ ":class:`aiogram.enums.update_type.UpdateType`," +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/contributing.po b/docs/locale/en/LC_MESSAGES/contributing.po new file mode 100644 index 00000000..2a7fe459 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/contributing.po @@ -0,0 +1,322 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../contributing.rst:3 +msgid "Contributing" +msgstr "" + +#: ../../contributing.rst:5 +msgid "You're welcome to contribute to aiogram!" +msgstr "" + +#: ../../contributing.rst:7 +msgid "" +"*aiogram* is an open-source project, and anyone can contribute to it in " +"any possible way" +msgstr "" + +#: ../../contributing.rst:11 +msgid "Developing" +msgstr "" + +#: ../../contributing.rst:13 +msgid "" +"Before making any changes in the framework code, it is necessary to fork " +"the project and clone the project to your PC and know how to do a pull-" +"request." +msgstr "" + +#: ../../contributing.rst:16 +msgid "" +"How to work with pull-request you can read in the `GitHub docs " +"`_" +msgstr "" + +#: ../../contributing.rst:18 +msgid "" +"Also in due to this project is written in Python, you will need Python to" +" be installed (is recommended to use latest Python versions, but any " +"version starting from 3.8 can be used)" +msgstr "" + +#: ../../contributing.rst:23 +msgid "Use virtualenv" +msgstr "" + +#: ../../contributing.rst:25 +msgid "" +"You can create a virtual environment in a directory using :code:`venv` " +"module (it should be pre-installed by default):" +msgstr "" + +#: ../../contributing.rst:31 +msgid "" +"This action will create a :code:`.venv` directory with the Python " +"binaries and then you will be able to install packages into that isolated" +" environment." +msgstr "" + +#: ../../contributing.rst:36 +msgid "Activate the environment" +msgstr "" + +#: ../../contributing.rst:38 +msgid "Linux/ macOS:" +msgstr "" + +#: ../../contributing.rst:44 +msgid "Windows PoweShell" +msgstr "" + +#: ../../contributing.rst:50 +msgid "" +"To check it worked, use described command, it should show the :code:`pip`" +" location inside the isolated environment" +msgstr "" + +#: ../../contributing.rst:53 +msgid "Linux, macOS:" +msgstr "" + +#: ../../contributing.rst:59 +msgid "Windows PowerShell" +msgstr "" + +#: ../../contributing.rst:65 +msgid "" +"Also make you shure you have the latest pip version in your virtual " +"environment to avoid errors on next steps:" +msgstr "" + +#: ../../contributing.rst:74 +msgid "Setup project" +msgstr "" + +#: ../../contributing.rst:76 +msgid "" +"After activating the environment install `aiogram` from sources and their" +" dependencies:" +msgstr "" + +#: ../../contributing.rst:82 +msgid "" +"It will install :code:`aiogram` in editable mode into your virtual " +"environment and all dependencies." +msgstr "" + +#: ../../contributing.rst:85 +msgid "Making changes in code" +msgstr "" + +#: ../../contributing.rst:87 +msgid "" +"At this point you can make any changes in the code that you want, it can " +"be any fixes, implementing new features or experimenting." +msgstr "" + +#: ../../contributing.rst:92 +msgid "Format the code (code-style)" +msgstr "" + +#: ../../contributing.rst:94 +msgid "" +"Note that this project is Black-formatted, so you should follow that " +"code-style, too be sure You're correctly doing this let's reformat the " +"code automatically:" +msgstr "" + +#: ../../contributing.rst:104 +msgid "Run tests" +msgstr "" + +#: ../../contributing.rst:106 +msgid "All changes should be tested:" +msgstr "" + +#: ../../contributing.rst:112 +msgid "" +"Also if you are doing something with Redis-storage, you will need to test" +" everything works with Redis:" +msgstr "" + +#: ../../contributing.rst:119 +msgid "Docs" +msgstr "" + +#: ../../contributing.rst:121 +msgid "" +"We are using `Sphinx` to render docs in different languages, all sources " +"located in `docs` directory, you can change the sources and to test it " +"you can start live-preview server and look what you are doing:" +msgstr "" + +#: ../../contributing.rst:130 +msgid "Docs translations" +msgstr "" + +#: ../../contributing.rst:132 +msgid "" +"Translation of the documentation is very necessary and cannot be done " +"without the help of the community from all over the world, so you are " +"welcome to translate the documentation into different languages." +msgstr "" + +#: ../../contributing.rst:136 +msgid "Before start, let's up to date all texts:" +msgstr "" + +#: ../../contributing.rst:144 +msgid "" +"Change the :code:`` in example below to the target " +"language code, after that you can modify texts inside " +":code:`docs/locale//LC_MESSAGES` as :code:`*.po` files by " +"using any text-editor or specialized utilites for GNU Gettext, for " +"example via `poedit `_." +msgstr "" + +#: ../../contributing.rst:149 +msgid "To view results:" +msgstr "" + +#: ../../contributing.rst:157 +msgid "Describe changes" +msgstr "" + +#: ../../contributing.rst:159 +msgid "" +"Describe your changes in one or more sentences so that bot developers " +"know what's changed in their favorite framework - create " +"`..rst` file and write the description." +msgstr "" + +#: ../../contributing.rst:162 +msgid "" +":code:`` is Issue or Pull-request number, after release link to " +"this issue will be published to the *Changelog* page." +msgstr "" + +#: ../../contributing.rst:165 +msgid ":code:`` is a changes category marker, it can be one of:" +msgstr "" + +#: ../../contributing.rst:167 +msgid ":code:`feature` - when you are implementing new feature" +msgstr "" + +#: ../../contributing.rst:168 +msgid ":code:`bugfix` - when you fix a bug" +msgstr "" + +#: ../../contributing.rst:169 +msgid ":code:`doc` - when you improve the docs" +msgstr "" + +#: ../../contributing.rst:170 +msgid ":code:`removal` - when you remove something from the framework" +msgstr "" + +#: ../../contributing.rst:171 +msgid "" +":code:`misc` - when changed something inside the Core or project " +"configuration" +msgstr "" + +#: ../../contributing.rst:173 +msgid "" +"If you have troubles with changing category feel free to ask Core-" +"contributors to help with choosing it." +msgstr "" + +#: ../../contributing.rst:176 +msgid "Complete" +msgstr "" + +#: ../../contributing.rst:178 +msgid "" +"After you have made all your changes, publish them to the repository and " +"create a pull request as mentioned at the beginning of the article and " +"wait for a review of these changes." +msgstr "" + +#: ../../contributing.rst:183 +msgid "Star on GitHub" +msgstr "" + +#: ../../contributing.rst:185 +msgid "" +"You can \"star\" repository on GitHub - " +"https://github.com/aiogram/aiogram (click the star button at the top " +"right)" +msgstr "" + +#: ../../contributing.rst:187 +msgid "" +"Adding stars makes it easier for other people to find this project and " +"understand how useful it is." +msgstr "" + +#: ../../contributing.rst:190 +msgid "Guides" +msgstr "" + +#: ../../contributing.rst:192 +msgid "" +"You can write guides how to develop Bots on top of aiogram and publish it" +" into YouTube, Medium, GitHub Books, any Courses platform or any other " +"platform that you know." +msgstr "" + +#: ../../contributing.rst:195 +msgid "" +"This will help more people learn about the framework and learn how to use" +" it" +msgstr "" + +#: ../../contributing.rst:199 +msgid "Take answers" +msgstr "" + +#: ../../contributing.rst:201 +msgid "" +"The developers is always asks for any question in our chats or any other " +"platforms like GitHub Discussions, StackOverflow and others, feel free to" +" answer to this questions." +msgstr "" + +#: ../../contributing.rst:205 +msgid "Funding" +msgstr "" + +#: ../../contributing.rst:207 +msgid "" +"The development of the project is free and not financed by commercial " +"organizations, it is my personal initiative (`@JRootJunior " +"`_) and I am engaged in the development of the " +"project in my free time." +msgstr "" + +#: ../../contributing.rst:211 +msgid "" +"So, if you want to financially support the project, or, for example, give" +" me a pizza or a beer, you can do it on `OpenCollective " +"`_ or `Patreon " +"`_." +msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/dispatcher/dispatcher.po b/docs/locale/en/LC_MESSAGES/dispatcher/dispatcher.po index 21372b3e..d21aea70 100644 --- a/docs/locale/en/LC_MESSAGES/dispatcher/dispatcher.po +++ b/docs/locale/en/LC_MESSAGES/dispatcher/dispatcher.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../dispatcher/dispatcher.rst:3 msgid "Dispatcher" @@ -92,23 +92,43 @@ msgstr "" msgid "Run many bots with polling" msgstr "" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 of -msgid "Bot instances" +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:3 of +msgid "Bot instances (one or mre)" msgstr "" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 of -msgid "Poling timeout" +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:4 of +msgid "Long-polling wait time" msgstr "" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 of +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:5 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:5 of msgid "Run task for each event and no wait result" msgstr "" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 of +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:6 of +msgid "backoff-retry config" +msgstr "" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:7 of msgid "List of the update types you want your bot to receive" msgstr "" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 of +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:8 of +msgid "handle signals (SIGINT/SIGTERM)" +msgstr "" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:9 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:9 of +msgid "close bot sessions on shutdown" +msgstr "" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:10 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:10 of msgid "contextual data" msgstr "" @@ -142,3 +162,9 @@ msgid "" "All updates can be propagated to the dispatcher by " ":obj:`Dispatcher.feed_update(bot=..., update=...)` method:" msgstr "" + +#~ msgid "Bot instances" +#~ msgstr "" + +#~ msgid "Poling timeout" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/index.po b/docs/locale/en/LC_MESSAGES/index.po index 5ac82a19..beb8f6d9 100644 --- a/docs/locale/en/LC_MESSAGES/index.po +++ b/docs/locale/en/LC_MESSAGES/index.po @@ -8,20 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-30 22:28+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../../README.rst:3 msgid "aiogram |beta badge|" msgstr "" -#: ../../../README.rst:98 +#: ../../../README.rst:94 msgid "Beta badge" msgstr "" @@ -33,6 +33,18 @@ msgstr "" msgid "MIT License" msgstr "" +#: ../../../README.rst:-1 +msgid "PyPi status" +msgstr "" + +#: ../../../README.rst:-1 +msgid "PyPi Package Version" +msgstr "" + +#: ../../../README.rst:-1 +msgid "Downloads" +msgstr "" + #: ../../../README.rst:-1 msgid "Supported python versions" msgstr "" @@ -45,27 +57,11 @@ msgstr "" msgid "Tests" msgstr "" -#: ../../../README.rst:-1 -msgid "PyPi Package Version" -msgstr "" - -#: ../../../README.rst:-1 -msgid "PyPi status" -msgstr "" - -#: ../../../README.rst:-1 -msgid "Downloads" -msgstr "" - -#: ../../../README.rst:-1 -msgid "[Telegram] aiogram live" -msgstr "" - #: ../../../README.rst:-1 msgid "Codecov" msgstr "" -#: ../../../README.rst:44 +#: ../../../README.rst:40 msgid "" "**aiogram** is a modern and fully asynchronous framework for `Telegram " "Bot API `_ written in Python 3.8 " @@ -73,136 +69,136 @@ msgid "" "`aiohttp `_." msgstr "" -#: ../../../README.rst:49 +#: ../../../README.rst:45 msgid "Make your bots faster and more powerful!" msgstr "" -#: ../../../README.rst:54 +#: ../../../README.rst:50 msgid "Documentation:" msgstr "" -#: ../../../README.rst:52 +#: ../../../README.rst:48 msgid "🇺🇸 `English `_" msgstr "" -#: ../../../README.rst:53 +#: ../../../README.rst:49 msgid "🇺🇦 `Ukrainian `_" msgstr "" -#: ../../../README.rst:58 +#: ../../../README.rst:54 msgid "**Breaking News:**" msgstr "" -#: ../../../README.rst:60 +#: ../../../README.rst:56 msgid "*aiogram* 3.0 has breaking changes." msgstr "" -#: ../../../README.rst:62 +#: ../../../README.rst:58 msgid "It breaks backward compatibility by introducing new breaking changes!" msgstr "" -#: ../../../README.rst:65 +#: ../../../README.rst:61 msgid "Features" msgstr "" -#: ../../../README.rst:67 +#: ../../../README.rst:63 msgid "" "Asynchronous (`asyncio docs " "`_, :pep:`492`)" msgstr "" -#: ../../../README.rst:68 +#: ../../../README.rst:64 msgid "" "Has type hints (:pep:`484`) and can be used with `mypy `_" msgstr "" -#: ../../../README.rst:69 +#: ../../../README.rst:65 msgid "Supports `PyPy `_" msgstr "" -#: ../../../README.rst:70 +#: ../../../README.rst:66 msgid "" -"Supports `Telegram Bot API 6.4 `_ and" +"Supports `Telegram Bot API 6.6 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" -#: ../../../README.rst:71 +#: ../../../README.rst:67 msgid "" "Telegram Bot API integration code was `autogenerated " "`_ and can be easily re-generated " "when API gets updated" msgstr "" -#: ../../../README.rst:72 +#: ../../../README.rst:68 msgid "Updates router (Blueprints)" msgstr "" -#: ../../../README.rst:73 +#: ../../../README.rst:69 msgid "Has Finite State Machine" msgstr "" -#: ../../../README.rst:74 +#: ../../../README.rst:70 msgid "" "Uses powerful `magic filters " "`" msgstr "" -#: ../../../README.rst:75 +#: ../../../README.rst:71 msgid "Middlewares (incoming updates and API calls)" msgstr "" -#: ../../../README.rst:76 +#: ../../../README.rst:72 msgid "" "Provides `Replies into Webhook `_" msgstr "" -#: ../../../README.rst:77 +#: ../../../README.rst:73 msgid "Integrated I18n/L10n support with GNU Gettext (or Fluent)" msgstr "" -#: ../../../README.rst:82 +#: ../../../README.rst:78 msgid "" "It is strongly advised that you have prior experience working with " "`asyncio `_ before " "beginning to use **aiogram**." msgstr "" -#: ../../../README.rst:86 +#: ../../../README.rst:82 msgid "If you have any questions, you can visit our community chats on Telegram:" msgstr "" -#: ../../../README.rst:88 +#: ../../../README.rst:84 msgid "🇺🇸 `@aiogram `_" msgstr "" -#: ../../../README.rst:89 +#: ../../../README.rst:85 msgid "🇺🇦 `@aiogramua `_" msgstr "" -#: ../../../README.rst:90 +#: ../../../README.rst:86 msgid "🇺🇿 `@aiogram_uz `_" msgstr "" -#: ../../../README.rst:91 +#: ../../../README.rst:87 msgid "🇰🇿 `@aiogram_kz `_" msgstr "" -#: ../../../README.rst:92 +#: ../../../README.rst:88 msgid "🇷🇺 `@aiogram_ru `_" msgstr "" -#: ../../../README.rst:93 +#: ../../../README.rst:89 msgid "🇮🇷 `@aiogram_fa `_" msgstr "" -#: ../../../README.rst:94 +#: ../../../README.rst:90 msgid "🇮🇹 `@aiogram_it `_" msgstr "" -#: ../../../README.rst:95 +#: ../../../README.rst:91 msgid "🇧🇷 `@aiogram_br `_" msgstr "" @@ -223,3 +219,13 @@ msgstr "" #~ " updates to the latest versions of" #~ " the Bot API" #~ msgstr "" + +#~ msgid "[Telegram] aiogram live" +#~ msgstr "" + +#~ msgid "" +#~ "Supports `Telegram Bot API 6.4 " +#~ "`_ and gets fast" +#~ " updates to the latest versions of" +#~ " the Bot API" +#~ msgstr "" diff --git a/docs/locale/en/LC_MESSAGES/utils/callback_answer.po b/docs/locale/en/LC_MESSAGES/utils/callback_answer.po new file mode 100644 index 00000000..daa3c973 --- /dev/null +++ b/docs/locale/en/LC_MESSAGES/utils/callback_answer.po @@ -0,0 +1,204 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../utils/callback_answer.rst:4 +msgid "Callback answer" +msgstr "" + +#: ../../utils/callback_answer.rst:6 +msgid "" +"Helper for callback query handlers, can be useful in bots with a lot of " +"callback handlers to automatically take answer to all requests." +msgstr "" + +#: ../../utils/callback_answer.rst:10 +msgid "Simple usage" +msgstr "" + +#: ../../utils/callback_answer.rst:12 +msgid "" +"For use, it is enough to register the inner middleware " +":class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` in " +"dispatcher or specific router:" +msgstr "" + +#: ../../utils/callback_answer.rst:18 +msgid "" +"After that all handled callback queries will be answered automatically " +"after processing the handler." +msgstr "" + +#: ../../utils/callback_answer.rst:21 +msgid "Advanced usage" +msgstr "" + +#: ../../utils/callback_answer.rst:23 +msgid "" +"In some cases you need to have some non-standard response parameters, " +"this can be done in several ways:" +msgstr "" + +#: ../../utils/callback_answer.rst:26 +msgid "Global defaults" +msgstr "" + +#: ../../utils/callback_answer.rst:28 +msgid "" +"Change default parameters while initializing middleware, for example " +"change answer to `pre` mode and text \"OK\":" +msgstr "" + +#: ../../utils/callback_answer.rst:35 +msgid "" +"Look at :class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` " +"to get all available parameters" +msgstr "" + +#: ../../utils/callback_answer.rst:39 +msgid "Handler specific" +msgstr "" + +#: ../../utils/callback_answer.rst:41 +msgid "" +"By using :ref:`flags ` you can change the behavior for specific " +"handler" +msgstr "" + +#: ../../utils/callback_answer.rst:50 +msgid "" +"Flag arguments is the same as in " +":class:`aiogram.utils.callback_answer.CallbackAnswerMiddleware` with " +"additional one :code:`disabled` to disable answer." +msgstr "" + +#: ../../utils/callback_answer.rst:54 +msgid "A special case" +msgstr "" + +#: ../../utils/callback_answer.rst:56 +msgid "" +"It is not always correct to answer the same in every case, so there is an" +" option to change the answer inside the handler. You can get an instance " +"of :class:`aiogram.utils.callback_answer.CallbackAnswer` object inside " +"handler and change whatever you want." +msgstr "" + +#: ../../utils/callback_answer.rst:61 +msgid "" +"Note that is impossible to change callback answer attributes when you use" +" :code:`pre=True` mode." +msgstr "" + +#: ../../utils/callback_answer.rst:76 +msgid "Combine that all at once" +msgstr "" + +#: ../../utils/callback_answer.rst:78 +msgid "" +"For example you want to answer in most of cases before handler with text " +"\"🤔\" but at some cases need to answer after the handler with custom " +"text, so you can do it:" +msgstr "" + +#: ../../utils/callback_answer.rst:94 +msgid "Description of objects" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware:1 of +msgid "Bases: :py:class:`~aiogram.dispatcher.middlewares.base.BaseMiddleware`" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:1 of +msgid "" +"Inner middleware for callback query handlers, can be useful in bots with " +"a lot of callback handlers to automatically take answer to all requests" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__ +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__ of +msgid "Parameters" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:4 of +msgid "send answer before execute handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:5 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:5 of +msgid "answer with text" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:6 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:6 of +msgid "show alert" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:7 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:7 of +msgid "game url" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:8 +#: aiogram.utils.callback_answer.CallbackAnswerMiddleware.__init__:8 of +msgid "cache answer for some time" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer:1 of +msgid "Bases: :py:class:`object`" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:1 of +msgid "Callback answer configuration" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:3 of +msgid "this request is already answered by middleware" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.__init__:4 of +msgid "answer will not be performed" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.disable:1 of +msgid "Deactivate answering for this handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.disabled:1 of +msgid "Indicates that automatic answer is disabled in this handler" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.answered:1 of +msgid "Indicates that request is already answered by middleware" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.text:1 of +msgid "Response text :return:" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.show_alert:1 of +msgid "Whether to display an alert" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.url:1 of +msgid "Game url" +msgstr "" + +#: aiogram.utils.callback_answer.CallbackAnswer.cache_time:1 of +msgid "Response cache time" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po index 0baa2869..6b275e0f 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/inline_query_result_type.po @@ -8,23 +8,27 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/enums/inline_query_result_type.rst:3 msgid "InlineQueryResultType" msgstr "" #: aiogram.enums.inline_query_result_type.InlineQueryResultType:1 of -msgid "The part of the face relative to which the mask should be placed." -msgstr "Частина обличчя, щодо якої слід розмістити маску." +msgid "Type of inline query result" +msgstr "" #: aiogram.enums.inline_query_result_type.InlineQueryResultType:3 of -msgid "Source: https://core.telegram.org/bots/api#maskposition" +#, fuzzy +msgid "Source: https://core.telegram.org/bots/api#inlinequeryresult" msgstr "Джерело: https://core.telegram.org/bots/api#maskposition" + +#~ msgid "The part of the face relative to which the mask should be placed." +#~ msgstr "Частина обличчя, щодо якої слід розмістити маску." diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_format.po b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_format.po new file mode 100644 index 00000000..57a8b198 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/enums/sticker_format.po @@ -0,0 +1,30 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/enums/sticker_format.rst:3 +msgid "StickerFormat" +msgstr "" + +#: aiogram.enums.sticker_format.StickerFormat:1 of +msgid "Format of the sticker" +msgstr "" + +#: aiogram.enums.sticker_format.StickerFormat:3 of +msgid "Source: https://core.telegram.org/bots/api#createnewstickerset" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po index f3b81bcd..483b44cd 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/add_sticker_to_set.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/add_sticker_to_set.rst:3 msgid "addStickerToSet" @@ -27,12 +27,11 @@ msgstr "" #: aiogram.methods.add_sticker_to_set.AddStickerToSet:1 of msgid "" -"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." +"Use this method to add a new sticker to a set created by the bot. The " +"format of the added sticker must match the format of the other stickers " +"in the set. Emoji sticker sets can have up to 200 stickers. Animated and " +"video sticker sets can have up to 50 stickers. Static sticker sets can " +"have up to 120 stickers. Returns :code:`True` on success." msgstr "" #: aiogram.methods.add_sticker_to_set.AddStickerToSet:3 of @@ -48,49 +47,12 @@ msgstr "" msgid "Sticker set name" msgstr "" -#: ../../docstring aiogram.methods.add_sticker_to_set.AddStickerToSet.emojis:1 +#: ../../docstring aiogram.methods.add_sticker_to_set.AddStickerToSet.sticker:1 #: of -msgid "One or more emoji corresponding to the sticker" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.png_sticker:1 of msgid "" -"**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 » `" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.tgs_sticker:1 of -msgid "" -"**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" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.webm_sticker:1 of -msgid "" -"**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" -msgstr "" - -#: ../../docstring -#: aiogram.methods.add_sticker_to_set.AddStickerToSet.mask_position:1 of -msgid "" -"A JSON-serialized object for position where the mask should be placed on " -"faces" +"A JSON-serialized object with information about the added sticker. If " +"exactly the same sticker had already been added to the set, then the set " +"isn't changed." msgstr "" #: ../../api/methods/add_sticker_to_set.rst:14 @@ -124,3 +86,64 @@ msgstr "" #: ../../api/methods/add_sticker_to_set.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "One or more emoji corresponding to the sticker" +#~ msgstr "" + +#~ msgid "" +#~ "**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 " +#~ "» `" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for position" +#~ " where the mask should be placed " +#~ "on faces" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po index 1d3789be..045ca8f0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/create_new_sticker_set.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/create_new_sticker_set.rst:3 msgid "createNewStickerSet" @@ -28,9 +28,8 @@ msgstr "" #: aiogram.methods.create_new_sticker_set.CreateNewStickerSet:1 of msgid "" "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." +" be able to edit the sticker set thus created. Returns :code:`True` on " +"success." msgstr "" #: aiogram.methods.create_new_sticker_set.CreateNewStickerSet:3 of @@ -58,57 +57,35 @@ msgid "Sticker set title, 1-64 characters" msgstr "" #: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.emojis:1 of -msgid "One or more emoji corresponding to the sticker" +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.stickers:1 of +msgid "" +"A JSON-serialized list of 1-50 initial stickers to be added to the " +"sticker set" msgstr "" #: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.png_sticker:1 of +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_format:1 +#: of msgid "" -"**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 » `" -msgstr "" - -#: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.tgs_sticker:1 of -msgid "" -"**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" -msgstr "" - -#: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.webm_sticker:1 of -msgid "" -"**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" +"Format of stickers in the set, must be one of 'static', 'animated', " +"'video'" msgstr "" #: ../../docstring #: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.sticker_type:1 of msgid "" -"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." +"Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. " +"By default, a regular sticker set is created." msgstr "" #: ../../docstring -#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.mask_position:1 +#: aiogram.methods.create_new_sticker_set.CreateNewStickerSet.needs_repainting:1 #: of msgid "" -"A JSON-serialized object for position where the mask should be placed on " -"faces" +"Pass :code:`True` if stickers in the sticker set must be repainted to the" +" color of text when used in messages, the accent color if used as emoji " +"status, white on chat photos, or another appropriate color based on " +"context; for custom emoji sticker sets only" msgstr "" #: ../../api/methods/create_new_sticker_set.rst:14 @@ -144,3 +121,70 @@ msgstr "" #: ../../api/methods/create_new_sticker_set.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "One or more emoji corresponding to the sticker" +#~ msgstr "" + +#~ msgid "" +#~ "**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 " +#~ "» `" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "**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" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "A JSON-serialized object for position" +#~ " where the mask should be placed " +#~ "on faces" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_set.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_set.po new file mode 100644 index 00000000..b0d56a23 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/delete_sticker_set.po @@ -0,0 +1,73 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/delete_sticker_set.rst:3 +msgid "deleteStickerSet" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.delete_sticker_set.DeleteStickerSet:1 of +msgid "" +"Use this method to delete a sticker set that was created by the bot. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.delete_sticker_set.DeleteStickerSet:3 of +msgid "Source: https://core.telegram.org/bots/api#deletestickerset" +msgstr "" + +#: ../../docstring aiogram.methods.delete_sticker_set.DeleteStickerSet.name:1 +#: of +msgid "Sticker set name" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:29 +msgid ":code:`from aiogram.methods.delete_sticker_set import DeleteStickerSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:30 +msgid "alias: :code:`from aiogram.methods import DeleteStickerSet`" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/delete_sticker_set.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_description.po new file mode 100644 index 00000000..b7ae81ab --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_description.po @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/get_my_description.rst:3 +msgid "getMyDescription" +msgstr "" + +#: ../../api/methods/get_my_description.rst:5 +msgid "Returns: :obj:`BotDescription`" +msgstr "" + +#: aiogram.methods.get_my_description.GetMyDescription:1 of +msgid "" +"Use this method to get the current bot description for the given user " +"language. Returns :class:`aiogram.types.bot_description.BotDescription` " +"on success." +msgstr "" + +#: aiogram.methods.get_my_description.GetMyDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#getmydescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_description.GetMyDescription.language_code:1 of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_description.rst:29 +msgid ":code:`from aiogram.methods.get_my_description import GetMyDescription`" +msgstr "" + +#: ../../api/methods/get_my_description.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyDescription`" +msgstr "" + +#: ../../api/methods/get_my_description.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_short_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_short_description.po new file mode 100644 index 00000000..0d4e2e77 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/get_my_short_description.po @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/get_my_short_description.rst:3 +msgid "getMyShortDescription" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:5 +msgid "Returns: :obj:`BotShortDescription`" +msgstr "" + +#: aiogram.methods.get_my_short_description.GetMyShortDescription:1 of +msgid "" +"Use this method to get the current bot short description for the given " +"user language. Returns " +":class:`aiogram.types.bot_short_description.BotShortDescription` on " +"success." +msgstr "" + +#: aiogram.methods.get_my_short_description.GetMyShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#getmyshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.get_my_short_description.GetMyShortDescription.language_code:1 +#: of +msgid "A two-letter ISO 639-1 language code or an empty string" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:29 +msgid "" +":code:`from aiogram.methods.get_my_short_description import " +"GetMyShortDescription`" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:30 +msgid "alias: :code:`from aiogram.methods import GetMyShortDescription`" +msgstr "" + +#: ../../api/methods/get_my_short_description.rst:33 +msgid "With specific bot" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po index b1e8bcb0..24650fbd 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/send_sticker.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/send_sticker.rst:3 msgid "sendSticker" @@ -48,9 +48,10 @@ msgstr "" msgid "" "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 » `" +"Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP " +"or .TGS sticker using multipart/form-data. :ref:`More information on " +"Sending Files » `. Video stickers can only be sent by a " +"file_id. Animated stickers can't be sent via an HTTP URL." msgstr "" #: ../../docstring aiogram.methods.send_sticker.SendSticker.message_thread_id:1 @@ -60,6 +61,10 @@ msgid "" " forum supergroups only" msgstr "" +#: ../../docstring aiogram.methods.send_sticker.SendSticker.emoji:1 of +msgid "Emoji associated with the sticker; only for just uploaded stickers" +msgstr "" + #: ../../docstring #: aiogram.methods.send_sticker.SendSticker.disable_notification:1 of msgid "" @@ -147,3 +152,15 @@ msgstr "" #~ "to remove reply keyboard or to " #~ "force a reply from the user." #~ msgstr "" + +#~ msgid "" +#~ "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 » `" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po new file mode 100644 index 00000000..afadc9a2 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_custom_emoji_sticker_set_thumbnail.po @@ -0,0 +1,90 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:3 +msgid "setCustomEmojiStickerSetThumbnail" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail:1 +#: of +msgid "" +"Use this method to set the thumbnail of a custom emoji sticker set. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail:3 +#: of +msgid "" +"Source: " +"https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail.name:1 +#: of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_custom_emoji_sticker_set_thumbnail.SetCustomEmojiStickerSetThumbnail.custom_emoji_id:1 +#: of +msgid "" +"Custom emoji identifier of a sticker from the sticker set; pass an empty " +"string to drop the thumbnail and use the first sticker as the thumbnail." +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:29 +msgid "" +":code:`from aiogram.methods.set_custom_emoji_sticker_set_thumbnail import" +" SetCustomEmojiStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:30 +msgid "" +"alias: :code:`from aiogram.methods import " +"SetCustomEmojiStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_custom_emoji_sticker_set_thumbnail.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po index 93f19f31..87382f51 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_default_administrator_rights.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/set_my_default_administrator_rights.rst:3 msgid "setMyDefaultAdministratorRights" @@ -30,8 +30,8 @@ msgstr "" msgid "" "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." +"rights will be suggested to users, but they are free to modify the list " +"before adding the bot. Returns :code:`True` on success." msgstr "" #: aiogram.methods.set_my_default_administrator_rights.SetMyDefaultAdministratorRights:3 @@ -89,3 +89,14 @@ msgstr "" #: ../../api/methods/set_my_default_administrator_rights.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_description.po new file mode 100644 index 00000000..b266de07 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_description.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_my_description.rst:3 +msgid "setMyDescription" +msgstr "" + +#: ../../api/methods/set_my_description.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_description.SetMyDescription:1 of +msgid "" +"Use this method to change the bot's description, which is shown in the " +"chat with the bot if the chat is empty. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_my_description.SetMyDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#setmydescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_description.SetMyDescription.description:1 of +msgid "" +"New bot description; 0-512 characters. Pass an empty string to remove the" +" dedicated description for the given language." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_description.SetMyDescription.language_code:1 of +msgid "" +"A two-letter ISO 639-1 language code. If empty, the description will be " +"applied to all users for whose language there is no dedicated " +"description." +msgstr "" + +#: ../../api/methods/set_my_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_description.rst:29 +msgid ":code:`from aiogram.methods.set_my_description import SetMyDescription`" +msgstr "" + +#: ../../api/methods/set_my_description.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyDescription`" +msgstr "" + +#: ../../api/methods/set_my_description.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_description.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_short_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_short_description.po new file mode 100644 index 00000000..eb4e343b --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_my_short_description.po @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_my_short_description.rst:3 +msgid "setMyShortDescription" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_my_short_description.SetMyShortDescription:1 of +msgid "" +"Use this method to change the bot's short description, which is shown on " +"the bot's profile page and is sent together with the link when users " +"share the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_my_short_description.SetMyShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#setmyshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_short_description.SetMyShortDescription.short_description:1 +#: of +msgid "" +"New short description for the bot; 0-120 characters. Pass an empty string" +" to remove the dedicated short description for the given language." +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_my_short_description.SetMyShortDescription.language_code:1 +#: of +msgid "" +"A two-letter ISO 639-1 language code. If empty, the short description " +"will be applied to all users for whose language there is no dedicated " +"short description." +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:29 +msgid "" +":code:`from aiogram.methods.set_my_short_description import " +"SetMyShortDescription`" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:30 +msgid "alias: :code:`from aiogram.methods import SetMyShortDescription`" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_my_short_description.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_emoji_list.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_emoji_list.po new file mode 100644 index 00000000..ad3536b3 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_emoji_list.po @@ -0,0 +1,81 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_emoji_list.rst:3 +msgid "setStickerEmojiList" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList:1 of +msgid "" +"Use this method to change the list of emoji assigned to a regular or " +"custom emoji sticker. The sticker must belong to a sticker set created by" +" the bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickeremojilist" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList.sticker:1 of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_emoji_list.SetStickerEmojiList.emoji_list:1 of +msgid "A JSON-serialized list of 1-20 emoji associated with the sticker" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_emoji_list import " +"SetStickerEmojiList`" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerEmojiList`" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_emoji_list.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_keywords.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_keywords.po new file mode 100644 index 00000000..22dfb120 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_keywords.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_keywords.rst:3 +msgid "setStickerKeywords" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords:1 of +msgid "" +"Use this method to change search keywords assigned to a regular or custom" +" emoji sticker. The sticker must belong to a sticker set created by the " +"bot. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickerkeywords" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords.sticker:1 of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_keywords.SetStickerKeywords.keywords:1 of +msgid "" +"A JSON-serialized list of 0-20 search keywords for the sticker with total" +" length of up to 64 characters" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_keywords import " +"SetStickerKeywords`" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerKeywords`" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_keywords.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_mask_position.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_mask_position.po new file mode 100644 index 00000000..8efc08ba --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_mask_position.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_mask_position.rst:3 +msgid "setStickerMaskPosition" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition:1 of +msgid "" +"Use this method to change the `mask position " +"`_ of a mask sticker. " +"The sticker must belong to a sticker set that was created by the bot. " +"Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickermaskposition" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition.sticker:1 +#: of +msgid "File identifier of the sticker" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_mask_position.SetStickerMaskPosition.mask_position:1 +#: of +msgid "" +"A JSON-serialized object with the position where the mask should be " +"placed on faces. Omit the parameter to remove the mask position." +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_mask_position import " +"SetStickerMaskPosition`" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerMaskPosition`" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_mask_position.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po index cb1608e8..8e279db0 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/set_sticker_set_thumb.rst:3 msgid "setStickerSetThumb" @@ -25,52 +25,6 @@ msgstr "" msgid "Returns: :obj:`bool`" msgstr "" -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb:1 of -msgid "" -"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." -msgstr "" - -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb:3 of -msgid "Source: https://core.telegram.org/bots/api#setstickersetthumb" -msgstr "" - -#: ../../docstring -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb.name:1 of -msgid "Sticker set name" -msgstr "" - -#: ../../docstring -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb.user_id:1 of -msgid "User identifier of the sticker set owner" -msgstr "" - -#: ../../docstring -#: aiogram.methods.set_sticker_set_thumb.SetStickerSetThumb.thumb:1 of -msgid "" -"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." -msgstr "" - #: ../../api/methods/set_sticker_set_thumb.rst:14 msgid "Usage" msgstr "" @@ -104,3 +58,57 @@ msgstr "" #: ../../api/methods/set_sticker_set_thumb.rst:40 msgid "As reply into Webhook in handler" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "Source: https://core.telegram.org/bots/api#setstickersetthumb" +#~ msgstr "" + +#~ msgid "Sticker set name" +#~ msgstr "" + +#~ msgid "User identifier of the sticker set owner" +#~ msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po new file mode 100644 index 00000000..c0d9b5ee --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumbnail.po @@ -0,0 +1,108 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:3 +msgid "setStickerSetThumbnail" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail:1 of +msgid "" +"Use this method to set the thumbnail of a regular or mask sticker set. " +"The format of the thumbnail file must match the format of the stickers in" +" the set. Returns :code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickersetthumbnail" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.user_id:1 +#: of +msgid "User identifier of the sticker set owner" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_thumbnail.SetStickerSetThumbnail.thumbnail:1 +#: of +msgid "" +"A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 " +"kilobytes in size and have a width and height of exactly 100px, or a " +"**.TGS** animation with a 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 and video " +"sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then " +"the thumbnail is dropped and the first sticker is used as the thumbnail." +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_set_thumbnail import " +"SetStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerSetThumbnail`" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_set_thumbnail.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_title.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_title.po new file mode 100644 index 00000000..fb27fdfc --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_title.po @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/methods/set_sticker_set_title.rst:3 +msgid "setStickerSetTitle" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:5 +msgid "Returns: :obj:`bool`" +msgstr "" + +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle:1 of +msgid "" +"Use this method to set the title of a created sticker set. Returns " +":code:`True` on success." +msgstr "" + +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle:3 of +msgid "Source: https://core.telegram.org/bots/api#setstickersettitle" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle.name:1 of +msgid "Sticker set name" +msgstr "" + +#: ../../docstring +#: aiogram.methods.set_sticker_set_title.SetStickerSetTitle.title:1 of +msgid "Sticker set title, 1-64 characters" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:14 +msgid "Usage" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:17 +msgid "As bot method" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:25 +msgid "Method as object" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:27 +msgid "Imports:" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:29 +msgid "" +":code:`from aiogram.methods.set_sticker_set_title import " +"SetStickerSetTitle`" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:30 +msgid "alias: :code:`from aiogram.methods import SetStickerSetTitle`" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:33 +msgid "With specific bot" +msgstr "" + +#: ../../api/methods/set_sticker_set_title.rst:40 +msgid "As reply into Webhook in handler" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po index 5a9d256a..4e909bd1 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/methods/upload_sticker_file.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/methods/upload_sticker_file.rst:3 msgid "uploadStickerFile" @@ -27,10 +27,11 @@ msgstr "" #: aiogram.methods.upload_sticker_file.UploadStickerFile:1 of msgid "" -"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." +"Use this method to upload a file with a sticker for later use in the " +":class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and " +":class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the " +"file can be used multiple times). Returns the uploaded " +":class:`aiogram.types.file.File` on success." msgstr "" #: aiogram.methods.upload_sticker_file.UploadStickerFile:3 of @@ -43,11 +44,18 @@ msgid "User identifier of sticker file owner" msgstr "" #: ../../docstring -#: aiogram.methods.upload_sticker_file.UploadStickerFile.png_sticker:1 of +#: aiogram.methods.upload_sticker_file.UploadStickerFile.sticker:1 of msgid "" -"**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 » `" +"A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See " +"`https://core.telegram.org/stickers " +"`_`https://core.telegram.org/stickers" +" `_ for technical requirements. " +":ref:`More information on Sending Files » `" +msgstr "" + +#: ../../docstring +#: aiogram.methods.upload_sticker_file.UploadStickerFile.sticker_format:1 of +msgid "Format of the sticker, must be one of 'static', 'animated', 'video'" msgstr "" #: ../../api/methods/upload_sticker_file.rst:14 @@ -77,3 +85,21 @@ msgstr "" #: ../../api/methods/upload_sticker_file.rst:33 msgid "With specific bot" msgstr "" + +#~ msgid "" +#~ "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." +#~ msgstr "" + +#~ msgid "" +#~ "**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 » `" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_description.po new file mode 100644 index 00000000..2f295229 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_description.po @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/bot_description.rst:3 +msgid "BotDescription" +msgstr "" + +#: aiogram.types.bot_description.BotDescription:1 of +msgid "This object represents the bot's description." +msgstr "" + +#: aiogram.types.bot_description.BotDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#botdescription" +msgstr "" + +#: ../../docstring aiogram.types.bot_description.BotDescription.description:1 +#: of +msgid "The bot's description" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_short_description.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_short_description.po new file mode 100644 index 00000000..8855dc52 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/bot_short_description.po @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/bot_short_description.rst:3 +msgid "BotShortDescription" +msgstr "" + +#: aiogram.types.bot_short_description.BotShortDescription:1 of +msgid "This object represents the bot's short description." +msgstr "" + +#: aiogram.types.bot_short_description.BotShortDescription:3 of +msgid "Source: https://core.telegram.org/bots/api#botshortdescription" +msgstr "" + +#: ../../docstring +#: aiogram.types.bot_short_description.BotShortDescription.short_description:1 +#: of +msgid "The bot's short description" +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po new file mode 100644 index 00000000..3bbc8b33 --- /dev/null +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/input_sticker.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023, aiogram Team +# This file is distributed under the same license as the aiogram package. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: aiogram \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: ../../api/types/input_sticker.rst:3 +msgid "InputSticker" +msgstr "" + +#: aiogram.types.input_sticker.InputSticker:1 of +msgid "This object describes a sticker to be added to a sticker set." +msgstr "" + +#: aiogram.types.input_sticker.InputSticker:3 of +msgid "Source: https://core.telegram.org/bots/api#inputsticker" +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.sticker:1 of +msgid "" +"The added sticker. Pass a *file_id* as a String to send a file that " +"already exists on the Telegram servers, pass an HTTP URL as a String for " +"Telegram to get a file from the Internet, or upload a new one using " +"multipart/form-data. Animated and video stickers can't be uploaded via " +"HTTP URL. :ref:`More information on Sending Files » `" +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.emoji_list:1 of +msgid "List of 1-20 emoji associated with the sticker" +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.mask_position:1 of +msgid "" +"*Optional*. Position where the mask should be placed on faces. For 'mask'" +" stickers only." +msgstr "" + +#: ../../docstring aiogram.types.input_sticker.InputSticker.keywords:1 of +msgid "" +"*Optional*. List of 0-20 search keywords for the sticker with total " +"length of up to 64 characters. For 'regular' and 'custom_emoji' stickers " +"only." +msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po index 416cf8e9..b3f65085 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/message.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/message.rst:3 msgid "Message" @@ -679,7 +679,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:17 #: aiogram.types.message.Message.answer_photo:16 #: aiogram.types.message.Message.answer_poll:23 -#: aiogram.types.message.Message.answer_sticker:12 +#: aiogram.types.message.Message.answer_sticker:13 #: aiogram.types.message.Message.answer_venue:19 #: aiogram.types.message.Message.answer_video:21 #: aiogram.types.message.Message.answer_video_note:15 @@ -697,7 +697,7 @@ msgstr "" #: aiogram.types.message.Message.reply_location:18 #: aiogram.types.message.Message.reply_photo:17 #: aiogram.types.message.Message.reply_poll:24 -#: aiogram.types.message.Message.reply_sticker:13 +#: aiogram.types.message.Message.reply_sticker:14 #: aiogram.types.message.Message.reply_venue:20 #: aiogram.types.message.Message.reply_video:22 #: aiogram.types.message.Message.reply_video_note:16 @@ -717,7 +717,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:18 #: aiogram.types.message.Message.answer_photo:17 #: aiogram.types.message.Message.answer_poll:24 -#: aiogram.types.message.Message.answer_sticker:13 +#: aiogram.types.message.Message.answer_sticker:14 #: aiogram.types.message.Message.answer_venue:20 #: aiogram.types.message.Message.answer_video:22 #: aiogram.types.message.Message.answer_video_note:16 @@ -733,7 +733,7 @@ msgstr "" #: aiogram.types.message.Message.reply_location:19 #: aiogram.types.message.Message.reply_photo:18 #: aiogram.types.message.Message.reply_poll:25 -#: aiogram.types.message.Message.reply_sticker:14 +#: aiogram.types.message.Message.reply_sticker:15 #: aiogram.types.message.Message.reply_venue:21 #: aiogram.types.message.Message.reply_video:23 #: aiogram.types.message.Message.reply_video_note:17 @@ -753,7 +753,7 @@ msgstr "" #: aiogram.types.message.Message.answer_media_group:15 #: aiogram.types.message.Message.answer_photo:19 #: aiogram.types.message.Message.answer_poll:26 -#: aiogram.types.message.Message.answer_sticker:15 +#: aiogram.types.message.Message.answer_sticker:16 #: aiogram.types.message.Message.answer_venue:22 #: aiogram.types.message.Message.answer_video:24 #: aiogram.types.message.Message.answer_video_note:18 @@ -771,7 +771,7 @@ msgstr "" #: aiogram.types.message.Message.reply_media_group:15 #: aiogram.types.message.Message.reply_photo:19 #: aiogram.types.message.Message.reply_poll:26 -#: aiogram.types.message.Message.reply_sticker:15 +#: aiogram.types.message.Message.reply_sticker:16 #: aiogram.types.message.Message.reply_venue:22 #: aiogram.types.message.Message.reply_video:24 #: aiogram.types.message.Message.reply_video_note:18 @@ -790,7 +790,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:21 #: aiogram.types.message.Message.answer_photo:20 #: aiogram.types.message.Message.answer_poll:27 -#: aiogram.types.message.Message.answer_sticker:16 +#: aiogram.types.message.Message.answer_sticker:17 #: aiogram.types.message.Message.answer_venue:23 #: aiogram.types.message.Message.answer_video:25 #: aiogram.types.message.Message.answer_video_note:19 @@ -805,7 +805,7 @@ msgstr "" #: aiogram.types.message.Message.reply_location:21 #: aiogram.types.message.Message.reply_photo:20 #: aiogram.types.message.Message.reply_poll:27 -#: aiogram.types.message.Message.reply_sticker:16 +#: aiogram.types.message.Message.reply_sticker:17 #: aiogram.types.message.Message.reply_venue:23 #: aiogram.types.message.Message.reply_video:25 #: aiogram.types.message.Message.reply_video_note:19 @@ -881,7 +881,7 @@ msgstr "" #: aiogram.types.message.Message.answer_location:19 #: aiogram.types.message.Message.answer_photo:18 #: aiogram.types.message.Message.answer_poll:25 -#: aiogram.types.message.Message.answer_sticker:14 +#: aiogram.types.message.Message.answer_sticker:15 #: aiogram.types.message.Message.answer_venue:21 #: aiogram.types.message.Message.answer_video:23 #: aiogram.types.message.Message.answer_video_note:17 @@ -1674,13 +1674,19 @@ msgstr "" msgid "" "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 » `" +"Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP " +"or .TGS sticker using multipart/form-data. :ref:`More information on " +"Sending Files » `. Video stickers can only be sent by a " +"file_id. Animated stickers can't be sent via an HTTP URL." msgstr "" -#: aiogram.types.message.Message.answer_sticker:17 -#: aiogram.types.message.Message.reply_sticker:17 of +#: aiogram.types.message.Message.answer_sticker:12 +#: aiogram.types.message.Message.reply_sticker:13 of +msgid "Emoji associated with the sticker; only for just uploaded stickers" +msgstr "" + +#: aiogram.types.message.Message.answer_sticker:18 +#: aiogram.types.message.Message.reply_sticker:18 of msgid "instance of method :class:`aiogram.methods.send_sticker.SendSticker`" msgstr "" @@ -2545,3 +2551,14 @@ msgstr "" #~ msgid "Copy message" #~ msgstr "" +#~ msgid "" +#~ "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 » `" +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker.po b/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker.po index 4f8fc38b..fe98cecc 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/types/sticker.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-23 00:47+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/types/sticker.rst:3 msgid "Sticker" @@ -66,7 +66,7 @@ msgid "" "`_" msgstr "" -#: ../../docstring aiogram.types.sticker.Sticker.thumb:1 of +#: ../../docstring aiogram.types.sticker.Sticker.thumbnail:1 of msgid "*Optional*. Sticker thumbnail in the .WEBP or .JPG format" msgstr "" @@ -96,6 +96,14 @@ msgid "" "emoji" msgstr "" +#: ../../docstring aiogram.types.sticker.Sticker.needs_repainting:1 of +msgid "" +"*Optional*. :code:`True`, if the sticker must be repainted to a text " +"color in messages, the color of the Telegram Premium badge in emoji " +"status, white color on chat photos, or another appropriate color in other" +" places" +msgstr "" + #: ../../docstring aiogram.types.sticker.Sticker.file_size:1 of msgid "*Optional*. File size in bytes" msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po b/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po index 9b0c2440..0506fffc 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po +++ b/docs/locale/uk_UA/LC_MESSAGES/api/upload_file.po @@ -5,17 +5,16 @@ # msgid "" msgstr "" -"Project-Id-Version: aiogram\n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-03 01:03+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: 2022-12-13 21:40+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" -"X-Generator: Poedit 3.2.2\n" +"Generated-By: Babel 2.11.0\n" #: ../../api/upload_file.rst:5 msgid "How to upload file?" @@ -23,13 +22,13 @@ msgstr "Як відвантажити файл?" #: ../../api/upload_file.rst:7 msgid "" -"As says `official Telegram Bot API documentation `_ there are three ways to send files " -"(photos, stickers, audio, media, etc.):" +"As says `official Telegram Bot API documentation " +"`_ there are three ways" +" to send files (photos, stickers, audio, media, etc.):" msgstr "" -"Як стверджує `official Telegram Bot API documentation `_ існує три способа надіслати файл " -"(фото, наклейки, аудіо, медіа тощо):" +"Як стверджує `official Telegram Bot API documentation " +"`_ існує три способа " +"надіслати файл (фото, наклейки, аудіо, медіа тощо):" #: ../../api/upload_file.rst:10 msgid "" @@ -40,15 +39,17 @@ msgstr "" "за URL-адресою, вам не потрібно його повторно завантажувати." #: ../../api/upload_file.rst:13 +#, fuzzy msgid "" -"But if you need to upload new file just use subclasses of `InputFile " +"But if you need to upload a new file just use subclasses of `InputFile " "`__." msgstr "" "Але якщо вам потрібно завантажити новий файл, просто використовуйте " "підкласи `InputFile `__." #: ../../api/upload_file.rst:15 -msgid "Here is available three different builtin types of input file:" +#, fuzzy +msgid "Here are the three different available builtin types of input file:" msgstr "Тут доступні три різні типи вхідних файлів:" #: ../../api/upload_file.rst:17 @@ -56,8 +57,8 @@ msgid "" ":class:`aiogram.types.input_file.FSInputFile` - `uploading from file " "system <#upload-from-file-system>`__" msgstr "" -":class:`aiogram.types.input_file.FSInputFile` - `відвантажений з " -"файлової системи <#upload-from-file-system>`__" +":class:`aiogram.types.input_file.FSInputFile` - `відвантажений з файлової" +" системи <#upload-from-file-system>`__" #: ../../api/upload_file.rst:18 msgid "" @@ -80,17 +81,18 @@ msgid "**Be respectful with Telegram**" msgstr "**Поважайте Telegram**" #: ../../api/upload_file.rst:25 +#, fuzzy msgid "" -"Instances of `InputFile` is reusable. That's mean you can create " -"instance of InputFile and sent this file multiple times but Telegram is " -"not recommend to do that and when you upload file once just save their " +"Instances of `InputFile` are reusable. That's mean you can create " +"instance of InputFile and sent this file multiple times but Telegram does" +" not recommend to do that and when you upload file once just save their " "`file_id` and use it in next times." msgstr "" "Екземпляри `InputFile` можна використовувати повторно. Це означає, що ви " "можете створити екземпляр InputFile і надіслати цей файл кілька разів, " -"але Telegram не рекомендує цього робити, і коли ви завантажуєте файл " -"один раз, просто збережіть його `file_id` і використовуйте його " -"наступного разу." +"але Telegram не рекомендує цього робити, і коли ви завантажуєте файл один" +" раз, просто збережіть його `file_id` і використовуйте його наступного " +"разу." #: ../../api/upload_file.rst:31 msgid "Upload from file system" @@ -123,8 +125,8 @@ msgid "" "Filename to be propagated to telegram. By default, will be parsed from " "path" msgstr "" -"Ім'я файлу, яке буде передано в telegram. За замовчуванням, буде взято " -"зі шляху" +"Ім'я файлу, яке буде передано в telegram. За замовчуванням, буде взято зі" +" шляху" #: aiogram.types.input_file.BufferedInputFile.__init__:5 #: aiogram.types.input_file.FSInputFile.__init__:6 of @@ -136,14 +138,15 @@ msgid "Upload from buffer" msgstr "Відвантаження з буферу" #: ../../api/upload_file.rst:54 +#, fuzzy msgid "" "Files can be also passed from buffer (For example you generate image " -"using `Pillow `_ and the " -"want's to sent it to the Telegram):" +"using `Pillow `_ and you want " +"to send it to Telegram):" msgstr "" -"Файли також можна передавати з буфера (наприклад, ви створюєте " -"зображення за допомогою `Pillow `_ і хочете надіслати його в Telegram):" +"Файли також можна передавати з буфера (наприклад, ви створюєте зображення" +" за допомогою `Pillow `_ і " +"хочете надіслати його в Telegram):" #: ../../api/upload_file.rst:58 ../../api/upload_file.rst:80 msgid "Import wrapper:" @@ -169,11 +172,11 @@ msgstr "Відвантаження з URL" msgid "" "If you need to upload a file from another server, but the direct link is " "bound to your server's IP, or you want to bypass native `upload limits " -"`_ by URL, you can " -"use :obj:`aiogram.types.input_file.URLInputFile`." +"`_ by URL, you can use " +":obj:`aiogram.types.input_file.URLInputFile`." msgstr "" -"Якщо вам потрібно відвантажити файл з іншого сервера, але пряме " -"посилання прив’язано до IP-адреси вашого сервера, або ви хочете обійти " -"власні `обмеження на завантаження `_ за URL-адресою, ви можете використовувати :obj:" -"`aiogram.types.input_file.URLInputFile`." +"Якщо вам потрібно відвантажити файл з іншого сервера, але пряме посилання" +" прив’язано до IP-адреси вашого сервера, або ви хочете обійти власні " +"`обмеження на завантаження `_ за URL-адресою, ви можете використовувати " +":obj:`aiogram.types.input_file.URLInputFile`." diff --git a/docs/locale/uk_UA/LC_MESSAGES/changelog.po b/docs/locale/uk_UA/LC_MESSAGES/changelog.po index 975e4939..eb5c4ffc 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/changelog.po +++ b/docs/locale/uk_UA/LC_MESSAGES/changelog.po @@ -8,49 +8,107 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.11.0\n" #: ../../../CHANGES.rst:3 msgid "Changelog" msgstr "" #: ../../[towncrier-fragments]:2 -msgid "\\ |release| [UNRELEASED DRAFT] (2023-02-12)" +msgid "\\ |release| [UNRELEASED DRAFT] (2023-03-11)" msgstr "" -#: ../../../CHANGES.rst:23 ../../../CHANGES.rst:83 ../../../CHANGES.rst:134 -#: ../../../CHANGES.rst:207 ../../../CHANGES.rst:248 ../../../CHANGES.rst:286 -#: ../../../CHANGES.rst:334 ../../../CHANGES.rst:410 ../../../CHANGES.rst:443 -#: ../../../CHANGES.rst:474 ../../[towncrier-fragments]:5 -msgid "Features" +#: ../../../CHANGES.rst:193 ../../../CHANGES.rst:243 ../../../CHANGES.rst:623 +#: ../../[towncrier-fragments]:5 +msgid "Improved Documentation" msgstr "" #: ../../[towncrier-fragments]:7 +msgid "" +"Changed small grammar typos for `upload_file` `#1133 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:127 ../../../CHANGES.rst:204 ../../../CHANGES.rst:257 +#: ../../../CHANGES.rst:308 ../../../CHANGES.rst:362 ../../../CHANGES.rst:404 +#: ../../../CHANGES.rst:450 ../../../CHANGES.rst:510 ../../../CHANGES.rst:531 +#: ../../../CHANGES.rst:554 ../../../CHANGES.rst:591 ../../../CHANGES.rst:630 +#: ../../[towncrier-fragments]:12 +msgid "Misc" +msgstr "" + +#: ../../[towncrier-fragments]:14 +msgid "" +"Added full support of `Bot API 6.6 `_" +msgstr "" + +#: ../../[towncrier-fragments]:18 +msgid "" +"Note that this issue has breaking changes described in in the Bot API " +"changelog, this changes is not breaking in the API but breaking inside " +"aiogram because Beta stage is not finished." +msgstr "" + +#: ../../[towncrier-fragments]:21 +msgid "`#1139 `_" +msgstr "" + +#: ../../../CHANGES.rst:20 +msgid "3.0.0b7 (2023-02-18)" +msgstr "" + +#: ../../../CHANGES.rst:24 +msgid "" +"Note that this version has incompatibility with Python 3.8-3.9 in case " +"when you create an instance of Dispatcher outside of the any coroutine." +msgstr "" + +#: ../../../CHANGES.rst:26 +msgid "Sorry for the inconvenience, it will be fixed in the next version." +msgstr "" + +#: ../../../CHANGES.rst:28 +msgid "This code will not work:" +msgstr "" + +#: ../../../CHANGES.rst:40 +msgid "But if you change it like this it should works as well:" +msgstr "" + +#: ../../../CHANGES.rst:56 ../../../CHANGES.rst:156 ../../../CHANGES.rst:216 +#: ../../../CHANGES.rst:267 ../../../CHANGES.rst:340 ../../../CHANGES.rst:381 +#: ../../../CHANGES.rst:419 ../../../CHANGES.rst:467 ../../../CHANGES.rst:543 +#: ../../../CHANGES.rst:576 ../../../CHANGES.rst:607 +msgid "Features" +msgstr "" + +#: ../../../CHANGES.rst:58 msgid "Added missing shortcuts, new enums, reworked old stuff" msgstr "" -#: ../../[towncrier-fragments]:9 +#: ../../../CHANGES.rst:60 msgid "" "**Breaking** All previously added enums is re-generated in new place - " "`aiogram.enums` instead of `aiogram.types`" msgstr "" -#: ../../[towncrier-fragments]:27 +#: ../../../CHANGES.rst:78 msgid "" "**Added enums:** " ":class:`aiogram.enums.bot_command_scope_type.BotCommandScopeType`," msgstr "" -#: ../../[towncrier-fragments]:13 +#: ../../../CHANGES.rst:64 msgid "" -":class:`aiogram.enums.chat_action.ChatActions`, " +":class:`aiogram.enums.chat_action.ChatAction`, " ":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " ":class:`aiogram.enums.chat_type.ChatType`, " ":class:`aiogram.enums.content_type.ContentType`, " @@ -67,15 +125,15 @@ msgid "" ":class:`aiogram.enums.update_type.UpdateType`," msgstr "" -#: ../../[towncrier-fragments]:29 +#: ../../../CHANGES.rst:80 msgid "**Added shortcuts**:" msgstr "" -#: ../../[towncrier-fragments]:54 +#: ../../../CHANGES.rst:105 msgid "*Chat* :meth:`aiogram.types.chat.Chat.get_administrators`," msgstr "" -#: ../../[towncrier-fragments]:32 +#: ../../../CHANGES.rst:83 msgid "" ":meth:`aiogram.types.chat.Chat.delete_message`, " ":meth:`aiogram.types.chat.Chat.revoke_invite_link`, " @@ -103,88 +161,92 @@ msgid "" ":meth:`aiogram.types.chat.Chat.set_photo`," msgstr "" -#: ../../[towncrier-fragments]:56 +#: ../../../CHANGES.rst:107 msgid "*Sticker*: :meth:`aiogram.types.sticker.Sticker.set_position_in_set`," msgstr "" -#: ../../[towncrier-fragments]:57 +#: ../../../CHANGES.rst:108 msgid ":meth:`aiogram.types.sticker.Sticker.delete_from_set`," msgstr "" -#: ../../[towncrier-fragments]:58 +#: ../../../CHANGES.rst:109 msgid "*User*: :meth:`aiogram.types.user.User.get_profile_photos`" msgstr "" -#: ../../[towncrier-fragments]:59 +#: ../../../CHANGES.rst:110 msgid "`#952 `_" msgstr "" -#: ../../[towncrier-fragments]:60 +#: ../../../CHANGES.rst:111 msgid "" "Added :ref:`callback answer ` feature `#1091 " "`_" msgstr "" -#: ../../../CHANGES.rst:48 ../../../CHANGES.rst:97 ../../../CHANGES.rst:158 -#: ../../../CHANGES.rst:216 ../../../CHANGES.rst:262 ../../../CHANGES.rst:310 -#: ../../../CHANGES.rst:366 ../../../CHANGES.rst:451 ../../../CHANGES.rst:483 -#: ../../[towncrier-fragments]:65 +#: ../../../CHANGES.rst:113 +msgid "" +"Added a method that allows you to compactly register routers `#1117 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:118 ../../../CHANGES.rst:181 ../../../CHANGES.rst:230 +#: ../../../CHANGES.rst:291 ../../../CHANGES.rst:349 ../../../CHANGES.rst:395 +#: ../../../CHANGES.rst:443 ../../../CHANGES.rst:499 ../../../CHANGES.rst:584 +#: ../../../CHANGES.rst:616 msgid "Bugfixes" msgstr "" -#: ../../[towncrier-fragments]:67 +#: ../../../CHANGES.rst:120 +msgid "" +"Check status code when downloading file `#816 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:122 msgid "" "Fixed `ignore_case` parameter in :obj:`aiogram.filters.command.Command` " "filter `#1106 `_" msgstr "" -#: ../../../CHANGES.rst:71 ../../../CHANGES.rst:124 ../../../CHANGES.rst:175 -#: ../../../CHANGES.rst:229 ../../../CHANGES.rst:271 ../../../CHANGES.rst:317 -#: ../../../CHANGES.rst:377 ../../../CHANGES.rst:398 ../../../CHANGES.rst:421 -#: ../../../CHANGES.rst:458 ../../../CHANGES.rst:497 -#: ../../[towncrier-fragments]:72 -msgid "Misc" -msgstr "" - -#: ../../[towncrier-fragments]:74 +#: ../../../CHANGES.rst:129 msgid "" "Added integration with new code-generator named `Butcher " "`_ `#1069 " "`_" msgstr "" -#: ../../[towncrier-fragments]:76 +#: ../../../CHANGES.rst:131 msgid "" "Added full support of `Bot API 6.4 `_ `#1088 " "`_" msgstr "" -#: ../../[towncrier-fragments]:78 +#: ../../../CHANGES.rst:133 msgid "" "Updated package metadata, moved build internals from Poetry to Hatch, " "added contributing guides. `#1095 " "`_" msgstr "" -#: ../../[towncrier-fragments]:80 +#: ../../../CHANGES.rst:135 msgid "" "Added full support of `Bot API 6.5 `_" msgstr "" -#: ../../[towncrier-fragments]:84 +#: ../../../CHANGES.rst:139 msgid "" "Note that :obj:`aiogram.types.chat_permissions.ChatPermissions` is " "updated without backward compatibility, so now this object has no " ":code:`can_send_media_messages` attribute" msgstr "" -#: ../../[towncrier-fragments]:86 +#: ../../../CHANGES.rst:141 msgid "`#1112 `_" msgstr "" -#: ../../[towncrier-fragments]:87 +#: ../../../CHANGES.rst:142 msgid "" "Replaced error :code:`TypeError: TelegramEventObserver.__call__() got an " "unexpected keyword argument ''` with a more understandable one for " @@ -192,131 +254,141 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:20 +#: ../../../CHANGES.rst:145 +msgid "" +"Added possibility to reply into webhook with files `#1120 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:147 +msgid "" +"Reworked graceful shutdown. Added method to stop polling. Now polling " +"started from dispatcher can be stopped by signals gracefully without " +"errors (on Linux and Mac). `#1124 " +"`_" +msgstr "" + +#: ../../../CHANGES.rst:153 msgid "3.0.0b6 (2022-11-18)" msgstr "" -#: ../../../CHANGES.rst:25 +#: ../../../CHANGES.rst:158 msgid "" "(again) Added possibility to combine filters with an *and*/*or* " "operations." msgstr "" -#: ../../../CHANGES.rst:27 +#: ../../../CHANGES.rst:160 msgid "" "Read more in \":ref:`Combining filters `\" " "documentation section `#1018 " "`_" msgstr "" -#: ../../../CHANGES.rst:29 +#: ../../../CHANGES.rst:162 msgid "Added following methods to ``Message`` class:" msgstr "" -#: ../../../CHANGES.rst:31 +#: ../../../CHANGES.rst:164 msgid ":code:`Message.forward(...)`" msgstr "" -#: ../../../CHANGES.rst:32 +#: ../../../CHANGES.rst:165 msgid ":code:`Message.edit_media(...)`" msgstr "" -#: ../../../CHANGES.rst:33 +#: ../../../CHANGES.rst:166 msgid ":code:`Message.edit_live_location(...)`" msgstr "" -#: ../../../CHANGES.rst:34 +#: ../../../CHANGES.rst:167 msgid ":code:`Message.stop_live_location(...)`" msgstr "" -#: ../../../CHANGES.rst:35 +#: ../../../CHANGES.rst:168 msgid ":code:`Message.pin(...)`" msgstr "" -#: ../../../CHANGES.rst:36 +#: ../../../CHANGES.rst:169 msgid ":code:`Message.unpin()`" msgstr "" -#: ../../../CHANGES.rst:37 +#: ../../../CHANGES.rst:170 msgid "`#1030 `_" msgstr "" -#: ../../../CHANGES.rst:38 +#: ../../../CHANGES.rst:171 msgid "Added following methods to :code:`User` class:" msgstr "" -#: ../../../CHANGES.rst:40 +#: ../../../CHANGES.rst:173 msgid ":code:`User.mention_markdown(...)`" msgstr "" -#: ../../../CHANGES.rst:41 +#: ../../../CHANGES.rst:174 msgid ":code:`User.mention_html(...)`" msgstr "" -#: ../../../CHANGES.rst:42 +#: ../../../CHANGES.rst:175 msgid "`#1049 `_" msgstr "" -#: ../../../CHANGES.rst:43 +#: ../../../CHANGES.rst:176 msgid "" "Added full support of `Bot API 6.3 `_ `#1057 " "`_" msgstr "" -#: ../../../CHANGES.rst:50 +#: ../../../CHANGES.rst:183 msgid "" "Fixed :code:`Message.send_invoice` and :code:`Message.reply_invoice`, " "added missing arguments `#1047 " "`_" msgstr "" -#: ../../../CHANGES.rst:52 +#: ../../../CHANGES.rst:185 msgid "Fixed copy and forward in:" msgstr "" -#: ../../../CHANGES.rst:54 +#: ../../../CHANGES.rst:187 msgid ":code:`Message.answer(...)`" msgstr "" -#: ../../../CHANGES.rst:55 +#: ../../../CHANGES.rst:188 msgid ":code:`Message.copy_to(...)`" msgstr "" -#: ../../../CHANGES.rst:56 +#: ../../../CHANGES.rst:189 msgid "`#1064 `_" msgstr "" -#: ../../../CHANGES.rst:60 ../../../CHANGES.rst:110 ../../../CHANGES.rst:490 -msgid "Improved Documentation" -msgstr "" - -#: ../../../CHANGES.rst:62 +#: ../../../CHANGES.rst:195 msgid "" "Fixed UA translations in index.po `#1017 " "`_" msgstr "" -#: ../../../CHANGES.rst:64 +#: ../../../CHANGES.rst:197 msgid "" "Fix typehints for :code:`Message`, :code:`reply_media_group` and " ":code:`answer_media_group` methods `#1029 " "`_" msgstr "" -#: ../../../CHANGES.rst:66 +#: ../../../CHANGES.rst:199 msgid "" "Removed an old now non-working feature `#1060 " "`_" msgstr "" -#: ../../../CHANGES.rst:73 +#: ../../../CHANGES.rst:206 msgid "" "Enabled testing on Python 3.11 `#1044 " "`_" msgstr "" -#: ../../../CHANGES.rst:75 +#: ../../../CHANGES.rst:208 msgid "" "Added a mandatory dependency :code:`certifi` in due to in some cases on " "systems that doesn't have updated ca-certificates the requests to Bot API" @@ -325,23 +397,23 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:80 +#: ../../../CHANGES.rst:213 msgid "3.0.0b5 (2022-10-02)" msgstr "" -#: ../../../CHANGES.rst:85 +#: ../../../CHANGES.rst:218 msgid "" "Add PyPy support and run tests under PyPy `#985 " "`_" msgstr "" -#: ../../../CHANGES.rst:87 +#: ../../../CHANGES.rst:220 msgid "" "Added message text to aiogram exceptions representation `#988 " "`_" msgstr "" -#: ../../../CHANGES.rst:89 +#: ../../../CHANGES.rst:222 msgid "" "Added warning about using magic filter from `magic_filter` instead of " "`aiogram`'s ones. Is recommended to use `from aiogram import F` instead " @@ -349,65 +421,65 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:92 +#: ../../../CHANGES.rst:225 msgid "" "Added more detailed error when server response can't be deserialized. " "This feature will help to debug unexpected responses from the Server " "`#1014 `_" msgstr "" -#: ../../../CHANGES.rst:99 +#: ../../../CHANGES.rst:232 msgid "" "Reworked error event, introduced " ":class:`aiogram.types.error_event.ErrorEvent` object. `#898 " "`_" msgstr "" -#: ../../../CHANGES.rst:101 +#: ../../../CHANGES.rst:234 msgid "" "Fixed escaping markdown in `aiogram.utils.markdown` module `#903 " "`_" msgstr "" -#: ../../../CHANGES.rst:103 +#: ../../../CHANGES.rst:236 msgid "" "Fixed polling crash when Telegram Bot API raises HTTP 429 status-code. " "`#995 `_" msgstr "" -#: ../../../CHANGES.rst:105 +#: ../../../CHANGES.rst:238 msgid "" "Fixed empty mention in command parsing, now it will be None instead of an" " empty string `#1013 `_" msgstr "" -#: ../../../CHANGES.rst:112 +#: ../../../CHANGES.rst:245 msgid "" "Initialized Docs translation (added Ukrainian language) `#925 " "`_" msgstr "" -#: ../../../CHANGES.rst:117 +#: ../../../CHANGES.rst:250 msgid "Deprecations and Removals" msgstr "" -#: ../../../CHANGES.rst:119 +#: ../../../CHANGES.rst:252 msgid "" "Removed filters factory as described in corresponding issue. `#942 " "`_" msgstr "" -#: ../../../CHANGES.rst:126 +#: ../../../CHANGES.rst:259 msgid "" "Now Router/Dispatcher accepts only keyword arguments. `#982 " "`_" msgstr "" -#: ../../../CHANGES.rst:131 +#: ../../../CHANGES.rst:264 msgid "3.0.0b4 (2022-08-14)" msgstr "" -#: ../../../CHANGES.rst:136 +#: ../../../CHANGES.rst:269 msgid "" "Add class helper ChatAction for constants that Telegram BotAPI uses in " "sendChatAction request. In my opinion, this will help users and will also" @@ -415,198 +487,198 @@ msgid "" "\"ChatActions\". `#803 `_" msgstr "" -#: ../../../CHANGES.rst:140 +#: ../../../CHANGES.rst:273 msgid "Added possibility to combine filters or invert result" msgstr "" -#: ../../../CHANGES.rst:142 +#: ../../../CHANGES.rst:275 msgid "Example:" msgstr "" -#: ../../../CHANGES.rst:150 +#: ../../../CHANGES.rst:283 msgid "`#894 `_" msgstr "" -#: ../../../CHANGES.rst:151 +#: ../../../CHANGES.rst:284 msgid "" "Fixed type hints for redis TTL params. `#922 " "`_" msgstr "" -#: ../../../CHANGES.rst:153 +#: ../../../CHANGES.rst:286 msgid "" "Added `full_name` shortcut for `Chat` object `#929 " "`_" msgstr "" -#: ../../../CHANGES.rst:160 +#: ../../../CHANGES.rst:293 msgid "" "Fixed false-positive coercing of Union types in API methods `#901 " "`_" msgstr "" -#: ../../../CHANGES.rst:162 +#: ../../../CHANGES.rst:295 msgid "Added 3 missing content types:" msgstr "" -#: ../../../CHANGES.rst:164 +#: ../../../CHANGES.rst:297 msgid "proximity_alert_triggered" msgstr "" -#: ../../../CHANGES.rst:165 +#: ../../../CHANGES.rst:298 msgid "supergroup_chat_created" msgstr "" -#: ../../../CHANGES.rst:166 +#: ../../../CHANGES.rst:299 msgid "channel_chat_created" msgstr "" -#: ../../../CHANGES.rst:167 +#: ../../../CHANGES.rst:300 msgid "`#906 `_" msgstr "" -#: ../../../CHANGES.rst:168 +#: ../../../CHANGES.rst:301 msgid "" "Fixed the ability to compare the state, now comparison to copy of the " "state will return `True`. `#927 " "`_" msgstr "" -#: ../../../CHANGES.rst:170 +#: ../../../CHANGES.rst:303 msgid "" "Fixed default lock kwargs in RedisEventIsolation. `#972 " "`_" msgstr "" -#: ../../../CHANGES.rst:177 +#: ../../../CHANGES.rst:310 msgid "" "Restrict including routers with strings `#896 " "`_" msgstr "" -#: ../../../CHANGES.rst:179 +#: ../../../CHANGES.rst:312 msgid "" "Changed CommandPatterType to CommandPatternType in " "`aiogram/dispatcher/filters/command.py` `#907 " "`_" msgstr "" -#: ../../../CHANGES.rst:181 +#: ../../../CHANGES.rst:314 msgid "" "Added full support of `Bot API 6.1 `_ `#936 " "`_" msgstr "" -#: ../../../CHANGES.rst:183 +#: ../../../CHANGES.rst:316 msgid "**Breaking!** More flat project structure" msgstr "" -#: ../../../CHANGES.rst:185 +#: ../../../CHANGES.rst:318 msgid "These packages was moved, imports in your code should be fixed:" msgstr "" -#: ../../../CHANGES.rst:187 +#: ../../../CHANGES.rst:320 msgid ":code:`aiogram.dispatcher.filters` -> :code:`aiogram.filters`" msgstr "" -#: ../../../CHANGES.rst:188 +#: ../../../CHANGES.rst:321 msgid ":code:`aiogram.dispatcher.fsm` -> :code:`aiogram.fsm`" msgstr "" -#: ../../../CHANGES.rst:189 +#: ../../../CHANGES.rst:322 msgid ":code:`aiogram.dispatcher.handler` -> :code:`aiogram.handler`" msgstr "" -#: ../../../CHANGES.rst:190 +#: ../../../CHANGES.rst:323 msgid ":code:`aiogram.dispatcher.webhook` -> :code:`aiogram.webhook`" msgstr "" -#: ../../../CHANGES.rst:191 +#: ../../../CHANGES.rst:324 msgid "" ":code:`aiogram.dispatcher.flags/*` -> :code:`aiogram.dispatcher.flags` " "(single module instead of package)" msgstr "" -#: ../../../CHANGES.rst:192 +#: ../../../CHANGES.rst:325 msgid "`#938 `_" msgstr "" -#: ../../../CHANGES.rst:193 +#: ../../../CHANGES.rst:326 msgid "" "Removed deprecated :code:`router._handler` and " ":code:`router.register__handler` methods. `#941 " "`_" msgstr "" -#: ../../../CHANGES.rst:195 +#: ../../../CHANGES.rst:328 msgid "" "Deprecated filters factory. It will be removed in next Beta (3.0b5) `#942" " `_" msgstr "" -#: ../../../CHANGES.rst:197 +#: ../../../CHANGES.rst:330 msgid "" "`MessageEntity` method `get_text` was removed and `extract` was renamed " "to `extract_from` `#944 `_" msgstr "" -#: ../../../CHANGES.rst:199 +#: ../../../CHANGES.rst:332 msgid "" "Added full support of `Bot API 6.2 `_ `#975 " "`_" msgstr "" -#: ../../../CHANGES.rst:204 +#: ../../../CHANGES.rst:337 msgid "3.0.0b3 (2022-04-19)" msgstr "" -#: ../../../CHANGES.rst:209 +#: ../../../CHANGES.rst:342 msgid "" "Added possibility to get command magic result as handler argument `#889 " "`_" msgstr "" -#: ../../../CHANGES.rst:211 +#: ../../../CHANGES.rst:344 msgid "" "Added full support of `Telegram Bot API 6.0 " "`_ `#890 " "`_" msgstr "" -#: ../../../CHANGES.rst:218 +#: ../../../CHANGES.rst:351 msgid "" "Fixed I18n lazy-proxy. Disabled caching. `#839 " "`_" msgstr "" -#: ../../../CHANGES.rst:220 +#: ../../../CHANGES.rst:353 msgid "" "Added parsing of spoiler message entity `#865 " "`_" msgstr "" -#: ../../../CHANGES.rst:222 +#: ../../../CHANGES.rst:355 msgid "" "Fixed default `parse_mode` for `Message.copy_to()` method. `#876 " "`_" msgstr "" -#: ../../../CHANGES.rst:224 +#: ../../../CHANGES.rst:357 msgid "" "Fixed CallbackData factory parsing IntEnum's `#885 " "`_" msgstr "" -#: ../../../CHANGES.rst:231 +#: ../../../CHANGES.rst:364 msgid "" "Added automated check that pull-request adds a changes description to " "**CHANGES** directory `#873 " "`_" msgstr "" -#: ../../../CHANGES.rst:233 +#: ../../../CHANGES.rst:366 msgid "" "Changed :code:`Message.html_text` and :code:`Message.md_text` attributes " "behaviour when message has no text. The empty string will be used instead" @@ -614,14 +686,14 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:236 +#: ../../../CHANGES.rst:369 msgid "" "Used `redis-py` instead of `aioredis` package in due to this packages was" " merged into single one `#882 " "`_" msgstr "" -#: ../../../CHANGES.rst:238 +#: ../../../CHANGES.rst:371 msgid "" "Solved common naming problem with middlewares that confusing too much " "developers - now you can't see the `middleware` and `middlewares` " @@ -630,113 +702,113 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:245 +#: ../../../CHANGES.rst:378 msgid "3.0.0b2 (2022-02-19)" msgstr "" -#: ../../../CHANGES.rst:250 +#: ../../../CHANGES.rst:383 msgid "" "Added possibility to pass additional arguments into the aiohttp webhook " "handler to use this arguments inside handlers as the same as it possible " "in polling mode. `#785 `_" msgstr "" -#: ../../../CHANGES.rst:253 +#: ../../../CHANGES.rst:386 msgid "" "Added possibility to add handler flags via decorator (like `pytest.mark` " "decorator but `aiogram.flags`) `#836 " "`_" msgstr "" -#: ../../../CHANGES.rst:255 +#: ../../../CHANGES.rst:388 msgid "" "Added :code:`ChatActionSender` utility to automatically sends chat action" " while long process is running." msgstr "" -#: ../../../CHANGES.rst:257 +#: ../../../CHANGES.rst:390 msgid "" "It also can be used as message middleware and can be customized via " ":code:`chat_action` flag. `#837 " "`_" msgstr "" -#: ../../../CHANGES.rst:264 +#: ../../../CHANGES.rst:397 msgid "" "Fixed unexpected behavior of sequences in the StateFilter. `#791 " "`_" msgstr "" -#: ../../../CHANGES.rst:266 +#: ../../../CHANGES.rst:399 msgid "" "Fixed exceptions filters `#827 " "`_" msgstr "" -#: ../../../CHANGES.rst:273 +#: ../../../CHANGES.rst:406 msgid "" "Logger name for processing events is changed to :code:`aiogram.events`. " "`#830 `_" msgstr "" -#: ../../../CHANGES.rst:275 +#: ../../../CHANGES.rst:408 msgid "" "Added full support of Telegram Bot API 5.6 and 5.7 `#835 " "`_" msgstr "" -#: ../../../CHANGES.rst:277 +#: ../../../CHANGES.rst:410 msgid "" "**BREAKING** Events isolation mechanism is moved from FSM storages to " "standalone managers `#838 " "`_" msgstr "" -#: ../../../CHANGES.rst:283 +#: ../../../CHANGES.rst:416 msgid "3.0.0b1 (2021-12-12)" msgstr "" -#: ../../../CHANGES.rst:288 +#: ../../../CHANGES.rst:421 msgid "Added new custom operation for MagicFilter named :code:`as_`" msgstr "" -#: ../../../CHANGES.rst:290 +#: ../../../CHANGES.rst:423 msgid "Now you can use it to get magic filter result as handler argument" msgstr "" -#: ../../../CHANGES.rst:306 +#: ../../../CHANGES.rst:439 msgid "`#759 `_" msgstr "" -#: ../../../CHANGES.rst:312 +#: ../../../CHANGES.rst:445 msgid "" "Fixed: Missing :code:`ChatMemberHandler` import in " ":code:`aiogram/dispatcher/handler` `#751 " "`_" msgstr "" -#: ../../../CHANGES.rst:319 +#: ../../../CHANGES.rst:452 msgid "" "Check :code:`destiny` in case of no :code:`with_destiny` enabled in " "RedisStorage key builder `#776 " "`_" msgstr "" -#: ../../../CHANGES.rst:321 +#: ../../../CHANGES.rst:454 msgid "" "Added full support of `Bot API 5.5 `_ `#777 " "`_" msgstr "" -#: ../../../CHANGES.rst:323 +#: ../../../CHANGES.rst:456 msgid "" "Stop using feature from #336. From now settings of client-session should " "be placed as initializer arguments instead of changing instance " "attributes. `#778 `_" msgstr "" -#: ../../../CHANGES.rst:325 +#: ../../../CHANGES.rst:458 msgid "" "Make TelegramAPIServer files wrapper in local mode bi-directional " "(server-client, client-server) Now you can convert local path to server " @@ -744,11 +816,11 @@ msgid "" "`_" msgstr "" -#: ../../../CHANGES.rst:331 +#: ../../../CHANGES.rst:464 msgid "3.0.0a18 (2021-11-10)" msgstr "" -#: ../../../CHANGES.rst:336 +#: ../../../CHANGES.rst:469 msgid "" "Breaking: Changed the signature of the session middlewares Breaking: " "Renamed AiohttpSession.make_request method parameter from call to method " @@ -756,258 +828,258 @@ msgid "" "outgoing requests `#716 `_" msgstr "" -#: ../../../CHANGES.rst:340 +#: ../../../CHANGES.rst:473 msgid "" "Improved description of filters resolving error. For example when you try" " to pass wrong type of argument to the filter but don't know why filter " "is not resolved now you can get error like this:" msgstr "" -#: ../../../CHANGES.rst:350 +#: ../../../CHANGES.rst:483 msgid "`#717 `_" msgstr "" -#: ../../../CHANGES.rst:351 +#: ../../../CHANGES.rst:484 msgid "" "**Breaking internal API change** Reworked FSM Storage record keys " "propagation `#723 `_" msgstr "" -#: ../../../CHANGES.rst:354 +#: ../../../CHANGES.rst:487 msgid "" "Implemented new filter named :code:`MagicData(magic_data)` that helps to " "filter event by data from middlewares or other filters" msgstr "" -#: ../../../CHANGES.rst:356 +#: ../../../CHANGES.rst:489 msgid "" "For example your bot is running with argument named :code:`config` that " "contains the application config then you can filter event by value from " "this config:" msgstr "" -#: ../../../CHANGES.rst:362 +#: ../../../CHANGES.rst:495 msgid "`#724 `_" msgstr "" -#: ../../../CHANGES.rst:368 +#: ../../../CHANGES.rst:501 msgid "" "Fixed I18n context inside error handlers `#726 " "`_" msgstr "" -#: ../../../CHANGES.rst:370 +#: ../../../CHANGES.rst:503 msgid "" "Fixed bot session closing before emit shutdown `#734 " "`_" msgstr "" -#: ../../../CHANGES.rst:372 +#: ../../../CHANGES.rst:505 msgid "" "Fixed: bound filter resolving does not require children routers `#736 " "`_" msgstr "" -#: ../../../CHANGES.rst:379 +#: ../../../CHANGES.rst:512 msgid "" "Enabled testing on Python 3.10 Removed `async_lru` dependency (is " "incompatible with Python 3.10) and replaced usage with protected property" " `#719 `_" msgstr "" -#: ../../../CHANGES.rst:382 +#: ../../../CHANGES.rst:515 msgid "" "Converted README.md to README.rst and use it as base file for docs `#725 " "`_" msgstr "" -#: ../../../CHANGES.rst:384 +#: ../../../CHANGES.rst:517 msgid "Rework filters resolving:" msgstr "" -#: ../../../CHANGES.rst:386 +#: ../../../CHANGES.rst:519 msgid "Automatically apply Bound Filters with default values to handlers" msgstr "" -#: ../../../CHANGES.rst:387 +#: ../../../CHANGES.rst:520 msgid "Fix data transfer from parent to included routers filters" msgstr "" -#: ../../../CHANGES.rst:388 +#: ../../../CHANGES.rst:521 msgid "`#727 `_" msgstr "" -#: ../../../CHANGES.rst:389 +#: ../../../CHANGES.rst:522 msgid "" "Added full support of Bot API 5.4 https://core.telegram.org/bots/api-" "changelog#november-5-2021 `#744 " "`_" msgstr "" -#: ../../../CHANGES.rst:395 +#: ../../../CHANGES.rst:528 msgid "3.0.0a17 (2021-09-24)" msgstr "" -#: ../../../CHANGES.rst:400 +#: ../../../CHANGES.rst:533 msgid "" "Added :code:`html_text` and :code:`md_text` to Message object `#708 " "`_" msgstr "" -#: ../../../CHANGES.rst:402 +#: ../../../CHANGES.rst:535 msgid "" "Refactored I18n, added context managers for I18n engine and current " "locale `#709 `_" msgstr "" -#: ../../../CHANGES.rst:407 +#: ../../../CHANGES.rst:540 msgid "3.0.0a16 (2021-09-22)" msgstr "" -#: ../../../CHANGES.rst:412 +#: ../../../CHANGES.rst:545 msgid "Added support of local Bot API server files downloading" msgstr "" -#: ../../../CHANGES.rst:414 +#: ../../../CHANGES.rst:547 msgid "" "When Local API is enabled files can be downloaded via " "`bot.download`/`bot.download_file` methods. `#698 " "`_" msgstr "" -#: ../../../CHANGES.rst:416 +#: ../../../CHANGES.rst:549 msgid "" "Implemented I18n & L10n support `#701 " "`_" msgstr "" -#: ../../../CHANGES.rst:423 +#: ../../../CHANGES.rst:556 msgid "" "Covered by tests and docs KeyboardBuilder util `#699 " "`_" msgstr "" -#: ../../../CHANGES.rst:425 +#: ../../../CHANGES.rst:558 msgid "**Breaking!!!**. Refactored and renamed exceptions." msgstr "" -#: ../../../CHANGES.rst:427 +#: ../../../CHANGES.rst:560 msgid "" "Exceptions module was moved from :code:`aiogram.utils.exceptions` to " ":code:`aiogram.exceptions`" msgstr "" -#: ../../../CHANGES.rst:428 +#: ../../../CHANGES.rst:561 msgid "Added prefix `Telegram` for all error classes" msgstr "" -#: ../../../CHANGES.rst:429 +#: ../../../CHANGES.rst:562 msgid "`#700 `_" msgstr "" -#: ../../../CHANGES.rst:430 +#: ../../../CHANGES.rst:563 msgid "" "Replaced all :code:`pragma: no cover` marks via global " ":code:`.coveragerc` config `#702 " "`_" msgstr "" -#: ../../../CHANGES.rst:432 +#: ../../../CHANGES.rst:565 msgid "Updated dependencies." msgstr "" -#: ../../../CHANGES.rst:434 +#: ../../../CHANGES.rst:567 msgid "" "**Breaking for framework developers** Now all optional dependencies " "should be installed as extra: `poetry install -E fast -E redis -E proxy " "-E i18n -E docs` `#703 `_" msgstr "" -#: ../../../CHANGES.rst:440 +#: ../../../CHANGES.rst:573 msgid "3.0.0a15 (2021-09-10)" msgstr "" -#: ../../../CHANGES.rst:445 +#: ../../../CHANGES.rst:578 msgid "" "Ability to iterate over all states in StatesGroup. Aiogram already had in" " check for states group so this is relative feature. `#666 " "`_" msgstr "" -#: ../../../CHANGES.rst:453 +#: ../../../CHANGES.rst:586 msgid "" "Fixed incorrect type checking in the " ":class:`aiogram.utils.keyboard.KeyboardBuilder` `#674 " "`_" msgstr "" -#: ../../../CHANGES.rst:460 +#: ../../../CHANGES.rst:593 msgid "" "Disable ContentType filter by default `#668 " "`_" msgstr "" -#: ../../../CHANGES.rst:462 +#: ../../../CHANGES.rst:595 msgid "" "Moved update type detection from Dispatcher to Update object `#669 " "`_" msgstr "" -#: ../../../CHANGES.rst:464 +#: ../../../CHANGES.rst:597 msgid "" "Updated **pre-commit** config `#681 " "`_" msgstr "" -#: ../../../CHANGES.rst:466 +#: ../../../CHANGES.rst:599 msgid "" "Reworked **handlers_in_use** util. Function moved to Router as method " "**.resolve_used_update_types()** `#682 " "`_" msgstr "" -#: ../../../CHANGES.rst:471 +#: ../../../CHANGES.rst:604 msgid "3.0.0a14 (2021-08-17)" msgstr "" -#: ../../../CHANGES.rst:476 +#: ../../../CHANGES.rst:609 msgid "" "add aliases for edit/delete reply markup to Message `#662 " "`_" msgstr "" -#: ../../../CHANGES.rst:478 +#: ../../../CHANGES.rst:611 msgid "" "Reworked outer middleware chain. Prevent to call many times the outer " "middleware for each nested router `#664 " "`_" msgstr "" -#: ../../../CHANGES.rst:485 +#: ../../../CHANGES.rst:618 msgid "" "Prepare parse mode for InputMessageContent in AnswerInlineQuery method " "`#660 `_" msgstr "" -#: ../../../CHANGES.rst:492 +#: ../../../CHANGES.rst:625 msgid "" "Added integration with :code:`towncrier` `#602 " "`_" msgstr "" -#: ../../../CHANGES.rst:499 +#: ../../../CHANGES.rst:632 msgid "" "Added `.editorconfig` `#650 " "`_" msgstr "" -#: ../../../CHANGES.rst:501 +#: ../../../CHANGES.rst:634 msgid "" "Redis storage speedup globals `#651 " "`_" msgstr "" -#: ../../../CHANGES.rst:503 +#: ../../../CHANGES.rst:636 msgid "" "add allow_sending_without_reply param to Message reply aliases `#663 " "`_" @@ -2529,3 +2601,23 @@ msgstr "" #~ msgid "\\ |release| [UNRELEASED DRAFT] (2023-01-07)" #~ msgstr "" +#~ msgid "\\ |release| [UNRELEASED DRAFT] (2023-02-12)" +#~ msgstr "" + +#~ msgid "" +#~ ":class:`aiogram.enums.chat_action.ChatActions`, " +#~ ":class:`aiogram.enums.chat_member_status.ChatMemberStatus`, " +#~ ":class:`aiogram.enums.chat_type.ChatType`, " +#~ ":class:`aiogram.enums.content_type.ContentType`, " +#~ ":class:`aiogram.enums.dice_emoji.DiceEmoji`, " +#~ ":class:`aiogram.enums.inline_query_result_type.InlineQueryResultType`," +#~ " :class:`aiogram.enums.input_media_type.InputMediaType`, " +#~ ":class:`aiogram.enums.mask_position_point.MaskPositionPoint`, " +#~ ":class:`aiogram.enums.menu_button_type.MenuButtonType`, " +#~ ":class:`aiogram.enums.message_entity_type.MessageEntityType`, " +#~ ":class:`aiogram.enums.parse_mode.ParseMode`, " +#~ ":class:`aiogram.enums.poll_type.PollType`, " +#~ ":class:`aiogram.enums.sticker_type.StickerType`, " +#~ ":class:`aiogram.enums.topic_icon_color.TopicIconColor`, " +#~ ":class:`aiogram.enums.update_type.UpdateType`," +#~ msgstr "" diff --git a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po index 053c8cbd..391505ee 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po +++ b/docs/locale/uk_UA/LC_MESSAGES/dispatcher/dispatcher.po @@ -5,17 +5,16 @@ # msgid "" msgstr "" -"Project-Id-Version: aiogram\n" +"Project-Id-Version: aiogram\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-01 22:51+0300\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: 2022-12-10 19:44+0200\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" -"X-Generator: Poedit 3.2.2\n" +"Generated-By: Babel 2.11.0\n" #: ../../dispatcher/dispatcher.rst:3 msgid "Dispatcher" @@ -73,8 +72,8 @@ msgstr "Ізоляція подій" #: aiogram.dispatcher.dispatcher.Dispatcher.__init__:6 of msgid "" -"Disable FSM, note that if you disable FSM then you should not use " -"storage and events isolation" +"Disable FSM, note that if you disable FSM then you should not use storage" +" and events isolation" msgstr "" "Відключення кінцевого апарату, зауважте що при вимкненому кінцевому " "апаратові вам не слід використовувати сховище (кінцевого апарату) та " @@ -92,8 +91,8 @@ msgstr "Основна точка входу для подій" #: aiogram.dispatcher.dispatcher.Dispatcher.feed_update:1 of msgid "" -"Main entry point for incoming updates Response of this method can be " -"used as Webhook response" +"Main entry point for incoming updates Response of this method can be used" +" as Webhook response" msgstr "" "Основна точка входу для подій. Відповідь цього метода може бути " "використана для відповіді у Webhook" @@ -102,23 +101,44 @@ msgstr "" msgid "Run many bots with polling" msgstr "Запуск кількох ботів з опитуванням" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 of -msgid "Bot instances" +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:3 of +#, fuzzy +msgid "Bot instances (one or mre)" msgstr "Екземпляри ботів" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 of -msgid "Poling timeout" -msgstr "Час очікування на відповідь" +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:4 of +msgid "Long-polling wait time" +msgstr "" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 of +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:5 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:5 of msgid "Run task for each event and no wait result" msgstr "Запуск обробки без очікування результату" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 of +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:6 of +msgid "backoff-retry config" +msgstr "" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:7 of msgid "List of the update types you want your bot to receive" msgstr "Список типів подій, які має опрацьовувати ваш бот" -#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 of +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:8 of +msgid "handle signals (SIGINT/SIGTERM)" +msgstr "" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:9 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:9 of +msgid "close bot sessions on shutdown" +msgstr "" + +#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:10 +#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:10 of msgid "contextual data" msgstr "контекстні дані" @@ -149,8 +169,11 @@ msgstr "Обробка подій" #: ../../dispatcher/dispatcher.rst:45 msgid "" -"All updates can be propagated to the dispatcher by :obj:`Dispatcher." -"feed_update(bot=..., update=...)` method:" +"All updates can be propagated to the dispatcher by " +":obj:`Dispatcher.feed_update(bot=..., update=...)` method:" msgstr "" -"Усі оновлення можна передати диспетчеру через :obj:`Dispatcher." -"feed_update(bot=..., update=...)` method:" +"Усі оновлення можна передати диспетчеру через " +":obj:`Dispatcher.feed_update(bot=..., update=...)` method:" + +#~ msgid "Poling timeout" +#~ msgstr "Час очікування на відповідь" diff --git a/docs/locale/uk_UA/LC_MESSAGES/index.po b/docs/locale/uk_UA/LC_MESSAGES/index.po index 7add5fd0..e7da04ce 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/index.po @@ -8,20 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: aiogram \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-12 00:22+0200\n" +"POT-Creation-Date: 2023-03-11 01:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.11.0\n" #: ../../../README.rst:3 msgid "aiogram |beta badge|" msgstr "" -#: ../../../README.rst:98 +#: ../../../README.rst:94 msgid "Beta badge" msgstr "" @@ -33,6 +33,18 @@ msgstr "Ще в розробці!" msgid "MIT License" msgstr "" +#: ../../../README.rst:-1 +msgid "PyPi status" +msgstr "" + +#: ../../../README.rst:-1 +msgid "PyPi Package Version" +msgstr "" + +#: ../../../README.rst:-1 +msgid "Downloads" +msgstr "Завантаження" + #: ../../../README.rst:-1 msgid "Supported python versions" msgstr "Підтримувані версії Python" @@ -45,27 +57,11 @@ msgstr "" msgid "Tests" msgstr "Тести" -#: ../../../README.rst:-1 -msgid "PyPi Package Version" -msgstr "" - -#: ../../../README.rst:-1 -msgid "PyPi status" -msgstr "" - -#: ../../../README.rst:-1 -msgid "Downloads" -msgstr "Завантаження" - -#: ../../../README.rst:-1 -msgid "[Telegram] aiogram live" -msgstr "" - #: ../../../README.rst:-1 msgid "Codecov" msgstr "" -#: ../../../README.rst:44 +#: ../../../README.rst:40 msgid "" "**aiogram** is a modern and fully asynchronous framework for `Telegram " "Bot API `_ written in Python 3.8 " @@ -78,39 +74,39 @@ msgstr "" "`_ та `aiohttp " "`_." -#: ../../../README.rst:49 +#: ../../../README.rst:45 msgid "Make your bots faster and more powerful!" msgstr "Зробіть своїх ботів швидшими та потужнішими!" -#: ../../../README.rst:54 +#: ../../../README.rst:50 msgid "Documentation:" msgstr "Документація" -#: ../../../README.rst:52 +#: ../../../README.rst:48 msgid "🇺🇸 `English `_" msgstr "🇺🇸 `English `_" -#: ../../../README.rst:53 +#: ../../../README.rst:49 msgid "🇺🇦 `Ukrainian `_" msgstr "🇺🇦 `Українською `_" -#: ../../../README.rst:58 +#: ../../../README.rst:54 msgid "**Breaking News:**" msgstr "**Важливі новини**" -#: ../../../README.rst:60 +#: ../../../README.rst:56 msgid "*aiogram* 3.0 has breaking changes." msgstr "*aiogram* 3.0 має зміни, що ламають зворотну сумісність." -#: ../../../README.rst:62 +#: ../../../README.rst:58 msgid "It breaks backward compatibility by introducing new breaking changes!" msgstr "Порушує зворотну сумісність, вводячи нові критичні зміни!" -#: ../../../README.rst:65 +#: ../../../README.rst:61 msgid "Features" msgstr "Особливості" -#: ../../../README.rst:67 +#: ../../../README.rst:63 msgid "" "Asynchronous (`asyncio docs " "`_, :pep:`492`)" @@ -118,7 +114,7 @@ msgstr "" "Асинхронність (`asyncio docs " "`_, :pep:`492`)" -#: ../../../README.rst:68 +#: ../../../README.rst:64 msgid "" "Has type hints (:pep:`484`) and can be used with `mypy `_" @@ -126,20 +122,20 @@ msgstr "" "Має анотації типів (:pep:`484`) та може використовуватись з `mypy `_" -#: ../../../README.rst:69 +#: ../../../README.rst:65 msgid "Supports `PyPy `_" msgstr "Працює з `PyPy `_" -#: ../../../README.rst:70 +#: ../../../README.rst:66 #, fuzzy msgid "" -"Supports `Telegram Bot API 6.5 `_ and" +"Supports `Telegram Bot API 6.6 `_ and" " gets fast updates to the latest versions of the Bot API" msgstr "" "Підтримує `Telegram Bot API 6.3 `_ та" " швидко отримує оновлення до нових версії АПІ" -#: ../../../README.rst:71 +#: ../../../README.rst:67 msgid "" "Telegram Bot API integration code was `autogenerated " "`_ and can be easily re-generated " @@ -149,28 +145,28 @@ msgstr "" "/tg-codegen>`_ що надає змогу дуже легко оновлювати фреймворк до останніх" " версій АПІ" -#: ../../../README.rst:72 +#: ../../../README.rst:68 msgid "Updates router (Blueprints)" msgstr "Має роутери подій (Blueprints)" -#: ../../../README.rst:73 +#: ../../../README.rst:69 msgid "Has Finite State Machine" msgstr "Має вбудований кінцевий автомат" -#: ../../../README.rst:74 +#: ../../../README.rst:70 msgid "" "Uses powerful `magic filters " "`" msgstr "" -#: ../../../README.rst:75 +#: ../../../README.rst:71 msgid "Middlewares (incoming updates and API calls)" msgstr "" "Підтримує мідлвари (для вхідних подій від АПІ та для вихідних запитів до " "АПІ)" -#: ../../../README.rst:76 +#: ../../../README.rst:72 msgid "" "Provides `Replies into Webhook `_" @@ -179,13 +175,13 @@ msgstr "" "`_" -#: ../../../README.rst:77 +#: ../../../README.rst:73 msgid "Integrated I18n/L10n support with GNU Gettext (or Fluent)" msgstr "" "Має вбудовану інтеграцію для використання інтернаціоналізації та " "локалізації GNU Gettext (або Fluent)" -#: ../../../README.rst:82 +#: ../../../README.rst:78 msgid "" "It is strongly advised that you have prior experience working with " "`asyncio `_ before " @@ -195,39 +191,39 @@ msgstr "" "починати використовувати цей фреймворк. `asyncio " "`_" -#: ../../../README.rst:86 +#: ../../../README.rst:82 msgid "If you have any questions, you can visit our community chats on Telegram:" msgstr "Якщо є якість додаткові запитання, ласкаво просимо до онлайн-спільнот:" -#: ../../../README.rst:88 +#: ../../../README.rst:84 msgid "🇺🇸 `@aiogram `_" msgstr "" -#: ../../../README.rst:89 +#: ../../../README.rst:85 msgid "🇺🇦 `@aiogramua `_" msgstr "" -#: ../../../README.rst:90 +#: ../../../README.rst:86 msgid "🇺🇿 `@aiogram_uz `_" msgstr "" -#: ../../../README.rst:91 +#: ../../../README.rst:87 msgid "🇰🇿 `@aiogram_kz `_" msgstr "" -#: ../../../README.rst:92 +#: ../../../README.rst:88 msgid "🇷🇺 `@aiogram_ru `_" msgstr "💩 `@aiogram_ru `_" -#: ../../../README.rst:93 +#: ../../../README.rst:89 msgid "🇮🇷 `@aiogram_fa `_" msgstr "" -#: ../../../README.rst:94 +#: ../../../README.rst:90 msgid "🇮🇹 `@aiogram_it `_" msgstr "" -#: ../../../README.rst:95 +#: ../../../README.rst:91 msgid "🇧🇷 `@aiogram_br `_" msgstr "" @@ -239,3 +235,5 @@ msgstr "Приклад використання" msgid "Contents" msgstr "Зміст" +#~ msgid "[Telegram] aiogram live" +#~ msgstr "" diff --git a/tests/test_api/test_methods/test_add_sticker_to_set.py b/tests/test_api/test_methods/test_add_sticker_to_set.py index 0bc6472c..94e9c3f1 100644 --- a/tests/test_api/test_methods/test_add_sticker_to_set.py +++ b/tests/test_api/test_methods/test_add_sticker_to_set.py @@ -1,4 +1,5 @@ from aiogram.methods import AddStickerToSet, Request +from aiogram.types import InputSticker from tests.mocked_bot import MockedBot @@ -7,7 +8,9 @@ class TestAddStickerToSet: prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True) response: bool = await AddStickerToSet( - user_id=42, name="test stickers pack", png_sticker="file id", emojis=":)" + user_id=42, + name="test stickers pack", + sticker=InputSticker(sticker="file id", emoji_list=[":)"]), ) request: Request = bot.get_request() assert request.method == "addStickerToSet" @@ -17,7 +20,9 @@ class TestAddStickerToSet: prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True) response: bool = await bot.add_sticker_to_set( - user_id=42, name="test stickers pack", png_sticker="file id", emojis=":)" + user_id=42, + name="test stickers pack", + sticker=InputSticker(sticker="file id", emoji_list=[":)"]), ) request: Request = bot.get_request() assert request.method == "addStickerToSet" diff --git a/tests/test_api/test_methods/test_answer_inline_query.py b/tests/test_api/test_methods/test_answer_inline_query.py index c2d11b43..c3b35a2e 100644 --- a/tests/test_api/test_methods/test_answer_inline_query.py +++ b/tests/test_api/test_methods/test_answer_inline_query.py @@ -32,7 +32,9 @@ class TestAnswerInlineQuery: def test_parse_mode(self, bot: MockedBot): query = AnswerInlineQuery( inline_query_id="query id", - results=[InlineQueryResultPhoto(id="result id", photo_url="photo", thumb_url="thumb")], + results=[ + InlineQueryResultPhoto(id="result id", photo_url="photo", thumbnail_url="thumb") + ], ) request = query.build_request(bot) assert request.data["results"][0]["parse_mode"] is None @@ -48,7 +50,7 @@ class TestAnswerInlineQuery: InlineQueryResultPhoto( id="result id", photo_url="photo", - thumb_url="thumb", + thumbnail_url="thumb", input_message_content=InputTextMessageContent(message_text="test"), ) ], diff --git a/tests/test_api/test_methods/test_create_new_sticker_set.py b/tests/test_api/test_methods/test_create_new_sticker_set.py index b82b1974..ba44266e 100644 --- a/tests/test_api/test_methods/test_create_new_sticker_set.py +++ b/tests/test_api/test_methods/test_create_new_sticker_set.py @@ -1,4 +1,6 @@ +from aiogram.enums import StickerFormat from aiogram.methods import CreateNewStickerSet, Request +from aiogram.types import FSInputFile, InputSticker from tests.mocked_bot import MockedBot @@ -7,7 +9,14 @@ class TestCreateNewStickerSet: prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True) response: bool = await CreateNewStickerSet( - user_id=42, name="name", title="title", png_sticker="file id", emojis=":)" + user_id=42, + name="name", + title="title", + stickers=[ + InputSticker(sticker="file id", emoji_list=[":)"]), + InputSticker(sticker=FSInputFile("file.png"), emoji_list=["=("]), + ], + sticker_format=StickerFormat.STATIC, ) request: Request = bot.get_request() assert request.method == "createNewStickerSet" @@ -17,7 +26,14 @@ class TestCreateNewStickerSet: prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True) response: bool = await bot.create_new_sticker_set( - user_id=42, name="name", title="title", png_sticker="file id", emojis=":)" + user_id=42, + name="name", + title="title", + stickers=[ + InputSticker(sticker="file id", emoji_list=[":)"]), + InputSticker(sticker=FSInputFile("file.png"), emoji_list=["=("]), + ], + sticker_format=StickerFormat.STATIC, ) request: Request = bot.get_request() assert request.method == "createNewStickerSet" diff --git a/tests/test_api/test_methods/test_delete_sticker_set.py b/tests/test_api/test_methods/test_delete_sticker_set.py new file mode 100644 index 00000000..4ab6a1a0 --- /dev/null +++ b/tests/test_api/test_methods/test_delete_sticker_set.py @@ -0,0 +1,20 @@ +from aiogram.methods import DeleteStickerSet, Request +from tests.mocked_bot import MockedBot + + +class TestDeleteStickerSet: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(DeleteStickerSet, ok=True, result=True) + + response: bool = await DeleteStickerSet(name="test") + request: Request = bot.get_request() + assert request.method == "deleteStickerSet" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(DeleteStickerSet, ok=True, result=True) + + response: bool = await bot.delete_sticker_set(name="test") + request: Request = bot.get_request() + assert request.method == "deleteStickerSet" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_description.py b/tests/test_api/test_methods/test_get_my_description.py new file mode 100644 index 00000000..8a861ecb --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_description.py @@ -0,0 +1,25 @@ +from aiogram.methods import GetMyDescription, Request +from aiogram.types import BotDescription +from tests.mocked_bot import MockedBot + + +class TestGetMyDescription: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyDescription, ok=True, result=BotDescription(description="Test") + ) + + response: BotDescription = await GetMyDescription() + request: Request = bot.get_request() + assert request.method == "getMyDescription" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyDescription, ok=True, result=BotDescription(description="Test") + ) + + response: BotDescription = await bot.get_my_description() + request: Request = bot.get_request() + assert request.method == "getMyDescription" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_short_description.py b/tests/test_api/test_methods/test_get_my_short_description.py new file mode 100644 index 00000000..5d362fdb --- /dev/null +++ b/tests/test_api/test_methods/test_get_my_short_description.py @@ -0,0 +1,25 @@ +from aiogram.methods import GetMyShortDescription, Request +from aiogram.types import BotShortDescription +from tests.mocked_bot import MockedBot + + +class TestGetMyShortDescription: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyShortDescription, ok=True, result=BotShortDescription(short_description="Test") + ) + + response: BotShortDescription = await GetMyShortDescription() + request: Request = bot.get_request() + assert request.method == "getMyShortDescription" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + GetMyShortDescription, ok=True, result=BotShortDescription(short_description="Test") + ) + + response: BotShortDescription = await bot.get_my_short_description() + request: Request = bot.get_request() + assert request.method == "getMyShortDescription" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_video_note.py b/tests/test_api/test_methods/test_send_video_note.py index e9afee41..bec233c7 100644 --- a/tests/test_api/test_methods/test_send_video_note.py +++ b/tests/test_api/test_methods/test_send_video_note.py @@ -21,7 +21,9 @@ class TestSendVideoNote: ) response: Message = await SendVideoNote( - chat_id=42, video_note="file id", thumb=BufferedInputFile(b"", "file.png") + chat_id=42, + video_note="file id", + thumbnail=BufferedInputFile(b"", "file.png"), ) request: Request = bot.get_request() assert request.method == "sendVideoNote" @@ -42,7 +44,9 @@ class TestSendVideoNote: ) response: Message = await bot.send_video_note( - chat_id=42, video_note="file id", thumb=BufferedInputFile(b"", "file.png") + chat_id=42, + video_note="file id", + thumbnail=BufferedInputFile(b"", "file.png"), ) request: Request = bot.get_request() assert request.method == "sendVideoNote" diff --git a/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py b/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py new file mode 100644 index 00000000..20ad08c9 --- /dev/null +++ b/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py @@ -0,0 +1,28 @@ +from aiogram.methods import Request, SetCustomEmojiStickerSetThumbnail +from tests.mocked_bot import MockedBot + + +class TestSetCustomEmojiStickerSetThumbnail: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SetCustomEmojiStickerSetThumbnail, ok=True, result=True + ) + + response: bool = await SetCustomEmojiStickerSetThumbnail( + name="test", custom_emoji_id="custom id" + ) + request: Request = bot.get_request() + assert request.method == "setCustomEmojiStickerSetThumbnail" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for( + SetCustomEmojiStickerSetThumbnail, ok=True, result=True + ) + + response: bool = await bot.set_custom_emoji_sticker_set_thumbnail( + name="test", custom_emoji_id="custom id" + ) + request: Request = bot.get_request() + assert request.method == "setCustomEmojiStickerSetThumbnail" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_description.py b/tests/test_api/test_methods/test_set_my_description.py new file mode 100644 index 00000000..843b66d2 --- /dev/null +++ b/tests/test_api/test_methods/test_set_my_description.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, SetMyDescription +from tests.mocked_bot import MockedBot + + +class TestSetMyDescription: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyDescription, ok=True, result=True) + + response: bool = await SetMyDescription(description="Test") + request: Request = bot.get_request() + assert request.method == "setMyDescription" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyDescription, ok=True, result=True) + + response: bool = await bot.set_my_description(description="Test") + request: Request = bot.get_request() + assert request.method == "setMyDescription" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_short_description.py b/tests/test_api/test_methods/test_set_my_short_description.py new file mode 100644 index 00000000..c985dee2 --- /dev/null +++ b/tests/test_api/test_methods/test_set_my_short_description.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, SetMyDescription, SetMyShortDescription +from tests.mocked_bot import MockedBot + + +class TestSetMyShortDescription: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyShortDescription, ok=True, result=True) + + response: bool = await SetMyShortDescription(short_description="Test") + request: Request = bot.get_request() + assert request.method == "setMyShortDescription" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetMyShortDescription, ok=True, result=True) + + response: bool = await bot.set_my_short_description(short_description="Test") + request: Request = bot.get_request() + assert request.method == "setMyShortDescription" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_emoji_list.py b/tests/test_api/test_methods/test_set_sticker_emoji_list.py new file mode 100644 index 00000000..b5ae829c --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_emoji_list.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, SetStickerEmojiList +from tests.mocked_bot import MockedBot + + +class TestSetStickerEmojiList: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerEmojiList, ok=True, result=True) + + response: bool = await SetStickerEmojiList(sticker="sticker id", emoji_list=["X"]) + request: Request = bot.get_request() + assert request.method == "setStickerEmojiList" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerEmojiList, ok=True, result=True) + + response: bool = await bot.set_sticker_emoji_list(sticker="sticker id", emoji_list=["X"]) + request: Request = bot.get_request() + assert request.method == "setStickerEmojiList" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_keywords.py b/tests/test_api/test_methods/test_set_sticker_keywords.py new file mode 100644 index 00000000..7cea6cae --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_keywords.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, SetStickerKeywords +from tests.mocked_bot import MockedBot + + +class TestSetStickerKeywords: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerKeywords, ok=True, result=True) + + response: bool = await SetStickerKeywords(sticker="sticker id", keywords=["X"]) + request: Request = bot.get_request() + assert request.method == "setStickerKeywords" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerKeywords, ok=True, result=True) + + response: bool = await bot.set_sticker_keywords(sticker="sticker id", keywords=["X"]) + request: Request = bot.get_request() + assert request.method == "setStickerKeywords" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_mask_position.py b/tests/test_api/test_methods/test_set_sticker_mask_position.py new file mode 100644 index 00000000..dec92d19 --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_mask_position.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, SetStickerEmojiList, SetStickerMaskPosition +from tests.mocked_bot import MockedBot + + +class TestSetStickerEmojiList: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerMaskPosition, ok=True, result=True) + + response: bool = await SetStickerMaskPosition(sticker="sticker id") + request: Request = bot.get_request() + assert request.method == "setStickerMaskPosition" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerMaskPosition, ok=True, result=True) + + response: bool = await bot.set_sticker_mask_position(sticker="sticker id") + request: Request = bot.get_request() + assert request.method == "setStickerMaskPosition" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumb.py b/tests/test_api/test_methods/test_set_sticker_set_thumb.py deleted file mode 100644 index ca1b596a..00000000 --- a/tests/test_api/test_methods/test_set_sticker_set_thumb.py +++ /dev/null @@ -1,22 +0,0 @@ -from aiogram.methods import Request, SetStickerSetThumb -from tests.mocked_bot import MockedBot - - -class TestSetStickerSetThumb: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerSetThumb, ok=True, result=None) - - response: bool = await SetStickerSetThumb(name="test", user_id=42) - request: Request = bot.get_request() - assert request.method == "setStickerSetThumb" - # assert request.data == {} - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerSetThumb, ok=True, result=None) - - response: bool = await bot.set_sticker_set_thumb(name="test", user_id=42) - request: Request = bot.get_request() - assert request.method == "setStickerSetThumb" - # assert request.data == {} - assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py b/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py new file mode 100644 index 00000000..41795be6 --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py @@ -0,0 +1,22 @@ +from aiogram.methods import Request, SetStickerSetThumbnail +from tests.mocked_bot import MockedBot + + +class TestSetStickerSetThumbnail: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerSetThumbnail, ok=True, result=None) + + response: bool = await SetStickerSetThumbnail(name="test", user_id=42) + request: Request = bot.get_request() + assert request.method == "setStickerSetThumbnail" + # assert request.data == {} + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerSetThumbnail, ok=True, result=None) + + response: bool = await bot.set_sticker_set_thumbnail(name="test", user_id=42) + request: Request = bot.get_request() + assert request.method == "setStickerSetThumbnail" + # assert request.data == {} + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_title.py b/tests/test_api/test_methods/test_set_sticker_set_title.py new file mode 100644 index 00000000..1dc306bc --- /dev/null +++ b/tests/test_api/test_methods/test_set_sticker_set_title.py @@ -0,0 +1,20 @@ +from aiogram.methods import Request, SetStickerEmojiList, SetStickerSetTitle +from tests.mocked_bot import MockedBot + + +class TestSetStickerSetTitle: + async def test_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerSetTitle, ok=True, result=True) + + response: bool = await SetStickerSetTitle(name="test", title="Test") + request: Request = bot.get_request() + assert request.method == "setStickerSetTitle" + assert response == prepare_result.result + + async def test_bot_method(self, bot: MockedBot): + prepare_result = bot.add_result_for(SetStickerSetTitle, ok=True, result=True) + + response: bool = await bot.set_sticker_set_title(name="test", title="Test") + request: Request = bot.get_request() + assert request.method == "setStickerSetTitle" + assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_upload_sticker_file.py b/tests/test_api/test_methods/test_upload_sticker_file.py index f8332815..7a6bded9 100644 --- a/tests/test_api/test_methods/test_upload_sticker_file.py +++ b/tests/test_api/test_methods/test_upload_sticker_file.py @@ -1,3 +1,4 @@ +from aiogram.enums import StickerFormat from aiogram.methods import Request, UploadStickerFile from aiogram.types import BufferedInputFile, File from tests.mocked_bot import MockedBot @@ -10,7 +11,9 @@ class TestUploadStickerFile: ) response: File = await UploadStickerFile( - user_id=42, png_sticker=BufferedInputFile(b"", "file.png") + user_id=42, + sticker=BufferedInputFile(b"", "file.png"), + sticker_format=StickerFormat.STATIC, ) request: Request = bot.get_request() assert request.method == "uploadStickerFile" @@ -22,7 +25,9 @@ class TestUploadStickerFile: ) response: File = await bot.upload_sticker_file( - user_id=42, png_sticker=BufferedInputFile(b"", "file.png") + user_id=42, + sticker=BufferedInputFile(b"", "file.png"), + sticker_format=StickerFormat.STATIC, ) request: Request = bot.get_request() assert request.method == "uploadStickerFile" From f6020476e65ad57eb7f35324b750012ec6510ea2 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 11 Mar 2023 16:41:19 +0200 Subject: [PATCH 40/42] Update schema --- .butcher/methods/addStickerToSet/entity.json | 4 +-- .../methods/answerCallbackQuery/entity.json | 4 +-- .../methods/answerInlineQuery/entity.json | 4 +-- .../answerPreCheckoutQuery/entity.json | 4 +-- .../methods/answerShippingQuery/entity.json | 4 +-- .../methods/answerWebAppQuery/entity.json | 4 +-- .../approveChatJoinRequest/entity.json | 4 +-- .butcher/methods/banChatMember/entity.json | 4 +-- .../methods/banChatSenderChat/entity.json | 4 +-- .butcher/methods/close/entity.json | 4 +-- .butcher/methods/closeForumTopic/entity.json | 4 +-- .../closeGeneralForumTopic/entity.json | 4 +-- .butcher/methods/copyMessage/entity.json | 4 +-- .../methods/createChatInviteLink/entity.json | 4 +-- .butcher/methods/createForumTopic/entity.json | 4 +-- .../methods/createInvoiceLink/entity.json | 4 +-- .../methods/createNewStickerSet/entity.json | 4 +-- .../declineChatJoinRequest/entity.json | 4 +-- .butcher/methods/deleteChatPhoto/entity.json | 4 +-- .../methods/deleteChatStickerSet/entity.json | 4 +-- .butcher/methods/deleteForumTopic/entity.json | 4 +-- .butcher/methods/deleteMessage/entity.json | 4 +-- .butcher/methods/deleteMyCommands/entity.json | 4 +-- .../methods/deleteStickerFromSet/entity.json | 4 +-- .butcher/methods/deleteStickerSet/entity.json | 4 +-- .butcher/methods/deleteWebhook/entity.json | 4 +-- .../methods/editChatInviteLink/entity.json | 4 +-- .butcher/methods/editForumTopic/entity.json | 4 +-- .../methods/editGeneralForumTopic/entity.json | 4 +-- .../methods/editMessageCaption/entity.json | 4 +-- .../editMessageLiveLocation/entity.json | 4 +-- .butcher/methods/editMessageMedia/entity.json | 4 +-- .../editMessageReplyMarkup/entity.json | 4 +-- .butcher/methods/editMessageText/entity.json | 4 +-- .../methods/exportChatInviteLink/entity.json | 4 +-- .butcher/methods/forwardMessage/entity.json | 4 +-- .butcher/methods/getChat/entity.json | 4 +-- .../methods/getChatAdministrators/entity.json | 4 +-- .butcher/methods/getChatMember/entity.json | 4 +-- .../methods/getChatMemberCount/entity.json | 4 +-- .../methods/getChatMenuButton/entity.json | 4 +-- .../getCustomEmojiStickers/entity.json | 4 +-- .butcher/methods/getFile/entity.json | 4 +-- .../getForumTopicIconStickers/entity.json | 4 +-- .../methods/getGameHighScores/entity.json | 4 +-- .butcher/methods/getMe/entity.json | 4 +-- .butcher/methods/getMyCommands/entity.json | 4 +-- .../entity.json | 4 +-- .butcher/methods/getMyDescription/entity.json | 4 +-- .../methods/getMyShortDescription/entity.json | 4 +-- .butcher/methods/getStickerSet/entity.json | 4 +-- .butcher/methods/getUpdates/entity.json | 4 +-- .../methods/getUserProfilePhotos/entity.json | 4 +-- .butcher/methods/getWebhookInfo/entity.json | 4 +-- .../methods/hideGeneralForumTopic/entity.json | 4 +-- .butcher/methods/leaveChat/entity.json | 4 +-- .butcher/methods/logOut/entity.json | 4 +-- .butcher/methods/pinChatMessage/entity.json | 4 +-- .../methods/promoteChatMember/entity.json | 4 +-- .butcher/methods/reopenForumTopic/entity.json | 4 +-- .../reopenGeneralForumTopic/entity.json | 4 +-- .../methods/restrictChatMember/entity.json | 4 +-- .../methods/revokeChatInviteLink/entity.json | 4 +-- .butcher/methods/sendAnimation/entity.json | 4 +-- .butcher/methods/sendAudio/entity.json | 4 +-- .butcher/methods/sendChatAction/entity.json | 4 +-- .butcher/methods/sendContact/entity.json | 4 +-- .butcher/methods/sendDice/entity.json | 4 +-- .butcher/methods/sendDocument/entity.json | 4 +-- .butcher/methods/sendGame/entity.json | 4 +-- .butcher/methods/sendInvoice/entity.json | 4 +-- .butcher/methods/sendLocation/entity.json | 4 +-- .butcher/methods/sendMediaGroup/entity.json | 4 +-- .butcher/methods/sendMessage/entity.json | 4 +-- .butcher/methods/sendPhoto/entity.json | 4 +-- .butcher/methods/sendPoll/entity.json | 4 +-- .butcher/methods/sendSticker/entity.json | 4 +-- .butcher/methods/sendVenue/entity.json | 4 +-- .butcher/methods/sendVideo/entity.json | 4 +-- .butcher/methods/sendVideoNote/entity.json | 4 +-- .butcher/methods/sendVoice/entity.json | 4 +-- .../entity.json | 4 +-- .../methods/setChatDescription/entity.json | 4 +-- .../methods/setChatMenuButton/entity.json | 4 +-- .../methods/setChatPermissions/entity.json | 4 +-- .butcher/methods/setChatPhoto/entity.json | 4 +-- .../methods/setChatStickerSet/entity.json | 4 +-- .butcher/methods/setChatTitle/entity.json | 4 +-- .../entity.json | 4 +-- .butcher/methods/setGameScore/entity.json | 4 +-- .butcher/methods/setMyCommands/entity.json | 4 +-- .../entity.json | 4 +-- .butcher/methods/setMyDescription/entity.json | 4 +-- .../methods/setMyShortDescription/entity.json | 4 +-- .../methods/setPassportDataErrors/entity.json | 4 +-- .../methods/setStickerEmojiList/entity.json | 4 +-- .../methods/setStickerKeywords/entity.json | 4 +-- .../setStickerMaskPosition/entity.json | 4 +-- .../setStickerPositionInSet/entity.json | 4 +-- .../setStickerSetThumbnail/entity.json | 4 +-- .../methods/setStickerSetTitle/entity.json | 4 +-- .butcher/methods/setWebhook/entity.json | 4 +-- .../stopMessageLiveLocation/entity.json | 4 +-- .butcher/methods/stopPoll/entity.json | 4 +-- .butcher/methods/unbanChatMember/entity.json | 4 +-- .../methods/unbanChatSenderChat/entity.json | 4 +-- .../unhideGeneralForumTopic/entity.json | 4 +-- .../methods/unpinAllChatMessages/entity.json | 4 +-- .../unpinAllForumTopicMessages/entity.json | 4 +-- .butcher/methods/unpinChatMessage/entity.json | 4 +-- .../methods/uploadStickerFile/entity.json | 4 +-- .butcher/types/Animation/entity.json | 4 +-- .butcher/types/Audio/entity.json | 4 +-- .butcher/types/BotCommand/entity.json | 4 +-- .butcher/types/BotCommandScope/entity.json | 4 +-- .../entity.json | 4 +-- .../BotCommandScopeAllGroupChats/entity.json | 4 +-- .../entity.json | 4 +-- .../types/BotCommandScopeChat/entity.json | 4 +-- .../entity.json | 4 +-- .../BotCommandScopeChatMember/entity.json | 4 +-- .../types/BotCommandScopeDefault/entity.json | 4 +-- .butcher/types/BotDescription/entity.json | 4 +-- .../types/BotShortDescription/entity.json | 4 +-- .butcher/types/CallbackGame/entity.json | 4 +-- .butcher/types/CallbackQuery/entity.json | 4 +-- .butcher/types/Chat/entity.json | 4 +-- .../types/ChatAdministratorRights/entity.json | 4 +-- .butcher/types/ChatInviteLink/entity.json | 4 +-- .butcher/types/ChatJoinRequest/entity.json | 4 +-- .butcher/types/ChatLocation/entity.json | 4 +-- .butcher/types/ChatMember/entity.json | 4 +-- .../types/ChatMemberAdministrator/entity.json | 4 +-- .butcher/types/ChatMemberBanned/entity.json | 4 +-- .butcher/types/ChatMemberLeft/entity.json | 4 +-- .butcher/types/ChatMemberMember/entity.json | 4 +-- .butcher/types/ChatMemberOwner/entity.json | 4 +-- .../types/ChatMemberRestricted/entity.json | 4 +-- .butcher/types/ChatMemberUpdated/entity.json | 4 +-- .butcher/types/ChatPermissions/entity.json | 4 +-- .butcher/types/ChatPhoto/entity.json | 4 +-- .butcher/types/ChatShared/entity.json | 4 +-- .butcher/types/ChosenInlineResult/entity.json | 4 +-- .butcher/types/Contact/entity.json | 4 +-- .butcher/types/Dice/entity.json | 4 +-- .butcher/types/Document/entity.json | 4 +-- .../types/EncryptedCredentials/entity.json | 4 +-- .../EncryptedPassportElement/entity.json | 4 +-- .butcher/types/ErrorEvent/entity.json | 36 ------------------- .butcher/types/ErrorEvent/replace.yml | 2 -- .butcher/types/File/entity.json | 4 +-- .butcher/types/ForceReply/entity.json | 4 +-- .butcher/types/ForumTopic/entity.json | 4 +-- .butcher/types/ForumTopicClosed/entity.json | 4 +-- .butcher/types/ForumTopicCreated/entity.json | 4 +-- .butcher/types/ForumTopicEdited/entity.json | 4 +-- .butcher/types/ForumTopicReopened/entity.json | 4 +-- .butcher/types/Game/entity.json | 4 +-- .butcher/types/GameHighScore/entity.json | 4 +-- .../types/GeneralForumTopicHidden/entity.json | 4 +-- .../GeneralForumTopicUnhidden/entity.json | 4 +-- .../types/InlineKeyboardButton/entity.json | 4 +-- .../types/InlineKeyboardMarkup/entity.json | 4 +-- .butcher/types/InlineQuery/entity.json | 4 +-- .butcher/types/InlineQueryResult/entity.json | 4 +-- .../InlineQueryResultArticle/entity.json | 4 +-- .../types/InlineQueryResultAudio/entity.json | 4 +-- .../InlineQueryResultCachedAudio/entity.json | 4 +-- .../entity.json | 4 +-- .../InlineQueryResultCachedGif/entity.json | 4 +-- .../entity.json | 4 +-- .../InlineQueryResultCachedPhoto/entity.json | 4 +-- .../entity.json | 4 +-- .../InlineQueryResultCachedVideo/entity.json | 4 +-- .../InlineQueryResultCachedVoice/entity.json | 4 +-- .../InlineQueryResultContact/entity.json | 4 +-- .../InlineQueryResultDocument/entity.json | 4 +-- .../types/InlineQueryResultGame/entity.json | 4 +-- .../types/InlineQueryResultGif/entity.json | 4 +-- .../InlineQueryResultLocation/entity.json | 4 +-- .../InlineQueryResultMpeg4Gif/entity.json | 4 +-- .../types/InlineQueryResultPhoto/entity.json | 4 +-- .../types/InlineQueryResultVenue/entity.json | 4 +-- .../types/InlineQueryResultVideo/entity.json | 4 +-- .../types/InlineQueryResultVoice/entity.json | 4 +-- .../InputContactMessageContent/entity.json | 4 +-- .butcher/types/InputFile/entity.json | 4 +-- .../InputInvoiceMessageContent/entity.json | 4 +-- .../InputLocationMessageContent/entity.json | 4 +-- .butcher/types/InputMedia/entity.json | 4 +-- .../types/InputMediaAnimation/entity.json | 4 +-- .butcher/types/InputMediaAudio/entity.json | 4 +-- .butcher/types/InputMediaDocument/entity.json | 4 +-- .butcher/types/InputMediaPhoto/entity.json | 4 +-- .butcher/types/InputMediaVideo/entity.json | 4 +-- .../types/InputMessageContent/entity.json | 4 +-- .butcher/types/InputSticker/entity.json | 4 +-- .../types/InputTextMessageContent/entity.json | 4 +-- .../InputVenueMessageContent/entity.json | 4 +-- .butcher/types/Invoice/entity.json | 4 +-- .butcher/types/KeyboardButton/entity.json | 4 +-- .../types/KeyboardButtonPollType/entity.json | 4 +-- .../KeyboardButtonRequestChat/entity.json | 4 +-- .../KeyboardButtonRequestUser/entity.json | 4 +-- .butcher/types/LabeledPrice/entity.json | 4 +-- .butcher/types/Location/entity.json | 4 +-- .butcher/types/LoginUrl/entity.json | 4 +-- .butcher/types/MaskPosition/entity.json | 4 +-- .butcher/types/MenuButton/entity.json | 4 +-- .butcher/types/MenuButtonCommands/entity.json | 4 +-- .butcher/types/MenuButtonDefault/entity.json | 4 +-- .butcher/types/MenuButtonWebApp/entity.json | 4 +-- .butcher/types/Message/entity.json | 4 +-- .../MessageAutoDeleteTimerChanged/entity.json | 4 +-- .butcher/types/MessageEntity/entity.json | 4 +-- .butcher/types/MessageId/entity.json | 4 +-- .butcher/types/OrderInfo/entity.json | 4 +-- .butcher/types/PassportData/entity.json | 4 +-- .../types/PassportElementError/entity.json | 4 +-- .../PassportElementErrorDataField/entity.json | 4 +-- .../PassportElementErrorFile/entity.json | 4 +-- .../PassportElementErrorFiles/entity.json | 4 +-- .../PassportElementErrorFrontSide/entity.json | 4 +-- .../entity.json | 4 +-- .../PassportElementErrorSelfie/entity.json | 4 +-- .../entity.json | 4 +-- .../entity.json | 4 +-- .../entity.json | 4 +-- .butcher/types/PassportFile/entity.json | 4 +-- .butcher/types/PhotoSize/entity.json | 4 +-- .butcher/types/Poll/entity.json | 4 +-- .butcher/types/PollAnswer/entity.json | 4 +-- .butcher/types/PollOption/entity.json | 4 +-- .butcher/types/PreCheckoutQuery/entity.json | 4 +-- .../types/ProximityAlertTriggered/entity.json | 4 +-- .../types/ReplyKeyboardMarkup/entity.json | 4 +-- .../types/ReplyKeyboardRemove/entity.json | 4 +-- .butcher/types/ResponseParameters/entity.json | 4 +-- .butcher/types/SentWebAppMessage/entity.json | 4 +-- .butcher/types/ShippingAddress/entity.json | 4 +-- .butcher/types/ShippingOption/entity.json | 4 +-- .butcher/types/ShippingQuery/entity.json | 4 +-- .butcher/types/Sticker/entity.json | 4 +-- .butcher/types/StickerSet/entity.json | 4 +-- .butcher/types/SuccessfulPayment/entity.json | 4 +-- .butcher/types/Update/entity.json | 4 +-- .butcher/types/User/entity.json | 4 +-- .butcher/types/UserProfilePhotos/entity.json | 4 +-- .butcher/types/UserShared/entity.json | 4 +-- .butcher/types/Venue/entity.json | 4 +-- .butcher/types/Video/entity.json | 4 +-- .butcher/types/VideoChatEnded/entity.json | 4 +-- .../VideoChatParticipantsInvited/entity.json | 4 +-- .butcher/types/VideoChatScheduled/entity.json | 4 +-- .butcher/types/VideoChatStarted/entity.json | 4 +-- .butcher/types/VideoNote/entity.json | 4 +-- .butcher/types/Voice/entity.json | 4 +-- .butcher/types/WebAppData/entity.json | 4 +-- .butcher/types/WebAppInfo/entity.json | 4 +-- .butcher/types/WebhookInfo/entity.json | 4 +-- .butcher/types/WriteAccessAllowed/entity.json | 4 +-- docs/api/types/index.rst | 8 ----- 262 files changed, 259 insertions(+), 823 deletions(-) delete mode 100644 .butcher/types/ErrorEvent/entity.json delete mode 100644 .butcher/types/ErrorEvent/replace.yml diff --git a/.butcher/methods/addStickerToSet/entity.json b/.butcher/methods/addStickerToSet/entity.json index cab8f7af..ea9b690e 100644 --- a/.butcher/methods/addStickerToSet/entity.json +++ b/.butcher/methods/addStickerToSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/answerCallbackQuery/entity.json b/.butcher/methods/answerCallbackQuery/entity.json index 7d3cf16a..d4d5bf0f 100644 --- a/.butcher/methods/answerCallbackQuery/entity.json +++ b/.butcher/methods/answerCallbackQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/answerInlineQuery/entity.json b/.butcher/methods/answerInlineQuery/entity.json index fe5efa5e..410c1ef4 100644 --- a/.butcher/methods/answerInlineQuery/entity.json +++ b/.butcher/methods/answerInlineQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/methods/answerPreCheckoutQuery/entity.json b/.butcher/methods/answerPreCheckoutQuery/entity.json index 7ab13902..275c85d6 100644 --- a/.butcher/methods/answerPreCheckoutQuery/entity.json +++ b/.butcher/methods/answerPreCheckoutQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/methods/answerShippingQuery/entity.json b/.butcher/methods/answerShippingQuery/entity.json index 40a5d985..906f38ab 100644 --- a/.butcher/methods/answerShippingQuery/entity.json +++ b/.butcher/methods/answerShippingQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/methods/answerWebAppQuery/entity.json b/.butcher/methods/answerWebAppQuery/entity.json index ad6d1ac4..cff0b491 100644 --- a/.butcher/methods/answerWebAppQuery/entity.json +++ b/.butcher/methods/answerWebAppQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/methods/approveChatJoinRequest/entity.json b/.butcher/methods/approveChatJoinRequest/entity.json index 67275af0..19620b97 100644 --- a/.butcher/methods/approveChatJoinRequest/entity.json +++ b/.butcher/methods/approveChatJoinRequest/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/banChatMember/entity.json b/.butcher/methods/banChatMember/entity.json index 4e2d7345..c6ee2e8e 100644 --- a/.butcher/methods/banChatMember/entity.json +++ b/.butcher/methods/banChatMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/banChatSenderChat/entity.json b/.butcher/methods/banChatSenderChat/entity.json index f53b422d..425f4c72 100644 --- a/.butcher/methods/banChatSenderChat/entity.json +++ b/.butcher/methods/banChatSenderChat/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/close/entity.json b/.butcher/methods/close/entity.json index e7c4de18..5a374104 100644 --- a/.butcher/methods/close/entity.json +++ b/.butcher/methods/close/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/closeForumTopic/entity.json b/.butcher/methods/closeForumTopic/entity.json index bed8f984..efe086a7 100644 --- a/.butcher/methods/closeForumTopic/entity.json +++ b/.butcher/methods/closeForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/closeGeneralForumTopic/entity.json b/.butcher/methods/closeGeneralForumTopic/entity.json index 9fcbc4fe..42c6f3bf 100644 --- a/.butcher/methods/closeGeneralForumTopic/entity.json +++ b/.butcher/methods/closeGeneralForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/copyMessage/entity.json b/.butcher/methods/copyMessage/entity.json index 20060294..5dc4f776 100644 --- a/.butcher/methods/copyMessage/entity.json +++ b/.butcher/methods/copyMessage/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/createChatInviteLink/entity.json b/.butcher/methods/createChatInviteLink/entity.json index 5f495b74..459edcd8 100644 --- a/.butcher/methods/createChatInviteLink/entity.json +++ b/.butcher/methods/createChatInviteLink/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/createForumTopic/entity.json b/.butcher/methods/createForumTopic/entity.json index 6babdc43..c10317c1 100644 --- a/.butcher/methods/createForumTopic/entity.json +++ b/.butcher/methods/createForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/createInvoiceLink/entity.json b/.butcher/methods/createInvoiceLink/entity.json index e5880197..14bed157 100644 --- a/.butcher/methods/createInvoiceLink/entity.json +++ b/.butcher/methods/createInvoiceLink/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/methods/createNewStickerSet/entity.json b/.butcher/methods/createNewStickerSet/entity.json index 34fcbfc5..7050c925 100644 --- a/.butcher/methods/createNewStickerSet/entity.json +++ b/.butcher/methods/createNewStickerSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/declineChatJoinRequest/entity.json b/.butcher/methods/declineChatJoinRequest/entity.json index 88134d68..c3935ffc 100644 --- a/.butcher/methods/declineChatJoinRequest/entity.json +++ b/.butcher/methods/declineChatJoinRequest/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/deleteChatPhoto/entity.json b/.butcher/methods/deleteChatPhoto/entity.json index 2037a932..ec2b6f4b 100644 --- a/.butcher/methods/deleteChatPhoto/entity.json +++ b/.butcher/methods/deleteChatPhoto/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/deleteChatStickerSet/entity.json b/.butcher/methods/deleteChatStickerSet/entity.json index 85091a8e..e1399fc4 100644 --- a/.butcher/methods/deleteChatStickerSet/entity.json +++ b/.butcher/methods/deleteChatStickerSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/deleteForumTopic/entity.json b/.butcher/methods/deleteForumTopic/entity.json index 3fbc6b8e..4e231d5b 100644 --- a/.butcher/methods/deleteForumTopic/entity.json +++ b/.butcher/methods/deleteForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/deleteMessage/entity.json b/.butcher/methods/deleteMessage/entity.json index 101cac70..945c67ac 100644 --- a/.butcher/methods/deleteMessage/entity.json +++ b/.butcher/methods/deleteMessage/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/deleteMyCommands/entity.json b/.butcher/methods/deleteMyCommands/entity.json index 1387029c..09b79f30 100644 --- a/.butcher/methods/deleteMyCommands/entity.json +++ b/.butcher/methods/deleteMyCommands/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/deleteStickerFromSet/entity.json b/.butcher/methods/deleteStickerFromSet/entity.json index db88dbd7..1792317f 100644 --- a/.butcher/methods/deleteStickerFromSet/entity.json +++ b/.butcher/methods/deleteStickerFromSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/deleteStickerSet/entity.json b/.butcher/methods/deleteStickerSet/entity.json index 1ae6f1ba..c33a8833 100644 --- a/.butcher/methods/deleteStickerSet/entity.json +++ b/.butcher/methods/deleteStickerSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/deleteWebhook/entity.json b/.butcher/methods/deleteWebhook/entity.json index 36b6210a..bab4c013 100644 --- a/.butcher/methods/deleteWebhook/entity.json +++ b/.butcher/methods/deleteWebhook/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Getting updates", "anchor": "getting-updates" diff --git a/.butcher/methods/editChatInviteLink/entity.json b/.butcher/methods/editChatInviteLink/entity.json index de98d31b..67d40ac9 100644 --- a/.butcher/methods/editChatInviteLink/entity.json +++ b/.butcher/methods/editChatInviteLink/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/editForumTopic/entity.json b/.butcher/methods/editForumTopic/entity.json index 8b65f5c9..c76f2157 100644 --- a/.butcher/methods/editForumTopic/entity.json +++ b/.butcher/methods/editForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/editGeneralForumTopic/entity.json b/.butcher/methods/editGeneralForumTopic/entity.json index af18e846..6bc78e96 100644 --- a/.butcher/methods/editGeneralForumTopic/entity.json +++ b/.butcher/methods/editGeneralForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/editMessageCaption/entity.json b/.butcher/methods/editMessageCaption/entity.json index 3c54c21a..15126a36 100644 --- a/.butcher/methods/editMessageCaption/entity.json +++ b/.butcher/methods/editMessageCaption/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/editMessageLiveLocation/entity.json b/.butcher/methods/editMessageLiveLocation/entity.json index 77e1beb1..98ae94a4 100644 --- a/.butcher/methods/editMessageLiveLocation/entity.json +++ b/.butcher/methods/editMessageLiveLocation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/editMessageMedia/entity.json b/.butcher/methods/editMessageMedia/entity.json index f1b1064f..85e3e42a 100644 --- a/.butcher/methods/editMessageMedia/entity.json +++ b/.butcher/methods/editMessageMedia/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/editMessageReplyMarkup/entity.json b/.butcher/methods/editMessageReplyMarkup/entity.json index f10af9c4..21295ec7 100644 --- a/.butcher/methods/editMessageReplyMarkup/entity.json +++ b/.butcher/methods/editMessageReplyMarkup/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/editMessageText/entity.json b/.butcher/methods/editMessageText/entity.json index e0ffb699..981fde92 100644 --- a/.butcher/methods/editMessageText/entity.json +++ b/.butcher/methods/editMessageText/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/exportChatInviteLink/entity.json b/.butcher/methods/exportChatInviteLink/entity.json index 38475f80..4b6f0b6f 100644 --- a/.butcher/methods/exportChatInviteLink/entity.json +++ b/.butcher/methods/exportChatInviteLink/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/forwardMessage/entity.json b/.butcher/methods/forwardMessage/entity.json index e6a696b0..d3e6a0f1 100644 --- a/.butcher/methods/forwardMessage/entity.json +++ b/.butcher/methods/forwardMessage/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getChat/entity.json b/.butcher/methods/getChat/entity.json index 1cb2f382..d1ab1088 100644 --- a/.butcher/methods/getChat/entity.json +++ b/.butcher/methods/getChat/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getChatAdministrators/entity.json b/.butcher/methods/getChatAdministrators/entity.json index d06b8923..7273570e 100644 --- a/.butcher/methods/getChatAdministrators/entity.json +++ b/.butcher/methods/getChatAdministrators/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getChatMember/entity.json b/.butcher/methods/getChatMember/entity.json index 767abf3e..96b0148f 100644 --- a/.butcher/methods/getChatMember/entity.json +++ b/.butcher/methods/getChatMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getChatMemberCount/entity.json b/.butcher/methods/getChatMemberCount/entity.json index 893eee1a..d5d06653 100644 --- a/.butcher/methods/getChatMemberCount/entity.json +++ b/.butcher/methods/getChatMemberCount/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getChatMenuButton/entity.json b/.butcher/methods/getChatMenuButton/entity.json index 95563eaa..6a47ae2d 100644 --- a/.butcher/methods/getChatMenuButton/entity.json +++ b/.butcher/methods/getChatMenuButton/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getCustomEmojiStickers/entity.json b/.butcher/methods/getCustomEmojiStickers/entity.json index 99968ab5..ff08346b 100644 --- a/.butcher/methods/getCustomEmojiStickers/entity.json +++ b/.butcher/methods/getCustomEmojiStickers/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/getFile/entity.json b/.butcher/methods/getFile/entity.json index 1b3195aa..29cc98c6 100644 --- a/.butcher/methods/getFile/entity.json +++ b/.butcher/methods/getFile/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getForumTopicIconStickers/entity.json b/.butcher/methods/getForumTopicIconStickers/entity.json index 2aa5c6e8..81673b9e 100644 --- a/.butcher/methods/getForumTopicIconStickers/entity.json +++ b/.butcher/methods/getForumTopicIconStickers/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getGameHighScores/entity.json b/.butcher/methods/getGameHighScores/entity.json index d6839809..c536fd4b 100644 --- a/.butcher/methods/getGameHighScores/entity.json +++ b/.butcher/methods/getGameHighScores/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Games", "anchor": "games" diff --git a/.butcher/methods/getMe/entity.json b/.butcher/methods/getMe/entity.json index 74e6b471..d009d229 100644 --- a/.butcher/methods/getMe/entity.json +++ b/.butcher/methods/getMe/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getMyCommands/entity.json b/.butcher/methods/getMyCommands/entity.json index 02dd72a5..2114d814 100644 --- a/.butcher/methods/getMyCommands/entity.json +++ b/.butcher/methods/getMyCommands/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getMyDefaultAdministratorRights/entity.json b/.butcher/methods/getMyDefaultAdministratorRights/entity.json index 1d1c920f..640074f8 100644 --- a/.butcher/methods/getMyDefaultAdministratorRights/entity.json +++ b/.butcher/methods/getMyDefaultAdministratorRights/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getMyDescription/entity.json b/.butcher/methods/getMyDescription/entity.json index 7b231729..aa9501cb 100644 --- a/.butcher/methods/getMyDescription/entity.json +++ b/.butcher/methods/getMyDescription/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getMyShortDescription/entity.json b/.butcher/methods/getMyShortDescription/entity.json index 10f51d1b..451f6985 100644 --- a/.butcher/methods/getMyShortDescription/entity.json +++ b/.butcher/methods/getMyShortDescription/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getStickerSet/entity.json b/.butcher/methods/getStickerSet/entity.json index e0f24e22..ca1e5879 100644 --- a/.butcher/methods/getStickerSet/entity.json +++ b/.butcher/methods/getStickerSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/getUpdates/entity.json b/.butcher/methods/getUpdates/entity.json index f448940a..1a5eb7eb 100644 --- a/.butcher/methods/getUpdates/entity.json +++ b/.butcher/methods/getUpdates/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Getting updates", "anchor": "getting-updates" diff --git a/.butcher/methods/getUserProfilePhotos/entity.json b/.butcher/methods/getUserProfilePhotos/entity.json index 5535a1aa..0af8cc6e 100644 --- a/.butcher/methods/getUserProfilePhotos/entity.json +++ b/.butcher/methods/getUserProfilePhotos/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/getWebhookInfo/entity.json b/.butcher/methods/getWebhookInfo/entity.json index 5eb412f3..e14144d3 100644 --- a/.butcher/methods/getWebhookInfo/entity.json +++ b/.butcher/methods/getWebhookInfo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Getting updates", "anchor": "getting-updates" diff --git a/.butcher/methods/hideGeneralForumTopic/entity.json b/.butcher/methods/hideGeneralForumTopic/entity.json index f75c012a..514160aa 100644 --- a/.butcher/methods/hideGeneralForumTopic/entity.json +++ b/.butcher/methods/hideGeneralForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/leaveChat/entity.json b/.butcher/methods/leaveChat/entity.json index 54c4d7a2..2b5e0efc 100644 --- a/.butcher/methods/leaveChat/entity.json +++ b/.butcher/methods/leaveChat/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/logOut/entity.json b/.butcher/methods/logOut/entity.json index 5b53b8c3..b9e30ba1 100644 --- a/.butcher/methods/logOut/entity.json +++ b/.butcher/methods/logOut/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/pinChatMessage/entity.json b/.butcher/methods/pinChatMessage/entity.json index 1b43e7ed..dd6e7609 100644 --- a/.butcher/methods/pinChatMessage/entity.json +++ b/.butcher/methods/pinChatMessage/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/promoteChatMember/entity.json b/.butcher/methods/promoteChatMember/entity.json index c02e98de..ad0fce42 100644 --- a/.butcher/methods/promoteChatMember/entity.json +++ b/.butcher/methods/promoteChatMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/reopenForumTopic/entity.json b/.butcher/methods/reopenForumTopic/entity.json index 6d0c5512..187f6f6b 100644 --- a/.butcher/methods/reopenForumTopic/entity.json +++ b/.butcher/methods/reopenForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/reopenGeneralForumTopic/entity.json b/.butcher/methods/reopenGeneralForumTopic/entity.json index c6efec74..e1f968c4 100644 --- a/.butcher/methods/reopenGeneralForumTopic/entity.json +++ b/.butcher/methods/reopenGeneralForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/restrictChatMember/entity.json b/.butcher/methods/restrictChatMember/entity.json index c6594507..f0ed7537 100644 --- a/.butcher/methods/restrictChatMember/entity.json +++ b/.butcher/methods/restrictChatMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/revokeChatInviteLink/entity.json b/.butcher/methods/revokeChatInviteLink/entity.json index 093db6a7..cddfae1a 100644 --- a/.butcher/methods/revokeChatInviteLink/entity.json +++ b/.butcher/methods/revokeChatInviteLink/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendAnimation/entity.json b/.butcher/methods/sendAnimation/entity.json index 5a11b343..a7cd738d 100644 --- a/.butcher/methods/sendAnimation/entity.json +++ b/.butcher/methods/sendAnimation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendAudio/entity.json b/.butcher/methods/sendAudio/entity.json index 84eec416..f16c9a7b 100644 --- a/.butcher/methods/sendAudio/entity.json +++ b/.butcher/methods/sendAudio/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendChatAction/entity.json b/.butcher/methods/sendChatAction/entity.json index cda25c18..e6b71ea9 100644 --- a/.butcher/methods/sendChatAction/entity.json +++ b/.butcher/methods/sendChatAction/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendContact/entity.json b/.butcher/methods/sendContact/entity.json index d5c72946..27c7e87a 100644 --- a/.butcher/methods/sendContact/entity.json +++ b/.butcher/methods/sendContact/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendDice/entity.json b/.butcher/methods/sendDice/entity.json index 08d5dd75..60354dd0 100644 --- a/.butcher/methods/sendDice/entity.json +++ b/.butcher/methods/sendDice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendDocument/entity.json b/.butcher/methods/sendDocument/entity.json index 31680179..fc629ca0 100644 --- a/.butcher/methods/sendDocument/entity.json +++ b/.butcher/methods/sendDocument/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendGame/entity.json b/.butcher/methods/sendGame/entity.json index cc4626cf..31dc2e6d 100644 --- a/.butcher/methods/sendGame/entity.json +++ b/.butcher/methods/sendGame/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Games", "anchor": "games" diff --git a/.butcher/methods/sendInvoice/entity.json b/.butcher/methods/sendInvoice/entity.json index 69eaa36d..76c76e87 100644 --- a/.butcher/methods/sendInvoice/entity.json +++ b/.butcher/methods/sendInvoice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/methods/sendLocation/entity.json b/.butcher/methods/sendLocation/entity.json index 15423ca0..49bf7650 100644 --- a/.butcher/methods/sendLocation/entity.json +++ b/.butcher/methods/sendLocation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendMediaGroup/entity.json b/.butcher/methods/sendMediaGroup/entity.json index 0bb9bcf7..d520e89f 100644 --- a/.butcher/methods/sendMediaGroup/entity.json +++ b/.butcher/methods/sendMediaGroup/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendMessage/entity.json b/.butcher/methods/sendMessage/entity.json index 9ad354eb..80017658 100644 --- a/.butcher/methods/sendMessage/entity.json +++ b/.butcher/methods/sendMessage/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendPhoto/entity.json b/.butcher/methods/sendPhoto/entity.json index 2cc2639f..0b6edb18 100644 --- a/.butcher/methods/sendPhoto/entity.json +++ b/.butcher/methods/sendPhoto/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendPoll/entity.json b/.butcher/methods/sendPoll/entity.json index 033f515a..8edfb619 100644 --- a/.butcher/methods/sendPoll/entity.json +++ b/.butcher/methods/sendPoll/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendSticker/entity.json b/.butcher/methods/sendSticker/entity.json index aca9254c..4fa2e22e 100644 --- a/.butcher/methods/sendSticker/entity.json +++ b/.butcher/methods/sendSticker/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/sendVenue/entity.json b/.butcher/methods/sendVenue/entity.json index 183349cd..ab6e0613 100644 --- a/.butcher/methods/sendVenue/entity.json +++ b/.butcher/methods/sendVenue/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendVideo/entity.json b/.butcher/methods/sendVideo/entity.json index b19e2201..fed387f8 100644 --- a/.butcher/methods/sendVideo/entity.json +++ b/.butcher/methods/sendVideo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendVideoNote/entity.json b/.butcher/methods/sendVideoNote/entity.json index ea382889..01eb3645 100644 --- a/.butcher/methods/sendVideoNote/entity.json +++ b/.butcher/methods/sendVideoNote/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/sendVoice/entity.json b/.butcher/methods/sendVoice/entity.json index d2058cf0..a7af4bab 100644 --- a/.butcher/methods/sendVoice/entity.json +++ b/.butcher/methods/sendVoice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setChatAdministratorCustomTitle/entity.json b/.butcher/methods/setChatAdministratorCustomTitle/entity.json index 9f35cbe3..364befd7 100644 --- a/.butcher/methods/setChatAdministratorCustomTitle/entity.json +++ b/.butcher/methods/setChatAdministratorCustomTitle/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setChatDescription/entity.json b/.butcher/methods/setChatDescription/entity.json index f1fbc1e5..0303dd25 100644 --- a/.butcher/methods/setChatDescription/entity.json +++ b/.butcher/methods/setChatDescription/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setChatMenuButton/entity.json b/.butcher/methods/setChatMenuButton/entity.json index 5ef29941..6af98260 100644 --- a/.butcher/methods/setChatMenuButton/entity.json +++ b/.butcher/methods/setChatMenuButton/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setChatPermissions/entity.json b/.butcher/methods/setChatPermissions/entity.json index dd14ad8c..67a36fa1 100644 --- a/.butcher/methods/setChatPermissions/entity.json +++ b/.butcher/methods/setChatPermissions/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setChatPhoto/entity.json b/.butcher/methods/setChatPhoto/entity.json index fa3facd2..e9a8afd9 100644 --- a/.butcher/methods/setChatPhoto/entity.json +++ b/.butcher/methods/setChatPhoto/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setChatStickerSet/entity.json b/.butcher/methods/setChatStickerSet/entity.json index 2451f9cf..cd6c7f31 100644 --- a/.butcher/methods/setChatStickerSet/entity.json +++ b/.butcher/methods/setChatStickerSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setChatTitle/entity.json b/.butcher/methods/setChatTitle/entity.json index 37a91d80..15b81e91 100644 --- a/.butcher/methods/setChatTitle/entity.json +++ b/.butcher/methods/setChatTitle/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json b/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json index a4b0e265..11341ce3 100644 --- a/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json +++ b/.butcher/methods/setCustomEmojiStickerSetThumbnail/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/setGameScore/entity.json b/.butcher/methods/setGameScore/entity.json index f76d662e..45c66522 100644 --- a/.butcher/methods/setGameScore/entity.json +++ b/.butcher/methods/setGameScore/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Games", "anchor": "games" diff --git a/.butcher/methods/setMyCommands/entity.json b/.butcher/methods/setMyCommands/entity.json index 835c7f6a..23b15e5e 100644 --- a/.butcher/methods/setMyCommands/entity.json +++ b/.butcher/methods/setMyCommands/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setMyDefaultAdministratorRights/entity.json b/.butcher/methods/setMyDefaultAdministratorRights/entity.json index 503198d7..2dbc6589 100644 --- a/.butcher/methods/setMyDefaultAdministratorRights/entity.json +++ b/.butcher/methods/setMyDefaultAdministratorRights/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setMyDescription/entity.json b/.butcher/methods/setMyDescription/entity.json index 9487c34b..0180b7fb 100644 --- a/.butcher/methods/setMyDescription/entity.json +++ b/.butcher/methods/setMyDescription/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setMyShortDescription/entity.json b/.butcher/methods/setMyShortDescription/entity.json index 0bb47047..7898993a 100644 --- a/.butcher/methods/setMyShortDescription/entity.json +++ b/.butcher/methods/setMyShortDescription/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/setPassportDataErrors/entity.json b/.butcher/methods/setPassportDataErrors/entity.json index ec0e03a8..410c1b7e 100644 --- a/.butcher/methods/setPassportDataErrors/entity.json +++ b/.butcher/methods/setPassportDataErrors/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/methods/setStickerEmojiList/entity.json b/.butcher/methods/setStickerEmojiList/entity.json index 92d1fd39..941260f8 100644 --- a/.butcher/methods/setStickerEmojiList/entity.json +++ b/.butcher/methods/setStickerEmojiList/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/setStickerKeywords/entity.json b/.butcher/methods/setStickerKeywords/entity.json index cabf2fbe..0391d3df 100644 --- a/.butcher/methods/setStickerKeywords/entity.json +++ b/.butcher/methods/setStickerKeywords/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/setStickerMaskPosition/entity.json b/.butcher/methods/setStickerMaskPosition/entity.json index e18fbd04..f4a481db 100644 --- a/.butcher/methods/setStickerMaskPosition/entity.json +++ b/.butcher/methods/setStickerMaskPosition/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/setStickerPositionInSet/entity.json b/.butcher/methods/setStickerPositionInSet/entity.json index e75a13c8..d5a9cb06 100644 --- a/.butcher/methods/setStickerPositionInSet/entity.json +++ b/.butcher/methods/setStickerPositionInSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/setStickerSetThumbnail/entity.json b/.butcher/methods/setStickerSetThumbnail/entity.json index b5eac7cf..906f7807 100644 --- a/.butcher/methods/setStickerSetThumbnail/entity.json +++ b/.butcher/methods/setStickerSetThumbnail/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/setStickerSetTitle/entity.json b/.butcher/methods/setStickerSetTitle/entity.json index 757f508a..9840d547 100644 --- a/.butcher/methods/setStickerSetTitle/entity.json +++ b/.butcher/methods/setStickerSetTitle/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/methods/setWebhook/entity.json b/.butcher/methods/setWebhook/entity.json index 83befbb9..337a7b43 100644 --- a/.butcher/methods/setWebhook/entity.json +++ b/.butcher/methods/setWebhook/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Getting updates", "anchor": "getting-updates" diff --git a/.butcher/methods/stopMessageLiveLocation/entity.json b/.butcher/methods/stopMessageLiveLocation/entity.json index 6f1cb51c..c3cdddfb 100644 --- a/.butcher/methods/stopMessageLiveLocation/entity.json +++ b/.butcher/methods/stopMessageLiveLocation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/stopPoll/entity.json b/.butcher/methods/stopPoll/entity.json index 0e277f16..b735f0fb 100644 --- a/.butcher/methods/stopPoll/entity.json +++ b/.butcher/methods/stopPoll/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Updating messages", "anchor": "updating-messages" diff --git a/.butcher/methods/unbanChatMember/entity.json b/.butcher/methods/unbanChatMember/entity.json index a7dce716..710ab883 100644 --- a/.butcher/methods/unbanChatMember/entity.json +++ b/.butcher/methods/unbanChatMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/unbanChatSenderChat/entity.json b/.butcher/methods/unbanChatSenderChat/entity.json index 9215b65d..aec3e9f6 100644 --- a/.butcher/methods/unbanChatSenderChat/entity.json +++ b/.butcher/methods/unbanChatSenderChat/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/unhideGeneralForumTopic/entity.json b/.butcher/methods/unhideGeneralForumTopic/entity.json index 962e0473..8db78a8a 100644 --- a/.butcher/methods/unhideGeneralForumTopic/entity.json +++ b/.butcher/methods/unhideGeneralForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/unpinAllChatMessages/entity.json b/.butcher/methods/unpinAllChatMessages/entity.json index 8adb563a..19587ff8 100644 --- a/.butcher/methods/unpinAllChatMessages/entity.json +++ b/.butcher/methods/unpinAllChatMessages/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/unpinAllForumTopicMessages/entity.json b/.butcher/methods/unpinAllForumTopicMessages/entity.json index c54cd239..dc46ec72 100644 --- a/.butcher/methods/unpinAllForumTopicMessages/entity.json +++ b/.butcher/methods/unpinAllForumTopicMessages/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/unpinChatMessage/entity.json b/.butcher/methods/unpinChatMessage/entity.json index ee716958..90c2dc11 100644 --- a/.butcher/methods/unpinChatMessage/entity.json +++ b/.butcher/methods/unpinChatMessage/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available methods", "anchor": "available-methods" diff --git a/.butcher/methods/uploadStickerFile/entity.json b/.butcher/methods/uploadStickerFile/entity.json index 687ae2cb..97bab16e 100644 --- a/.butcher/methods/uploadStickerFile/entity.json +++ b/.butcher/methods/uploadStickerFile/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/types/Animation/entity.json b/.butcher/types/Animation/entity.json index db471f53..751e38c3 100644 --- a/.butcher/types/Animation/entity.json +++ b/.butcher/types/Animation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Audio/entity.json b/.butcher/types/Audio/entity.json index c65b9118..e0b22adf 100644 --- a/.butcher/types/Audio/entity.json +++ b/.butcher/types/Audio/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommand/entity.json b/.butcher/types/BotCommand/entity.json index 54cf79a1..88cf7aea 100644 --- a/.butcher/types/BotCommand/entity.json +++ b/.butcher/types/BotCommand/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScope/entity.json b/.butcher/types/BotCommandScope/entity.json index a43e32bd..808c1b16 100644 --- a/.butcher/types/BotCommandScope/entity.json +++ b/.butcher/types/BotCommandScope/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json b/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json index f1d09250..a215fb1a 100644 --- a/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json +++ b/.butcher/types/BotCommandScopeAllChatAdministrators/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScopeAllGroupChats/entity.json b/.butcher/types/BotCommandScopeAllGroupChats/entity.json index 9d1698cb..cab68eca 100644 --- a/.butcher/types/BotCommandScopeAllGroupChats/entity.json +++ b/.butcher/types/BotCommandScopeAllGroupChats/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScopeAllPrivateChats/entity.json b/.butcher/types/BotCommandScopeAllPrivateChats/entity.json index c7950f92..0c8a1eac 100644 --- a/.butcher/types/BotCommandScopeAllPrivateChats/entity.json +++ b/.butcher/types/BotCommandScopeAllPrivateChats/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScopeChat/entity.json b/.butcher/types/BotCommandScopeChat/entity.json index c0189614..09990c4a 100644 --- a/.butcher/types/BotCommandScopeChat/entity.json +++ b/.butcher/types/BotCommandScopeChat/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScopeChatAdministrators/entity.json b/.butcher/types/BotCommandScopeChatAdministrators/entity.json index 0f073037..06c96964 100644 --- a/.butcher/types/BotCommandScopeChatAdministrators/entity.json +++ b/.butcher/types/BotCommandScopeChatAdministrators/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScopeChatMember/entity.json b/.butcher/types/BotCommandScopeChatMember/entity.json index ea0bb34e..6d75e7d6 100644 --- a/.butcher/types/BotCommandScopeChatMember/entity.json +++ b/.butcher/types/BotCommandScopeChatMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotCommandScopeDefault/entity.json b/.butcher/types/BotCommandScopeDefault/entity.json index a1235132..edc6ca7b 100644 --- a/.butcher/types/BotCommandScopeDefault/entity.json +++ b/.butcher/types/BotCommandScopeDefault/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotDescription/entity.json b/.butcher/types/BotDescription/entity.json index 6d47a69d..5784507a 100644 --- a/.butcher/types/BotDescription/entity.json +++ b/.butcher/types/BotDescription/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/BotShortDescription/entity.json b/.butcher/types/BotShortDescription/entity.json index dcd3e80c..da55449f 100644 --- a/.butcher/types/BotShortDescription/entity.json +++ b/.butcher/types/BotShortDescription/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/CallbackGame/entity.json b/.butcher/types/CallbackGame/entity.json index f72d1945..246618f0 100644 --- a/.butcher/types/CallbackGame/entity.json +++ b/.butcher/types/CallbackGame/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Games", "anchor": "games" diff --git a/.butcher/types/CallbackQuery/entity.json b/.butcher/types/CallbackQuery/entity.json index 760d0e3e..e0b35038 100644 --- a/.butcher/types/CallbackQuery/entity.json +++ b/.butcher/types/CallbackQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Chat/entity.json b/.butcher/types/Chat/entity.json index 5ba08c1d..7aa42c18 100644 --- a/.butcher/types/Chat/entity.json +++ b/.butcher/types/Chat/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatAdministratorRights/entity.json b/.butcher/types/ChatAdministratorRights/entity.json index 5fa75a33..6d5951e8 100644 --- a/.butcher/types/ChatAdministratorRights/entity.json +++ b/.butcher/types/ChatAdministratorRights/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatInviteLink/entity.json b/.butcher/types/ChatInviteLink/entity.json index 7b96a2c4..d2441682 100644 --- a/.butcher/types/ChatInviteLink/entity.json +++ b/.butcher/types/ChatInviteLink/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatJoinRequest/entity.json b/.butcher/types/ChatJoinRequest/entity.json index 9731c368..99fa2d7d 100644 --- a/.butcher/types/ChatJoinRequest/entity.json +++ b/.butcher/types/ChatJoinRequest/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatLocation/entity.json b/.butcher/types/ChatLocation/entity.json index 02db74b8..8b9f1e7d 100644 --- a/.butcher/types/ChatLocation/entity.json +++ b/.butcher/types/ChatLocation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMember/entity.json b/.butcher/types/ChatMember/entity.json index 1aaccd38..642479cc 100644 --- a/.butcher/types/ChatMember/entity.json +++ b/.butcher/types/ChatMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMemberAdministrator/entity.json b/.butcher/types/ChatMemberAdministrator/entity.json index dc8d03ae..577d9daf 100644 --- a/.butcher/types/ChatMemberAdministrator/entity.json +++ b/.butcher/types/ChatMemberAdministrator/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMemberBanned/entity.json b/.butcher/types/ChatMemberBanned/entity.json index 95f50234..49d42e20 100644 --- a/.butcher/types/ChatMemberBanned/entity.json +++ b/.butcher/types/ChatMemberBanned/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMemberLeft/entity.json b/.butcher/types/ChatMemberLeft/entity.json index f9754ded..6e67d7cc 100644 --- a/.butcher/types/ChatMemberLeft/entity.json +++ b/.butcher/types/ChatMemberLeft/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMemberMember/entity.json b/.butcher/types/ChatMemberMember/entity.json index 43f9cab2..90d6016a 100644 --- a/.butcher/types/ChatMemberMember/entity.json +++ b/.butcher/types/ChatMemberMember/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMemberOwner/entity.json b/.butcher/types/ChatMemberOwner/entity.json index 7a9c439e..2fafed33 100644 --- a/.butcher/types/ChatMemberOwner/entity.json +++ b/.butcher/types/ChatMemberOwner/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMemberRestricted/entity.json b/.butcher/types/ChatMemberRestricted/entity.json index b1eabbb5..958ad57a 100644 --- a/.butcher/types/ChatMemberRestricted/entity.json +++ b/.butcher/types/ChatMemberRestricted/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatMemberUpdated/entity.json b/.butcher/types/ChatMemberUpdated/entity.json index 4bd3bc15..7454b512 100644 --- a/.butcher/types/ChatMemberUpdated/entity.json +++ b/.butcher/types/ChatMemberUpdated/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatPermissions/entity.json b/.butcher/types/ChatPermissions/entity.json index fee1d989..5a206394 100644 --- a/.butcher/types/ChatPermissions/entity.json +++ b/.butcher/types/ChatPermissions/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatPhoto/entity.json b/.butcher/types/ChatPhoto/entity.json index eefcb188..50ce7532 100644 --- a/.butcher/types/ChatPhoto/entity.json +++ b/.butcher/types/ChatPhoto/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChatShared/entity.json b/.butcher/types/ChatShared/entity.json index 6d343b9f..ceaeb604 100644 --- a/.butcher/types/ChatShared/entity.json +++ b/.butcher/types/ChatShared/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ChosenInlineResult/entity.json b/.butcher/types/ChosenInlineResult/entity.json index d3df812c..66d5eb25 100644 --- a/.butcher/types/ChosenInlineResult/entity.json +++ b/.butcher/types/ChosenInlineResult/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/Contact/entity.json b/.butcher/types/Contact/entity.json index 95081fb0..fbbf72ef 100644 --- a/.butcher/types/Contact/entity.json +++ b/.butcher/types/Contact/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Dice/entity.json b/.butcher/types/Dice/entity.json index 1302cb88..ac9ad417 100644 --- a/.butcher/types/Dice/entity.json +++ b/.butcher/types/Dice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Document/entity.json b/.butcher/types/Document/entity.json index 036df2c4..c583215d 100644 --- a/.butcher/types/Document/entity.json +++ b/.butcher/types/Document/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/EncryptedCredentials/entity.json b/.butcher/types/EncryptedCredentials/entity.json index 906910b7..0841cc1d 100644 --- a/.butcher/types/EncryptedCredentials/entity.json +++ b/.butcher/types/EncryptedCredentials/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/EncryptedPassportElement/entity.json b/.butcher/types/EncryptedPassportElement/entity.json index c098c209..33fd2827 100644 --- a/.butcher/types/EncryptedPassportElement/entity.json +++ b/.butcher/types/EncryptedPassportElement/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/ErrorEvent/entity.json b/.butcher/types/ErrorEvent/entity.json deleted file mode 100644 index 3eebe2fc..00000000 --- a/.butcher/types/ErrorEvent/entity.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "meta": { - "deprecated": true, - "internal": true - }, - "group": { - "title": "Internals", - "anchor": "internals" - }, - "object": { - "anchor": "error-event", - "category": "types", - "name": "ErrorEvent", - "description": "Internal event, should be used to receive errors while processing Updates from Telegram", - "html_description": "Internal event, should be used to receive errors while processing Updates from Telegram", - "rst_description": "Internal event, should be used to receive errors while processing Updates from Telegram", - "annotations": [ - { - "type": "Update", - "description": "Received update", - "html_description": "Received update", - "rst_description": "Received update", - "name": "update", - "required": true - }, - { - "type": "Exception", - "description": "Exception", - "html_description": "Exception", - "rst_description": "Exception", - "name": "exception", - "required": true - } - ] - } -} diff --git a/.butcher/types/ErrorEvent/replace.yml b/.butcher/types/ErrorEvent/replace.yml deleted file mode 100644 index aea86aff..00000000 --- a/.butcher/types/ErrorEvent/replace.yml +++ /dev/null @@ -1,2 +0,0 @@ -bases: - - _ErrorEvent diff --git a/.butcher/types/File/entity.json b/.butcher/types/File/entity.json index 22170036..dcf7a39c 100644 --- a/.butcher/types/File/entity.json +++ b/.butcher/types/File/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ForceReply/entity.json b/.butcher/types/ForceReply/entity.json index 679e8606..c06b916d 100644 --- a/.butcher/types/ForceReply/entity.json +++ b/.butcher/types/ForceReply/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ForumTopic/entity.json b/.butcher/types/ForumTopic/entity.json index 4dabd630..4198661a 100644 --- a/.butcher/types/ForumTopic/entity.json +++ b/.butcher/types/ForumTopic/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ForumTopicClosed/entity.json b/.butcher/types/ForumTopicClosed/entity.json index 4b54cd59..c06f4f6f 100644 --- a/.butcher/types/ForumTopicClosed/entity.json +++ b/.butcher/types/ForumTopicClosed/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ForumTopicCreated/entity.json b/.butcher/types/ForumTopicCreated/entity.json index 16b90aeb..f1832898 100644 --- a/.butcher/types/ForumTopicCreated/entity.json +++ b/.butcher/types/ForumTopicCreated/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ForumTopicEdited/entity.json b/.butcher/types/ForumTopicEdited/entity.json index 0adc5fdd..c8f3dd1c 100644 --- a/.butcher/types/ForumTopicEdited/entity.json +++ b/.butcher/types/ForumTopicEdited/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ForumTopicReopened/entity.json b/.butcher/types/ForumTopicReopened/entity.json index 6b701c95..f9527ce0 100644 --- a/.butcher/types/ForumTopicReopened/entity.json +++ b/.butcher/types/ForumTopicReopened/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Game/entity.json b/.butcher/types/Game/entity.json index 9a0ebe64..45ce4f08 100644 --- a/.butcher/types/Game/entity.json +++ b/.butcher/types/Game/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Games", "anchor": "games" diff --git a/.butcher/types/GameHighScore/entity.json b/.butcher/types/GameHighScore/entity.json index 291fc839..ce3f52d2 100644 --- a/.butcher/types/GameHighScore/entity.json +++ b/.butcher/types/GameHighScore/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Games", "anchor": "games" diff --git a/.butcher/types/GeneralForumTopicHidden/entity.json b/.butcher/types/GeneralForumTopicHidden/entity.json index de94d519..ec288ac1 100644 --- a/.butcher/types/GeneralForumTopicHidden/entity.json +++ b/.butcher/types/GeneralForumTopicHidden/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/GeneralForumTopicUnhidden/entity.json b/.butcher/types/GeneralForumTopicUnhidden/entity.json index 4c3d2287..415d75a5 100644 --- a/.butcher/types/GeneralForumTopicUnhidden/entity.json +++ b/.butcher/types/GeneralForumTopicUnhidden/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InlineKeyboardButton/entity.json b/.butcher/types/InlineKeyboardButton/entity.json index 3b243461..e73ff4dc 100644 --- a/.butcher/types/InlineKeyboardButton/entity.json +++ b/.butcher/types/InlineKeyboardButton/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InlineKeyboardMarkup/entity.json b/.butcher/types/InlineKeyboardMarkup/entity.json index 8e8d3708..e641e20a 100644 --- a/.butcher/types/InlineKeyboardMarkup/entity.json +++ b/.butcher/types/InlineKeyboardMarkup/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InlineQuery/entity.json b/.butcher/types/InlineQuery/entity.json index 56284893..e34ce5bc 100644 --- a/.butcher/types/InlineQuery/entity.json +++ b/.butcher/types/InlineQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResult/entity.json b/.butcher/types/InlineQueryResult/entity.json index 71c5a3b4..f75078ee 100644 --- a/.butcher/types/InlineQueryResult/entity.json +++ b/.butcher/types/InlineQueryResult/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultArticle/entity.json b/.butcher/types/InlineQueryResultArticle/entity.json index 74b635ff..eba5d318 100644 --- a/.butcher/types/InlineQueryResultArticle/entity.json +++ b/.butcher/types/InlineQueryResultArticle/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultAudio/entity.json b/.butcher/types/InlineQueryResultAudio/entity.json index 83170481..9e995562 100644 --- a/.butcher/types/InlineQueryResultAudio/entity.json +++ b/.butcher/types/InlineQueryResultAudio/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedAudio/entity.json b/.butcher/types/InlineQueryResultCachedAudio/entity.json index ec759647..0b5abf32 100644 --- a/.butcher/types/InlineQueryResultCachedAudio/entity.json +++ b/.butcher/types/InlineQueryResultCachedAudio/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedDocument/entity.json b/.butcher/types/InlineQueryResultCachedDocument/entity.json index a00bf785..3f49dc6d 100644 --- a/.butcher/types/InlineQueryResultCachedDocument/entity.json +++ b/.butcher/types/InlineQueryResultCachedDocument/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedGif/entity.json b/.butcher/types/InlineQueryResultCachedGif/entity.json index 5d18e4cb..51c90620 100644 --- a/.butcher/types/InlineQueryResultCachedGif/entity.json +++ b/.butcher/types/InlineQueryResultCachedGif/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json index 8dbef2eb..bd91435e 100644 --- a/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json +++ b/.butcher/types/InlineQueryResultCachedMpeg4Gif/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedPhoto/entity.json b/.butcher/types/InlineQueryResultCachedPhoto/entity.json index 460c3274..d0bc2b9b 100644 --- a/.butcher/types/InlineQueryResultCachedPhoto/entity.json +++ b/.butcher/types/InlineQueryResultCachedPhoto/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedSticker/entity.json b/.butcher/types/InlineQueryResultCachedSticker/entity.json index 7f3f4e47..eb0b717b 100644 --- a/.butcher/types/InlineQueryResultCachedSticker/entity.json +++ b/.butcher/types/InlineQueryResultCachedSticker/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedVideo/entity.json b/.butcher/types/InlineQueryResultCachedVideo/entity.json index c7e60fea..2b35ddc6 100644 --- a/.butcher/types/InlineQueryResultCachedVideo/entity.json +++ b/.butcher/types/InlineQueryResultCachedVideo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultCachedVoice/entity.json b/.butcher/types/InlineQueryResultCachedVoice/entity.json index 6dd0ea0d..3c576fbb 100644 --- a/.butcher/types/InlineQueryResultCachedVoice/entity.json +++ b/.butcher/types/InlineQueryResultCachedVoice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultContact/entity.json b/.butcher/types/InlineQueryResultContact/entity.json index 2445e5d7..10d12e2b 100644 --- a/.butcher/types/InlineQueryResultContact/entity.json +++ b/.butcher/types/InlineQueryResultContact/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultDocument/entity.json b/.butcher/types/InlineQueryResultDocument/entity.json index 1eda8583..286fd9b7 100644 --- a/.butcher/types/InlineQueryResultDocument/entity.json +++ b/.butcher/types/InlineQueryResultDocument/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultGame/entity.json b/.butcher/types/InlineQueryResultGame/entity.json index 00728d78..918bff7b 100644 --- a/.butcher/types/InlineQueryResultGame/entity.json +++ b/.butcher/types/InlineQueryResultGame/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultGif/entity.json b/.butcher/types/InlineQueryResultGif/entity.json index b6ab8d8f..7824368a 100644 --- a/.butcher/types/InlineQueryResultGif/entity.json +++ b/.butcher/types/InlineQueryResultGif/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultLocation/entity.json b/.butcher/types/InlineQueryResultLocation/entity.json index c4cdf8e7..a6c30068 100644 --- a/.butcher/types/InlineQueryResultLocation/entity.json +++ b/.butcher/types/InlineQueryResultLocation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json index 69916a5b..c365a134 100644 --- a/.butcher/types/InlineQueryResultMpeg4Gif/entity.json +++ b/.butcher/types/InlineQueryResultMpeg4Gif/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultPhoto/entity.json b/.butcher/types/InlineQueryResultPhoto/entity.json index a216aacf..67130359 100644 --- a/.butcher/types/InlineQueryResultPhoto/entity.json +++ b/.butcher/types/InlineQueryResultPhoto/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultVenue/entity.json b/.butcher/types/InlineQueryResultVenue/entity.json index 3bf6bebe..2191ae32 100644 --- a/.butcher/types/InlineQueryResultVenue/entity.json +++ b/.butcher/types/InlineQueryResultVenue/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultVideo/entity.json b/.butcher/types/InlineQueryResultVideo/entity.json index abc82746..7164306c 100644 --- a/.butcher/types/InlineQueryResultVideo/entity.json +++ b/.butcher/types/InlineQueryResultVideo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InlineQueryResultVoice/entity.json b/.butcher/types/InlineQueryResultVoice/entity.json index ad3d394e..aeec353f 100644 --- a/.butcher/types/InlineQueryResultVoice/entity.json +++ b/.butcher/types/InlineQueryResultVoice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InputContactMessageContent/entity.json b/.butcher/types/InputContactMessageContent/entity.json index 6f465e9e..0acb3c07 100644 --- a/.butcher/types/InputContactMessageContent/entity.json +++ b/.butcher/types/InputContactMessageContent/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InputFile/entity.json b/.butcher/types/InputFile/entity.json index 009d6131..fb12abf0 100644 --- a/.butcher/types/InputFile/entity.json +++ b/.butcher/types/InputFile/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InputInvoiceMessageContent/entity.json b/.butcher/types/InputInvoiceMessageContent/entity.json index bc5c8048..27195732 100644 --- a/.butcher/types/InputInvoiceMessageContent/entity.json +++ b/.butcher/types/InputInvoiceMessageContent/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InputLocationMessageContent/entity.json b/.butcher/types/InputLocationMessageContent/entity.json index 460ed0d0..ef06ef82 100644 --- a/.butcher/types/InputLocationMessageContent/entity.json +++ b/.butcher/types/InputLocationMessageContent/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InputMedia/entity.json b/.butcher/types/InputMedia/entity.json index b1965e5c..193520cf 100644 --- a/.butcher/types/InputMedia/entity.json +++ b/.butcher/types/InputMedia/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InputMediaAnimation/entity.json b/.butcher/types/InputMediaAnimation/entity.json index 4d694d1b..1bd2e3b4 100644 --- a/.butcher/types/InputMediaAnimation/entity.json +++ b/.butcher/types/InputMediaAnimation/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InputMediaAudio/entity.json b/.butcher/types/InputMediaAudio/entity.json index e16a0a7d..5f10ad67 100644 --- a/.butcher/types/InputMediaAudio/entity.json +++ b/.butcher/types/InputMediaAudio/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InputMediaDocument/entity.json b/.butcher/types/InputMediaDocument/entity.json index 97bcbcd3..676d6947 100644 --- a/.butcher/types/InputMediaDocument/entity.json +++ b/.butcher/types/InputMediaDocument/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InputMediaPhoto/entity.json b/.butcher/types/InputMediaPhoto/entity.json index 091db974..3437668f 100644 --- a/.butcher/types/InputMediaPhoto/entity.json +++ b/.butcher/types/InputMediaPhoto/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InputMediaVideo/entity.json b/.butcher/types/InputMediaVideo/entity.json index 1f5e6487..3bfbb06a 100644 --- a/.butcher/types/InputMediaVideo/entity.json +++ b/.butcher/types/InputMediaVideo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/InputMessageContent/entity.json b/.butcher/types/InputMessageContent/entity.json index f578b8de..cc9e857e 100644 --- a/.butcher/types/InputMessageContent/entity.json +++ b/.butcher/types/InputMessageContent/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InputSticker/entity.json b/.butcher/types/InputSticker/entity.json index 819f81f9..a58690aa 100644 --- a/.butcher/types/InputSticker/entity.json +++ b/.butcher/types/InputSticker/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/types/InputTextMessageContent/entity.json b/.butcher/types/InputTextMessageContent/entity.json index 88f794f8..bc4b79d2 100644 --- a/.butcher/types/InputTextMessageContent/entity.json +++ b/.butcher/types/InputTextMessageContent/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/InputVenueMessageContent/entity.json b/.butcher/types/InputVenueMessageContent/entity.json index 34bd84aa..7c9b81a6 100644 --- a/.butcher/types/InputVenueMessageContent/entity.json +++ b/.butcher/types/InputVenueMessageContent/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/Invoice/entity.json b/.butcher/types/Invoice/entity.json index 5cbd0f37..2ae83aa4 100644 --- a/.butcher/types/Invoice/entity.json +++ b/.butcher/types/Invoice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/KeyboardButton/entity.json b/.butcher/types/KeyboardButton/entity.json index 06009b90..2a75141c 100644 --- a/.butcher/types/KeyboardButton/entity.json +++ b/.butcher/types/KeyboardButton/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/KeyboardButtonPollType/entity.json b/.butcher/types/KeyboardButtonPollType/entity.json index 3c1f026e..2681d80b 100644 --- a/.butcher/types/KeyboardButtonPollType/entity.json +++ b/.butcher/types/KeyboardButtonPollType/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/KeyboardButtonRequestChat/entity.json b/.butcher/types/KeyboardButtonRequestChat/entity.json index 570fa963..616025e4 100644 --- a/.butcher/types/KeyboardButtonRequestChat/entity.json +++ b/.butcher/types/KeyboardButtonRequestChat/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/KeyboardButtonRequestUser/entity.json b/.butcher/types/KeyboardButtonRequestUser/entity.json index ae6be60f..46f792aa 100644 --- a/.butcher/types/KeyboardButtonRequestUser/entity.json +++ b/.butcher/types/KeyboardButtonRequestUser/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/LabeledPrice/entity.json b/.butcher/types/LabeledPrice/entity.json index 38963855..97dad650 100644 --- a/.butcher/types/LabeledPrice/entity.json +++ b/.butcher/types/LabeledPrice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/Location/entity.json b/.butcher/types/Location/entity.json index 5ae27da8..c6b36c45 100644 --- a/.butcher/types/Location/entity.json +++ b/.butcher/types/Location/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/LoginUrl/entity.json b/.butcher/types/LoginUrl/entity.json index 1085f9c4..7748fe56 100644 --- a/.butcher/types/LoginUrl/entity.json +++ b/.butcher/types/LoginUrl/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/MaskPosition/entity.json b/.butcher/types/MaskPosition/entity.json index 24a015d5..98f0c7b7 100644 --- a/.butcher/types/MaskPosition/entity.json +++ b/.butcher/types/MaskPosition/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/types/MenuButton/entity.json b/.butcher/types/MenuButton/entity.json index deb0a185..224a5dac 100644 --- a/.butcher/types/MenuButton/entity.json +++ b/.butcher/types/MenuButton/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/MenuButtonCommands/entity.json b/.butcher/types/MenuButtonCommands/entity.json index 5ea1805c..25f67474 100644 --- a/.butcher/types/MenuButtonCommands/entity.json +++ b/.butcher/types/MenuButtonCommands/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/MenuButtonDefault/entity.json b/.butcher/types/MenuButtonDefault/entity.json index 2760f7b8..ce7f22af 100644 --- a/.butcher/types/MenuButtonDefault/entity.json +++ b/.butcher/types/MenuButtonDefault/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/MenuButtonWebApp/entity.json b/.butcher/types/MenuButtonWebApp/entity.json index 63311034..6f763e9e 100644 --- a/.butcher/types/MenuButtonWebApp/entity.json +++ b/.butcher/types/MenuButtonWebApp/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Message/entity.json b/.butcher/types/Message/entity.json index 0bf6c146..cd5e27cb 100644 --- a/.butcher/types/Message/entity.json +++ b/.butcher/types/Message/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/MessageAutoDeleteTimerChanged/entity.json b/.butcher/types/MessageAutoDeleteTimerChanged/entity.json index 5778e75a..3c6bc533 100644 --- a/.butcher/types/MessageAutoDeleteTimerChanged/entity.json +++ b/.butcher/types/MessageAutoDeleteTimerChanged/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/MessageEntity/entity.json b/.butcher/types/MessageEntity/entity.json index fa01ab48..663f8957 100644 --- a/.butcher/types/MessageEntity/entity.json +++ b/.butcher/types/MessageEntity/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/MessageId/entity.json b/.butcher/types/MessageId/entity.json index 86e988bc..69fce170 100644 --- a/.butcher/types/MessageId/entity.json +++ b/.butcher/types/MessageId/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/OrderInfo/entity.json b/.butcher/types/OrderInfo/entity.json index 868ed681..42c6296b 100644 --- a/.butcher/types/OrderInfo/entity.json +++ b/.butcher/types/OrderInfo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/PassportData/entity.json b/.butcher/types/PassportData/entity.json index c00b6b06..2c01dc79 100644 --- a/.butcher/types/PassportData/entity.json +++ b/.butcher/types/PassportData/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementError/entity.json b/.butcher/types/PassportElementError/entity.json index 2a2403e0..3451e40c 100644 --- a/.butcher/types/PassportElementError/entity.json +++ b/.butcher/types/PassportElementError/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorDataField/entity.json b/.butcher/types/PassportElementErrorDataField/entity.json index 9eb32a87..1db574d9 100644 --- a/.butcher/types/PassportElementErrorDataField/entity.json +++ b/.butcher/types/PassportElementErrorDataField/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorFile/entity.json b/.butcher/types/PassportElementErrorFile/entity.json index 71c1c10d..61e45072 100644 --- a/.butcher/types/PassportElementErrorFile/entity.json +++ b/.butcher/types/PassportElementErrorFile/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorFiles/entity.json b/.butcher/types/PassportElementErrorFiles/entity.json index 61fb2ab9..33856a8b 100644 --- a/.butcher/types/PassportElementErrorFiles/entity.json +++ b/.butcher/types/PassportElementErrorFiles/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorFrontSide/entity.json b/.butcher/types/PassportElementErrorFrontSide/entity.json index c9bf175c..6b3d4bae 100644 --- a/.butcher/types/PassportElementErrorFrontSide/entity.json +++ b/.butcher/types/PassportElementErrorFrontSide/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorReverseSide/entity.json b/.butcher/types/PassportElementErrorReverseSide/entity.json index 8d659b16..804ab05c 100644 --- a/.butcher/types/PassportElementErrorReverseSide/entity.json +++ b/.butcher/types/PassportElementErrorReverseSide/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorSelfie/entity.json b/.butcher/types/PassportElementErrorSelfie/entity.json index f79db407..fa8dc591 100644 --- a/.butcher/types/PassportElementErrorSelfie/entity.json +++ b/.butcher/types/PassportElementErrorSelfie/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorTranslationFile/entity.json b/.butcher/types/PassportElementErrorTranslationFile/entity.json index 0b81d6fb..0253dfdd 100644 --- a/.butcher/types/PassportElementErrorTranslationFile/entity.json +++ b/.butcher/types/PassportElementErrorTranslationFile/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorTranslationFiles/entity.json b/.butcher/types/PassportElementErrorTranslationFiles/entity.json index 15bd0a96..98ddf11d 100644 --- a/.butcher/types/PassportElementErrorTranslationFiles/entity.json +++ b/.butcher/types/PassportElementErrorTranslationFiles/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportElementErrorUnspecified/entity.json b/.butcher/types/PassportElementErrorUnspecified/entity.json index f1a3c4d3..1116a924 100644 --- a/.butcher/types/PassportElementErrorUnspecified/entity.json +++ b/.butcher/types/PassportElementErrorUnspecified/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PassportFile/entity.json b/.butcher/types/PassportFile/entity.json index 7c10c6cc..20b7f9c2 100644 --- a/.butcher/types/PassportFile/entity.json +++ b/.butcher/types/PassportFile/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Telegram Passport", "anchor": "telegram-passport" diff --git a/.butcher/types/PhotoSize/entity.json b/.butcher/types/PhotoSize/entity.json index 67882df0..5bf50009 100644 --- a/.butcher/types/PhotoSize/entity.json +++ b/.butcher/types/PhotoSize/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Poll/entity.json b/.butcher/types/Poll/entity.json index 131e96ea..dcf1bf7c 100644 --- a/.butcher/types/Poll/entity.json +++ b/.butcher/types/Poll/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/PollAnswer/entity.json b/.butcher/types/PollAnswer/entity.json index 323577b6..9081b30c 100644 --- a/.butcher/types/PollAnswer/entity.json +++ b/.butcher/types/PollAnswer/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/PollOption/entity.json b/.butcher/types/PollOption/entity.json index dfef5817..0b06084a 100644 --- a/.butcher/types/PollOption/entity.json +++ b/.butcher/types/PollOption/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/PreCheckoutQuery/entity.json b/.butcher/types/PreCheckoutQuery/entity.json index 349e8172..5fb05a1c 100644 --- a/.butcher/types/PreCheckoutQuery/entity.json +++ b/.butcher/types/PreCheckoutQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/ProximityAlertTriggered/entity.json b/.butcher/types/ProximityAlertTriggered/entity.json index d8dc1750..ede85d2b 100644 --- a/.butcher/types/ProximityAlertTriggered/entity.json +++ b/.butcher/types/ProximityAlertTriggered/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ReplyKeyboardMarkup/entity.json b/.butcher/types/ReplyKeyboardMarkup/entity.json index 586bf507..d74d741d 100644 --- a/.butcher/types/ReplyKeyboardMarkup/entity.json +++ b/.butcher/types/ReplyKeyboardMarkup/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ReplyKeyboardRemove/entity.json b/.butcher/types/ReplyKeyboardRemove/entity.json index 5ca28ce0..57e119d7 100644 --- a/.butcher/types/ReplyKeyboardRemove/entity.json +++ b/.butcher/types/ReplyKeyboardRemove/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/ResponseParameters/entity.json b/.butcher/types/ResponseParameters/entity.json index 3166f89d..02abbbad 100644 --- a/.butcher/types/ResponseParameters/entity.json +++ b/.butcher/types/ResponseParameters/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/SentWebAppMessage/entity.json b/.butcher/types/SentWebAppMessage/entity.json index 4fbf67d3..a70568af 100644 --- a/.butcher/types/SentWebAppMessage/entity.json +++ b/.butcher/types/SentWebAppMessage/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Inline mode", "anchor": "inline-mode" diff --git a/.butcher/types/ShippingAddress/entity.json b/.butcher/types/ShippingAddress/entity.json index 310cc037..771d2fe1 100644 --- a/.butcher/types/ShippingAddress/entity.json +++ b/.butcher/types/ShippingAddress/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/ShippingOption/entity.json b/.butcher/types/ShippingOption/entity.json index 37bc6f18..5288408c 100644 --- a/.butcher/types/ShippingOption/entity.json +++ b/.butcher/types/ShippingOption/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/ShippingQuery/entity.json b/.butcher/types/ShippingQuery/entity.json index d0c2d11d..607f7e57 100644 --- a/.butcher/types/ShippingQuery/entity.json +++ b/.butcher/types/ShippingQuery/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/Sticker/entity.json b/.butcher/types/Sticker/entity.json index cd3d092b..702f84e5 100644 --- a/.butcher/types/Sticker/entity.json +++ b/.butcher/types/Sticker/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/types/StickerSet/entity.json b/.butcher/types/StickerSet/entity.json index b766cd7d..d74eb635 100644 --- a/.butcher/types/StickerSet/entity.json +++ b/.butcher/types/StickerSet/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Stickers", "anchor": "stickers" diff --git a/.butcher/types/SuccessfulPayment/entity.json b/.butcher/types/SuccessfulPayment/entity.json index 2d9fe818..bbe8b21c 100644 --- a/.butcher/types/SuccessfulPayment/entity.json +++ b/.butcher/types/SuccessfulPayment/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Payments", "anchor": "payments" diff --git a/.butcher/types/Update/entity.json b/.butcher/types/Update/entity.json index 32c7d35d..1ee46f08 100644 --- a/.butcher/types/Update/entity.json +++ b/.butcher/types/Update/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Getting updates", "anchor": "getting-updates" diff --git a/.butcher/types/User/entity.json b/.butcher/types/User/entity.json index 3b08c07e..a753bb16 100644 --- a/.butcher/types/User/entity.json +++ b/.butcher/types/User/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/UserProfilePhotos/entity.json b/.butcher/types/UserProfilePhotos/entity.json index 4b09b777..d6406d9e 100644 --- a/.butcher/types/UserProfilePhotos/entity.json +++ b/.butcher/types/UserProfilePhotos/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/UserShared/entity.json b/.butcher/types/UserShared/entity.json index 71f5392e..1e7f0044 100644 --- a/.butcher/types/UserShared/entity.json +++ b/.butcher/types/UserShared/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Venue/entity.json b/.butcher/types/Venue/entity.json index 7ca5f295..3711d325 100644 --- a/.butcher/types/Venue/entity.json +++ b/.butcher/types/Venue/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Video/entity.json b/.butcher/types/Video/entity.json index 52bb1439..b98f44ba 100644 --- a/.butcher/types/Video/entity.json +++ b/.butcher/types/Video/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/VideoChatEnded/entity.json b/.butcher/types/VideoChatEnded/entity.json index 58d88893..bd3cf1e4 100644 --- a/.butcher/types/VideoChatEnded/entity.json +++ b/.butcher/types/VideoChatEnded/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/VideoChatParticipantsInvited/entity.json b/.butcher/types/VideoChatParticipantsInvited/entity.json index 27114659..d0758387 100644 --- a/.butcher/types/VideoChatParticipantsInvited/entity.json +++ b/.butcher/types/VideoChatParticipantsInvited/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/VideoChatScheduled/entity.json b/.butcher/types/VideoChatScheduled/entity.json index c67f3af4..37393d7b 100644 --- a/.butcher/types/VideoChatScheduled/entity.json +++ b/.butcher/types/VideoChatScheduled/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/VideoChatStarted/entity.json b/.butcher/types/VideoChatStarted/entity.json index 173e71e7..c870523f 100644 --- a/.butcher/types/VideoChatStarted/entity.json +++ b/.butcher/types/VideoChatStarted/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/VideoNote/entity.json b/.butcher/types/VideoNote/entity.json index a27d9a7d..da99d65c 100644 --- a/.butcher/types/VideoNote/entity.json +++ b/.butcher/types/VideoNote/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/Voice/entity.json b/.butcher/types/Voice/entity.json index 2be67726..f19f9536 100644 --- a/.butcher/types/Voice/entity.json +++ b/.butcher/types/Voice/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/WebAppData/entity.json b/.butcher/types/WebAppData/entity.json index a625d7ca..0a41a879 100644 --- a/.butcher/types/WebAppData/entity.json +++ b/.butcher/types/WebAppData/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/WebAppInfo/entity.json b/.butcher/types/WebAppInfo/entity.json index 3a2e882d..a0ec3c45 100644 --- a/.butcher/types/WebAppInfo/entity.json +++ b/.butcher/types/WebAppInfo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/.butcher/types/WebhookInfo/entity.json b/.butcher/types/WebhookInfo/entity.json index 0fbe1ee4..62e578c0 100644 --- a/.butcher/types/WebhookInfo/entity.json +++ b/.butcher/types/WebhookInfo/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Getting updates", "anchor": "getting-updates" diff --git a/.butcher/types/WriteAccessAllowed/entity.json b/.butcher/types/WriteAccessAllowed/entity.json index f9a0d1ed..2ddeba40 100644 --- a/.butcher/types/WriteAccessAllowed/entity.json +++ b/.butcher/types/WriteAccessAllowed/entity.json @@ -1,7 +1,5 @@ { - "meta": { - "deprecated": false - }, + "meta": {}, "group": { "title": "Available types", "anchor": "available-types" diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index 400af0d9..304eae6b 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -201,11 +201,3 @@ Games callback_game game game_high_score - -Internals -========= - -.. toctree:: - :maxdepth: 1 - - error_event From 924a83966da0e90154e2a8afb93034473a36891f Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 11 Mar 2023 17:42:36 +0200 Subject: [PATCH 41/42] Update butcher - Added deprecation mechanism to schema and codegen --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3855ca10..6f76173e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,7 +148,7 @@ features = [ "test", ] extra-dependencies = [ - "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.11" + "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.12" ] [tool.hatch.envs.test] From fea1b7b0a385e4dd701ea644fd6e9052ec95c587 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 11 Mar 2023 20:46:36 +0200 Subject: [PATCH 42/42] Reworked request builder (#1142) * Reworked request builder * Added more default values * Update tests * Fixed timestamp * Fixed Py3.8 support * Describe changes --- .butcher/methods/copyMessage/replace.yml | 4 +- .../methods/editMessageCaption/replace.yml | 2 +- .butcher/methods/editMessageText/replace.yml | 4 +- .butcher/methods/forwardMessage/replace.yml | 3 + .butcher/methods/sendAnimation/replace.yml | 4 +- .butcher/methods/sendAudio/replace.yml | 4 +- .butcher/methods/sendContact/replace.yml | 3 + .butcher/methods/sendDice/replace.yml | 3 + .butcher/methods/sendDocument/replace.yml | 4 +- .butcher/methods/sendGame/replace.yml | 3 + .butcher/methods/sendInvoice/replace.yml | 3 + .butcher/methods/sendLocation/replace.yml | 3 + .butcher/methods/sendMediaGroup/replace.yml | 3 + .butcher/methods/sendMessage/replace.yml | 6 +- .butcher/methods/sendPhoto/replace.yml | 4 +- .butcher/methods/sendPoll/replace.yml | 4 +- .butcher/methods/sendSticker/replace.yml | 3 + .butcher/methods/sendVenue/replace.yml | 3 + .butcher/methods/sendVideo/replace.yml | 4 +- .butcher/methods/sendVideoNote/replace.yml | 3 + .butcher/methods/sendVoice/replace.yml | 4 +- .../types/InlineQueryResultAudio/replace.yml | 2 +- .../InlineQueryResultCachedAudio/replace.yml | 2 +- .../replace.yml | 2 +- .../InlineQueryResultCachedGif/replace.yml | 2 +- .../replace.yml | 2 +- .../InlineQueryResultCachedPhoto/replace.yml | 2 +- .../InlineQueryResultCachedVideo/replace.yml | 2 +- .../InlineQueryResultCachedVoice/replace.yml | 2 +- .../InlineQueryResultDocument/replace.yml | 2 +- .../types/InlineQueryResultGif/replace.yml | 2 +- .../InlineQueryResultMpeg4Gif/replace.yml | 2 +- .../types/InlineQueryResultPhoto/replace.yml | 2 +- .../types/InlineQueryResultVideo/replace.yml | 2 +- .../types/InlineQueryResultVoice/replace.yml | 2 +- .../types/InputMediaAnimation/replace.yml | 2 +- .butcher/types/InputMediaAudio/replace.yml | 2 +- .butcher/types/InputMediaDocument/replace.yml | 2 +- .butcher/types/InputMediaPhoto/replace.yml | 2 +- .butcher/types/InputMediaVideo/replace.yml | 2 +- .../types/InputTextMessageContent/replace.yml | 4 +- CHANGES/1142.misc.rst | 2 + aiogram/client/bot.py | 75 ++++++----- aiogram/client/session/aiohttp.py | 24 ++-- aiogram/client/session/base.py | 85 +++++++++--- aiogram/dispatcher/dispatcher.py | 7 +- aiogram/methods/add_sticker_to_set.py | 18 +-- aiogram/methods/answer_callback_query.py | 13 +- aiogram/methods/answer_inline_query.py | 20 +-- aiogram/methods/answer_pre_checkout_query.py | 13 +- aiogram/methods/answer_shipping_query.py | 13 +- aiogram/methods/answer_web_app_query.py | 17 +-- aiogram/methods/approve_chat_join_request.py | 13 +- aiogram/methods/ban_chat_member.py | 13 +- aiogram/methods/ban_chat_sender_chat.py | 13 +- aiogram/methods/base.py | 120 ++--------------- aiogram/methods/close.py | 13 +- aiogram/methods/close_forum_topic.py | 13 +- aiogram/methods/close_general_forum_topic.py | 13 +- aiogram/methods/copy_message.py | 24 +--- aiogram/methods/create_chat_invite_link.py | 13 +- aiogram/methods/create_forum_topic.py | 13 +- aiogram/methods/create_invoice_link.py | 13 +- aiogram/methods/create_new_sticker_set.py | 18 +-- aiogram/methods/decline_chat_join_request.py | 13 +- aiogram/methods/delete_chat_photo.py | 13 +- aiogram/methods/delete_chat_sticker_set.py | 13 +- aiogram/methods/delete_forum_topic.py | 13 +- aiogram/methods/delete_message.py | 13 +- aiogram/methods/delete_my_commands.py | 13 +- aiogram/methods/delete_sticker_from_set.py | 13 +- aiogram/methods/delete_sticker_set.py | 13 +- aiogram/methods/delete_webhook.py | 13 +- aiogram/methods/edit_chat_invite_link.py | 13 +- aiogram/methods/edit_forum_topic.py | 13 +- aiogram/methods/edit_general_forum_topic.py | 13 +- aiogram/methods/edit_message_caption.py | 21 +-- aiogram/methods/edit_message_live_location.py | 13 +- aiogram/methods/edit_message_media.py | 18 +-- aiogram/methods/edit_message_reply_markup.py | 13 +- aiogram/methods/edit_message_text.py | 24 +--- aiogram/methods/export_chat_invite_link.py | 13 +- aiogram/methods/forward_message.py | 16 +-- aiogram/methods/get_chat.py | 13 +- aiogram/methods/get_chat_administrators.py | 13 +- aiogram/methods/get_chat_member.py | 13 +- aiogram/methods/get_chat_member_count.py | 13 +- aiogram/methods/get_chat_menu_button.py | 13 +- aiogram/methods/get_custom_emoji_stickers.py | 13 +- aiogram/methods/get_file.py | 13 +- .../methods/get_forum_topic_icon_stickers.py | 13 +- aiogram/methods/get_game_high_scores.py | 13 +- aiogram/methods/get_me.py | 13 +- aiogram/methods/get_my_commands.py | 13 +- .../get_my_default_administrator_rights.py | 13 +- aiogram/methods/get_my_description.py | 13 +- aiogram/methods/get_my_short_description.py | 13 +- aiogram/methods/get_sticker_set.py | 13 +- aiogram/methods/get_updates.py | 13 +- aiogram/methods/get_user_profile_photos.py | 13 +- aiogram/methods/get_webhook_info.py | 13 +- aiogram/methods/hide_general_forum_topic.py | 13 +- aiogram/methods/leave_chat.py | 13 +- aiogram/methods/log_out.py | 13 +- aiogram/methods/pin_chat_message.py | 13 +- aiogram/methods/promote_chat_member.py | 13 +- aiogram/methods/reopen_forum_topic.py | 13 +- aiogram/methods/reopen_general_forum_topic.py | 13 +- aiogram/methods/restrict_chat_member.py | 13 +- aiogram/methods/revoke_chat_invite_link.py | 13 +- aiogram/methods/send_animation.py | 28 +--- aiogram/methods/send_audio.py | 28 +--- aiogram/methods/send_chat_action.py | 13 +- aiogram/methods/send_contact.py | 16 +-- aiogram/methods/send_dice.py | 16 +-- aiogram/methods/send_document.py | 28 +--- aiogram/methods/send_game.py | 16 +-- aiogram/methods/send_invoice.py | 16 +-- aiogram/methods/send_location.py | 16 +-- aiogram/methods/send_media_group.py | 21 +-- aiogram/methods/send_message.py | 26 ++-- aiogram/methods/send_photo.py | 27 +--- aiogram/methods/send_poll.py | 27 +--- aiogram/methods/send_sticker.py | 19 +-- aiogram/methods/send_venue.py | 16 +-- aiogram/methods/send_video.py | 28 +--- aiogram/methods/send_video_note.py | 20 +-- aiogram/methods/send_voice.py | 27 +--- .../set_chat_administrator_custom_title.py | 13 +- aiogram/methods/set_chat_description.py | 13 +- aiogram/methods/set_chat_menu_button.py | 13 +- aiogram/methods/set_chat_permissions.py | 13 +- aiogram/methods/set_chat_photo.py | 16 +-- aiogram/methods/set_chat_sticker_set.py | 13 +- aiogram/methods/set_chat_title.py | 13 +- .../set_custom_emoji_sticker_set_thumbnail.py | 13 +- aiogram/methods/set_game_score.py | 13 +- aiogram/methods/set_my_commands.py | 13 +- .../set_my_default_administrator_rights.py | 13 +- aiogram/methods/set_my_description.py | 13 +- aiogram/methods/set_my_short_description.py | 13 +- aiogram/methods/set_passport_data_errors.py | 13 +- aiogram/methods/set_sticker_emoji_list.py | 13 +- aiogram/methods/set_sticker_keywords.py | 13 +- aiogram/methods/set_sticker_mask_position.py | 13 +- .../methods/set_sticker_position_in_set.py | 13 +- aiogram/methods/set_sticker_set_thumbnail.py | 16 +-- aiogram/methods/set_sticker_set_title.py | 13 +- aiogram/methods/set_webhook.py | 16 +-- aiogram/methods/stop_message_live_location.py | 13 +- aiogram/methods/stop_poll.py | 13 +- aiogram/methods/unban_chat_member.py | 13 +- aiogram/methods/unban_chat_sender_chat.py | 13 +- aiogram/methods/unhide_general_forum_topic.py | 13 +- aiogram/methods/unpin_all_chat_messages.py | 13 +- .../methods/unpin_all_forum_topic_messages.py | 13 +- aiogram/methods/unpin_chat_message.py | 13 +- aiogram/methods/upload_sticker_file.py | 16 +-- aiogram/types/__init__.py | 4 +- aiogram/types/base.py | 8 +- aiogram/types/inline_query_result_audio.py | 4 +- .../types/inline_query_result_cached_audio.py | 4 +- .../inline_query_result_cached_document.py | 4 +- .../types/inline_query_result_cached_gif.py | 4 +- .../inline_query_result_cached_mpeg4_gif.py | 4 +- .../types/inline_query_result_cached_photo.py | 4 +- .../types/inline_query_result_cached_video.py | 4 +- .../types/inline_query_result_cached_voice.py | 4 +- aiogram/types/inline_query_result_document.py | 4 +- aiogram/types/inline_query_result_gif.py | 4 +- .../types/inline_query_result_mpeg4_gif.py | 4 +- aiogram/types/inline_query_result_photo.py | 4 +- aiogram/types/inline_query_result_video.py | 4 +- aiogram/types/inline_query_result_voice.py | 4 +- aiogram/types/input_media_animation.py | 4 +- aiogram/types/input_media_audio.py | 4 +- aiogram/types/input_media_document.py | 4 +- aiogram/types/input_media_photo.py | 4 +- aiogram/types/input_media_video.py | 4 +- aiogram/types/input_text_message_content.py | 6 +- aiogram/types/message.py | 123 +++++++++--------- aiogram/webhook/aiohttp_server.py | 32 +++-- pyproject.toml | 4 +- tests/mocked_bot.py | 17 ++- .../test_session/test_aiohttp_session.py | 76 ++++++----- .../test_session/test_base_session.py | 107 ++++++++------- .../test_methods/test_add_sticker_to_set.py | 17 +-- .../test_answer_callback_query.py | 11 +- .../test_methods/test_answer_inline_query.py | 46 +------ .../test_answer_pre_checkout_query.py | 11 +- .../test_answer_shipping_query.py | 11 +- .../test_methods/test_answer_web_app_query.py | 16 +-- .../test_approve_chat_join_request.py | 14 +- .../test_methods/test_ban_chat_member.py | 11 +- .../test_methods/test_ban_chat_sender_chat.py | 16 +-- tests/test_api/test_methods/test_base.py | 64 +++------ tests/test_api/test_methods/test_close.py | 13 +- .../test_methods/test_close_forum_topic.py | 16 +-- .../test_close_general_forum_topic.py | 11 +- .../test_methods/test_copy_message.py | 17 +-- .../test_create_chat_invite_link.py | 25 +--- .../test_methods/test_create_forum_topic.py | 20 +-- .../test_methods/test_create_invoice_link.py | 20 +-- .../test_create_new_sticker_set.py | 20 +-- .../test_decline_chat_join_request.py | 14 +- .../test_methods/test_delete_chat_photo.py | 11 +- .../test_delete_chat_sticker_set.py | 11 +- .../test_methods/test_delete_forum_topic.py | 16 +-- .../test_methods/test_delete_message.py | 11 +- .../test_methods/test_delete_my_commands.py | 11 +- .../test_delete_sticker_from_set.py | 11 +- .../test_methods/test_delete_sticker_set.py | 11 +- .../test_methods/test_delete_webhook.py | 11 +- .../test_edit_chat_invite_link.py | 23 +--- .../test_methods/test_edit_forum_topic.py | 19 +-- .../test_edit_general_forum_topic.py | 11 +- .../test_methods/test_edit_message_caption.py | 20 +-- .../test_edit_message_live_location.py | 13 +- .../test_methods/test_edit_message_media.py | 13 +- .../test_edit_message_reply_markup.py | 19 +-- .../test_methods/test_edit_message_text.py | 13 +- .../test_export_chat_invite_link.py | 13 +- .../test_methods/test_forward_message.py | 22 +--- tests/test_api/test_methods/test_get_chat.py | 13 +- .../test_get_chat_administrators.py | 19 +-- .../test_methods/test_get_chat_member.py | 20 +-- .../test_get_chat_member_count.py | 11 +- .../test_methods/test_get_chat_menu_button.py | 13 +- .../test_get_custom_emoji_stickers.py | 30 +---- tests/test_api/test_methods/test_get_file.py | 13 +- .../test_get_forum_topic_icon_stickers.py | 13 +- .../test_methods/test_get_game_high_scores.py | 19 +-- tests/test_api/test_methods/test_get_me.py | 15 +-- .../test_methods/test_get_my_commands.py | 11 +- ...est_get_my_default_administrator_rights.py | 26 +--- .../test_methods/test_get_my_description.py | 13 +- .../test_get_my_short_description.py | 13 +- .../test_methods/test_get_sticker_set.py | 32 +---- .../test_api/test_methods/test_get_updates.py | 11 +- .../test_get_user_profile_photos.py | 20 +-- .../test_methods/test_get_webhook_info.py | 17 +-- .../test_hide_general_forum_topic.py | 11 +- .../test_api/test_methods/test_leave_chat.py | 11 +- tests/test_api/test_methods/test_log_out.py | 13 +- .../test_methods/test_pin_chat_message.py | 11 +- .../test_methods/test_promote_chat_member.py | 11 +- .../test_methods/test_reopen_forum_topic.py | 16 +-- .../test_reopen_general_forum_topic.py | 11 +- .../test_methods/test_restrict_chat_member.py | 13 +- .../test_revoke_chat_invite_link.py | 24 +--- .../test_methods/test_send_animation.py | 22 +--- .../test_api/test_methods/test_send_audio.py | 20 +-- .../test_methods/test_send_chat_action.py | 20 +-- .../test_methods/test_send_contact.py | 20 +-- tests/test_api/test_methods/test_send_dice.py | 11 +- .../test_methods/test_send_document.py | 20 +-- tests/test_api/test_methods/test_send_game.py | 26 +--- .../test_methods/test_send_invoice.py | 35 +---- .../test_methods/test_send_location.py | 20 +-- .../test_methods/test_send_media_group.py | 44 +------ .../test_methods/test_send_message.py | 20 +-- .../test_api/test_methods/test_send_photo.py | 22 +--- tests/test_api/test_methods/test_send_poll.py | 35 +---- .../test_methods/test_send_sticker.py | 28 +--- .../test_api/test_methods/test_send_venue.py | 32 +---- .../test_api/test_methods/test_send_video.py | 22 +--- .../test_methods/test_send_video_note.py | 26 +--- .../test_api/test_methods/test_send_voice.py | 20 +-- ...est_set_chat_administrator_custom_title.py | 13 +- .../test_methods/test_set_chat_description.py | 11 +- .../test_methods/test_set_chat_menu_button.py | 13 +- .../test_methods/test_set_chat_permissions.py | 13 +- .../test_methods/test_set_chat_photo.py | 13 +- .../test_methods/test_set_chat_sticker_set.py | 11 +- .../test_methods/test_set_chat_title.py | 11 +- ..._set_custom_emoji_sticker_set_thumbnail.py | 15 +-- .../test_methods/test_set_game_score.py | 13 +- .../test_methods/test_set_my_commands.py | 14 +- ...est_set_my_default_administrator_rights.py | 13 +- .../test_methods/test_set_my_description.py | 11 +- .../test_set_my_short_description.py | 11 +- .../test_set_passport_data_errors.py | 11 +- .../test_set_sticker_emoji_list.py | 11 +- .../test_methods/test_set_sticker_keywords.py | 11 +- .../test_set_sticker_mask_position.py | 11 +- .../test_set_sticker_position_in_set.py | 11 +- .../test_set_sticker_set_thumbnail.py | 13 +- .../test_set_sticker_set_title.py | 11 +- .../test_api/test_methods/test_set_webhook.py | 11 +- .../test_stop_message_live_location.py | 13 +- tests/test_api/test_methods/test_stop_poll.py | 25 +--- .../test_methods/test_unban_chat_member.py | 11 +- .../test_unban_chat_sender_chat.py | 16 +-- .../test_unhide_general_forum_topic.py | 11 +- .../test_unpin_all_chat_messages.py | 15 +-- .../test_unpin_all_forum_topic_messages.py | 16 +-- .../test_methods/test_unpin_chat_message.py | 11 +- .../test_methods/test_upload_sticker_file.py | 17 +-- tests/test_dispatcher/test_dispatcher.py | 6 +- tests/test_webhook/test_aiohtt_server.py | 3 +- 300 files changed, 1003 insertions(+), 3448 deletions(-) create mode 100644 .butcher/methods/forwardMessage/replace.yml create mode 100644 .butcher/methods/sendContact/replace.yml create mode 100644 .butcher/methods/sendDice/replace.yml create mode 100644 .butcher/methods/sendGame/replace.yml create mode 100644 .butcher/methods/sendInvoice/replace.yml create mode 100644 .butcher/methods/sendLocation/replace.yml create mode 100644 .butcher/methods/sendMediaGroup/replace.yml create mode 100644 .butcher/methods/sendSticker/replace.yml create mode 100644 .butcher/methods/sendVenue/replace.yml create mode 100644 .butcher/methods/sendVideoNote/replace.yml create mode 100644 CHANGES/1142.misc.rst diff --git a/.butcher/methods/copyMessage/replace.yml b/.butcher/methods/copyMessage/replace.yml index 1feb5360..cc4fe9b2 100644 --- a/.butcher/methods/copyMessage/replace.yml +++ b/.butcher/methods/copyMessage/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/editMessageCaption/replace.yml b/.butcher/methods/editMessageCaption/replace.yml index 1feb5360..e87fb9b3 100644 --- a/.butcher/methods/editMessageCaption/replace.yml +++ b/.butcher/methods/editMessageCaption/replace.yml @@ -1,3 +1,3 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/methods/editMessageText/replace.yml b/.butcher/methods/editMessageText/replace.yml index 1feb5360..ebc1d7e9 100644 --- a/.butcher/methods/editMessageText/replace.yml +++ b/.butcher/methods/editMessageText/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + disable_web_page_preview: + value: UNSET_DISABLE_WEB_PAGE_PREVIEW diff --git a/.butcher/methods/forwardMessage/replace.yml b/.butcher/methods/forwardMessage/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/forwardMessage/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendAnimation/replace.yml b/.butcher/methods/sendAnimation/replace.yml index 1feb5360..cc4fe9b2 100644 --- a/.butcher/methods/sendAnimation/replace.yml +++ b/.butcher/methods/sendAnimation/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendAudio/replace.yml b/.butcher/methods/sendAudio/replace.yml index 1feb5360..cc4fe9b2 100644 --- a/.butcher/methods/sendAudio/replace.yml +++ b/.butcher/methods/sendAudio/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendContact/replace.yml b/.butcher/methods/sendContact/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendContact/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendDice/replace.yml b/.butcher/methods/sendDice/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendDice/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendDocument/replace.yml b/.butcher/methods/sendDocument/replace.yml index 1feb5360..cc4fe9b2 100644 --- a/.butcher/methods/sendDocument/replace.yml +++ b/.butcher/methods/sendDocument/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendGame/replace.yml b/.butcher/methods/sendGame/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendGame/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendInvoice/replace.yml b/.butcher/methods/sendInvoice/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendInvoice/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendLocation/replace.yml b/.butcher/methods/sendLocation/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendLocation/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendMediaGroup/replace.yml b/.butcher/methods/sendMediaGroup/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendMediaGroup/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendMessage/replace.yml b/.butcher/methods/sendMessage/replace.yml index 1feb5360..68d7bef9 100644 --- a/.butcher/methods/sendMessage/replace.yml +++ b/.butcher/methods/sendMessage/replace.yml @@ -1,3 +1,7 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + disable_web_page_preview: + value: UNSET_DISABLE_WEB_PAGE_PREVIEW + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendPhoto/replace.yml b/.butcher/methods/sendPhoto/replace.yml index 1feb5360..cc4fe9b2 100644 --- a/.butcher/methods/sendPhoto/replace.yml +++ b/.butcher/methods/sendPhoto/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendPoll/replace.yml b/.butcher/methods/sendPoll/replace.yml index 92d645dd..4b39b8ab 100644 --- a/.butcher/methods/sendPoll/replace.yml +++ b/.butcher/methods/sendPoll/replace.yml @@ -1,6 +1,8 @@ annotations: explanation_parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT close_date: parsed_type: type: union diff --git a/.butcher/methods/sendSticker/replace.yml b/.butcher/methods/sendSticker/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendSticker/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendVenue/replace.yml b/.butcher/methods/sendVenue/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendVenue/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendVideo/replace.yml b/.butcher/methods/sendVideo/replace.yml index 1feb5360..cc4fe9b2 100644 --- a/.butcher/methods/sendVideo/replace.yml +++ b/.butcher/methods/sendVideo/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendVideoNote/replace.yml b/.butcher/methods/sendVideoNote/replace.yml new file mode 100644 index 00000000..39cba814 --- /dev/null +++ b/.butcher/methods/sendVideoNote/replace.yml @@ -0,0 +1,3 @@ +annotations: + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/methods/sendVoice/replace.yml b/.butcher/methods/sendVoice/replace.yml index 1feb5360..cc4fe9b2 100644 --- a/.butcher/methods/sendVoice/replace.yml +++ b/.butcher/methods/sendVoice/replace.yml @@ -1,3 +1,5 @@ annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + protect_content: + value: UNSET_PROTECT_CONTENT diff --git a/.butcher/types/InlineQueryResultAudio/replace.yml b/.butcher/types/InlineQueryResultAudio/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultAudio/replace.yml +++ b/.butcher/types/InlineQueryResultAudio/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultCachedAudio/replace.yml b/.butcher/types/InlineQueryResultCachedAudio/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultCachedAudio/replace.yml +++ b/.butcher/types/InlineQueryResultCachedAudio/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultCachedDocument/replace.yml b/.butcher/types/InlineQueryResultCachedDocument/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultCachedDocument/replace.yml +++ b/.butcher/types/InlineQueryResultCachedDocument/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultCachedGif/replace.yml b/.butcher/types/InlineQueryResultCachedGif/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultCachedGif/replace.yml +++ b/.butcher/types/InlineQueryResultCachedGif/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml b/.butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml +++ b/.butcher/types/InlineQueryResultCachedMpeg4Gif/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultCachedPhoto/replace.yml b/.butcher/types/InlineQueryResultCachedPhoto/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultCachedPhoto/replace.yml +++ b/.butcher/types/InlineQueryResultCachedPhoto/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultCachedVideo/replace.yml b/.butcher/types/InlineQueryResultCachedVideo/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultCachedVideo/replace.yml +++ b/.butcher/types/InlineQueryResultCachedVideo/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultCachedVoice/replace.yml b/.butcher/types/InlineQueryResultCachedVoice/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultCachedVoice/replace.yml +++ b/.butcher/types/InlineQueryResultCachedVoice/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultDocument/replace.yml b/.butcher/types/InlineQueryResultDocument/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultDocument/replace.yml +++ b/.butcher/types/InlineQueryResultDocument/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultGif/replace.yml b/.butcher/types/InlineQueryResultGif/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultGif/replace.yml +++ b/.butcher/types/InlineQueryResultGif/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultMpeg4Gif/replace.yml b/.butcher/types/InlineQueryResultMpeg4Gif/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultMpeg4Gif/replace.yml +++ b/.butcher/types/InlineQueryResultMpeg4Gif/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultPhoto/replace.yml b/.butcher/types/InlineQueryResultPhoto/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultPhoto/replace.yml +++ b/.butcher/types/InlineQueryResultPhoto/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultVideo/replace.yml b/.butcher/types/InlineQueryResultVideo/replace.yml index b877a94d..cd89306d 100644 --- a/.butcher/types/InlineQueryResultVideo/replace.yml +++ b/.butcher/types/InlineQueryResultVideo/replace.yml @@ -3,4 +3,4 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InlineQueryResultVoice/replace.yml b/.butcher/types/InlineQueryResultVoice/replace.yml index cd07671d..6c32c60f 100644 --- a/.butcher/types/InlineQueryResultVoice/replace.yml +++ b/.butcher/types/InlineQueryResultVoice/replace.yml @@ -2,4 +2,4 @@ bases: - InlineQueryResult annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InputMediaAnimation/replace.yml b/.butcher/types/InputMediaAnimation/replace.yml index d2375f89..a2756429 100644 --- a/.butcher/types/InputMediaAnimation/replace.yml +++ b/.butcher/types/InputMediaAnimation/replace.yml @@ -12,4 +12,4 @@ annotations: category: types name: InputFile parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InputMediaAudio/replace.yml b/.butcher/types/InputMediaAudio/replace.yml index d2375f89..a2756429 100644 --- a/.butcher/types/InputMediaAudio/replace.yml +++ b/.butcher/types/InputMediaAudio/replace.yml @@ -12,4 +12,4 @@ annotations: category: types name: InputFile parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InputMediaDocument/replace.yml b/.butcher/types/InputMediaDocument/replace.yml index d2375f89..a2756429 100644 --- a/.butcher/types/InputMediaDocument/replace.yml +++ b/.butcher/types/InputMediaDocument/replace.yml @@ -12,4 +12,4 @@ annotations: category: types name: InputFile parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InputMediaPhoto/replace.yml b/.butcher/types/InputMediaPhoto/replace.yml index d2375f89..a2756429 100644 --- a/.butcher/types/InputMediaPhoto/replace.yml +++ b/.butcher/types/InputMediaPhoto/replace.yml @@ -12,4 +12,4 @@ annotations: category: types name: InputFile parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InputMediaVideo/replace.yml b/.butcher/types/InputMediaVideo/replace.yml index d2375f89..a2756429 100644 --- a/.butcher/types/InputMediaVideo/replace.yml +++ b/.butcher/types/InputMediaVideo/replace.yml @@ -12,4 +12,4 @@ annotations: category: types name: InputFile parse_mode: - value: UNSET + value: UNSET_PARSE_MODE diff --git a/.butcher/types/InputTextMessageContent/replace.yml b/.butcher/types/InputTextMessageContent/replace.yml index c79933d0..63741e83 100644 --- a/.butcher/types/InputTextMessageContent/replace.yml +++ b/.butcher/types/InputTextMessageContent/replace.yml @@ -3,4 +3,6 @@ bases: annotations: parse_mode: - value: UNSET + value: UNSET_PARSE_MODE + disable_web_page_preview: + value: UNSET_DISABLE_WEB_PAGE_PREVIEW diff --git a/CHANGES/1142.misc.rst b/CHANGES/1142.misc.rst new file mode 100644 index 00000000..c17fb588 --- /dev/null +++ b/CHANGES/1142.misc.rst @@ -0,0 +1,2 @@ +Added global defaults `disable_web_page_preview` and `protect_content` in addition to `parse_mode` to the Bot instance, +reworked internal request builder mechanism. diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 91dd91fa..6f874a88 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -136,7 +136,7 @@ from ..methods import ( UploadStickerFile, ) from ..types import ( - UNSET, + UNSET_PARSE_MODE, BotCommand, BotCommandScope, BotDescription, @@ -186,6 +186,7 @@ from ..types import ( UserProfilePhotos, WebhookInfo, ) +from ..types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PROTECT_CONTENT from .session.aiohttp import AiohttpSession from .session.base import BaseSession @@ -198,6 +199,8 @@ class Bot(ContextInstanceMixin["Bot"]): token: str, session: Optional[BaseSession] = None, parse_mode: Optional[str] = None, + disable_web_page_preview: Optional[bool] = None, + protect_content: Optional[bool] = None, ) -> None: """ Bot class @@ -207,6 +210,10 @@ class Bot(ContextInstanceMixin["Bot"]): If not specified it will be automatically created. :param parse_mode: Default parse mode. If specified it will be propagated into the API methods at runtime. + :param disable_web_page_preview: Default disable_web_page_preview mode. + If specified it will be propagated into the API methods at runtime. + :param protect_content: Default protect_content mode. + If specified it will be propagated into the API methods at runtime. :raise TokenValidationError: When token has invalid format this exception will be raised """ @@ -217,6 +224,8 @@ class Bot(ContextInstanceMixin["Bot"]): self.session = session self.parse_mode = parse_mode + self.disable_web_page_preview = disable_web_page_preview + self.protect_content = protect_content self.__token = token self._me: Optional[User] = None @@ -704,10 +713,10 @@ class Bot(ContextInstanceMixin["Bot"]): message_id: int, message_thread_id: Optional[int] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -1188,7 +1197,7 @@ class Bot(ContextInstanceMixin["Bot"]): message_id: Optional[int] = None, inline_message_id: Optional[str] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, request_timeout: Optional[int] = None, @@ -1331,9 +1340,9 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id: Optional[Union[int, str]] = None, message_id: Optional[int] = None, inline_message_id: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, reply_markup: Optional[InlineKeyboardMarkup] = None, request_timeout: Optional[int] = None, ) -> Union[Message, bool]: @@ -1395,7 +1404,7 @@ class Bot(ContextInstanceMixin["Bot"]): message_id: int, message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, request_timeout: Optional[int] = None, ) -> Message: """ @@ -1995,11 +2004,11 @@ class Bot(ContextInstanceMixin["Bot"]): height: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2058,14 +2067,14 @@ class Bot(ContextInstanceMixin["Bot"]): audio: Union[InputFile, str], message_thread_id: Optional[int] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2156,7 +2165,7 @@ class Bot(ContextInstanceMixin["Bot"]): last_name: Optional[str] = None, vcard: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2205,7 +2214,7 @@ class Bot(ContextInstanceMixin["Bot"]): message_thread_id: Optional[int] = None, emoji: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2249,11 +2258,11 @@ class Bot(ContextInstanceMixin["Bot"]): message_thread_id: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, disable_content_type_detection: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2306,7 +2315,7 @@ class Bot(ContextInstanceMixin["Bot"]): game_short_name: str, message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, @@ -2367,7 +2376,7 @@ class Bot(ContextInstanceMixin["Bot"]): send_email_to_provider: Optional[bool] = None, is_flexible: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, @@ -2453,7 +2462,7 @@ class Bot(ContextInstanceMixin["Bot"]): heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2506,7 +2515,7 @@ class Bot(ContextInstanceMixin["Bot"]): media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, request_timeout: Optional[int] = None, @@ -2543,11 +2552,11 @@ class Bot(ContextInstanceMixin["Bot"]): chat_id: Union[int, str], text: str, message_thread_id: Optional[int] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2596,11 +2605,11 @@ class Bot(ContextInstanceMixin["Bot"]): photo: Union[InputFile, str], message_thread_id: Optional[int] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2656,13 +2665,13 @@ class Bot(ContextInstanceMixin["Bot"]): allows_multiple_answers: Optional[bool] = None, correct_option_id: Optional[int] = None, explanation: Optional[str] = None, - explanation_parse_mode: Optional[str] = UNSET, + explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE, explanation_entities: Optional[List[MessageEntity]] = None, open_period: Optional[int] = None, close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, is_closed: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2728,7 +2737,7 @@ class Bot(ContextInstanceMixin["Bot"]): message_thread_id: Optional[int] = None, emoji: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2780,7 +2789,7 @@ class Bot(ContextInstanceMixin["Bot"]): google_place_id: Optional[str] = None, google_place_type: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2841,12 +2850,12 @@ class Bot(ContextInstanceMixin["Bot"]): height: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2910,7 +2919,7 @@ class Bot(ContextInstanceMixin["Bot"]): length: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2959,11 +2968,11 @@ class Bot(ContextInstanceMixin["Bot"]): voice: Union[InputFile, str], message_thread_id: Optional[int] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, duration: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ diff --git a/aiogram/client/session/aiohttp.py b/aiogram/client/session/aiohttp.py index 3f35a0e0..279f61f9 100644 --- a/aiogram/client/session/aiohttp.py +++ b/aiogram/client/session/aiohttp.py @@ -19,12 +19,12 @@ from typing import ( import certifi from aiohttp import BasicAuth, ClientError, ClientSession, FormData, TCPConnector -from aiogram.methods import Request, TelegramMethod +from aiogram.methods import TelegramMethod from ...exceptions import TelegramNetworkError from ...methods.base import TelegramType from ...types import InputFile -from .base import UNSET, BaseSession +from .base import BaseSession if TYPE_CHECKING: from ..bot import Bot @@ -130,15 +130,16 @@ class AiohttpSession(BaseSession): if self._session is not None and not self._session.closed: await self._session.close() - def build_form_data(self, request: Request) -> FormData: + def build_form_data(self, bot: Bot, method: TelegramMethod[TelegramType]) -> FormData: form = FormData(quote_fields=False) - for key, value in request.data.items(): - if value is None or value is UNSET: + files: Dict[str, InputFile] = {} + for key, value in method.dict().items(): + value = self.prepare_value(value, bot=bot, files=files) + if not value: continue - form.add_field(key, self.prepare_value(value)) - if request.files: - for key, value in request.files.items(): - form.add_field(key, value, filename=value.filename or key) + form.add_field(key, value) + for key, value in files.items(): + form.add_field(key, value, filename=value.filename or key) return form async def make_request( @@ -146,9 +147,8 @@ class AiohttpSession(BaseSession): ) -> TelegramType: session = await self.create_session() - request = method.build_request(bot) - url = self.api.api_url(token=bot.token, method=request.method) - form = self.build_form_data(request) + url = self.api.api_url(token=bot.token, method=method.__api_method__) + form = self.build_form_data(bot=bot, method=method) try: async with session.post( diff --git a/aiogram/client/session/base.py b/aiogram/client/session/base.py index 971d9a32..a66eb7cc 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 +import secrets from enum import Enum from http import HTTPStatus from types import TracebackType @@ -11,10 +12,10 @@ from typing import ( Any, AsyncGenerator, Callable, + Dict, Final, Optional, Type, - Union, cast, ) @@ -37,7 +38,8 @@ from aiogram.exceptions import ( from ...methods import Response, TelegramMethod from ...methods.base import TelegramType -from ...types import UNSET +from ...types import UNSET_PARSE_MODE, InputFile +from ...types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PROTECT_CONTENT from ..telegram import PRODUCTION, TelegramAPIServer from .middlewares.manager import RequestMiddlewareManager @@ -138,7 +140,10 @@ class BaseSession(abc.ABC): @abc.abstractmethod async def make_request( - self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = UNSET + self, + bot: Bot, + method: TelegramMethod[TelegramType], + timeout: Optional[int] = None, ) -> TelegramType: # pragma: no cover """ Make request to Telegram Bot API @@ -160,35 +165,81 @@ class BaseSession(abc.ABC): """ yield b"" - def prepare_value(self, value: Any) -> Union[str, int, bool]: + def prepare_value( + self, + value: Any, + bot: Bot, + files: Dict[str, Any], + _dumps_json: bool = True, + ) -> Any: """ Prepare value before send """ + if value is None: + return None if isinstance(value, str): return value - if isinstance(value, (list, dict)): - return self.json_dumps(self.clean_json(value)) + if value is UNSET_PARSE_MODE: + return self.prepare_value( + bot.parse_mode, bot=bot, files=files, _dumps_json=_dumps_json + ) + if value is UNSET_DISABLE_WEB_PAGE_PREVIEW: + return self.prepare_value( + bot.disable_web_page_preview, bot=bot, files=files, _dumps_json=_dumps_json + ) + if value is UNSET_PROTECT_CONTENT: + return self.prepare_value( + bot.protect_content, bot=bot, files=files, _dumps_json=_dumps_json + ) + if isinstance(value, InputFile): + key = secrets.token_urlsafe(10) + files[key] = value + return f"attach://{key}" + if isinstance(value, dict): + value = { + key: prepared_item + for key, item in value.items() + if ( + prepared_item := self.prepare_value( + item, bot=bot, files=files, _dumps_json=False + ) + ) + is not None + } + if _dumps_json: + return self.json_dumps(value) + return value + if isinstance(value, list): + value = [ + prepared_item + for item in value + if ( + prepared_item := self.prepare_value( + item, bot=bot, files=files, _dumps_json=False + ) + ) + is not None + ] + if _dumps_json: + return self.json_dumps(value) + return value if isinstance(value, datetime.timedelta): now = datetime.datetime.now() 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) - return str(value) + return self.prepare_value(value.value, bot=bot, files=files) - def clean_json(self, value: Any) -> Any: - """ - Clean data before send - """ - if isinstance(value, list): - return [self.clean_json(v) for v in value if v is not None] - if isinstance(value, dict): - return {k: self.clean_json(v) for k, v in value.items() if v is not None} + if _dumps_json: + return self.json_dumps(value) return value async def __call__( - self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = UNSET + self, + bot: Bot, + method: TelegramMethod[TelegramType], + timeout: Optional[int] = None, ) -> TelegramType: middleware = self.middleware.wrap_middlewares(self.make_request, timeout=timeout) return cast(TelegramType, await middleware(bot, method)) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 63eb9a3a..71791f72 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -15,7 +15,8 @@ from ..fsm.middleware import FSMContextMiddleware from ..fsm.storage.base import BaseEventIsolation, BaseStorage from ..fsm.storage.memory import DisabledEventIsolation, MemoryStorage from ..fsm.strategy import FSMStrategy -from ..methods import GetUpdates, Request, TelegramMethod +from ..methods import GetUpdates, TelegramMethod +from ..methods.base import TelegramType from ..types import Update, User from ..types.update import UpdateTypeLookupError from ..utils.backoff import Backoff, BackoffConfig @@ -364,7 +365,7 @@ class Dispatcher(Router): async def feed_webhook_update( self, bot: Bot, update: Union[Update, Dict[str, Any]], _timeout: float = 55, **kwargs: Any - ) -> Optional[Request]: + ) -> Optional[TelegramMethod[TelegramType]]: if not isinstance(update, Update): # Allow to use raw updates update = Update(**update) @@ -410,7 +411,7 @@ class Dispatcher(Router): # TODO: handle exceptions response: Any = process_updates.result() if isinstance(response, TelegramMethod): - return response.build_request(bot=bot) + return response else: process_updates.remove_done_callback(release_waiter) diff --git a/aiogram/methods/add_sticker_to_set.py b/aiogram/methods/add_sticker_to_set.py index 75b8387a..49759b84 100644 --- a/aiogram/methods/add_sticker_to_set.py +++ b/aiogram/methods/add_sticker_to_set.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING -from ..types import InputFile, InputSticker -from .base import Request, TelegramMethod, prepare_input_sticker - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import InputSticker +from .base import TelegramMethod class AddStickerToSet(TelegramMethod[bool]): @@ -17,6 +14,7 @@ class AddStickerToSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "addStickerToSet" user_id: int """User identifier of sticker set owner""" @@ -24,11 +22,3 @@ class AddStickerToSet(TelegramMethod[bool]): """Sticker set name""" sticker: InputSticker """A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - files: Dict[str, InputFile] = {} - prepare_input_sticker(input_sticker=data["sticker"], files=files) - - return Request(method="addStickerToSet", data=data, files=files) diff --git a/aiogram/methods/answer_callback_query.py b/aiogram/methods/answer_callback_query.py index 8d932f51..4b3e16fd 100644 --- a/aiogram/methods/answer_callback_query.py +++ b/aiogram/methods/answer_callback_query.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerCallbackQuery(TelegramMethod[bool]): @@ -18,6 +15,7 @@ class AnswerCallbackQuery(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "answerCallbackQuery" callback_query_id: str """Unique identifier for the query to be answered""" @@ -29,8 +27,3 @@ class AnswerCallbackQuery(TelegramMethod[bool]): """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.""" cache_time: Optional[int] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="answerCallbackQuery", data=data) diff --git a/aiogram/methods/answer_inline_query.py b/aiogram/methods/answer_inline_query.py index 56422180..f7760cb0 100644 --- a/aiogram/methods/answer_inline_query.py +++ b/aiogram/methods/answer_inline_query.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import InlineQueryResult -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerInlineQuery(TelegramMethod[bool]): @@ -19,6 +16,7 @@ class AnswerInlineQuery(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "answerInlineQuery" inline_query_id: str """Unique identifier for the answered query""" @@ -34,15 +32,3 @@ class AnswerInlineQuery(TelegramMethod[bool]): """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*""" switch_pm_parameter: Optional[str] = None """`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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - input_message_contents = [] - for result in data["results"]: - input_message_content = result.get("input_message_content", None) - if input_message_content is not None: - input_message_contents.append(input_message_content) - - prepare_parse_mode(bot, data["results"] + input_message_contents) - return Request(method="answerInlineQuery", data=data) diff --git a/aiogram/methods/answer_pre_checkout_query.py b/aiogram/methods/answer_pre_checkout_query.py index 507f8158..a87929fb 100644 --- a/aiogram/methods/answer_pre_checkout_query.py +++ b/aiogram/methods/answer_pre_checkout_query.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerPreCheckoutQuery(TelegramMethod[bool]): @@ -16,6 +13,7 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "answerPreCheckoutQuery" pre_checkout_query_id: str """Unique identifier for the query to be answered""" @@ -23,8 +21,3 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]): """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.""" error_message: Optional[str] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="answerPreCheckoutQuery", data=data) diff --git a/aiogram/methods/answer_shipping_query.py b/aiogram/methods/answer_shipping_query.py index 99f093a9..4e62d0cb 100644 --- a/aiogram/methods/answer_shipping_query.py +++ b/aiogram/methods/answer_shipping_query.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import ShippingOption -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerShippingQuery(TelegramMethod[bool]): @@ -17,6 +14,7 @@ class AnswerShippingQuery(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "answerShippingQuery" shipping_query_id: str """Unique identifier for the query to be answered""" @@ -26,8 +24,3 @@ class AnswerShippingQuery(TelegramMethod[bool]): """Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.""" error_message: Optional[str] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="answerShippingQuery", data=data) diff --git a/aiogram/methods/answer_web_app_query.py b/aiogram/methods/answer_web_app_query.py index c9315ee8..d45e249d 100644 --- a/aiogram/methods/answer_web_app_query.py +++ b/aiogram/methods/answer_web_app_query.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING from ..types import InlineQueryResult, SentWebAppMessage -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]): @@ -17,17 +14,9 @@ class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]): """ __returning__ = SentWebAppMessage + __api_method__ = "answerWebAppQuery" web_app_query_id: str """Unique identifier for the query to be answered""" result: InlineQueryResult """A JSON-serialized object describing the message to be sent""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - prepare_parse_mode( - bot, data["result"], parse_mode_property="parse_mode", entities_property="entities" - ) - - return Request(method="answerWebAppQuery", data=data) diff --git a/aiogram/methods/approve_chat_join_request.py b/aiogram/methods/approve_chat_join_request.py index 5c4008af..83e34599 100644 --- a/aiogram/methods/approve_chat_join_request.py +++ b/aiogram/methods/approve_chat_join_request.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class ApproveChatJoinRequest(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class ApproveChatJoinRequest(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "approveChatJoinRequest" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="approveChatJoinRequest", data=data) diff --git a/aiogram/methods/ban_chat_member.py b/aiogram/methods/ban_chat_member.py index 3252af1b..ecc468ee 100644 --- a/aiogram/methods/ban_chat_member.py +++ b/aiogram/methods/ban_chat_member.py @@ -1,12 +1,9 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class BanChatMember(TelegramMethod[bool]): @@ -17,6 +14,7 @@ class BanChatMember(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "banChatMember" chat_id: Union[int, str] """Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)""" @@ -26,8 +24,3 @@ class BanChatMember(TelegramMethod[bool]): """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="banChatMember", data=data) diff --git a/aiogram/methods/ban_chat_sender_chat.py b/aiogram/methods/ban_chat_sender_chat.py index c68d8f29..e63f2ecc 100644 --- a/aiogram/methods/ban_chat_sender_chat.py +++ b/aiogram/methods/ban_chat_sender_chat.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class BanChatSenderChat(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class BanChatSenderChat(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "banChatSenderChat" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sender_chat_id: int """Unique identifier of the target sender chat""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="banChatSenderChat", data=data) diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index 8f9db0d4..33045bf0 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -1,22 +1,13 @@ from __future__ import annotations -import abc -import secrets -from typing import ( - TYPE_CHECKING, - Any, - Dict, - Generator, - Generic, - Optional, - TypeVar, - Union, -) +from abc import ABC, abstractmethod +from typing import TYPE_CHECKING, Any, Dict, Generator, Generic, Optional, TypeVar from pydantic import BaseConfig, BaseModel, Extra, root_validator from pydantic.generics import GenericModel -from ..types import UNSET, InputFile, ResponseParameters +from ..types import InputFile, ResponseParameters +from ..types.base import UNSET_TYPE if TYPE_CHECKING: from ..client.bot import Bot @@ -42,7 +33,7 @@ class Response(GenericModel, Generic[TelegramType]): parameters: Optional[ResponseParameters] = None -class TelegramMethod(abc.ABC, BaseModel, Generic[TelegramType]): +class TelegramMethod(ABC, BaseModel, Generic[TelegramType]): class Config(BaseConfig): # use_enum_values = True extra = Extra.allow @@ -54,25 +45,23 @@ class TelegramMethod(abc.ABC, BaseModel, Generic[TelegramType]): @root_validator(pre=True) def remove_unset(cls, values: Dict[str, Any]) -> Dict[str, Any]: """ - Remove UNSET from `parse_mode` before fields validation. + Remove UNSET before fields validation. We use UNSET as a sentinel value for `parse_mode` and replace it to real value later. - It isn't a problem when it's just default value for a model field, but UNSET might be passing to - a model initialization from `Bot.method_name`, so we must take care of it and - remove it before fields validation. + It isn't a problem when it's just default value for a model field, + but UNSET might be passing to a model initialization from `Bot.method_name`, + so we must take care of it and remove it before fields validation. """ - for parse_mode_attribute in {"parse_mode", "explanation_parse_mode"}: - if parse_mode_attribute in values and values[parse_mode_attribute] is UNSET: - values.pop(parse_mode_attribute) - return values + return {k: v for k, v in values.items() if not isinstance(v, UNSET_TYPE)} @property - @abc.abstractmethod + @abstractmethod def __returning__(self) -> type: # pragma: no cover pass - @abc.abstractmethod - def build_request(self, bot: Bot) -> Request: # pragma: no cover + @property + @abstractmethod + def __api_method__(self) -> str: pass def dict(self, **kwargs: Any) -> Any: @@ -95,84 +84,3 @@ class TelegramMethod(abc.ABC, BaseModel, Generic[TelegramType]): bot = Bot.get_current(no_error=False) return self.emit(bot).__await__() - - -def prepare_file(name: str, value: Any, data: Dict[str, Any], files: Dict[str, Any]) -> None: - if not value: - return - if name == "thumbnail": - tag = secrets.token_urlsafe(10) - files[tag] = value - data["thumbnail"] = f"attach://{tag}" - elif isinstance(value, InputFile): - files[name] = value - else: - data[name] = value - - -def prepare_input_media(data: Dict[str, Any], files: Dict[str, InputFile]) -> None: - for input_media in data.get("media", []): # type: Dict[str, Union[str, InputFile]] - if ( - "media" in input_media - and input_media["media"] - and isinstance(input_media["media"], InputFile) - ): - tag = secrets.token_urlsafe(10) - files[tag] = input_media.pop("media") # type: ignore - input_media["media"] = f"attach://{tag}" - - -def prepare_input_sticker(input_sticker: Dict[str, Any], files: Dict[str, InputFile]) -> None: - if ( - "sticker" in input_sticker - and input_sticker["sticker"] - and isinstance(input_sticker["sticker"], InputFile) - ): - tag = secrets.token_urlsafe(10) - files[tag] = input_sticker.pop("sticker") - input_sticker["sticker"] = f"attach://{tag}" - - -def prepare_input_stickers(data: Dict[str, Any], files: Dict[str, InputFile]) -> None: - for input_sticker in data["stickers"]: - prepare_input_sticker(input_sticker, files=files) - - -def prepare_media_file(data: Dict[str, Any], files: Dict[str, InputFile]) -> None: - if ( - data["media"] - and "media" in data["media"] - and isinstance(data["media"]["media"], InputFile) - ): - tag = secrets.token_urlsafe(10) - files[tag] = data["media"].pop("media") - data["media"]["media"] = f"attach://{tag}" - - -def prepare_parse_mode( - bot: Bot, - root: Any, - parse_mode_property: str = "parse_mode", - entities_property: str = "entities", -) -> None: - """ - Find and set parse_mode with highest priority. - - Developer can manually set parse_mode for each message (or message-like) object, - but if parse_mode was unset we should use value from Bot object. - - We can't use None for "unset state", because None itself is the parse_mode option. - """ - if isinstance(root, list): - for item in root: - prepare_parse_mode( - bot=bot, - root=item, - parse_mode_property=parse_mode_property, - entities_property=entities_property, - ) - elif root.get(parse_mode_property, UNSET) is UNSET: - if bot.parse_mode and root.get(entities_property, None) is None: - root[parse_mode_property] = bot.parse_mode - else: - root[parse_mode_property] = None diff --git a/aiogram/methods/close.py b/aiogram/methods/close.py index 78e8f07d..c8e9008d 100644 --- a/aiogram/methods/close.py +++ b/aiogram/methods/close.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class Close(TelegramMethod[bool]): @@ -16,8 +13,4 @@ class Close(TelegramMethod[bool]): """ __returning__ = bool - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="close", data=data) + __api_method__ = "close" diff --git a/aiogram/methods/close_forum_topic.py b/aiogram/methods/close_forum_topic.py index da9eedec..7ab5a479 100644 --- a/aiogram/methods/close_forum_topic.py +++ b/aiogram/methods/close_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class CloseForumTopic(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class CloseForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "closeForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="closeForumTopic", data=data) diff --git a/aiogram/methods/close_general_forum_topic.py b/aiogram/methods/close_general_forum_topic.py index 1dea28c4..bc44bde5 100644 --- a/aiogram/methods/close_general_forum_topic.py +++ b/aiogram/methods/close_general_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class CloseGeneralForumTopic(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class CloseGeneralForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "closeGeneralForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="closeGeneralForumTopic", data=data) diff --git a/aiogram/methods/copy_message.py b/aiogram/methods/copy_message.py index fc30b8fe..5e34bb7d 100644 --- a/aiogram/methods/copy_message.py +++ b/aiogram/methods/copy_message.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, MessageEntity, @@ -11,10 +11,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class CopyMessage(TelegramMethod[MessageId]): @@ -25,6 +23,7 @@ class CopyMessage(TelegramMethod[MessageId]): """ __returning__ = MessageId + __api_method__ = "copyMessage" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -36,13 +35,13 @@ class CopyMessage(TelegramMethod[MessageId]): """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" caption: Optional[str] = None """New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the new caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -52,12 +51,3 @@ class CopyMessage(TelegramMethod[MessageId]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - return Request(method="copyMessage", data=data) diff --git a/aiogram/methods/create_chat_invite_link.py b/aiogram/methods/create_chat_invite_link.py index a9cf9144..539115bb 100644 --- a/aiogram/methods/create_chat_invite_link.py +++ b/aiogram/methods/create_chat_invite_link.py @@ -1,13 +1,10 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ChatInviteLink -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): @@ -18,6 +15,7 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): """ __returning__ = ChatInviteLink + __api_method__ = "createChatInviteLink" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -29,8 +27,3 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" creates_join_request: Optional[bool] = None """: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""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="createChatInviteLink", data=data) diff --git a/aiogram/methods/create_forum_topic.py b/aiogram/methods/create_forum_topic.py index bafd8ef4..f4b3f4da 100644 --- a/aiogram/methods/create_forum_topic.py +++ b/aiogram/methods/create_forum_topic.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ForumTopic -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class CreateForumTopic(TelegramMethod[ForumTopic]): @@ -17,6 +14,7 @@ class CreateForumTopic(TelegramMethod[ForumTopic]): """ __returning__ = ForumTopic + __api_method__ = "createForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" @@ -26,8 +24,3 @@ class CreateForumTopic(TelegramMethod[ForumTopic]): """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="createForumTopic", data=data) diff --git a/aiogram/methods/create_invoice_link.py b/aiogram/methods/create_invoice_link.py index 5ba21a9d..de6497c1 100644 --- a/aiogram/methods/create_invoice_link.py +++ b/aiogram/methods/create_invoice_link.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import LabeledPrice -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class CreateInvoiceLink(TelegramMethod[str]): @@ -17,6 +14,7 @@ class CreateInvoiceLink(TelegramMethod[str]): """ __returning__ = str + __api_method__ = "createInvoiceLink" title: str """Product name, 1-32 characters""" @@ -58,8 +56,3 @@ class CreateInvoiceLink(TelegramMethod[str]): """Pass :code:`True` if the user's email address should be sent to the provider""" is_flexible: Optional[bool] = None """Pass :code:`True` if the final price depends on the shipping method""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="createInvoiceLink", data=data) diff --git a/aiogram/methods/create_new_sticker_set.py b/aiogram/methods/create_new_sticker_set.py index 651c6672..6406df81 100644 --- a/aiogram/methods/create_new_sticker_set.py +++ b/aiogram/methods/create_new_sticker_set.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional -from ..types import InputFile, InputSticker -from .base import Request, TelegramMethod, prepare_input_sticker, prepare_input_stickers - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import InputSticker +from .base import TelegramMethod class CreateNewStickerSet(TelegramMethod[bool]): @@ -17,6 +14,7 @@ class CreateNewStickerSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "createNewStickerSet" user_id: int """User identifier of created sticker set owner""" @@ -32,11 +30,3 @@ class CreateNewStickerSet(TelegramMethod[bool]): """Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.""" needs_repainting: Optional[bool] = None """Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - files: Dict[str, InputFile] = {} - - prepare_input_stickers(data=data, files=files) - - return Request(method="createNewStickerSet", data=data, files=files) diff --git a/aiogram/methods/decline_chat_join_request.py b/aiogram/methods/decline_chat_join_request.py index 6bc03c9e..7861b7bb 100644 --- a/aiogram/methods/decline_chat_join_request.py +++ b/aiogram/methods/decline_chat_join_request.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeclineChatJoinRequest(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class DeclineChatJoinRequest(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "declineChatJoinRequest" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="declineChatJoinRequest", data=data) diff --git a/aiogram/methods/delete_chat_photo.py b/aiogram/methods/delete_chat_photo.py index 9fe12a65..11a3836e 100644 --- a/aiogram/methods/delete_chat_photo.py +++ b/aiogram/methods/delete_chat_photo.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteChatPhoto(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class DeleteChatPhoto(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteChatPhoto" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteChatPhoto", data=data) diff --git a/aiogram/methods/delete_chat_sticker_set.py b/aiogram/methods/delete_chat_sticker_set.py index 18fbaf82..681293df 100644 --- a/aiogram/methods/delete_chat_sticker_set.py +++ b/aiogram/methods/delete_chat_sticker_set.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteChatStickerSet(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class DeleteChatStickerSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteChatStickerSet" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteChatStickerSet", data=data) diff --git a/aiogram/methods/delete_forum_topic.py b/aiogram/methods/delete_forum_topic.py index acbe8858..4733c67d 100644 --- a/aiogram/methods/delete_forum_topic.py +++ b/aiogram/methods/delete_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteForumTopic(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class DeleteForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteForumTopic", data=data) diff --git a/aiogram/methods/delete_message.py b/aiogram/methods/delete_message.py index 09279969..468411d5 100644 --- a/aiogram/methods/delete_message.py +++ b/aiogram/methods/delete_message.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteMessage(TelegramMethod[bool]): @@ -34,13 +31,9 @@ class DeleteMessage(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteMessage" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: int """Identifier of the message to delete""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteMessage", data=data) diff --git a/aiogram/methods/delete_my_commands.py b/aiogram/methods/delete_my_commands.py index 0e475625..d73814db 100644 --- a/aiogram/methods/delete_my_commands.py +++ b/aiogram/methods/delete_my_commands.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import BotCommandScope -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteMyCommands(TelegramMethod[bool]): @@ -17,13 +14,9 @@ class DeleteMyCommands(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteMyCommands" scope: Optional[BotCommandScope] = None """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" language_code: Optional[str] = None """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""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteMyCommands", data=data) diff --git a/aiogram/methods/delete_sticker_from_set.py b/aiogram/methods/delete_sticker_from_set.py index cb40c366..96219c15 100644 --- a/aiogram/methods/delete_sticker_from_set.py +++ b/aiogram/methods/delete_sticker_from_set.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteStickerFromSet(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class DeleteStickerFromSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteStickerFromSet" sticker: str """File identifier of the sticker""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteStickerFromSet", data=data) diff --git a/aiogram/methods/delete_sticker_set.py b/aiogram/methods/delete_sticker_set.py index 2ffa48f2..d5a0f67e 100644 --- a/aiogram/methods/delete_sticker_set.py +++ b/aiogram/methods/delete_sticker_set.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteStickerSet(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class DeleteStickerSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteStickerSet" name: str """Sticker set name""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteStickerSet", data=data) diff --git a/aiogram/methods/delete_webhook.py b/aiogram/methods/delete_webhook.py index a68bf78d..b9d6cd7b 100644 --- a/aiogram/methods/delete_webhook.py +++ b/aiogram/methods/delete_webhook.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class DeleteWebhook(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class DeleteWebhook(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "deleteWebhook" drop_pending_updates: Optional[bool] = None """Pass :code:`True` to drop all pending updates""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="deleteWebhook", data=data) diff --git a/aiogram/methods/edit_chat_invite_link.py b/aiogram/methods/edit_chat_invite_link.py index 3bd3a4c3..26f4ccc3 100644 --- a/aiogram/methods/edit_chat_invite_link.py +++ b/aiogram/methods/edit_chat_invite_link.py @@ -1,13 +1,10 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ChatInviteLink -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class EditChatInviteLink(TelegramMethod[ChatInviteLink]): @@ -18,6 +15,7 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]): """ __returning__ = ChatInviteLink + __api_method__ = "editChatInviteLink" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -31,8 +29,3 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]): """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" creates_join_request: Optional[bool] = None """: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""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="editChatInviteLink", data=data) diff --git a/aiogram/methods/edit_forum_topic.py b/aiogram/methods/edit_forum_topic.py index 2e76a190..f87d0cea 100644 --- a/aiogram/methods/edit_forum_topic.py +++ b/aiogram/methods/edit_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class EditForumTopic(TelegramMethod[bool]): @@ -16,6 +13,7 @@ class EditForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "editForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" @@ -25,8 +23,3 @@ class EditForumTopic(TelegramMethod[bool]): """New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept""" icon_custom_emoji_id: Optional[str] = None """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. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="editForumTopic", data=data) diff --git a/aiogram/methods/edit_general_forum_topic.py b/aiogram/methods/edit_general_forum_topic.py index 532e05b7..f35c2048 100644 --- a/aiogram/methods/edit_general_forum_topic.py +++ b/aiogram/methods/edit_general_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class EditGeneralForumTopic(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class EditGeneralForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "editGeneralForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" name: str """New topic name, 1-128 characters""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="editGeneralForumTopic", data=data) diff --git a/aiogram/methods/edit_message_caption.py b/aiogram/methods/edit_message_caption.py index 8360ccf5..66cdeac9 100644 --- a/aiogram/methods/edit_message_caption.py +++ b/aiogram/methods/edit_message_caption.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union -from ..types import UNSET, InlineKeyboardMarkup, Message, MessageEntity -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity +from .base import TelegramMethod class EditMessageCaption(TelegramMethod[Union[Message, bool]]): @@ -17,6 +14,7 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]): """ __returning__ = Union[Message, bool] + __api_method__ = "editMessageCaption" chat_id: Optional[Union[int, str]] = None """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`)""" @@ -26,18 +24,9 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]): """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" caption: Optional[str] = None """New caption of the message, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the message caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - return Request(method="editMessageCaption", data=data) diff --git a/aiogram/methods/edit_message_live_location.py b/aiogram/methods/edit_message_live_location.py index 35a72912..e35c3225 100644 --- a/aiogram/methods/edit_message_live_location.py +++ b/aiogram/methods/edit_message_live_location.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): @@ -17,6 +14,7 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): """ __returning__ = Union[Message, bool] + __api_method__ = "editMessageLiveLocation" latitude: float """Latitude of new location""" @@ -36,8 +34,3 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): """The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new `inline keyboard `_.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="editMessageLiveLocation", data=data) diff --git a/aiogram/methods/edit_message_media.py b/aiogram/methods/edit_message_media.py index b2434105..f986a841 100644 --- a/aiogram/methods/edit_message_media.py +++ b/aiogram/methods/edit_message_media.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from ..types import InlineKeyboardMarkup, InputFile, InputMedia, Message -from .base import Request, TelegramMethod, prepare_media_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import InlineKeyboardMarkup, InputMedia, Message +from .base import TelegramMethod class EditMessageMedia(TelegramMethod[Union[Message, bool]]): @@ -17,6 +14,7 @@ class EditMessageMedia(TelegramMethod[Union[Message, bool]]): """ __returning__ = Union[Message, bool] + __api_method__ = "editMessageMedia" media: InputMedia """A JSON-serialized object for a new media content of the message""" @@ -28,11 +26,3 @@ class EditMessageMedia(TelegramMethod[Union[Message, bool]]): """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new `inline keyboard `_.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - prepare_parse_mode(bot, data["media"]) - files: Dict[str, InputFile] = {} - prepare_media_file(data=data, files=files) - - return Request(method="editMessageMedia", data=data, files=files) diff --git a/aiogram/methods/edit_message_reply_markup.py b/aiogram/methods/edit_message_reply_markup.py index 4b871d58..a828c9d8 100644 --- a/aiogram/methods/edit_message_reply_markup.py +++ b/aiogram/methods/edit_message_reply_markup.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]): @@ -17,6 +14,7 @@ class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]): """ __returning__ = Union[Message, bool] + __api_method__ = "editMessageReplyMarkup" chat_id: Optional[Union[int, str]] = None """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`)""" @@ -26,8 +24,3 @@ class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]): """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="editMessageReplyMarkup", data=data) diff --git a/aiogram/methods/edit_message_text.py b/aiogram/methods/edit_message_text.py index f47ef15a..79887c97 100644 --- a/aiogram/methods/edit_message_text.py +++ b/aiogram/methods/edit_message_text.py @@ -1,12 +1,10 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union -from ..types import UNSET, InlineKeyboardMarkup, Message, MessageEntity -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity +from ..types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW +from .base import TelegramMethod class EditMessageText(TelegramMethod[Union[Message, bool]]): @@ -17,6 +15,7 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]): """ __returning__ = Union[Message, bool] + __api_method__ = "editMessageText" text: str """New text of the message, 1-4096 characters after entities parsing""" @@ -26,20 +25,11 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]): """Required if *inline_message_id* is not specified. Identifier of the message to edit""" inline_message_id: Optional[str] = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the message text. See `formatting options `_ for more details.""" entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*""" - disable_web_page_preview: Optional[bool] = None + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW """Disables link previews for links in this message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for an `inline keyboard `_.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="entities" - ) - - return Request(method="editMessageText", data=data) diff --git a/aiogram/methods/export_chat_invite_link.py b/aiogram/methods/export_chat_invite_link.py index d4b72e34..ba4436ed 100644 --- a/aiogram/methods/export_chat_invite_link.py +++ b/aiogram/methods/export_chat_invite_link.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class ExportChatInviteLink(TelegramMethod[str]): @@ -18,11 +15,7 @@ class ExportChatInviteLink(TelegramMethod[str]): """ __returning__ = str + __api_method__ = "exportChatInviteLink" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="exportChatInviteLink", data=data) diff --git a/aiogram/methods/forward_message.py b/aiogram/methods/forward_message.py index c75aac76..45c084a0 100644 --- a/aiogram/methods/forward_message.py +++ b/aiogram/methods/forward_message.py @@ -1,12 +1,10 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class ForwardMessage(TelegramMethod[Message]): @@ -17,6 +15,7 @@ class ForwardMessage(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "forwardMessage" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -28,10 +27,5 @@ class ForwardMessage(TelegramMethod[Message]): """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the forwarded message from forwarding and saving""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="forwardMessage", data=data) diff --git a/aiogram/methods/get_chat.py b/aiogram/methods/get_chat.py index 925e2638..a565529a 100644 --- a/aiogram/methods/get_chat.py +++ b/aiogram/methods/get_chat.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union from ..types import Chat -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetChat(TelegramMethod[Chat]): @@ -17,11 +14,7 @@ class GetChat(TelegramMethod[Chat]): """ __returning__ = Chat + __api_method__ = "getChat" 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="getChat", data=data) diff --git a/aiogram/methods/get_chat_administrators.py b/aiogram/methods/get_chat_administrators.py index d760a93e..3e0cac3c 100644 --- a/aiogram/methods/get_chat_administrators.py +++ b/aiogram/methods/get_chat_administrators.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Union +from typing import TYPE_CHECKING, List, Union from ..types import ( ChatMemberAdministrator, @@ -10,10 +10,7 @@ from ..types import ( ChatMemberOwner, ChatMemberRestricted, ) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetChatAdministrators( @@ -46,11 +43,7 @@ class GetChatAdministrators( ChatMemberBanned, ] ] + __api_method__ = "getChatAdministrators" 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="getChatAdministrators", data=data) diff --git a/aiogram/methods/get_chat_member.py b/aiogram/methods/get_chat_member.py index ee531e1c..ab308024 100644 --- a/aiogram/methods/get_chat_member.py +++ b/aiogram/methods/get_chat_member.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union from ..types import ( ChatMemberAdministrator, @@ -10,10 +10,7 @@ from ..types import ( ChatMemberOwner, ChatMemberRestricted, ) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetChatMember( @@ -42,13 +39,9 @@ class GetChatMember( ChatMemberLeft, ChatMemberBanned, ] + __api_method__ = "getChatMember" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" user_id: int """Unique identifier of the target user""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getChatMember", data=data) diff --git a/aiogram/methods/get_chat_member_count.py b/aiogram/methods/get_chat_member_count.py index 7b492998..c1b08e5b 100644 --- a/aiogram/methods/get_chat_member_count.py +++ b/aiogram/methods/get_chat_member_count.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetChatMemberCount(TelegramMethod[int]): @@ -16,11 +13,7 @@ class GetChatMemberCount(TelegramMethod[int]): """ __returning__ = int + __api_method__ = "getChatMemberCount" 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="getChatMemberCount", data=data) diff --git a/aiogram/methods/get_chat_menu_button.py b/aiogram/methods/get_chat_menu_button.py index bdf07c38..6679d5df 100644 --- a/aiogram/methods/get_chat_menu_button.py +++ b/aiogram/methods/get_chat_menu_button.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetChatMenuButton( @@ -19,11 +16,7 @@ class GetChatMenuButton( """ __returning__ = Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands] + __api_method__ = "getChatMenuButton" chat_id: Optional[int] = None """Unique identifier for the target private chat. If not specified, default bot's menu button will be returned""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getChatMenuButton", data=data) diff --git a/aiogram/methods/get_custom_emoji_stickers.py b/aiogram/methods/get_custom_emoji_stickers.py index bdc265e0..3522b539 100644 --- a/aiogram/methods/get_custom_emoji_stickers.py +++ b/aiogram/methods/get_custom_emoji_stickers.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List +from typing import TYPE_CHECKING, List from ..types import Sticker -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]): @@ -17,11 +14,7 @@ class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]): """ __returning__ = List[Sticker] + __api_method__ = "getCustomEmojiStickers" custom_emoji_ids: List[str] """List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getCustomEmojiStickers", data=data) diff --git a/aiogram/methods/get_file.py b/aiogram/methods/get_file.py index 9b006296..b84ff940 100644 --- a/aiogram/methods/get_file.py +++ b/aiogram/methods/get_file.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING from ..types import File -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetFile(TelegramMethod[File]): @@ -18,11 +15,7 @@ class GetFile(TelegramMethod[File]): """ __returning__ = File + __api_method__ = "getFile" file_id: str """File identifier to get information about""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getFile", data=data) diff --git a/aiogram/methods/get_forum_topic_icon_stickers.py b/aiogram/methods/get_forum_topic_icon_stickers.py index f00a8caa..31965661 100644 --- a/aiogram/methods/get_forum_topic_icon_stickers.py +++ b/aiogram/methods/get_forum_topic_icon_stickers.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List +from typing import TYPE_CHECKING, List from ..types import Sticker -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetForumTopicIconStickers(TelegramMethod[List[Sticker]]): @@ -17,8 +14,4 @@ class GetForumTopicIconStickers(TelegramMethod[List[Sticker]]): """ __returning__ = List[Sticker] - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getForumTopicIconStickers", data=data) + __api_method__ = "getForumTopicIconStickers" diff --git a/aiogram/methods/get_game_high_scores.py b/aiogram/methods/get_game_high_scores.py index 2ec6ded4..aff1c56a 100644 --- a/aiogram/methods/get_game_high_scores.py +++ b/aiogram/methods/get_game_high_scores.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import GameHighScore -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetGameHighScores(TelegramMethod[List[GameHighScore]]): @@ -19,6 +16,7 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]): """ __returning__ = List[GameHighScore] + __api_method__ = "getGameHighScores" user_id: int """Target user id""" @@ -28,8 +26,3 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]): """Required if *inline_message_id* is not specified. Identifier of the sent message""" inline_message_id: Optional[str] = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getGameHighScores", data=data) diff --git a/aiogram/methods/get_me.py b/aiogram/methods/get_me.py index 63f901a8..1a7f1fe1 100644 --- a/aiogram/methods/get_me.py +++ b/aiogram/methods/get_me.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING from ..types import User -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetMe(TelegramMethod[User]): @@ -17,8 +14,4 @@ class GetMe(TelegramMethod[User]): """ __returning__ = User - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getMe", data=data) + __api_method__ = "getMe" diff --git a/aiogram/methods/get_my_commands.py b/aiogram/methods/get_my_commands.py index ed3eae1a..d1e5c9c3 100644 --- a/aiogram/methods/get_my_commands.py +++ b/aiogram/methods/get_my_commands.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import BotCommand, BotCommandScope -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetMyCommands(TelegramMethod[List[BotCommand]]): @@ -17,13 +14,9 @@ class GetMyCommands(TelegramMethod[List[BotCommand]]): """ __returning__ = List[BotCommand] + __api_method__ = "getMyCommands" scope: Optional[BotCommandScope] = None """A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code or an empty string""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getMyCommands", data=data) diff --git a/aiogram/methods/get_my_default_administrator_rights.py b/aiogram/methods/get_my_default_administrator_rights.py index 53a8e494..d20e7a15 100644 --- a/aiogram/methods/get_my_default_administrator_rights.py +++ b/aiogram/methods/get_my_default_administrator_rights.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import ChatAdministratorRights -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]): @@ -17,11 +14,7 @@ class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]): """ __returning__ = ChatAdministratorRights + __api_method__ = "getMyDefaultAdministratorRights" for_channels: Optional[bool] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getMyDefaultAdministratorRights", data=data) diff --git a/aiogram/methods/get_my_description.py b/aiogram/methods/get_my_description.py index 770e6263..3b0534ff 100644 --- a/aiogram/methods/get_my_description.py +++ b/aiogram/methods/get_my_description.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import BotDescription -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetMyDescription(TelegramMethod[BotDescription]): @@ -17,11 +14,7 @@ class GetMyDescription(TelegramMethod[BotDescription]): """ __returning__ = BotDescription + __api_method__ = "getMyDescription" language_code: Optional[str] = None """A two-letter ISO 639-1 language code or an empty string""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getMyDescription", data=data) diff --git a/aiogram/methods/get_my_short_description.py b/aiogram/methods/get_my_short_description.py index a38d4ecc..81731142 100644 --- a/aiogram/methods/get_my_short_description.py +++ b/aiogram/methods/get_my_short_description.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import BotShortDescription -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetMyShortDescription(TelegramMethod[BotShortDescription]): @@ -17,11 +14,7 @@ class GetMyShortDescription(TelegramMethod[BotShortDescription]): """ __returning__ = BotShortDescription + __api_method__ = "getMyShortDescription" language_code: Optional[str] = None """A two-letter ISO 639-1 language code or an empty string""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getMyShortDescription", data=data) diff --git a/aiogram/methods/get_sticker_set.py b/aiogram/methods/get_sticker_set.py index 35af44bf..87041172 100644 --- a/aiogram/methods/get_sticker_set.py +++ b/aiogram/methods/get_sticker_set.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING from ..types import StickerSet -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetStickerSet(TelegramMethod[StickerSet]): @@ -17,11 +14,7 @@ class GetStickerSet(TelegramMethod[StickerSet]): """ __returning__ = StickerSet + __api_method__ = "getStickerSet" name: str """Name of the sticker set""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getStickerSet", data=data) diff --git a/aiogram/methods/get_updates.py b/aiogram/methods/get_updates.py index 219a474a..8c60f051 100644 --- a/aiogram/methods/get_updates.py +++ b/aiogram/methods/get_updates.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import Update -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetUpdates(TelegramMethod[List[Update]]): @@ -23,6 +20,7 @@ class GetUpdates(TelegramMethod[List[Update]]): """ __returning__ = List[Update] + __api_method__ = "getUpdates" offset: Optional[int] = None """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.""" @@ -32,8 +30,3 @@ class GetUpdates(TelegramMethod[List[Update]]): """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.""" allowed_updates: Optional[List[str]] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getUpdates", data=data) diff --git a/aiogram/methods/get_user_profile_photos.py b/aiogram/methods/get_user_profile_photos.py index 2bcc881a..47abc196 100644 --- a/aiogram/methods/get_user_profile_photos.py +++ b/aiogram/methods/get_user_profile_photos.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import UserProfilePhotos -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): @@ -17,6 +14,7 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): """ __returning__ = UserProfilePhotos + __api_method__ = "getUserProfilePhotos" user_id: int """Unique identifier of the target user""" @@ -24,8 +22,3 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): """Sequential number of the first photo to be returned. By default, all photos are returned.""" limit: Optional[int] = None """Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getUserProfilePhotos", data=data) diff --git a/aiogram/methods/get_webhook_info.py b/aiogram/methods/get_webhook_info.py index 6544cf83..5e4e194c 100644 --- a/aiogram/methods/get_webhook_info.py +++ b/aiogram/methods/get_webhook_info.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING from ..types import WebhookInfo -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class GetWebhookInfo(TelegramMethod[WebhookInfo]): @@ -17,8 +14,4 @@ class GetWebhookInfo(TelegramMethod[WebhookInfo]): """ __returning__ = WebhookInfo - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="getWebhookInfo", data=data) + __api_method__ = "getWebhookInfo" diff --git a/aiogram/methods/hide_general_forum_topic.py b/aiogram/methods/hide_general_forum_topic.py index 6e20a6bd..2587cf9e 100644 --- a/aiogram/methods/hide_general_forum_topic.py +++ b/aiogram/methods/hide_general_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class HideGeneralForumTopic(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class HideGeneralForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "hideGeneralForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="hideGeneralForumTopic", data=data) diff --git a/aiogram/methods/leave_chat.py b/aiogram/methods/leave_chat.py index 748c25c6..5b2e15cf 100644 --- a/aiogram/methods/leave_chat.py +++ b/aiogram/methods/leave_chat.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class LeaveChat(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class LeaveChat(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "leaveChat" 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="leaveChat", data=data) diff --git a/aiogram/methods/log_out.py b/aiogram/methods/log_out.py index 02c76ed2..3f3ea3de 100644 --- a/aiogram/methods/log_out.py +++ b/aiogram/methods/log_out.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class LogOut(TelegramMethod[bool]): @@ -16,8 +13,4 @@ class LogOut(TelegramMethod[bool]): """ __returning__ = bool - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="logOut", data=data) + __api_method__ = "logOut" diff --git a/aiogram/methods/pin_chat_message.py b/aiogram/methods/pin_chat_message.py index 57ec7fb9..d1641eea 100644 --- a/aiogram/methods/pin_chat_message.py +++ b/aiogram/methods/pin_chat_message.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class PinChatMessage(TelegramMethod[bool]): @@ -16,6 +13,7 @@ class PinChatMessage(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "pinChatMessage" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -23,8 +21,3 @@ class PinChatMessage(TelegramMethod[bool]): """Identifier of a message to pin""" disable_notification: Optional[bool] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="pinChatMessage", data=data) diff --git a/aiogram/methods/promote_chat_member.py b/aiogram/methods/promote_chat_member.py index 5069d951..d8f6096f 100644 --- a/aiogram/methods/promote_chat_member.py +++ b/aiogram/methods/promote_chat_member.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class PromoteChatMember(TelegramMethod[bool]): @@ -16,6 +13,7 @@ class PromoteChatMember(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "promoteChatMember" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -45,8 +43,3 @@ class PromoteChatMember(TelegramMethod[bool]): """Pass :code:`True` if the administrator can pin messages, supergroups only""" can_manage_topics: Optional[bool] = None """Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="promoteChatMember", data=data) diff --git a/aiogram/methods/reopen_forum_topic.py b/aiogram/methods/reopen_forum_topic.py index 1efa2366..efe1c31d 100644 --- a/aiogram/methods/reopen_forum_topic.py +++ b/aiogram/methods/reopen_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class ReopenForumTopic(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class ReopenForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "reopenForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="reopenForumTopic", data=data) diff --git a/aiogram/methods/reopen_general_forum_topic.py b/aiogram/methods/reopen_general_forum_topic.py index 1d27ca2d..381278a9 100644 --- a/aiogram/methods/reopen_general_forum_topic.py +++ b/aiogram/methods/reopen_general_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class ReopenGeneralForumTopic(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class ReopenGeneralForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "reopenGeneralForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="reopenGeneralForumTopic", data=data) diff --git a/aiogram/methods/restrict_chat_member.py b/aiogram/methods/restrict_chat_member.py index 2a8b9fbe..efea2f97 100644 --- a/aiogram/methods/restrict_chat_member.py +++ b/aiogram/methods/restrict_chat_member.py @@ -1,13 +1,10 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ChatPermissions -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class RestrictChatMember(TelegramMethod[bool]): @@ -18,6 +15,7 @@ class RestrictChatMember(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "restrictChatMember" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" @@ -29,8 +27,3 @@ class RestrictChatMember(TelegramMethod[bool]): """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None """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""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="restrictChatMember", data=data) diff --git a/aiogram/methods/revoke_chat_invite_link.py b/aiogram/methods/revoke_chat_invite_link.py index c644d8a4..ad31e77d 100644 --- a/aiogram/methods/revoke_chat_invite_link.py +++ b/aiogram/methods/revoke_chat_invite_link.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union from ..types import ChatInviteLink -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): @@ -17,13 +14,9 @@ class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): """ __returning__ = ChatInviteLink + __api_method__ = "revokeChatInviteLink" chat_id: Union[int, str] """Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)""" invite_link: str """The invite link to revoke""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="revokeChatInviteLink", data=data) diff --git a/aiogram/methods/send_animation.py b/aiogram/methods/send_animation.py index 7528d8be..14029d25 100644 --- a/aiogram/methods/send_animation.py +++ b/aiogram/methods/send_animation.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -12,10 +12,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendAnimation(TelegramMethod[Message]): @@ -26,6 +24,7 @@ class SendAnimation(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendAnimation" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -43,7 +42,7 @@ class SendAnimation(TelegramMethod[Message]): """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 » `""" caption: Optional[str] = None """Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" @@ -51,7 +50,7 @@ class SendAnimation(TelegramMethod[Message]): """Pass :code:`True` if the animation needs to be covered with a spoiler animation""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -61,16 +60,3 @@ class SendAnimation(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"animation", "thumb"}) - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="animation", value=self.animation) - prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) - - return Request(method="sendAnimation", data=data, files=files) diff --git a/aiogram/methods/send_audio.py b/aiogram/methods/send_audio.py index 6557a5c1..e0f4b900 100644 --- a/aiogram/methods/send_audio.py +++ b/aiogram/methods/send_audio.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -12,10 +12,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendAudio(TelegramMethod[Message]): @@ -27,6 +25,7 @@ class SendAudio(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendAudio" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -36,7 +35,7 @@ class SendAudio(TelegramMethod[Message]): """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" caption: Optional[str] = None """Audio caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" @@ -50,7 +49,7 @@ class SendAudio(TelegramMethod[Message]): """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 » `""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -60,16 +59,3 @@ class SendAudio(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"audio", "thumb"}) - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="audio", value=self.audio) - prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) - - return Request(method="sendAudio", data=data, files=files) diff --git a/aiogram/methods/send_chat_action.py b/aiogram/methods/send_chat_action.py index 538300b2..d21dc68c 100644 --- a/aiogram/methods/send_chat_action.py +++ b/aiogram/methods/send_chat_action.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SendChatAction(TelegramMethod[bool]): @@ -20,6 +17,7 @@ class SendChatAction(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "sendChatAction" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -27,8 +25,3 @@ class SendChatAction(TelegramMethod[bool]): """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 `_.""" message_thread_id: Optional[int] = None """Unique identifier for the target message thread; supergroups only""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="sendChatAction", data=data) diff --git a/aiogram/methods/send_contact.py b/aiogram/methods/send_contact.py index 41e1110b..35473338 100644 --- a/aiogram/methods/send_contact.py +++ b/aiogram/methods/send_contact.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ( ForceReply, @@ -9,10 +9,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendContact(TelegramMethod[Message]): @@ -23,6 +21,7 @@ class SendContact(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendContact" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -38,7 +37,7 @@ class SendContact(TelegramMethod[Message]): """Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -48,8 +47,3 @@ class SendContact(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="sendContact", data=data) diff --git a/aiogram/methods/send_dice.py b/aiogram/methods/send_dice.py index d898a742..9fa2ce70 100644 --- a/aiogram/methods/send_dice.py +++ b/aiogram/methods/send_dice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ( ForceReply, @@ -9,10 +9,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendDice(TelegramMethod[Message]): @@ -23,6 +21,7 @@ class SendDice(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendDice" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -32,7 +31,7 @@ class SendDice(TelegramMethod[Message]): """Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -42,8 +41,3 @@ class SendDice(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="sendDice", data=data) diff --git a/aiogram/methods/send_document.py b/aiogram/methods/send_document.py index 9b81b88f..5c83beb3 100644 --- a/aiogram/methods/send_document.py +++ b/aiogram/methods/send_document.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -12,10 +12,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendDocument(TelegramMethod[Message]): @@ -26,6 +24,7 @@ class SendDocument(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendDocument" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -37,7 +36,7 @@ class SendDocument(TelegramMethod[Message]): """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 » `""" caption: Optional[str] = None """Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" @@ -45,7 +44,7 @@ class SendDocument(TelegramMethod[Message]): """Disables automatic server-side content type detection for files uploaded using multipart/form-data""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -55,16 +54,3 @@ class SendDocument(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"document", "thumb"}) - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="document", value=self.document) - prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) - - return Request(method="sendDocument", data=data, files=files) diff --git a/aiogram/methods/send_game.py b/aiogram/methods/send_game.py index f6301562..ab55a459 100644 --- a/aiogram/methods/send_game.py +++ b/aiogram/methods/send_game.py @@ -1,12 +1,10 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendGame(TelegramMethod[Message]): @@ -17,6 +15,7 @@ class SendGame(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendGame" chat_id: int """Unique identifier for the target chat""" @@ -26,7 +25,7 @@ class SendGame(TelegramMethod[Message]): """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -34,8 +33,3 @@ class SendGame(TelegramMethod[Message]): """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" reply_markup: Optional[InlineKeyboardMarkup] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="sendGame", data=data) diff --git a/aiogram/methods/send_invoice.py b/aiogram/methods/send_invoice.py index 9f085fbd..d08002a9 100644 --- a/aiogram/methods/send_invoice.py +++ b/aiogram/methods/send_invoice.py @@ -1,12 +1,10 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import InlineKeyboardMarkup, LabeledPrice, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendInvoice(TelegramMethod[Message]): @@ -17,6 +15,7 @@ class SendInvoice(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendInvoice" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -66,7 +65,7 @@ class SendInvoice(TelegramMethod[Message]): """Pass :code:`True` if the final price depends on the shipping method""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -74,8 +73,3 @@ class SendInvoice(TelegramMethod[Message]): """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" reply_markup: Optional[InlineKeyboardMarkup] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="sendInvoice", data=data) diff --git a/aiogram/methods/send_location.py b/aiogram/methods/send_location.py index 350157b8..845b4741 100644 --- a/aiogram/methods/send_location.py +++ b/aiogram/methods/send_location.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ( ForceReply, @@ -9,10 +9,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendLocation(TelegramMethod[Message]): @@ -23,6 +21,7 @@ class SendLocation(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendLocation" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -42,7 +41,7 @@ class SendLocation(TelegramMethod[Message]): """For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -52,8 +51,3 @@ class SendLocation(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="sendLocation", data=data) diff --git a/aiogram/methods/send_media_group.py b/aiogram/methods/send_media_group.py index 7d97a665..fd8dbb25 100644 --- a/aiogram/methods/send_media_group.py +++ b/aiogram/methods/send_media_group.py @@ -1,19 +1,16 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - InputFile, InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo, Message, ) -from .base import Request, TelegramMethod, prepare_input_media, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendMediaGroup(TelegramMethod[List[Message]]): @@ -24,6 +21,7 @@ class SendMediaGroup(TelegramMethod[List[Message]]): """ __returning__ = List[Message] + __api_method__ = "sendMediaGroup" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -33,18 +31,9 @@ class SendMediaGroup(TelegramMethod[List[Message]]): """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" disable_notification: Optional[bool] = None """Sends messages `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent messages from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the messages are a reply, ID of the original message""" allow_sending_without_reply: Optional[bool] = None """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - prepare_parse_mode(bot, data["media"]) - - files: Dict[str, InputFile] = {} - prepare_input_media(data, files) - - return Request(method="sendMediaGroup", data=data, files=files) diff --git a/aiogram/methods/send_message.py b/aiogram/methods/send_message.py index a3c83bad..9b7dae7b 100644 --- a/aiogram/methods/send_message.py +++ b/aiogram/methods/send_message.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, Message, @@ -11,10 +11,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendMessage(TelegramMethod[Message]): @@ -25,6 +23,7 @@ class SendMessage(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendMessage" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -32,15 +31,15 @@ class SendMessage(TelegramMethod[Message]): """Text of the message to be sent, 1-4096 characters after entities parsing""" message_thread_id: Optional[int] = None """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the message text. See `formatting options `_ for more details.""" entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*""" - disable_web_page_preview: Optional[bool] = None + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW """Disables link previews for links in this message""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -50,12 +49,3 @@ class SendMessage(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="entities" - ) - - return Request(method="sendMessage", data=data) diff --git a/aiogram/methods/send_photo.py b/aiogram/methods/send_photo.py index 43a4c65a..236d8710 100644 --- a/aiogram/methods/send_photo.py +++ b/aiogram/methods/send_photo.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -12,10 +12,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendPhoto(TelegramMethod[Message]): @@ -26,6 +24,7 @@ class SendPhoto(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendPhoto" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -35,7 +34,7 @@ class SendPhoto(TelegramMethod[Message]): """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" caption: Optional[str] = None """Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" @@ -43,7 +42,7 @@ class SendPhoto(TelegramMethod[Message]): """Pass :code:`True` if the photo needs to be covered with a spoiler animation""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -53,15 +52,3 @@ class SendPhoto(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"photo"}) - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="photo", value=self.photo) - - return Request(method="sendPhoto", data=data, files=files) diff --git a/aiogram/methods/send_poll.py b/aiogram/methods/send_poll.py index be67fcda..fca3dc58 100644 --- a/aiogram/methods/send_poll.py +++ b/aiogram/methods/send_poll.py @@ -1,10 +1,10 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, Message, @@ -12,10 +12,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendPoll(TelegramMethod[Message]): @@ -26,6 +24,7 @@ class SendPoll(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendPoll" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -45,7 +44,7 @@ class SendPoll(TelegramMethod[Message]): """0-based identifier of the correct answer option, required for polls in quiz mode""" explanation: Optional[str] = None """Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing""" - explanation_parse_mode: Optional[str] = UNSET + explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the explanation. See `formatting options `_ for more details.""" explanation_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of *parse_mode*""" @@ -57,7 +56,7 @@ class SendPoll(TelegramMethod[Message]): """Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -67,15 +66,3 @@ class SendPoll(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - prepare_parse_mode( - bot, - data, - parse_mode_property="explanation_parse_mode", - entities_property="explanation_entities", - ) - - return Request(method="sendPoll", data=data) diff --git a/aiogram/methods/send_sticker.py b/aiogram/methods/send_sticker.py index e707cd2f..8429b105 100644 --- a/aiogram/methods/send_sticker.py +++ b/aiogram/methods/send_sticker.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ( ForceReply, @@ -10,10 +10,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendSticker(TelegramMethod[Message]): @@ -24,6 +22,7 @@ class SendSticker(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendSticker" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -35,7 +34,7 @@ class SendSticker(TelegramMethod[Message]): """Emoji associated with the sticker; only for just uploaded stickers""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -45,11 +44,3 @@ class SendSticker(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"sticker"}) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="sticker", value=self.sticker) - - return Request(method="sendSticker", data=data, files=files) diff --git a/aiogram/methods/send_venue.py b/aiogram/methods/send_venue.py index b9f3c464..d0859770 100644 --- a/aiogram/methods/send_venue.py +++ b/aiogram/methods/send_venue.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ( ForceReply, @@ -9,10 +9,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendVenue(TelegramMethod[Message]): @@ -23,6 +21,7 @@ class SendVenue(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendVenue" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -46,7 +45,7 @@ class SendVenue(TelegramMethod[Message]): """Google Places type of the venue. (See `supported types `_.)""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -56,8 +55,3 @@ class SendVenue(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="sendVenue", data=data) diff --git a/aiogram/methods/send_video.py b/aiogram/methods/send_video.py index 8075b1fb..a894e335 100644 --- a/aiogram/methods/send_video.py +++ b/aiogram/methods/send_video.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -12,10 +12,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendVideo(TelegramMethod[Message]): @@ -26,6 +24,7 @@ class SendVideo(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendVideo" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -43,7 +42,7 @@ class SendVideo(TelegramMethod[Message]): """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 » `""" caption: Optional[str] = None """Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" @@ -53,7 +52,7 @@ class SendVideo(TelegramMethod[Message]): """Pass :code:`True` if the uploaded video is suitable for streaming""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -63,16 +62,3 @@ class SendVideo(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"video", "thumb"}) - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="video", value=self.video) - prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) - - return Request(method="sendVideo", data=data, files=files) diff --git a/aiogram/methods/send_video_note.py b/aiogram/methods/send_video_note.py index 3db3a142..761c91a2 100644 --- a/aiogram/methods/send_video_note.py +++ b/aiogram/methods/send_video_note.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ( ForceReply, @@ -10,10 +10,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendVideoNote(TelegramMethod[Message]): @@ -24,6 +22,7 @@ class SendVideoNote(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendVideoNote" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -39,7 +38,7 @@ class SendVideoNote(TelegramMethod[Message]): """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 » `""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -49,12 +48,3 @@ class SendVideoNote(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"video_note", "thumb"}) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="video_note", value=self.video_note) - prepare_file(data=data, files=files, name="thumbnail", value=self.thumbnail) - - return Request(method="sendVideoNote", data=data, files=files) diff --git a/aiogram/methods/send_voice.py b/aiogram/methods/send_voice.py index e9bc9a37..ae692ad6 100644 --- a/aiogram/methods/send_voice.py +++ b/aiogram/methods/send_voice.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, List, Optional, Union from ..types import ( - UNSET, + UNSET_PARSE_MODE, ForceReply, InlineKeyboardMarkup, InputFile, @@ -12,10 +12,8 @@ from ..types import ( ReplyKeyboardMarkup, ReplyKeyboardRemove, ) -from .base import Request, TelegramMethod, prepare_file, prepare_parse_mode - -if TYPE_CHECKING: - from ..client.bot import Bot +from ..types.base import UNSET_PROTECT_CONTENT +from .base import TelegramMethod class SendVoice(TelegramMethod[Message]): @@ -26,6 +24,7 @@ class SendVoice(TelegramMethod[Message]): """ __returning__ = Message + __api_method__ = "sendVoice" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -35,7 +34,7 @@ class SendVoice(TelegramMethod[Message]): """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" caption: Optional[str] = None """Voice message caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" @@ -43,7 +42,7 @@ class SendVoice(TelegramMethod[Message]): """Duration of the voice message in seconds""" disable_notification: Optional[bool] = None """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT """Protects the contents of the sent message from forwarding and saving""" reply_to_message_id: Optional[int] = None """If the message is a reply, ID of the original message""" @@ -53,15 +52,3 @@ class SendVoice(TelegramMethod[Message]): Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] ] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"voice"}) - - prepare_parse_mode( - bot, data, parse_mode_property="parse_mode", entities_property="caption_entities" - ) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="voice", value=self.voice) - - return Request(method="sendVoice", data=data, files=files) diff --git a/aiogram/methods/set_chat_administrator_custom_title.py b/aiogram/methods/set_chat_administrator_custom_title.py index 7522a237..edf79d8c 100644 --- a/aiogram/methods/set_chat_administrator_custom_title.py +++ b/aiogram/methods/set_chat_administrator_custom_title.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetChatAdministratorCustomTitle(TelegramMethod[bool]): @@ -16,6 +13,7 @@ class SetChatAdministratorCustomTitle(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setChatAdministratorCustomTitle" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" @@ -23,8 +21,3 @@ class SetChatAdministratorCustomTitle(TelegramMethod[bool]): """Unique identifier of the target user""" custom_title: str """New custom title for the administrator; 0-16 characters, emoji are not allowed""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setChatAdministratorCustomTitle", data=data) diff --git a/aiogram/methods/set_chat_description.py b/aiogram/methods/set_chat_description.py index a4014f79..05b51a69 100644 --- a/aiogram/methods/set_chat_description.py +++ b/aiogram/methods/set_chat_description.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetChatDescription(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetChatDescription(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setChatDescription" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" description: Optional[str] = None """New chat description, 0-255 characters""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setChatDescription", data=data) diff --git a/aiogram/methods/set_chat_menu_button.py b/aiogram/methods/set_chat_menu_button.py index 9a7caaf1..6eeb3a10 100644 --- a/aiogram/methods/set_chat_menu_button.py +++ b/aiogram/methods/set_chat_menu_button.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetChatMenuButton(TelegramMethod[bool]): @@ -17,13 +14,9 @@ class SetChatMenuButton(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setChatMenuButton" chat_id: Optional[int] = None """Unique identifier for the target private chat. If not specified, default bot's menu button will be changed""" menu_button: Optional[Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]] = None """A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setChatMenuButton", data=data) diff --git a/aiogram/methods/set_chat_permissions.py b/aiogram/methods/set_chat_permissions.py index c68b441d..af13ddb7 100644 --- a/aiogram/methods/set_chat_permissions.py +++ b/aiogram/methods/set_chat_permissions.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import ChatPermissions -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetChatPermissions(TelegramMethod[bool]): @@ -17,6 +14,7 @@ class SetChatPermissions(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setChatPermissions" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" @@ -24,8 +22,3 @@ class SetChatPermissions(TelegramMethod[bool]): """A JSON-serialized object for new default chat permissions""" use_independent_chat_permissions: Optional[bool] = None """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setChatPermissions", data=data) diff --git a/aiogram/methods/set_chat_photo.py b/aiogram/methods/set_chat_photo.py index dc9aef57..ba7b8de3 100644 --- a/aiogram/methods/set_chat_photo.py +++ b/aiogram/methods/set_chat_photo.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union from ..types import InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetChatPhoto(TelegramMethod[bool]): @@ -17,16 +14,9 @@ class SetChatPhoto(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setChatPhoto" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" photo: InputFile """New chat photo, uploaded using multipart/form-data""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"photo"}) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="photo", value=self.photo) - - return Request(method="setChatPhoto", data=data, files=files) diff --git a/aiogram/methods/set_chat_sticker_set.py b/aiogram/methods/set_chat_sticker_set.py index 089083f6..a7f3d216 100644 --- a/aiogram/methods/set_chat_sticker_set.py +++ b/aiogram/methods/set_chat_sticker_set.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetChatStickerSet(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetChatStickerSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setChatStickerSet" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" sticker_set_name: str """Name of the sticker set to be set as the group sticker set""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setChatStickerSet", data=data) diff --git a/aiogram/methods/set_chat_title.py b/aiogram/methods/set_chat_title.py index edad33cc..07507d0f 100644 --- a/aiogram/methods/set_chat_title.py +++ b/aiogram/methods/set_chat_title.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetChatTitle(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetChatTitle(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setChatTitle" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" title: str """New chat title, 1-128 characters""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setChatTitle", data=data) diff --git a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py index 35b047a2..10a4a267 100644 --- a/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py +++ b/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setCustomEmojiStickerSetThumbnail" name: str """Sticker set name""" custom_emoji_id: Optional[str] = None """Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setCustomEmojiStickerSetThumbnail", data=data) diff --git a/aiogram/methods/set_game_score.py b/aiogram/methods/set_game_score.py index c3f8ce92..170988ec 100644 --- a/aiogram/methods/set_game_score.py +++ b/aiogram/methods/set_game_score.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetGameScore(TelegramMethod[Union[Message, bool]]): @@ -17,6 +14,7 @@ class SetGameScore(TelegramMethod[Union[Message, bool]]): """ __returning__ = Union[Message, bool] + __api_method__ = "setGameScore" user_id: int """User identifier""" @@ -32,8 +30,3 @@ class SetGameScore(TelegramMethod[Union[Message, bool]]): """Required if *inline_message_id* is not specified. Identifier of the sent message""" inline_message_id: Optional[str] = None """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setGameScore", data=data) diff --git a/aiogram/methods/set_my_commands.py b/aiogram/methods/set_my_commands.py index 98e47aff..a62e7a84 100644 --- a/aiogram/methods/set_my_commands.py +++ b/aiogram/methods/set_my_commands.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import BotCommand, BotCommandScope -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetMyCommands(TelegramMethod[bool]): @@ -17,6 +14,7 @@ class SetMyCommands(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setMyCommands" commands: List[BotCommand] """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.""" @@ -24,8 +22,3 @@ class SetMyCommands(TelegramMethod[bool]): """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" language_code: Optional[str] = None """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""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setMyCommands", data=data) diff --git a/aiogram/methods/set_my_default_administrator_rights.py b/aiogram/methods/set_my_default_administrator_rights.py index f8177958..0b1468bc 100644 --- a/aiogram/methods/set_my_default_administrator_rights.py +++ b/aiogram/methods/set_my_default_administrator_rights.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import ChatAdministratorRights -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetMyDefaultAdministratorRights(TelegramMethod[bool]): @@ -17,13 +14,9 @@ class SetMyDefaultAdministratorRights(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setMyDefaultAdministratorRights" rights: Optional[ChatAdministratorRights] = None """A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.""" for_channels: Optional[bool] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setMyDefaultAdministratorRights", data=data) diff --git a/aiogram/methods/set_my_description.py b/aiogram/methods/set_my_description.py index a05440ef..2af2ed44 100644 --- a/aiogram/methods/set_my_description.py +++ b/aiogram/methods/set_my_description.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetMyDescription(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetMyDescription(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setMyDescription" description: Optional[str] = None """New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setMyDescription", data=data) diff --git a/aiogram/methods/set_my_short_description.py b/aiogram/methods/set_my_short_description.py index c759d1ed..19e5b254 100644 --- a/aiogram/methods/set_my_short_description.py +++ b/aiogram/methods/set_my_short_description.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetMyShortDescription(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetMyShortDescription(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setMyShortDescription" short_description: Optional[str] = None """New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.""" language_code: Optional[str] = None """A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setMyShortDescription", data=data) diff --git a/aiogram/methods/set_passport_data_errors.py b/aiogram/methods/set_passport_data_errors.py index 1f781b08..ae127d2b 100644 --- a/aiogram/methods/set_passport_data_errors.py +++ b/aiogram/methods/set_passport_data_errors.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List +from typing import TYPE_CHECKING, List from ..types import PassportElementError -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetPassportDataErrors(TelegramMethod[bool]): @@ -18,13 +15,9 @@ class SetPassportDataErrors(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setPassportDataErrors" user_id: int """User identifier""" errors: List[PassportElementError] """A JSON-serialized array describing the errors""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setPassportDataErrors", data=data) diff --git a/aiogram/methods/set_sticker_emoji_list.py b/aiogram/methods/set_sticker_emoji_list.py index d6ef31f2..f23033c7 100644 --- a/aiogram/methods/set_sticker_emoji_list.py +++ b/aiogram/methods/set_sticker_emoji_list.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List +from typing import TYPE_CHECKING, List -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetStickerEmojiList(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetStickerEmojiList(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setStickerEmojiList" sticker: str """File identifier of the sticker""" emoji_list: List[str] """A JSON-serialized list of 1-20 emoji associated with the sticker""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setStickerEmojiList", data=data) diff --git a/aiogram/methods/set_sticker_keywords.py b/aiogram/methods/set_sticker_keywords.py index 2fd5b1c4..0ebef118 100644 --- a/aiogram/methods/set_sticker_keywords.py +++ b/aiogram/methods/set_sticker_keywords.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetStickerKeywords(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetStickerKeywords(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setStickerKeywords" sticker: str """File identifier of the sticker""" keywords: Optional[List[str]] = None """A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setStickerKeywords", data=data) diff --git a/aiogram/methods/set_sticker_mask_position.py b/aiogram/methods/set_sticker_mask_position.py index 95aa8ca3..f3147f2d 100644 --- a/aiogram/methods/set_sticker_mask_position.py +++ b/aiogram/methods/set_sticker_mask_position.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional +from typing import TYPE_CHECKING, Optional from ..types import MaskPosition -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetStickerMaskPosition(TelegramMethod[bool]): @@ -17,13 +14,9 @@ class SetStickerMaskPosition(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setStickerMaskPosition" sticker: str """File identifier of the sticker""" mask_position: Optional[MaskPosition] = None """A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setStickerMaskPosition", data=data) diff --git a/aiogram/methods/set_sticker_position_in_set.py b/aiogram/methods/set_sticker_position_in_set.py index c607c0d5..ed5792ae 100644 --- a/aiogram/methods/set_sticker_position_in_set.py +++ b/aiogram/methods/set_sticker_position_in_set.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetStickerPositionInSet(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetStickerPositionInSet(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setStickerPositionInSet" sticker: str """File identifier of the sticker""" position: int """New sticker position in the set, zero-based""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setStickerPositionInSet", data=data) diff --git a/aiogram/methods/set_sticker_set_thumbnail.py b/aiogram/methods/set_sticker_set_thumbnail.py index 829aa192..7da1c397 100644 --- a/aiogram/methods/set_sticker_set_thumbnail.py +++ b/aiogram/methods/set_sticker_set_thumbnail.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetStickerSetThumbnail(TelegramMethod[bool]): @@ -17,6 +14,7 @@ class SetStickerSetThumbnail(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setStickerSetThumbnail" name: str """Sticker set name""" @@ -24,11 +22,3 @@ class SetStickerSetThumbnail(TelegramMethod[bool]): """User identifier of the sticker set owner""" thumbnail: Optional[Union[InputFile, str]] = None """A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a 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 and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - files: Dict[str, InputFile] = {} - prepare_file("thumbnail", value=self.thumbnail, data=data, files=files) - - return Request(method="setStickerSetThumbnail", data=data) diff --git a/aiogram/methods/set_sticker_set_title.py b/aiogram/methods/set_sticker_set_title.py index e699c082..978432ff 100644 --- a/aiogram/methods/set_sticker_set_title.py +++ b/aiogram/methods/set_sticker_set_title.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetStickerSetTitle(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class SetStickerSetTitle(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setStickerSetTitle" name: str """Sticker set name""" title: str """Sticker set title, 1-64 characters""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="setStickerSetTitle", data=data) diff --git a/aiogram/methods/set_webhook.py b/aiogram/methods/set_webhook.py index 34c14aaf..6e63a75a 100644 --- a/aiogram/methods/set_webhook.py +++ b/aiogram/methods/set_webhook.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, List, Optional +from typing import TYPE_CHECKING, List, Optional from ..types import InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class SetWebhook(TelegramMethod[bool]): @@ -27,6 +24,7 @@ class SetWebhook(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "setWebhook" url: str """HTTPS URL to send updates to. Use an empty string to remove webhook integration""" @@ -42,11 +40,3 @@ class SetWebhook(TelegramMethod[bool]): """Pass :code:`True` to drop all pending updates""" secret_token: Optional[str] = None """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.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"certificate"}) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="certificate", value=self.certificate) - - return Request(method="setWebhook", data=data, files=files) diff --git a/aiogram/methods/stop_message_live_location.py b/aiogram/methods/stop_message_live_location.py index 50297930..8a16f586 100644 --- a/aiogram/methods/stop_message_live_location.py +++ b/aiogram/methods/stop_message_live_location.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import InlineKeyboardMarkup, Message -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]): @@ -17,6 +14,7 @@ class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]): """ __returning__ = Union[Message, bool] + __api_method__ = "stopMessageLiveLocation" chat_id: Optional[Union[int, str]] = None """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`)""" @@ -26,8 +24,3 @@ class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]): """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new `inline keyboard `_.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="stopMessageLiveLocation", data=data) diff --git a/aiogram/methods/stop_poll.py b/aiogram/methods/stop_poll.py index 92662285..19ef26ac 100644 --- a/aiogram/methods/stop_poll.py +++ b/aiogram/methods/stop_poll.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union from ..types import InlineKeyboardMarkup, Poll -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class StopPoll(TelegramMethod[Poll]): @@ -17,6 +14,7 @@ class StopPoll(TelegramMethod[Poll]): """ __returning__ = Poll + __api_method__ = "stopPoll" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" @@ -24,8 +22,3 @@ class StopPoll(TelegramMethod[Poll]): """Identifier of the original message with the poll""" reply_markup: Optional[InlineKeyboardMarkup] = None """A JSON-serialized object for a new message `inline keyboard `_.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="stopPoll", data=data) diff --git a/aiogram/methods/unban_chat_member.py b/aiogram/methods/unban_chat_member.py index 3fce083b..768eea22 100644 --- a/aiogram/methods/unban_chat_member.py +++ b/aiogram/methods/unban_chat_member.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UnbanChatMember(TelegramMethod[bool]): @@ -16,6 +13,7 @@ class UnbanChatMember(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "unbanChatMember" chat_id: Union[int, str] """Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)""" @@ -23,8 +21,3 @@ class UnbanChatMember(TelegramMethod[bool]): """Unique identifier of the target user""" only_if_banned: Optional[bool] = None """Do nothing if the user is not banned""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="unbanChatMember", data=data) diff --git a/aiogram/methods/unban_chat_sender_chat.py b/aiogram/methods/unban_chat_sender_chat.py index 9da79e1f..fbd3f1d3 100644 --- a/aiogram/methods/unban_chat_sender_chat.py +++ b/aiogram/methods/unban_chat_sender_chat.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UnbanChatSenderChat(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class UnbanChatSenderChat(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "unbanChatSenderChat" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" sender_chat_id: int """Unique identifier of the target sender chat""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="unbanChatSenderChat", data=data) diff --git a/aiogram/methods/unhide_general_forum_topic.py b/aiogram/methods/unhide_general_forum_topic.py index 2ee341aa..82524758 100644 --- a/aiogram/methods/unhide_general_forum_topic.py +++ b/aiogram/methods/unhide_general_forum_topic.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UnhideGeneralForumTopic(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class UnhideGeneralForumTopic(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "unhideGeneralForumTopic" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="unhideGeneralForumTopic", data=data) diff --git a/aiogram/methods/unpin_all_chat_messages.py b/aiogram/methods/unpin_all_chat_messages.py index 99a3a1f2..f8566e33 100644 --- a/aiogram/methods/unpin_all_chat_messages.py +++ b/aiogram/methods/unpin_all_chat_messages.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UnpinAllChatMessages(TelegramMethod[bool]): @@ -16,11 +13,7 @@ class UnpinAllChatMessages(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "unpinAllChatMessages" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="unpinAllChatMessages", data=data) diff --git a/aiogram/methods/unpin_all_forum_topic_messages.py b/aiogram/methods/unpin_all_forum_topic_messages.py index 6a94c218..6b735e98 100644 --- a/aiogram/methods/unpin_all_forum_topic_messages.py +++ b/aiogram/methods/unpin_all_forum_topic_messages.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Union +from typing import TYPE_CHECKING, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UnpinAllForumTopicMessages(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class UnpinAllForumTopicMessages(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "unpinAllForumTopicMessages" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" message_thread_id: int """Unique identifier for the target message thread of the forum topic""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="unpinAllForumTopicMessages", data=data) diff --git a/aiogram/methods/unpin_chat_message.py b/aiogram/methods/unpin_chat_message.py index 098dba48..0d5d2b0a 100644 --- a/aiogram/methods/unpin_chat_message.py +++ b/aiogram/methods/unpin_chat_message.py @@ -1,11 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Optional, Union -from .base import Request, TelegramMethod - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UnpinChatMessage(TelegramMethod[bool]): @@ -16,13 +13,9 @@ class UnpinChatMessage(TelegramMethod[bool]): """ __returning__ = bool + __api_method__ = "unpinChatMessage" chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: Optional[int] = None """Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict() - - return Request(method="unpinChatMessage", data=data) diff --git a/aiogram/methods/upload_sticker_file.py b/aiogram/methods/upload_sticker_file.py index d0fcbc44..2194e35f 100644 --- a/aiogram/methods/upload_sticker_file.py +++ b/aiogram/methods/upload_sticker_file.py @@ -1,12 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict +from typing import TYPE_CHECKING from ..types import File, InputFile -from .base import Request, TelegramMethod, prepare_file - -if TYPE_CHECKING: - from ..client.bot import Bot +from .base import TelegramMethod class UploadStickerFile(TelegramMethod[File]): @@ -17,6 +14,7 @@ class UploadStickerFile(TelegramMethod[File]): """ __returning__ = File + __api_method__ = "uploadStickerFile" user_id: int """User identifier of sticker file owner""" @@ -24,11 +22,3 @@ class UploadStickerFile(TelegramMethod[File]): """A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `""" sticker_format: str """Format of the sticker, must be one of 'static', 'animated', 'video'""" - - def build_request(self, bot: Bot) -> Request: - data: Dict[str, Any] = self.dict(exclude={"sticker"}) - - files: Dict[str, InputFile] = {} - prepare_file(data=data, files=files, name="sticker", value=self.sticker) - - return Request(method="uploadStickerFile", data=data, files=files) diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 3fc98953..85fd9338 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -2,7 +2,7 @@ from typing import Optional from .animation import Animation from .audio import Audio -from .base import UNSET, TelegramObject +from .base import UNSET_PARSE_MODE, TelegramObject from .bot_command import BotCommand from .bot_command_scope import BotCommandScope from .bot_command_scope_all_chat_administrators import ( @@ -295,7 +295,7 @@ __all__ = ( "StickerSet", "SuccessfulPayment", "TelegramObject", - "UNSET", + "UNSET_PARSE_MODE", "URLInputFile", "Update", "User", diff --git a/aiogram/types/base.py b/aiogram/types/base.py index 0b5d08ad..707e328c 100644 --- a/aiogram/types/base.py +++ b/aiogram/types/base.py @@ -23,6 +23,8 @@ class MutableTelegramObject(TelegramObject): allow_mutation = True -UNSET: Any = ( - sentinel.UNSET -) # special sentinel object which used in sutuation when None might be a useful value +# special sentinel object which used in situation when None might be a useful value +UNSET_PARSE_MODE: Any = sentinel.UNSET_PARSE_MODE +UNSET_DISABLE_WEB_PAGE_PREVIEW = sentinel.UNSET_DISABLE_WEB_PAGE_PREVIEW +UNSET_PROTECT_CONTENT = sentinel.UNSET_PROTECT_CONTENT +UNSET_TYPE = type(sentinel.DEFAULT) diff --git a/aiogram/types/inline_query_result_audio.py b/aiogram/types/inline_query_result_audio.py index d217d246..3b830fc8 100644 --- a/aiogram/types/inline_query_result_audio.py +++ b/aiogram/types/inline_query_result_audio.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -32,7 +32,7 @@ class InlineQueryResultAudio(InlineQueryResult): """Title""" caption: Optional[str] = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_cached_audio.py b/aiogram/types/inline_query_result_cached_audio.py index f630ee51..8358f723 100644 --- a/aiogram/types/inline_query_result_cached_audio.py +++ b/aiogram/types/inline_query_result_cached_audio.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -30,7 +30,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult): """A valid file identifier for the audio file""" caption: Optional[str] = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_cached_document.py b/aiogram/types/inline_query_result_cached_document.py index 34ca1238..5513971f 100644 --- a/aiogram/types/inline_query_result_cached_document.py +++ b/aiogram/types/inline_query_result_cached_document.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -34,7 +34,7 @@ class InlineQueryResultCachedDocument(InlineQueryResult): """*Optional*. Short description of the result""" caption: Optional[str] = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_cached_gif.py b/aiogram/types/inline_query_result_cached_gif.py index 3bb77f44..7aa5c535 100644 --- a/aiogram/types/inline_query_result_cached_gif.py +++ b/aiogram/types/inline_query_result_cached_gif.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -31,7 +31,7 @@ class InlineQueryResultCachedGif(InlineQueryResult): """*Optional*. Title for the result""" caption: Optional[str] = None """*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_cached_mpeg4_gif.py b/aiogram/types/inline_query_result_cached_mpeg4_gif.py index 5175bc8c..ab7a2a9b 100644 --- a/aiogram/types/inline_query_result_cached_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_cached_mpeg4_gif.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -31,7 +31,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): """*Optional*. Title for the result""" caption: Optional[str] = None """*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_cached_photo.py b/aiogram/types/inline_query_result_cached_photo.py index 09a9f5b0..fc892826 100644 --- a/aiogram/types/inline_query_result_cached_photo.py +++ b/aiogram/types/inline_query_result_cached_photo.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -33,7 +33,7 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): """*Optional*. Short description of the result""" caption: Optional[str] = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_cached_video.py b/aiogram/types/inline_query_result_cached_video.py index 10720c80..acda3962 100644 --- a/aiogram/types/inline_query_result_cached_video.py +++ b/aiogram/types/inline_query_result_cached_video.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -33,7 +33,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult): """*Optional*. Short description of the result""" caption: Optional[str] = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_cached_voice.py b/aiogram/types/inline_query_result_cached_voice.py index 23595edf..3f03b2fe 100644 --- a/aiogram/types/inline_query_result_cached_voice.py +++ b/aiogram/types/inline_query_result_cached_voice.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -32,7 +32,7 @@ class InlineQueryResultCachedVoice(InlineQueryResult): """Voice message title""" caption: Optional[str] = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_document.py b/aiogram/types/inline_query_result_document.py index d1c577cf..7698e4c6 100644 --- a/aiogram/types/inline_query_result_document.py +++ b/aiogram/types/inline_query_result_document.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -34,7 +34,7 @@ class InlineQueryResultDocument(InlineQueryResult): """MIME type of the content of the file, either 'application/pdf' or 'application/zip'""" caption: Optional[str] = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_gif.py b/aiogram/types/inline_query_result_gif.py index ac4e0c05..b38cfa1a 100644 --- a/aiogram/types/inline_query_result_gif.py +++ b/aiogram/types/inline_query_result_gif.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -41,7 +41,7 @@ class InlineQueryResultGif(InlineQueryResult): """*Optional*. Title for the result""" caption: Optional[str] = None """*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_mpeg4_gif.py b/aiogram/types/inline_query_result_mpeg4_gif.py index 260ae839..44a61fee 100644 --- a/aiogram/types/inline_query_result_mpeg4_gif.py +++ b/aiogram/types/inline_query_result_mpeg4_gif.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -41,7 +41,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): """*Optional*. Title for the result""" caption: Optional[str] = None """*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_photo.py b/aiogram/types/inline_query_result_photo.py index 6ef09fc3..6ed85276 100644 --- a/aiogram/types/inline_query_result_photo.py +++ b/aiogram/types/inline_query_result_photo.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -39,7 +39,7 @@ class InlineQueryResultPhoto(InlineQueryResult): """*Optional*. Short description of the result""" caption: Optional[str] = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_video.py b/aiogram/types/inline_query_result_video.py index f35c55cb..ba14d066 100644 --- a/aiogram/types/inline_query_result_video.py +++ b/aiogram/types/inline_query_result_video.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -37,7 +37,7 @@ class InlineQueryResultVideo(InlineQueryResult): """Title for the result""" caption: Optional[str] = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/inline_query_result_voice.py b/aiogram/types/inline_query_result_voice.py index ea5230b2..7de1f6cf 100644 --- a/aiogram/types/inline_query_result_voice.py +++ b/aiogram/types/inline_query_result_voice.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional from pydantic import Field from ..enums import InlineQueryResultType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .inline_query_result import InlineQueryResult if TYPE_CHECKING: @@ -32,7 +32,7 @@ class InlineQueryResultVoice(InlineQueryResult): """Recording title""" caption: Optional[str] = None """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/input_media_animation.py b/aiogram/types/input_media_animation.py index 9b94f0c1..eabc4b5e 100644 --- a/aiogram/types/input_media_animation.py +++ b/aiogram/types/input_media_animation.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union from pydantic import Field from ..enums import InputMediaType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .input_media import InputMedia if TYPE_CHECKING: @@ -28,7 +28,7 @@ class InputMediaAnimation(InputMedia): """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/input_media_audio.py b/aiogram/types/input_media_audio.py index 3d149dc8..8de62a6f 100644 --- a/aiogram/types/input_media_audio.py +++ b/aiogram/types/input_media_audio.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union from pydantic import Field from ..enums import InputMediaType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .input_media import InputMedia if TYPE_CHECKING: @@ -28,7 +28,7 @@ class InputMediaAudio(InputMedia): """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/input_media_document.py b/aiogram/types/input_media_document.py index 6eb6acfa..9ef4d52f 100644 --- a/aiogram/types/input_media_document.py +++ b/aiogram/types/input_media_document.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union from pydantic import Field from ..enums import InputMediaType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .input_media import InputMedia if TYPE_CHECKING: @@ -28,7 +28,7 @@ class InputMediaDocument(InputMedia): """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/input_media_photo.py b/aiogram/types/input_media_photo.py index 1b6f70dd..0f9500e8 100644 --- a/aiogram/types/input_media_photo.py +++ b/aiogram/types/input_media_photo.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union from pydantic import Field from ..enums import InputMediaType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .input_media import InputMedia if TYPE_CHECKING: @@ -26,7 +26,7 @@ class InputMediaPhoto(InputMedia): """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 » `""" caption: Optional[str] = None """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/input_media_video.py b/aiogram/types/input_media_video.py index 21379d5f..89d4df91 100644 --- a/aiogram/types/input_media_video.py +++ b/aiogram/types/input_media_video.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, List, Optional, Union from pydantic import Field from ..enums import InputMediaType -from .base import UNSET +from .base import UNSET_PARSE_MODE from .input_media import InputMedia if TYPE_CHECKING: @@ -28,7 +28,7 @@ class InputMediaVideo(InputMedia): """*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 » `""" caption: Optional[str] = None """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" caption_entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" diff --git a/aiogram/types/input_text_message_content.py b/aiogram/types/input_text_message_content.py index 2b502765..697696ce 100644 --- a/aiogram/types/input_text_message_content.py +++ b/aiogram/types/input_text_message_content.py @@ -2,7 +2,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, List, Optional -from .base import UNSET +from .base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PARSE_MODE from .input_message_content import InputMessageContent if TYPE_CHECKING: @@ -18,9 +18,9 @@ class InputTextMessageContent(InputMessageContent): message_text: str """Text of the message to be sent, 1-4096 characters""" - parse_mode: Optional[str] = UNSET + parse_mode: Optional[str] = UNSET_PARSE_MODE """*Optional*. Mode for parsing entities in the message text. See `formatting options `_ for more details.""" entities: Optional[List[MessageEntity]] = None """*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*""" - disable_web_page_preview: Optional[bool] = None + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW """*Optional*. Disables link previews for links in the sent message""" diff --git a/aiogram/types/message.py b/aiogram/types/message.py index bd18740a..c74ccb97 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -12,7 +12,12 @@ from aiogram.utils.text_decorations import ( ) from ..enums import ContentType -from .base import UNSET, TelegramObject +from .base import ( + UNSET_DISABLE_WEB_PAGE_PREVIEW, + UNSET_PARSE_MODE, + UNSET_PROTECT_CONTENT, + TelegramObject, +) if TYPE_CHECKING: from ..methods import ( @@ -350,11 +355,11 @@ class Message(TelegramObject): height: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -421,11 +426,11 @@ class Message(TelegramObject): height: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -489,14 +494,14 @@ class Message(TelegramObject): self, audio: Union[InputFile, str], caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -558,14 +563,14 @@ class Message(TelegramObject): self, audio: Union[InputFile, str], caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, duration: Optional[int] = None, performer: Optional[str] = None, title: Optional[str] = None, thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -631,7 +636,7 @@ class Message(TelegramObject): last_name: Optional[str] = None, vcard: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -687,7 +692,7 @@ class Message(TelegramObject): last_name: Optional[str] = None, vcard: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -742,11 +747,11 @@ class Message(TelegramObject): document: Union[InputFile, str], thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, disable_content_type_detection: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -804,11 +809,11 @@ class Message(TelegramObject): document: Union[InputFile, str], thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, disable_content_type_detection: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -866,7 +871,7 @@ class Message(TelegramObject): self, game_short_name: str, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, **kwargs: Any, @@ -911,7 +916,7 @@ class Message(TelegramObject): self, game_short_name: str, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, @@ -977,7 +982,7 @@ class Message(TelegramObject): send_email_to_provider: Optional[bool] = None, is_flexible: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, **kwargs: Any, @@ -1082,7 +1087,7 @@ class Message(TelegramObject): send_email_to_provider: Optional[bool] = None, is_flexible: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, @@ -1173,7 +1178,7 @@ class Message(TelegramObject): heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -1235,7 +1240,7 @@ class Message(TelegramObject): heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -1293,7 +1298,7 @@ class Message(TelegramObject): self, media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, ) -> SendMediaGroup: @@ -1335,7 +1340,7 @@ class Message(TelegramObject): self, media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, **kwargs: Any, @@ -1377,11 +1382,11 @@ class Message(TelegramObject): def reply( self, text: str, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -1433,11 +1438,11 @@ class Message(TelegramObject): def answer( self, text: str, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -1491,11 +1496,11 @@ class Message(TelegramObject): self, photo: Union[InputFile, str], caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -1550,11 +1555,11 @@ class Message(TelegramObject): self, photo: Union[InputFile, str], caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -1615,13 +1620,13 @@ class Message(TelegramObject): allows_multiple_answers: Optional[bool] = None, correct_option_id: Optional[int] = None, explanation: Optional[str] = None, - explanation_parse_mode: Optional[str] = UNSET, + explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE, explanation_entities: Optional[List[MessageEntity]] = None, open_period: Optional[int] = None, close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, is_closed: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -1695,13 +1700,13 @@ class Message(TelegramObject): allows_multiple_answers: Optional[bool] = None, correct_option_id: Optional[int] = None, explanation: Optional[str] = None, - explanation_parse_mode: Optional[str] = UNSET, + explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE, explanation_entities: Optional[List[MessageEntity]] = None, open_period: Optional[int] = None, close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, is_closed: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -1771,7 +1776,7 @@ class Message(TelegramObject): self, emoji: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -1818,7 +1823,7 @@ class Message(TelegramObject): self, emoji: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -1867,7 +1872,7 @@ class Message(TelegramObject): sticker: Union[InputFile, str], emoji: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -1917,7 +1922,7 @@ class Message(TelegramObject): sticker: Union[InputFile, str], emoji: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -1974,7 +1979,7 @@ class Message(TelegramObject): google_place_id: Optional[str] = None, google_place_type: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -2042,7 +2047,7 @@ class Message(TelegramObject): google_place_id: Optional[str] = None, google_place_type: Optional[str] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2108,12 +2113,12 @@ class Message(TelegramObject): height: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -2182,12 +2187,12 @@ class Message(TelegramObject): height: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, has_spoiler: Optional[bool] = None, supports_streaming: Optional[bool] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2256,7 +2261,7 @@ class Message(TelegramObject): length: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -2312,7 +2317,7 @@ class Message(TelegramObject): length: Optional[int] = None, thumbnail: Optional[Union[InputFile, str]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2366,11 +2371,11 @@ class Message(TelegramObject): self, voice: Union[InputFile, str], caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, duration: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] @@ -2425,11 +2430,11 @@ class Message(TelegramObject): self, voice: Union[InputFile, str], caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, duration: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2624,10 +2629,10 @@ class Message(TelegramObject): chat_id: Union[int, str], message_thread_id: Optional[int] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, reply_to_message_id: Optional[int] = None, allow_sending_without_reply: Optional[bool] = None, reply_markup: Optional[ @@ -2683,9 +2688,9 @@ class Message(TelegramObject): self, text: str, inline_message_id: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, entities: Optional[List[MessageEntity]] = None, - disable_web_page_preview: Optional[bool] = None, + disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW, reply_markup: Optional[InlineKeyboardMarkup] = None, **kwargs: Any, ) -> EditMessageText: @@ -2730,7 +2735,7 @@ class Message(TelegramObject): chat_id: Union[int, str], message_thread_id: Optional[int] = None, disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, + protect_content: Optional[bool] = UNSET_PROTECT_CONTENT, **kwargs: Any, ) -> ForwardMessage: """ @@ -2926,7 +2931,7 @@ class Message(TelegramObject): self, inline_message_id: Optional[str] = None, caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET, + parse_mode: Optional[str] = UNSET_PARSE_MODE, caption_entities: Optional[List[MessageEntity]] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, **kwargs: Any, diff --git a/aiogram/webhook/aiohttp_server.py b/aiogram/webhook/aiohttp_server.py index c5e5f661..4406f1ff 100644 --- a/aiogram/webhook/aiohttp_server.py +++ b/aiogram/webhook/aiohttp_server.py @@ -10,8 +10,9 @@ from aiohttp.typedefs import Handler from aiohttp.web_middlewares import middleware from aiogram import Bot, Dispatcher, loggers -from aiogram.methods import Request, TelegramMethod -from aiogram.types import UNSET +from aiogram.methods import TelegramMethod +from aiogram.methods.base import TelegramType +from aiogram.types import InputFile from aiogram.webhook.security import IPFilter @@ -143,7 +144,9 @@ class BaseRequestHandler(ABC): ) return web.json_response({}, dumps=bot.session.json_dumps) - def _build_response_writer(self, bot: Bot, result: Optional[Request]) -> MultipartWriter: + def _build_response_writer( + self, bot: Bot, result: Optional[TelegramMethod[TelegramType]] + ) -> MultipartWriter: writer = MultipartWriter( "form-data", boundary=f"webhookBoundary{secrets.token_urlsafe(16)}", @@ -151,26 +154,29 @@ class BaseRequestHandler(ABC): if not result: return writer - payload = writer.append(result.method) + payload = writer.append(result.__api_method__) payload.set_content_disposition("form-data", name="method") - for key, value in result.data.items(): - if value is None or value is UNSET: + files: Dict[str, InputFile] = {} + for key, value in result.dict().items(): + value = bot.session.prepare_value(value, bot=bot, files=files) + if not value: continue - payload = writer.append(bot.session.prepare_value(value)) + payload = writer.append(value) payload.set_content_disposition("form-data", name=key) - if not result.files: - return writer - - for key, value in result.files.items(): + for key, value in files.items(): payload = writer.append(value) - payload.set_content_disposition("form-data", name=key, filename=value.filename) + payload.set_content_disposition( + "form-data", + name=key, + filename=value.filename or key, + ) return writer async def _handle_request(self, bot: Bot, request: web.Request) -> web.Response: - result = await self.dispatcher.feed_webhook_update( + result: Optional[TelegramMethod[Any]] = await self.dispatcher.feed_webhook_update( bot, await request.json(loads=bot.session.json_loads), **self.data, diff --git a/pyproject.toml b/pyproject.toml index 6f76173e..5a203c92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -138,7 +138,7 @@ features = [ serve = "sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.rst docs/ docs/_build/ {args}" [tool.hatch.envs.dev] -python = "3.10" +python = "3.11" features = [ "dev", "fast", @@ -148,7 +148,7 @@ features = [ "test", ] extra-dependencies = [ - "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.12" + "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.13" ] [tool.hatch.envs.test] diff --git a/tests/mocked_bot.py b/tests/mocked_bot.py index 25a9b38e..29c477a0 100644 --- a/tests/mocked_bot.py +++ b/tests/mocked_bot.py @@ -4,32 +4,35 @@ from typing import TYPE_CHECKING, AsyncGenerator, Deque, Optional, Type from aiogram import Bot from aiogram.client.session.base import BaseSession from aiogram.methods import TelegramMethod -from aiogram.methods.base import Request, Response, TelegramType -from aiogram.types import UNSET, ResponseParameters, User +from aiogram.methods.base import Response, TelegramType +from aiogram.types import UNSET_PARSE_MODE, ResponseParameters, User class MockedSession(BaseSession): def __init__(self): super(MockedSession, self).__init__() self.responses: Deque[Response[TelegramType]] = deque() - self.requests: Deque[Request] = deque() + self.requests: Deque[TelegramMethod[TelegramType]] = deque() self.closed = True def add_result(self, response: Response[TelegramType]) -> Response[TelegramType]: self.responses.append(response) return response - def get_request(self) -> Request: + def get_request(self) -> TelegramMethod[TelegramType]: return self.requests.pop() async def close(self): self.closed = True async def make_request( - self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = UNSET + self, + bot: Bot, + method: TelegramMethod[TelegramType], + timeout: Optional[int] = UNSET_PARSE_MODE, ) -> TelegramType: self.closed = False - self.requests.append(method.build_request(bot)) + self.requests.append(method) response: Response[TelegramType] = self.responses.pop() self.check_response( method=method, status_code=response.error_code, content=response.json() @@ -86,5 +89,5 @@ class MockedBot(Bot): self.session.add_result(response) return response - def get_request(self) -> Request: + def get_request(self) -> TelegramMethod[TelegramType]: return self.session.get_request() diff --git a/tests/test_api/test_client/test_session/test_aiohttp_session.py b/tests/test_api/test_client/test_session/test_aiohttp_session.py index 651711cb..fd7cabfd 100644 --- a/tests/test_api/test_client/test_session/test_aiohttp_session.py +++ b/tests/test_api/test_client/test_session/test_aiohttp_session.py @@ -1,5 +1,5 @@ import asyncio -from typing import AsyncContextManager, AsyncGenerator +from typing import Any, AsyncContextManager, AsyncGenerator, Dict, List from unittest.mock import AsyncMock, patch import aiohttp_socks @@ -11,8 +11,8 @@ from aiogram import Bot from aiogram.client.session import aiohttp from aiogram.client.session.aiohttp import AiohttpSession from aiogram.exceptions import TelegramNetworkError -from aiogram.methods import Request, TelegramMethod -from aiogram.types import UNSET, InputFile +from aiogram.methods import TelegramMethod +from aiogram.types import UNSET_PARSE_MODE, InputFile from tests.mocked_bot import MockedBot @@ -103,44 +103,60 @@ class TestAiohttpSession: await session.close() mocked_close.assert_called_once() - def test_build_form_data_with_data_only(self): - request = Request( - method="method", - data={ - "str": "value", - "int": 42, - "bool": True, - "unset": UNSET, - "null": None, - "list": ["foo"], - "dict": {"bar": "baz"}, - }, - ) + def test_build_form_data_with_data_only(self, bot: MockedBot): + class TestMethod(TelegramMethod[bool]): + __api_method__ = "test" + __returning__ = bool + + str_: str + int_: int + bool_: bool + unset_: str = UNSET_PARSE_MODE + null_: None + list_: List[str] + dict_: Dict[str, Any] session = AiohttpSession() - form = session.build_form_data(request) + form = session.build_form_data( + bot, + TestMethod( + str_="value", + int_=42, + bool_=True, + unset_=UNSET_PARSE_MODE, + null_=None, + list_=["foo"], + dict_={"bar": "baz"}, + ), + ) fields = form._fields assert len(fields) == 5 assert all(isinstance(field[2], str) for field in fields) - assert "null" not in [item[0]["name"] for item in fields] + assert "null_" not in [item[0]["name"] for item in fields] - def test_build_form_data_with_files(self): - request = Request( - method="method", - data={"key": "value"}, - files={"document": BareInputFile(filename="file.txt")}, - ) + def test_build_form_data_with_files(self, bot: Bot): + class TestMethod(TelegramMethod[bool]): + __api_method__ = "test" + __returning__ = bool + + key: str + document: InputFile session = AiohttpSession() - form = session.build_form_data(request) + form = session.build_form_data( + bot, + TestMethod(key="value", document=BareInputFile(filename="file.txt")), + ) fields = form._fields - assert len(fields) == 2 + assert len(fields) == 3 assert fields[1][0]["name"] == "document" - assert fields[1][0]["filename"] == "file.txt" - assert isinstance(fields[1][2], BareInputFile) + assert fields[1][2].startswith("attach://") + assert fields[2][0]["name"] == fields[1][2][9:] + assert fields[2][0]["filename"] == "file.txt" + assert isinstance(fields[2][2], BareInputFile) async def test_make_request(self, bot: MockedBot, aresponses: ResponsesMockServer): aresponses.add( @@ -158,9 +174,7 @@ class TestAiohttpSession: class TestMethod(TelegramMethod[int]): __returning__ = int - - def build_request(self, bot: Bot) -> Request: - return Request(method="method", data={}) + __api_method__ = "method" call = TestMethod() 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 e46981f6..48d43cef 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 @@ -1,14 +1,15 @@ import datetime import json -from typing import AsyncContextManager, AsyncGenerator, Optional +from typing import Any, AsyncContextManager, AsyncGenerator, Optional from unittest.mock import AsyncMock, patch import pytest +from pytz import utc 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.enums import ChatType, ParseMode, TopicIconColor from aiogram.exceptions import ( ClientDecodeError, RestartingTelegram, @@ -24,7 +25,8 @@ from aiogram.exceptions import ( TelegramUnauthorizedError, ) from aiogram.methods import DeleteMessage, GetMe, TelegramMethod -from aiogram.types import UNSET, User +from aiogram.types import UNSET_PARSE_MODE, User +from aiogram.types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW, UNSET_PROTECT_CONTENT from tests.mocked_bot import MockedBot @@ -33,17 +35,21 @@ class CustomSession(BaseSession): pass async def make_request( - self, token: str, method: TelegramMethod[TelegramType], timeout: Optional[int] = UNSET + self, + token: str, + method: TelegramMethod[TelegramType], + timeout: Optional[int] = UNSET_PARSE_MODE, ) -> None: # type: ignore assert isinstance(token, str) assert isinstance(method, TelegramMethod) async def stream_content( - self, url: str, timeout: int, chunk_size: int + self, url: str, timeout: int, chunk_size: int, raise_for_status: bool ) -> AsyncGenerator[bytes, None]: # pragma: no cover assert isinstance(url, str) assert isinstance(timeout, int) assert isinstance(chunk_size, int) + assert isinstance(raise_for_status, bool) yield b"\f" * 10 @@ -79,58 +85,56 @@ class TestBaseSession: assert session.api == api assert "example.com" in session.api.base - def test_prepare_value(self): + @pytest.mark.parametrize( + "value,result", + [ + [None, None], + ["text", "text"], + [ChatType.PRIVATE, "private"], + [TopicIconColor.RED, "16478047"], + [42, "42"], + [True, "true"], + [["test"], '["test"]'], + [["test", ["test"]], '["test", ["test"]]'], + [[{"test": "pass", "spam": None}], '[{"test": "pass"}]'], + [{"test": "pass", "number": 42, "spam": None}, '{"test": "pass", "number": 42}'], + [{"foo": {"test": "pass", "spam": None}}, '{"foo": {"test": "pass"}}'], + [ + datetime.datetime( + year=2017, month=5, day=17, hour=4, minute=11, second=42, tzinfo=utc + ), + "1494994302", + ], + ], + ) + def test_prepare_value(self, value: Any, result: str, bot: MockedBot): session = CustomSession() - now = datetime.datetime.now() + assert session.prepare_value(value, bot=bot, files={}) == result - assert session.prepare_value("text") == "text" - assert session.prepare_value(["test"]) == '["test"]' - assert session.prepare_value({"test": "ok"}) == '{"test": "ok"}' - 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): + def test_prepare_value_timedelta(self, bot: MockedBot): session = CustomSession() - cleaned_dict = session.clean_json({"key": "value", "null": None}) - assert "key" in cleaned_dict - assert "null" not in cleaned_dict + value = session.prepare_value(datetime.timedelta(minutes=2), bot=bot, files={}) + assert isinstance(value, str) - cleaned_list = session.clean_json(["kaboom", 42, None]) - assert len(cleaned_list) == 2 - assert 42 in cleaned_list - assert None not in cleaned_list - assert cleaned_list[0] == "kaboom" - - def test_clean_json_with_nested_json(self): - session = CustomSession() - - cleaned = session.clean_json( - { - "key": "value", - "null": None, - "nested_list": ["kaboom", 42, None], - "nested_dict": {"key": "value", "null": None}, - } + def test_prepare_value_defaults_replace(self): + bot = MockedBot( + parse_mode=ParseMode.HTML, + protect_content=True, + disable_web_page_preview=True, ) + assert bot.session.prepare_value(UNSET_PARSE_MODE, bot=bot, files={}) == "HTML" + assert ( + bot.session.prepare_value(UNSET_DISABLE_WEB_PAGE_PREVIEW, bot=bot, files={}) == "true" + ) + assert bot.session.prepare_value(UNSET_PROTECT_CONTENT, bot=bot, files={}) == "true" - assert len(cleaned) == 3 - assert "null" not in cleaned - - assert isinstance(cleaned["nested_list"], list) - assert cleaned["nested_list"] == ["kaboom", 42] - - assert isinstance(cleaned["nested_dict"], dict) - assert cleaned["nested_dict"] == {"key": "value"} - - def test_clean_json_not_json(self): - session = CustomSession() - - assert session.clean_json(42) == 42 + def test_prepare_value_defaults_unset(self): + bot = MockedBot() + assert bot.session.prepare_value(UNSET_PARSE_MODE, bot=bot, files={}) is None + assert bot.session.prepare_value(UNSET_DISABLE_WEB_PAGE_PREVIEW, bot=bot, files={}) is None + assert bot.session.prepare_value(UNSET_PROTECT_CONTENT, bot=bot, files={}) is None @pytest.mark.parametrize( "status_code,content,error", @@ -210,7 +214,10 @@ class TestBaseSession: async def test_stream_content(self): session = CustomSession() stream = session.stream_content( - "https://www.python.org/static/img/python-logo.png", timeout=5, chunk_size=65536 + "https://www.python.org/static/img/python-logo.png", + timeout=5, + chunk_size=65536, + raise_for_status=True, ) assert isinstance(stream, AsyncGenerator) diff --git a/tests/test_api/test_methods/test_add_sticker_to_set.py b/tests/test_api/test_methods/test_add_sticker_to_set.py index 94e9c3f1..8e617a74 100644 --- a/tests/test_api/test_methods/test_add_sticker_to_set.py +++ b/tests/test_api/test_methods/test_add_sticker_to_set.py @@ -1,21 +1,9 @@ -from aiogram.methods import AddStickerToSet, Request +from aiogram.methods import AddStickerToSet from aiogram.types import InputSticker from tests.mocked_bot import MockedBot class TestAddStickerToSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True) - - response: bool = await AddStickerToSet( - user_id=42, - name="test stickers pack", - sticker=InputSticker(sticker="file id", emoji_list=[":)"]), - ) - request: Request = bot.get_request() - assert request.method == "addStickerToSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True) @@ -24,6 +12,5 @@ class TestAddStickerToSet: name="test stickers pack", sticker=InputSticker(sticker="file id", emoji_list=[":)"]), ) - request: Request = bot.get_request() - assert request.method == "addStickerToSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_callback_query.py b/tests/test_api/test_methods/test_answer_callback_query.py index 54f9e640..98e9df17 100644 --- a/tests/test_api/test_methods/test_answer_callback_query.py +++ b/tests/test_api/test_methods/test_answer_callback_query.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestAnswerCallbackQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True) - - response: bool = await AnswerCallbackQuery(callback_query_id="cq id", text="OK") - request: Request = bot.get_request() - assert request.method == "answerCallbackQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True) response: bool = await bot.answer_callback_query(callback_query_id="cq id", text="OK") - request: Request = bot.get_request() - assert request.method == "answerCallbackQuery" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_inline_query.py b/tests/test_api/test_methods/test_answer_inline_query.py index c3b35a2e..a0cec362 100644 --- a/tests/test_api/test_methods/test_answer_inline_query.py +++ b/tests/test_api/test_methods/test_answer_inline_query.py @@ -9,55 +9,11 @@ from tests.mocked_bot import MockedBot class TestAnswerInlineQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerInlineQuery, ok=True, result=True) - - response: bool = await AnswerInlineQuery( - inline_query_id="query id", results=[InlineQueryResult()] - ) - request: Request = bot.get_request() - assert request.method == "answerInlineQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerInlineQuery, ok=True, result=True) response: bool = await bot.answer_inline_query( inline_query_id="query id", results=[InlineQueryResult()] ) - request: Request = bot.get_request() - assert request.method == "answerInlineQuery" + request = bot.get_request() assert response == prepare_result.result - - def test_parse_mode(self, bot: MockedBot): - query = AnswerInlineQuery( - inline_query_id="query id", - results=[ - InlineQueryResultPhoto(id="result id", photo_url="photo", thumbnail_url="thumb") - ], - ) - request = query.build_request(bot) - assert request.data["results"][0]["parse_mode"] is None - - new_bot = Bot(token="42:TEST", parse_mode="HTML") - request = query.build_request(new_bot) - assert request.data["results"][0]["parse_mode"] == "HTML" - - def test_parse_mode_input_message_content(self, bot: MockedBot): - query = AnswerInlineQuery( - inline_query_id="query id", - results=[ - InlineQueryResultPhoto( - id="result id", - photo_url="photo", - thumbnail_url="thumb", - input_message_content=InputTextMessageContent(message_text="test"), - ) - ], - ) - request = query.build_request(bot) - assert request.data["results"][0]["input_message_content"]["parse_mode"] is None - - new_bot = Bot(token="42:TEST", parse_mode="HTML") - request = query.build_request(new_bot) - assert request.data["results"][0]["input_message_content"]["parse_mode"] == "HTML" diff --git a/tests/test_api/test_methods/test_answer_pre_checkout_query.py b/tests/test_api/test_methods/test_answer_pre_checkout_query.py index f15f5beb..b2a1f6c9 100644 --- a/tests/test_api/test_methods/test_answer_pre_checkout_query.py +++ b/tests/test_api/test_methods/test_answer_pre_checkout_query.py @@ -3,20 +3,11 @@ from tests.mocked_bot import MockedBot class TestAnswerPreCheckoutQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerPreCheckoutQuery, ok=True, result=True) - - response: bool = await AnswerPreCheckoutQuery(pre_checkout_query_id="query id", ok=True) - request: Request = bot.get_request() - assert request.method == "answerPreCheckoutQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerPreCheckoutQuery, ok=True, result=True) response: bool = await bot.answer_pre_checkout_query( pre_checkout_query_id="query id", ok=True ) - request: Request = bot.get_request() - assert request.method == "answerPreCheckoutQuery" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_shipping_query.py b/tests/test_api/test_methods/test_answer_shipping_query.py index 8a2b5f89..d31f41f8 100644 --- a/tests/test_api/test_methods/test_answer_shipping_query.py +++ b/tests/test_api/test_methods/test_answer_shipping_query.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestAnswerShippingQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerShippingQuery, ok=True, result=True) - - response: bool = await AnswerShippingQuery(shipping_query_id="query id", ok=True) - request: Request = bot.get_request() - assert request.method == "answerShippingQuery" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerShippingQuery, ok=True, result=True) response: bool = await bot.answer_shipping_query(shipping_query_id="query id", ok=True) - request: Request = bot.get_request() - assert request.method == "answerShippingQuery" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_answer_web_app_query.py b/tests/test_api/test_methods/test_answer_web_app_query.py index 713653f1..6948bead 100644 --- a/tests/test_api/test_methods/test_answer_web_app_query.py +++ b/tests/test_api/test_methods/test_answer_web_app_query.py @@ -4,18 +4,6 @@ from tests.mocked_bot import MockedBot class TestAnswerWebAppQuery: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) - - response: SentWebAppMessage = await AnswerWebAppQuery( - web_app_query_id="test", - result=InlineQueryResult(), - ) - request: Request = bot.get_request() - assert request.method == "answerWebAppQuery" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) @@ -23,7 +11,5 @@ class TestAnswerWebAppQuery: web_app_query_id="test", result=InlineQueryResult(), ) - request: Request = bot.get_request() - assert request.method == "answerWebAppQuery" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_approve_chat_join_request.py b/tests/test_api/test_methods/test_approve_chat_join_request.py index ea81c4ac..6b097702 100755 --- a/tests/test_api/test_methods/test_approve_chat_join_request.py +++ b/tests/test_api/test_methods/test_approve_chat_join_request.py @@ -3,17 +3,6 @@ from tests.mocked_bot import MockedBot class TestApproveChatJoinRequest: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=True) - - response: bool = await ApproveChatJoinRequest( - chat_id=-42, - user_id=42, - ) - request: Request = bot.get_request() - assert request.method == "approveChatJoinRequest" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=None) @@ -21,6 +10,5 @@ class TestApproveChatJoinRequest: chat_id=-42, user_id=42, ) - request: Request = bot.get_request() - assert request.method == "approveChatJoinRequest" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_ban_chat_member.py b/tests/test_api/test_methods/test_ban_chat_member.py index 10464737..98ca951e 100644 --- a/tests/test_api/test_methods/test_ban_chat_member.py +++ b/tests/test_api/test_methods/test_ban_chat_member.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestKickChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(BanChatMember, ok=True, result=True) - - response: bool = await BanChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "banChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatMember, ok=True, result=True) response: bool = await bot.ban_chat_member(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "banChatMember" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_ban_chat_sender_chat.py b/tests/test_api/test_methods/test_ban_chat_sender_chat.py index b93f27a5..6811c975 100755 --- a/tests/test_api/test_methods/test_ban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_ban_chat_sender_chat.py @@ -3,18 +3,6 @@ from tests.mocked_bot import MockedBot class TestBanChatSenderChat: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) - - response: bool = await BanChatSenderChat( - chat_id=-42, - sender_chat_id=-1337, - ) - request: Request = bot.get_request() - assert request.method == "banChatSenderChat" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) @@ -22,7 +10,5 @@ class TestBanChatSenderChat: chat_id=-42, sender_chat_id=-1337, ) - request: Request = bot.get_request() - assert request.method == "banChatSenderChat" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_base.py b/tests/test_api/test_methods/test_base.py index 38306db1..f2351d40 100644 --- a/tests/test_api/test_methods/test_base.py +++ b/tests/test_api/test_methods/test_base.py @@ -1,61 +1,27 @@ -from typing import Dict, Optional +from unittest.mock import sentinel import pytest -from aiogram import Bot -from aiogram.methods.base import prepare_parse_mode +from aiogram.methods import GetMe, TelegramMethod +from aiogram.types import User from tests.mocked_bot import MockedBot -class TestPrepareFile: - # TODO: Add tests - pass - - -class TestPrepareInputMedia: - # TODO: Add tests - pass - - -class TestPrepareMediaFile: - # TODO: Add tests - pass - - -class TestPrepareParseMode: +class TestTelegramMethodRemoveUnset: @pytest.mark.parametrize( - "parse_mode,data,result", + "values,names", [ - [None, {}, None], - ["HTML", {}, "HTML"], - ["Markdown", {}, "Markdown"], - [None, {"parse_mode": "HTML"}, "HTML"], - ["HTML", {"parse_mode": "HTML"}, "HTML"], - ["Markdown", {"parse_mode": "HTML"}, "HTML"], + [{}, set()], + [{"foo": "bar"}, {"foo"}], + [{"foo": "bar", "baz": sentinel.DEFAULT}, {"foo"}], ], ) - async def test_default_parse_mode( - self, bot: MockedBot, parse_mode: str, data: Dict[str, str], result: Optional[str] - ): - async with Bot(token="42:TEST", parse_mode=parse_mode).context() as bot: - assert bot.parse_mode == parse_mode - prepare_parse_mode(bot, data) - assert data.get("parse_mode") == result + def test_remove_unset(self, values, names): + validated = TelegramMethod.remove_unset(values) + assert set(validated.keys()) == names - async def test_list(self): - data = [{}] * 2 - data.append({"parse_mode": "HTML"}) - bot = Bot(token="42:TEST", parse_mode="Markdown") - prepare_parse_mode(bot, data) - assert isinstance(data, list) - assert len(data) == 3 - assert all("parse_mode" in item for item in data) - assert data[0]["parse_mode"] == "Markdown" - assert data[1]["parse_mode"] == "Markdown" - assert data[2]["parse_mode"] == "HTML" - - def test_bot_not_in_context(self, bot: MockedBot): - data = {} - prepare_parse_mode(bot, data) - assert data["parse_mode"] is None +class TestTelegramMethodCall: + async def test_async_emit(self, bot: MockedBot): + bot.add_result_for(GetMe, ok=True, result=User(id=42, is_bot=True, first_name="Test")) + assert isinstance(await GetMe(), User) diff --git a/tests/test_api/test_methods/test_close.py b/tests/test_api/test_methods/test_close.py index f8f8956b..e13223fa 100644 --- a/tests/test_api/test_methods/test_close.py +++ b/tests/test_api/test_methods/test_close.py @@ -3,20 +3,9 @@ from tests.mocked_bot import MockedBot class TestClose: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(Close, ok=True, result=True) - - response: bool = await Close() - request: Request = bot.get_request() - assert request.method == "close" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(Close, ok=True, result=True) response: bool = await bot.close() - request: Request = bot.get_request() - assert request.method == "close" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_close_forum_topic.py b/tests/test_api/test_methods/test_close_forum_topic.py index 4857e7a4..ff45c6ac 100644 --- a/tests/test_api/test_methods/test_close_forum_topic.py +++ b/tests/test_api/test_methods/test_close_forum_topic.py @@ -3,18 +3,6 @@ from tests.mocked_bot import MockedBot class TestCloseForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) - - response: bool = await CloseForumTopic( - chat_id=42, - message_thread_id=42, - ) - request: Request = bot.get_request() - assert request.method == "closeForumTopic" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) @@ -22,7 +10,5 @@ class TestCloseForumTopic: chat_id=42, message_thread_id=42, ) - request: Request = bot.get_request() - assert request.method == "closeForumTopic" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_close_general_forum_topic.py b/tests/test_api/test_methods/test_close_general_forum_topic.py index a62ce146..b0a022ec 100644 --- a/tests/test_api/test_methods/test_close_general_forum_topic.py +++ b/tests/test_api/test_methods/test_close_general_forum_topic.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestCloseGeneralForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) - - response: bool = await bot(CloseGeneralForumTopic(chat_id=42)) - request: Request = bot.get_request() - assert request.method == "closeGeneralForumTopic" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CloseGeneralForumTopic, ok=True, result=True) response: bool = await bot.close_general_forum_topic(chat_id=42) - request: Request = bot.get_request() - assert request.method == "closeGeneralForumTopic" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_copy_message.py b/tests/test_api/test_methods/test_copy_message.py index 38419c6b..bff6004b 100644 --- a/tests/test_api/test_methods/test_copy_message.py +++ b/tests/test_api/test_methods/test_copy_message.py @@ -4,19 +4,6 @@ from tests.mocked_bot import MockedBot class TestCopyMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(CopyMessage, ok=True, result=MessageId(message_id=42)) - - response: MessageId = await CopyMessage( - chat_id=42, - from_chat_id=42, - message_id=42, - ) - request: Request = bot.get_request() - assert request.method == "copyMessage" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CopyMessage, ok=True, result=MessageId(message_id=42)) @@ -25,7 +12,5 @@ class TestCopyMessage: from_chat_id=42, message_id=42, ) - request: Request = bot.get_request() - assert request.method == "copyMessage" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_chat_invite_link.py b/tests/test_api/test_methods/test_create_chat_invite_link.py index cfdca233..87a31be8 100644 --- a/tests/test_api/test_methods/test_create_chat_invite_link.py +++ b/tests/test_api/test_methods/test_create_chat_invite_link.py @@ -4,27 +4,6 @@ from tests.mocked_bot import MockedBot class TestCreateChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - CreateChatInviteLink, - ok=True, - result=ChatInviteLink( - invite_link="https://t.me/username", - creator=User(id=42, is_bot=False, first_name="User"), - is_primary=False, - is_revoked=False, - creates_join_request=False, - ), - ) - - response: ChatInviteLink = await CreateChatInviteLink( - chat_id=-42, - ) - request: Request = bot.get_request() - assert request.method == "createChatInviteLink" - # assert request.data == {"chat_id": -42} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateChatInviteLink, @@ -41,7 +20,5 @@ class TestCreateChatInviteLink: response: ChatInviteLink = await bot.create_chat_invite_link( chat_id=-42, ) - request: Request = bot.get_request() - assert request.method == "createChatInviteLink" - # assert request.data == {"chat_id": -42} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_forum_topic.py b/tests/test_api/test_methods/test_create_forum_topic.py index 84eaf02e..071945ca 100644 --- a/tests/test_api/test_methods/test_create_forum_topic.py +++ b/tests/test_api/test_methods/test_create_forum_topic.py @@ -4,22 +4,6 @@ from tests.mocked_bot import MockedBot class TestCreateForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - CreateForumTopic, - ok=True, - result=ForumTopic(message_thread_id=42, name="test", icon_color=0xFFD67E), - ) - - response: ForumTopic = await CreateForumTopic( - chat_id=42, - name="test", - ) - request: Request = bot.get_request() - assert request.method == "createForumTopic" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateForumTopic, @@ -31,7 +15,5 @@ class TestCreateForumTopic: chat_id=42, name="test", ) - request: Request = bot.get_request() - assert request.method == "createForumTopic" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_invoice_link.py b/tests/test_api/test_methods/test_create_invoice_link.py index 7909fac9..75a46326 100644 --- a/tests/test_api/test_methods/test_create_invoice_link.py +++ b/tests/test_api/test_methods/test_create_invoice_link.py @@ -4,23 +4,6 @@ from tests.mocked_bot import MockedBot class TestCreateInvoiceLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" - ) - - response: str = await CreateInvoiceLink( - title="test", - description="test", - payload="test", - provider_token="test", - currency="BTC", - prices=[LabeledPrice(label="Test", amount=1)], - ) - request: Request = bot.get_request() - assert request.method == "createInvoiceLink" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" @@ -34,6 +17,5 @@ class TestCreateInvoiceLink: currency="BTC", prices=[LabeledPrice(label="Test", amount=1)], ) - request: Request = bot.get_request() - assert request.method == "createInvoiceLink" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_create_new_sticker_set.py b/tests/test_api/test_methods/test_create_new_sticker_set.py index ba44266e..7aef1fc8 100644 --- a/tests/test_api/test_methods/test_create_new_sticker_set.py +++ b/tests/test_api/test_methods/test_create_new_sticker_set.py @@ -5,23 +5,6 @@ from tests.mocked_bot import MockedBot class TestCreateNewStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True) - - response: bool = await CreateNewStickerSet( - user_id=42, - name="name", - title="title", - stickers=[ - InputSticker(sticker="file id", emoji_list=[":)"]), - InputSticker(sticker=FSInputFile("file.png"), emoji_list=["=("]), - ], - sticker_format=StickerFormat.STATIC, - ) - request: Request = bot.get_request() - assert request.method == "createNewStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True) @@ -35,6 +18,5 @@ class TestCreateNewStickerSet: ], sticker_format=StickerFormat.STATIC, ) - request: Request = bot.get_request() - assert request.method == "createNewStickerSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_decline_chat_join_request.py b/tests/test_api/test_methods/test_decline_chat_join_request.py index 549f43d1..f85c4375 100755 --- a/tests/test_api/test_methods/test_decline_chat_join_request.py +++ b/tests/test_api/test_methods/test_decline_chat_join_request.py @@ -3,17 +3,6 @@ from tests.mocked_bot import MockedBot class TestDeclineChatJoinRequest: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) - - response: bool = await DeclineChatJoinRequest( - chat_id=-42, - user_id=42, - ) - request: Request = bot.get_request() - assert request.method == "declineChatJoinRequest" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) @@ -21,6 +10,5 @@ class TestDeclineChatJoinRequest: chat_id=-42, user_id=42, ) - request: Request = bot.get_request() - assert request.method == "declineChatJoinRequest" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_chat_photo.py b/tests/test_api/test_methods/test_delete_chat_photo.py index 9faaa8bf..df8c5eef 100644 --- a/tests/test_api/test_methods/test_delete_chat_photo.py +++ b/tests/test_api/test_methods/test_delete_chat_photo.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestDeleteChatPhoto: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteChatPhoto, ok=True, result=True) - - response: bool = await DeleteChatPhoto(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatPhoto" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteChatPhoto, ok=True, result=True) response: bool = await bot.delete_chat_photo(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatPhoto" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_chat_sticker_set.py b/tests/test_api/test_methods/test_delete_chat_sticker_set.py index ae6af449..c8452d75 100644 --- a/tests/test_api/test_methods/test_delete_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_delete_chat_sticker_set.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestDeleteChatStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteChatStickerSet, ok=True, result=True) - - response: bool = await DeleteChatStickerSet(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteChatStickerSet, ok=True, result=True) response: bool = await bot.delete_chat_sticker_set(chat_id=42) - request: Request = bot.get_request() - assert request.method == "deleteChatStickerSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_forum_topic.py b/tests/test_api/test_methods/test_delete_forum_topic.py index e0ad6bfd..63cd629e 100644 --- a/tests/test_api/test_methods/test_delete_forum_topic.py +++ b/tests/test_api/test_methods/test_delete_forum_topic.py @@ -3,18 +3,6 @@ from tests.mocked_bot import MockedBot class TestDeleteForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) - - response: bool = await DeleteForumTopic( - chat_id=42, - message_thread_id=42, - ) - request: Request = bot.get_request() - assert request.method == "deleteForumTopic" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) @@ -22,7 +10,5 @@ class TestDeleteForumTopic: chat_id=42, message_thread_id=42, ) - request: Request = bot.get_request() - assert request.method == "deleteForumTopic" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_message.py b/tests/test_api/test_methods/test_delete_message.py index 097496a2..de8b44e4 100644 --- a/tests/test_api/test_methods/test_delete_message.py +++ b/tests/test_api/test_methods/test_delete_message.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestDeleteMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteMessage, ok=True, result=True) - - response: bool = await DeleteMessage(chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "deleteMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteMessage, ok=True, result=True) response: bool = await bot.delete_message(chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "deleteMessage" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_my_commands.py b/tests/test_api/test_methods/test_delete_my_commands.py index c4902ec4..86e4c47e 100644 --- a/tests/test_api/test_methods/test_delete_my_commands.py +++ b/tests/test_api/test_methods/test_delete_my_commands.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestKickChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteMyCommands, ok=True, result=True) - - response: bool = await DeleteMyCommands() - request: Request = bot.get_request() - assert request.method == "deleteMyCommands" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteMyCommands, ok=True, result=True) response: bool = await bot.delete_my_commands() - request: Request = bot.get_request() - assert request.method == "deleteMyCommands" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_sticker_from_set.py b/tests/test_api/test_methods/test_delete_sticker_from_set.py index bc2a8e79..b8e25153 100644 --- a/tests/test_api/test_methods/test_delete_sticker_from_set.py +++ b/tests/test_api/test_methods/test_delete_sticker_from_set.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestDeleteStickerFromSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteStickerFromSet, ok=True, result=True) - - response: bool = await DeleteStickerFromSet(sticker="sticker id") - request: Request = bot.get_request() - assert request.method == "deleteStickerFromSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteStickerFromSet, ok=True, result=True) response: bool = await bot.delete_sticker_from_set(sticker="sticker id") - request: Request = bot.get_request() - assert request.method == "deleteStickerFromSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_sticker_set.py b/tests/test_api/test_methods/test_delete_sticker_set.py index 4ab6a1a0..b0f6391c 100644 --- a/tests/test_api/test_methods/test_delete_sticker_set.py +++ b/tests/test_api/test_methods/test_delete_sticker_set.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestDeleteStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteStickerSet, ok=True, result=True) - - response: bool = await DeleteStickerSet(name="test") - request: Request = bot.get_request() - assert request.method == "deleteStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteStickerSet, ok=True, result=True) response: bool = await bot.delete_sticker_set(name="test") - request: Request = bot.get_request() - assert request.method == "deleteStickerSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_delete_webhook.py b/tests/test_api/test_methods/test_delete_webhook.py index 76591a8a..3f755d73 100644 --- a/tests/test_api/test_methods/test_delete_webhook.py +++ b/tests/test_api/test_methods/test_delete_webhook.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestDeleteWebhook: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(DeleteWebhook, ok=True, result=True) - - response: bool = await DeleteWebhook() - request: Request = bot.get_request() - assert request.method == "deleteWebhook" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(DeleteWebhook, ok=True, result=True) response: bool = await bot.delete_webhook() - request: Request = bot.get_request() - assert request.method == "deleteWebhook" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_chat_invite_link.py b/tests/test_api/test_methods/test_edit_chat_invite_link.py index ab71c3ae..7bceffcd 100644 --- a/tests/test_api/test_methods/test_edit_chat_invite_link.py +++ b/tests/test_api/test_methods/test_edit_chat_invite_link.py @@ -4,26 +4,6 @@ from tests.mocked_bot import MockedBot class TestEditChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - EditChatInviteLink, - ok=True, - result=ChatInviteLink( - invite_link="https://t.me/username2", - creator=User(id=42, is_bot=False, first_name="User"), - is_primary=False, - is_revoked=False, - creates_join_request=False, - ), - ) - - response: ChatInviteLink = await EditChatInviteLink( - chat_id=-42, invite_link="https://t.me/username", member_limit=1 - ) - request: Request = bot.get_request() - assert request.method == "editChatInviteLink" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( EditChatInviteLink, @@ -40,6 +20,5 @@ class TestEditChatInviteLink: response: ChatInviteLink = await bot.edit_chat_invite_link( chat_id=-42, invite_link="https://t.me/username", member_limit=1 ) - request: Request = bot.get_request() - assert request.method == "editChatInviteLink" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_forum_topic.py b/tests/test_api/test_methods/test_edit_forum_topic.py index 98e30166..2dbb06f9 100644 --- a/tests/test_api/test_methods/test_edit_forum_topic.py +++ b/tests/test_api/test_methods/test_edit_forum_topic.py @@ -3,21 +3,6 @@ from tests.mocked_bot import MockedBot class TestEditForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) - - response: bool = await EditForumTopic( - chat_id=42, - message_thread_id=42, - name="test", - icon_color=0xFFD67E, - icon_custom_emoji_id="0", - ) - request: Request = bot.get_request() - assert request.method == "editForumTopic" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) @@ -27,7 +12,5 @@ class TestEditForumTopic: name="test", icon_custom_emoji_id="0", ) - request: Request = bot.get_request() - assert request.method == "editForumTopic" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_general_forum_topic.py b/tests/test_api/test_methods/test_edit_general_forum_topic.py index 01bff1d6..cc3fc14f 100644 --- a/tests/test_api/test_methods/test_edit_general_forum_topic.py +++ b/tests/test_api/test_methods/test_edit_general_forum_topic.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestCloseGeneralForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) - - response: bool = await bot(EditGeneralForumTopic(chat_id=42, name="Test")) - request: Request = bot.get_request() - assert request.method == "editGeneralForumTopic" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditGeneralForumTopic, ok=True, result=True) response: bool = await bot.edit_general_forum_topic(chat_id=42, name="Test") - request: Request = bot.get_request() - assert request.method == "editGeneralForumTopic" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_caption.py b/tests/test_api/test_methods/test_edit_message_caption.py index 71a7784e..55ab5d6f 100644 --- a/tests/test_api/test_methods/test_edit_message_caption.py +++ b/tests/test_api/test_methods/test_edit_message_caption.py @@ -7,23 +7,6 @@ from tests.mocked_bot import MockedBot class TestEditMessageCaption: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - EditMessageCaption, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - text="text", - chat=Chat(id=42, type="private"), - ), - ) - - response: Union[Message, bool] = await EditMessageCaption() - request: Request = bot.get_request() - assert request.method == "editMessageCaption" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( EditMessageCaption, @@ -37,6 +20,5 @@ class TestEditMessageCaption: ) response: Union[Message, bool] = await bot.edit_message_caption() - request: Request = bot.get_request() - assert request.method == "editMessageCaption" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_live_location.py b/tests/test_api/test_methods/test_edit_message_live_location.py index 7a2c2f7d..b9aee11a 100644 --- a/tests/test_api/test_methods/test_edit_message_live_location.py +++ b/tests/test_api/test_methods/test_edit_message_live_location.py @@ -6,22 +6,11 @@ from tests.mocked_bot import MockedBot class TestEditMessageLiveLocation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageLiveLocation, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageLiveLocation( - latitude=3.141592, longitude=3.141592 - ) - request: Request = bot.get_request() - assert request.method == "editMessageLiveLocation" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageLiveLocation, ok=True, result=True) response: Union[Message, bool] = await bot.edit_message_live_location( latitude=3.141592, longitude=3.141592 ) - request: Request = bot.get_request() - assert request.method == "editMessageLiveLocation" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_media.py b/tests/test_api/test_methods/test_edit_message_media.py index 15594aff..57e74d45 100644 --- a/tests/test_api/test_methods/test_edit_message_media.py +++ b/tests/test_api/test_methods/test_edit_message_media.py @@ -6,22 +6,11 @@ from tests.mocked_bot import MockedBot class TestEditMessageMedia: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageMedia, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageMedia( - media=InputMediaPhoto(media=BufferedInputFile(b"", "photo.png")) - ) - request: Request = bot.get_request() - assert request.method == "editMessageMedia" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageMedia, ok=True, result=True) response: Union[Message, bool] = await bot.edit_message_media( media=InputMediaPhoto(media=BufferedInputFile(b"", "photo.png")) ) - request: Request = bot.get_request() - assert request.method == "editMessageMedia" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_reply_markup.py b/tests/test_api/test_methods/test_edit_message_reply_markup.py index 38baa76f..1f5d94be 100644 --- a/tests/test_api/test_methods/test_edit_message_reply_markup.py +++ b/tests/test_api/test_methods/test_edit_message_reply_markup.py @@ -6,22 +6,6 @@ from tests.mocked_bot import MockedBot class TestEditMessageReplyMarkup: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageReplyMarkup, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageReplyMarkup( - chat_id=42, - inline_message_id="inline message id", - reply_markup=InlineKeyboardMarkup( - inline_keyboard=[ - [InlineKeyboardButton(text="button", callback_data="placeholder")] - ] - ), - ) - request: Request = bot.get_request() - assert request.method == "editMessageReplyMarkup" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageReplyMarkup, ok=True, result=True) @@ -34,6 +18,5 @@ class TestEditMessageReplyMarkup: ] ), ) - request: Request = bot.get_request() - assert request.method == "editMessageReplyMarkup" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_edit_message_text.py b/tests/test_api/test_methods/test_edit_message_text.py index 1cdfcfe0..c9e203a8 100644 --- a/tests/test_api/test_methods/test_edit_message_text.py +++ b/tests/test_api/test_methods/test_edit_message_text.py @@ -6,22 +6,11 @@ from tests.mocked_bot import MockedBot class TestEditMessageText: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(EditMessageText, ok=True, result=True) - - response: Union[Message, bool] = await EditMessageText( - chat_id=42, inline_message_id="inline message id", text="text" - ) - request: Request = bot.get_request() - assert request.method == "editMessageText" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(EditMessageText, ok=True, result=True) response: Union[Message, bool] = await bot.edit_message_text( chat_id=42, inline_message_id="inline message id", text="text" ) - request: Request = bot.get_request() - assert request.method == "editMessageText" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_export_chat_invite_link.py b/tests/test_api/test_methods/test_export_chat_invite_link.py index 7e3901a0..ba85def7 100644 --- a/tests/test_api/test_methods/test_export_chat_invite_link.py +++ b/tests/test_api/test_methods/test_export_chat_invite_link.py @@ -3,22 +3,11 @@ from tests.mocked_bot import MockedBot class TestExportChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - ExportChatInviteLink, ok=True, result="http://example.com" - ) - - response: str = await ExportChatInviteLink(chat_id=42) - request: Request = bot.get_request() - assert request.method == "exportChatInviteLink" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( ExportChatInviteLink, ok=True, result="http://example.com" ) response: str = await bot.export_chat_invite_link(chat_id=42) - request: Request = bot.get_request() - assert request.method == "exportChatInviteLink" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_forward_message.py b/tests/test_api/test_methods/test_forward_message.py index 955b6456..f04ec0f0 100644 --- a/tests/test_api/test_methods/test_forward_message.py +++ b/tests/test_api/test_methods/test_forward_message.py @@ -6,24 +6,6 @@ from tests.mocked_bot import MockedBot class TestForwardMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - ForwardMessage, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - chat=Chat(id=42, title="chat", type="private"), - text="text", - ), - ) - - response: Message = await ForwardMessage(chat_id=42, from_chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "forwardMessage" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( ForwardMessage, @@ -37,7 +19,5 @@ class TestForwardMessage: ) response: Message = await bot.forward_message(chat_id=42, from_chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "forwardMessage" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat.py b/tests/test_api/test_methods/test_get_chat.py index c5d4bfcd..902b03b3 100644 --- a/tests/test_api/test_methods/test_get_chat.py +++ b/tests/test_api/test_methods/test_get_chat.py @@ -4,22 +4,11 @@ from tests.mocked_bot import MockedBot class TestGetChat: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetChat, ok=True, result=Chat(id=-42, type="channel", title="chat") - ) - - response: Chat = await GetChat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChat" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetChat, ok=True, result=Chat(id=-42, type="channel", title="chat") ) response: Chat = await bot.get_chat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChat" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_administrators.py b/tests/test_api/test_methods/test_get_chat_administrators.py index 945b2e02..d8d57fc5 100644 --- a/tests/test_api/test_methods/test_get_chat_administrators.py +++ b/tests/test_api/test_methods/test_get_chat_administrators.py @@ -6,22 +6,6 @@ from tests.mocked_bot import MockedBot class TestGetChatAdministrators: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetChatAdministrators, - ok=True, - result=[ - ChatMemberOwner( - user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False - ) - ], - ) - - response: List[ChatMember] = await GetChatAdministrators(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatAdministrators" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetChatAdministrators, @@ -33,6 +17,5 @@ class TestGetChatAdministrators: ], ) response: List[ChatMember] = await bot.get_chat_administrators(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatAdministrators" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_member.py b/tests/test_api/test_methods/test_get_chat_member.py index e2fd2a75..f59a491b 100644 --- a/tests/test_api/test_methods/test_get_chat_member.py +++ b/tests/test_api/test_methods/test_get_chat_member.py @@ -4,20 +4,6 @@ from tests.mocked_bot import MockedBot class TestGetChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetChatMember, - ok=True, - result=ChatMemberOwner( - user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False - ), - ) - - response: ChatMember = await GetChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "getChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetChatMember, @@ -26,8 +12,6 @@ class TestGetChatMember: user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False ), ) - - response: ChatMember = await bot.get_chat_member(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "getChatMember" + response = await bot.get_chat_member(chat_id=-42, user_id=42) + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_member_count.py b/tests/test_api/test_methods/test_get_chat_member_count.py index 91a7c514..e1aea1ff 100644 --- a/tests/test_api/test_methods/test_get_chat_member_count.py +++ b/tests/test_api/test_methods/test_get_chat_member_count.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestGetChatMembersCount: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetChatMemberCount, ok=True, result=42) - - response: int = await GetChatMemberCount(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMemberCount" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMemberCount, ok=True, result=42) response: int = await bot.get_chat_member_count(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "getChatMemberCount" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_chat_menu_button.py b/tests/test_api/test_methods/test_get_chat_menu_button.py index 89181d3f..63a29eec 100644 --- a/tests/test_api/test_methods/test_get_chat_menu_button.py +++ b/tests/test_api/test_methods/test_get_chat_menu_button.py @@ -4,20 +4,9 @@ from tests.mocked_bot import MockedBot class TestGetChatMenuButton: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) - - response: MenuButton = await GetChatMenuButton() - request: Request = bot.get_request() - assert request.method == "getChatMenuButton" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) response: MenuButton = await bot.get_chat_menu_button() - request: Request = bot.get_request() - assert request.method == "getChatMenuButton" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py index fd3ea8ff..6db0f8f4 100644 --- a/tests/test_api/test_methods/test_get_custom_emoji_stickers.py +++ b/tests/test_api/test_methods/test_get_custom_emoji_stickers.py @@ -6,32 +6,6 @@ from tests.mocked_bot import MockedBot class TestGetCustomEmojiStickers: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetCustomEmojiStickers, - ok=True, - result=[ - Sticker( - file_id="file id", - width=42, - height=42, - is_animated=False, - is_video=False, - file_unique_id="file id", - custom_emoji_id="1", - type="custom_emoji", - ) - ], - ) - - response: List[Sticker] = await GetCustomEmojiStickers( - custom_emoji_ids=["1"], - ) - request: Request = bot.get_request() - assert request.method == "getCustomEmojiStickers" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetCustomEmojiStickers, @@ -53,7 +27,5 @@ class TestGetCustomEmojiStickers: response: List[Sticker] = await bot.get_custom_emoji_stickers( custom_emoji_ids=["1", "2"], ) - request: Request = bot.get_request() - assert request.method == "getCustomEmojiStickers" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_file.py b/tests/test_api/test_methods/test_get_file.py index eb95cd20..9c54ac38 100644 --- a/tests/test_api/test_methods/test_get_file.py +++ b/tests/test_api/test_methods/test_get_file.py @@ -4,22 +4,11 @@ from tests.mocked_bot import MockedBot class TestGetFile: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id") - ) - - response: File = await GetFile(file_id="file id") - request: Request = bot.get_request() - assert request.method == "getFile" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id") ) response: File = await bot.get_file(file_id="file id") - request: Request = bot.get_request() - assert request.method == "getFile" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py index c9a1455a..ab280abc 100644 --- a/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py +++ b/tests/test_api/test_methods/test_get_forum_topic_icon_stickers.py @@ -6,20 +6,9 @@ from tests.mocked_bot import MockedBot class TestGetForumTopicIconStickers: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) - - response: List[Sticker] = await GetForumTopicIconStickers() - request: Request = bot.get_request() - assert request.method == "getForumTopicIconStickers" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) response: List[Sticker] = await bot.get_forum_topic_icon_stickers() - request: Request = bot.get_request() - assert request.method == "getForumTopicIconStickers" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_game_high_scores.py b/tests/test_api/test_methods/test_get_game_high_scores.py index fe84d21d..9dfaf5f4 100644 --- a/tests/test_api/test_methods/test_get_game_high_scores.py +++ b/tests/test_api/test_methods/test_get_game_high_scores.py @@ -6,22 +6,6 @@ from tests.mocked_bot import MockedBot class TestGetGameHighScores: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetGameHighScores, - ok=True, - result=[ - GameHighScore( - position=1, user=User(id=42, is_bot=False, first_name="User"), score=42 - ) - ], - ) - - response: List[GameHighScore] = await GetGameHighScores(user_id=42) - request: Request = bot.get_request() - assert request.method == "getGameHighScores" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetGameHighScores, @@ -34,6 +18,5 @@ class TestGetGameHighScores: ) response: List[GameHighScore] = await bot.get_game_high_scores(user_id=42) - request: Request = bot.get_request() - assert request.method == "getGameHighScores" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_me.py b/tests/test_api/test_methods/test_get_me.py index 70f274ec..e84ccd1e 100644 --- a/tests/test_api/test_methods/test_get_me.py +++ b/tests/test_api/test_methods/test_get_me.py @@ -4,25 +4,12 @@ from tests.mocked_bot import MockedBot class TestGetMe: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User") - ) - - response: User = await GetMe() - request: Request = bot.get_request() - assert request.method == "getMe" - assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User") ) response: User = await bot.get_me() - request: Request = bot.get_request() - assert request.method == "getMe" - assert request.data == {} + request = bot.get_request() assert response == prepare_result.result async def test_me_property(self, bot: MockedBot): diff --git a/tests/test_api/test_methods/test_get_my_commands.py b/tests/test_api/test_methods/test_get_my_commands.py index c627ff11..41a7a7d0 100644 --- a/tests/test_api/test_methods/test_get_my_commands.py +++ b/tests/test_api/test_methods/test_get_my_commands.py @@ -6,18 +6,9 @@ from tests.mocked_bot import MockedBot class TestGetMyCommands: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetMyCommands, ok=True, result=None) - - response: List[BotCommand] = await GetMyCommands() - request: Request = bot.get_request() - assert request.method == "getMyCommands" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetMyCommands, ok=True, result=None) response: List[BotCommand] = await bot.get_my_commands() - request: Request = bot.get_request() - assert request.method == "getMyCommands" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py index 7e843686..bd18199c 100644 --- a/tests/test_api/test_methods/test_get_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_get_my_default_administrator_rights.py @@ -4,28 +4,6 @@ from tests.mocked_bot import MockedBot class TestGetMyDefaultAdministratorRights: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetMyDefaultAdministratorRights, - ok=True, - result=ChatAdministratorRights( - is_anonymous=False, - can_manage_chat=False, - can_delete_messages=False, - can_manage_video_chats=False, - can_restrict_members=False, - can_promote_members=False, - can_change_info=False, - can_invite_users=False, - ), - ) - - response: ChatAdministratorRights = await GetMyDefaultAdministratorRights() - request: Request = bot.get_request() - assert request.method == "getMyDefaultAdministratorRights" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDefaultAdministratorRights, @@ -43,7 +21,5 @@ class TestGetMyDefaultAdministratorRights: ) response: ChatAdministratorRights = await bot.get_my_default_administrator_rights() - request: Request = bot.get_request() - assert request.method == "getMyDefaultAdministratorRights" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_description.py b/tests/test_api/test_methods/test_get_my_description.py index 8a861ecb..32277b43 100644 --- a/tests/test_api/test_methods/test_get_my_description.py +++ b/tests/test_api/test_methods/test_get_my_description.py @@ -4,22 +4,11 @@ from tests.mocked_bot import MockedBot class TestGetMyDescription: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetMyDescription, ok=True, result=BotDescription(description="Test") - ) - - response: BotDescription = await GetMyDescription() - request: Request = bot.get_request() - assert request.method == "getMyDescription" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyDescription, ok=True, result=BotDescription(description="Test") ) response: BotDescription = await bot.get_my_description() - request: Request = bot.get_request() - assert request.method == "getMyDescription" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_my_short_description.py b/tests/test_api/test_methods/test_get_my_short_description.py index 5d362fdb..3b78be89 100644 --- a/tests/test_api/test_methods/test_get_my_short_description.py +++ b/tests/test_api/test_methods/test_get_my_short_description.py @@ -4,22 +4,11 @@ from tests.mocked_bot import MockedBot class TestGetMyShortDescription: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetMyShortDescription, ok=True, result=BotShortDescription(short_description="Test") - ) - - response: BotShortDescription = await GetMyShortDescription() - request: Request = bot.get_request() - assert request.method == "getMyShortDescription" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetMyShortDescription, ok=True, result=BotShortDescription(short_description="Test") ) response: BotShortDescription = await bot.get_my_short_description() - request: Request = bot.get_request() - assert request.method == "getMyShortDescription" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_sticker_set.py b/tests/test_api/test_methods/test_get_sticker_set.py index d8e7ca45..dd15e795 100644 --- a/tests/test_api/test_methods/test_get_sticker_set.py +++ b/tests/test_api/test_methods/test_get_sticker_set.py @@ -4,35 +4,6 @@ from tests.mocked_bot import MockedBot class TestGetStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetStickerSet, - ok=True, - result=StickerSet( - name="test", - title="test", - is_animated=False, - is_video=False, - stickers=[ - Sticker( - file_id="file if", - width=42, - height=42, - is_animated=False, - is_video=False, - file_unique_id="file id", - type="regular", - ) - ], - sticker_type="regular", - ), - ) - - response: StickerSet = await GetStickerSet(name="test") - request: Request = bot.get_request() - assert request.method == "getStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetStickerSet, @@ -58,6 +29,5 @@ class TestGetStickerSet: ) response: StickerSet = await bot.get_sticker_set(name="test") - request: Request = bot.get_request() - assert request.method == "getStickerSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_updates.py b/tests/test_api/test_methods/test_get_updates.py index b4cd11b9..ad86ceed 100644 --- a/tests/test_api/test_methods/test_get_updates.py +++ b/tests/test_api/test_methods/test_get_updates.py @@ -6,18 +6,9 @@ from tests.mocked_bot import MockedBot class TestGetUpdates: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(GetUpdates, ok=True, result=[Update(update_id=42)]) - - response: List[Update] = await GetUpdates() - request: Request = bot.get_request() - assert request.method == "getUpdates" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(GetUpdates, ok=True, result=[Update(update_id=42)]) response: List[Update] = await bot.get_updates() - request: Request = bot.get_request() - assert request.method == "getUpdates" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_user_profile_photos.py b/tests/test_api/test_methods/test_get_user_profile_photos.py index cbfd0dbc..ed5329cc 100644 --- a/tests/test_api/test_methods/test_get_user_profile_photos.py +++ b/tests/test_api/test_methods/test_get_user_profile_photos.py @@ -4,23 +4,6 @@ from tests.mocked_bot import MockedBot class TestGetUserProfilePhotos: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetUserProfilePhotos, - ok=True, - result=UserProfilePhotos( - total_count=1, - photos=[ - [PhotoSize(file_id="file_id", width=42, height=42, file_unique_id="file id")] - ], - ), - ) - - response: UserProfilePhotos = await GetUserProfilePhotos(user_id=42) - request: Request = bot.get_request() - assert request.method == "getUserProfilePhotos" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetUserProfilePhotos, @@ -34,6 +17,5 @@ class TestGetUserProfilePhotos: ) response: UserProfilePhotos = await bot.get_user_profile_photos(user_id=42) - request: Request = bot.get_request() - assert request.method == "getUserProfilePhotos" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_get_webhook_info.py b/tests/test_api/test_methods/test_get_webhook_info.py index 06d11dbc..d6723411 100644 --- a/tests/test_api/test_methods/test_get_webhook_info.py +++ b/tests/test_api/test_methods/test_get_webhook_info.py @@ -4,20 +4,6 @@ from tests.mocked_bot import MockedBot class TestGetWebhookInfo: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - GetWebhookInfo, - ok=True, - result=WebhookInfo( - url="https://example.com", has_custom_certificate=False, pending_update_count=0 - ), - ) - - response: WebhookInfo = await GetWebhookInfo() - request: Request = bot.get_request() - assert request.method == "getWebhookInfo" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( GetWebhookInfo, @@ -28,6 +14,5 @@ class TestGetWebhookInfo: ) response: WebhookInfo = await bot.get_webhook_info() - request: Request = bot.get_request() - assert request.method == "getWebhookInfo" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_hide_general_forum_topic.py b/tests/test_api/test_methods/test_hide_general_forum_topic.py index 51e6684b..d142ae5e 100644 --- a/tests/test_api/test_methods/test_hide_general_forum_topic.py +++ b/tests/test_api/test_methods/test_hide_general_forum_topic.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestHideGeneralForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) - - response: bool = await bot(HideGeneralForumTopic(chat_id=42)) - request: Request = bot.get_request() - assert request.method == "hideGeneralForumTopic" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(HideGeneralForumTopic, ok=True, result=True) response: bool = await bot.hide_general_forum_topic(chat_id=42) - request: Request = bot.get_request() - assert request.method == "hideGeneralForumTopic" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_leave_chat.py b/tests/test_api/test_methods/test_leave_chat.py index db771a7d..e65902ca 100644 --- a/tests/test_api/test_methods/test_leave_chat.py +++ b/tests/test_api/test_methods/test_leave_chat.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestLeaveChat: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(LeaveChat, ok=True, result=True) - - response: bool = await LeaveChat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "leaveChat" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(LeaveChat, ok=True, result=True) response: bool = await bot.leave_chat(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "leaveChat" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_log_out.py b/tests/test_api/test_methods/test_log_out.py index fd09d116..bb066579 100644 --- a/tests/test_api/test_methods/test_log_out.py +++ b/tests/test_api/test_methods/test_log_out.py @@ -3,20 +3,9 @@ from tests.mocked_bot import MockedBot class TestLogOut: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(LogOut, ok=True, result=True) - - response: bool = await LogOut() - request: Request = bot.get_request() - assert request.method == "logOut" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(LogOut, ok=True, result=True) response: bool = await bot.log_out() - request: Request = bot.get_request() - assert request.method == "logOut" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_pin_chat_message.py b/tests/test_api/test_methods/test_pin_chat_message.py index f74cd4cd..5f8a0eba 100644 --- a/tests/test_api/test_methods/test_pin_chat_message.py +++ b/tests/test_api/test_methods/test_pin_chat_message.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestPinChatMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(PinChatMessage, ok=True, result=True) - - response: bool = await PinChatMessage(chat_id=-42, message_id=42) - request: Request = bot.get_request() - assert request.method == "pinChatMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(PinChatMessage, ok=True, result=True) response: bool = await bot.pin_chat_message(chat_id=-42, message_id=42) - request: Request = bot.get_request() - assert request.method == "pinChatMessage" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_promote_chat_member.py b/tests/test_api/test_methods/test_promote_chat_member.py index 6721eb1f..8fa4a08f 100644 --- a/tests/test_api/test_methods/test_promote_chat_member.py +++ b/tests/test_api/test_methods/test_promote_chat_member.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestPromoteChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(PromoteChatMember, ok=True, result=True) - - response: bool = await PromoteChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "promoteChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(PromoteChatMember, ok=True, result=True) response: bool = await bot.promote_chat_member(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "promoteChatMember" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_reopen_forum_topic.py b/tests/test_api/test_methods/test_reopen_forum_topic.py index 2c4a33b2..ff4c9b66 100644 --- a/tests/test_api/test_methods/test_reopen_forum_topic.py +++ b/tests/test_api/test_methods/test_reopen_forum_topic.py @@ -3,18 +3,6 @@ from tests.mocked_bot import MockedBot class TestReopenForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) - - response: bool = await ReopenForumTopic( - chat_id=42, - message_thread_id=42, - ) - request: Request = bot.get_request() - assert request.method == "reopenForumTopic" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) @@ -22,7 +10,5 @@ class TestReopenForumTopic: chat_id=42, message_thread_id=42, ) - request: Request = bot.get_request() - assert request.method == "reopenForumTopic" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_reopen_general_forum_topic.py b/tests/test_api/test_methods/test_reopen_general_forum_topic.py index af1abf55..6eceb7d7 100644 --- a/tests/test_api/test_methods/test_reopen_general_forum_topic.py +++ b/tests/test_api/test_methods/test_reopen_general_forum_topic.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestReopenGeneralForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) - - response: bool = await bot(ReopenGeneralForumTopic(chat_id=42)) - request: Request = bot.get_request() - assert request.method == "reopenGeneralForumTopic" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(ReopenGeneralForumTopic, ok=True, result=True) response: bool = await bot.reopen_general_forum_topic(chat_id=42) - request: Request = bot.get_request() - assert request.method == "reopenGeneralForumTopic" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_restrict_chat_member.py b/tests/test_api/test_methods/test_restrict_chat_member.py index ca9ee4c8..716fa23d 100644 --- a/tests/test_api/test_methods/test_restrict_chat_member.py +++ b/tests/test_api/test_methods/test_restrict_chat_member.py @@ -4,22 +4,11 @@ from tests.mocked_bot import MockedBot class TestRestrictChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(RestrictChatMember, ok=True, result=True) - - response: bool = await RestrictChatMember( - chat_id=-42, user_id=42, permissions=ChatPermissions() - ) - request: Request = bot.get_request() - assert request.method == "restrictChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(RestrictChatMember, ok=True, result=True) response: bool = await bot.restrict_chat_member( chat_id=-42, user_id=42, permissions=ChatPermissions() ) - request: Request = bot.get_request() - assert request.method == "restrictChatMember" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_revoke_chat_invite_link.py b/tests/test_api/test_methods/test_revoke_chat_invite_link.py index 84ca46b5..9d8c26b3 100644 --- a/tests/test_api/test_methods/test_revoke_chat_invite_link.py +++ b/tests/test_api/test_methods/test_revoke_chat_invite_link.py @@ -4,27 +4,6 @@ from tests.mocked_bot import MockedBot class TestRevokeChatInviteLink: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - RevokeChatInviteLink, - ok=True, - result=ChatInviteLink( - invite_link="https://t.me/username", - creator=User(id=42, is_bot=False, first_name="User"), - is_primary=False, - is_revoked=True, - creates_join_request=False, - ), - ) - - response: ChatInviteLink = await RevokeChatInviteLink( - chat_id=-42, - invite_link="https://t.me/username", - ) - request: Request = bot.get_request() - assert request.method == "revokeChatInviteLink" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( RevokeChatInviteLink, @@ -42,6 +21,5 @@ class TestRevokeChatInviteLink: chat_id=-42, invite_link="https://t.me/username", ) - request: Request = bot.get_request() - assert request.method == "revokeChatInviteLink" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_animation.py b/tests/test_api/test_methods/test_send_animation.py index 5ec7f52a..b9f5508f 100644 --- a/tests/test_api/test_methods/test_send_animation.py +++ b/tests/test_api/test_methods/test_send_animation.py @@ -6,25 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendAnimation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendAnimation, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - animation=Animation( - file_id="file id", width=42, height=42, duration=0, file_unique_id="file id" - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendAnimation(chat_id=42, animation="file id") - request: Request = bot.get_request() - assert request.method == "sendAnimation" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendAnimation, @@ -40,6 +21,5 @@ class TestSendAnimation: ) response: Message = await bot.send_animation(chat_id=42, animation="file id") - request: Request = bot.get_request() - assert request.method == "sendAnimation" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_audio.py b/tests/test_api/test_methods/test_send_audio.py index 95621f10..b5b2a32b 100644 --- a/tests/test_api/test_methods/test_send_audio.py +++ b/tests/test_api/test_methods/test_send_audio.py @@ -6,23 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendAudio: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendAudio, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - audio=Audio(file_id="file id", duration=42, file_unique_id="file id"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendAudio(chat_id=42, audio="file id") - request: Request = bot.get_request() - assert request.method == "sendAudio" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendAudio, @@ -36,6 +19,5 @@ class TestSendAudio: ) response: Message = await bot.send_audio(chat_id=42, audio="file id") - request: Request = bot.get_request() - assert request.method == "sendAudio" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_chat_action.py b/tests/test_api/test_methods/test_send_chat_action.py index a37568fe..3c2d8ecb 100644 --- a/tests/test_api/test_methods/test_send_chat_action.py +++ b/tests/test_api/test_methods/test_send_chat_action.py @@ -4,27 +4,9 @@ from tests.mocked_bot import MockedBot class TestSendChatAction: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True) - - response: bool = await SendChatAction(chat_id=42, action="typing") - request: Request = bot.get_request() - assert request.method == "sendChatAction" - assert response == prepare_result.result - - async def test_bot_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True) - - response: bool = await bot.send_chat_action(chat_id=42, action="typing") - request: Request = bot.get_request() - assert request.method == "sendChatAction" - assert response == prepare_result.result - async def test_chat_action_class(self, bot: MockedBot): prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True) response: bool = await bot.send_chat_action(chat_id=42, action=ChatAction.TYPING) - request: Request = bot.get_request() - assert request.method == "sendChatAction" - assert request.data["action"] == "typing" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_contact.py b/tests/test_api/test_methods/test_send_contact.py index 97f6981c..83c6f3ae 100644 --- a/tests/test_api/test_methods/test_send_contact.py +++ b/tests/test_api/test_methods/test_send_contact.py @@ -6,23 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendContact: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendContact, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - contact=Contact(phone_number="911", first_name="911"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendContact(chat_id=42, phone_number="911", first_name="911") - request: Request = bot.get_request() - assert request.method == "sendContact" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendContact, @@ -38,6 +21,5 @@ class TestSendContact: response: Message = await bot.send_contact( chat_id=42, phone_number="911", first_name="911" ) - request: Request = bot.get_request() - assert request.method == "sendContact" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_dice.py b/tests/test_api/test_methods/test_send_dice.py index 3dea06c4..35196ee6 100644 --- a/tests/test_api/test_methods/test_send_dice.py +++ b/tests/test_api/test_methods/test_send_dice.py @@ -4,18 +4,9 @@ from tests.mocked_bot import MockedBot class TestSendDice: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SendDice, ok=True, result=None) - - response: Message = await SendDice(chat_id=42) - request: Request = bot.get_request() - assert request.method == "sendDice" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SendDice, ok=True, result=None) response: Message = await bot.send_dice(chat_id=42) - request: Request = bot.get_request() - assert request.method == "sendDice" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_document.py b/tests/test_api/test_methods/test_send_document.py index cf758815..54c0d712 100644 --- a/tests/test_api/test_methods/test_send_document.py +++ b/tests/test_api/test_methods/test_send_document.py @@ -6,23 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendDocument: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendDocument, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - document=Document(file_id="file id", file_unique_id="file id"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendDocument(chat_id=42, document="file id") - request: Request = bot.get_request() - assert request.method == "sendDocument" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendDocument, @@ -36,6 +19,5 @@ class TestSendDocument: ) response: Message = await bot.send_document(chat_id=42, document="file id") - request: Request = bot.get_request() - assert request.method == "sendDocument" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_game.py b/tests/test_api/test_methods/test_send_game.py index 57ab645f..a0d1bb84 100644 --- a/tests/test_api/test_methods/test_send_game.py +++ b/tests/test_api/test_methods/test_send_game.py @@ -6,29 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendGame: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendGame, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - game=Game( - title="title", - description="description", - photo=[ - PhotoSize(file_id="file id", width=42, height=42, file_unique_id="file id") - ], - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendGame(chat_id=42, game_short_name="game") - request: Request = bot.get_request() - assert request.method == "sendGame" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendGame, @@ -48,6 +25,5 @@ class TestSendGame: ) response: Message = await bot.send_game(chat_id=42, game_short_name="game") - request: Request = bot.get_request() - assert request.method == "sendGame" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_invoice.py b/tests/test_api/test_methods/test_send_invoice.py index e88d9acf..650c4a19 100644 --- a/tests/test_api/test_methods/test_send_invoice.py +++ b/tests/test_api/test_methods/test_send_invoice.py @@ -6,38 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendInvoice: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendInvoice, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - invoice=Invoice( - title="test", - description="test", - start_parameter="brilliant", - currency="BTC", - total_amount=1, - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendInvoice( - chat_id=42, - title="test", - description="test", - payload="payload", - provider_token="TEST:token", - start_parameter="brilliant", - currency="BTC", - prices=[LabeledPrice(amount=1, label="test")], - ) - request: Request = bot.get_request() - assert request.method == "sendInvoice" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendInvoice, @@ -66,6 +34,5 @@ class TestSendInvoice: currency="BTC", prices=[LabeledPrice(amount=1, label="test")], ) - request: Request = bot.get_request() - assert request.method == "sendInvoice" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_location.py b/tests/test_api/test_methods/test_send_location.py index 7429f0b8..b662106d 100644 --- a/tests/test_api/test_methods/test_send_location.py +++ b/tests/test_api/test_methods/test_send_location.py @@ -6,23 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendLocation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendLocation, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - location=Location(longitude=3.14, latitude=3.14), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendLocation(chat_id=42, latitude=3.14, longitude=3.14) - request: Request = bot.get_request() - assert request.method == "sendLocation" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendLocation, @@ -36,6 +19,5 @@ class TestSendLocation: ) response: Message = await bot.send_location(chat_id=42, latitude=3.14, longitude=3.14) - request: Request = bot.get_request() - assert request.method == "sendLocation" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_media_group.py b/tests/test_api/test_methods/test_send_media_group.py index 149937d4..759184f7 100644 --- a/tests/test_api/test_methods/test_send_media_group.py +++ b/tests/test_api/test_methods/test_send_media_group.py @@ -15,47 +15,6 @@ from tests.mocked_bot import MockedBot class TestSendMediaGroup: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendMediaGroup, - ok=True, - result=[ - Message( - message_id=42, - date=datetime.datetime.now(), - photo=[ - PhotoSize(file_id="file id", width=42, height=42, file_unique_id="file id") - ], - media_group_id="media group", - chat=Chat(id=42, type="private"), - ), - Message( - message_id=43, - date=datetime.datetime.now(), - video=Video( - file_id="file id", - width=42, - height=42, - duration=0, - file_unique_id="file id", - ), - media_group_id="media group", - chat=Chat(id=42, type="private"), - ), - ], - ) - - response: List[Message] = await SendMediaGroup( - chat_id=42, - media=[ - InputMediaPhoto(media="file id"), - InputMediaVideo(media=BufferedInputFile(b"", "video.mp4")), - ], - ) - request: Request = bot.get_request() - assert request.method == "sendMediaGroup" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendMediaGroup, @@ -93,6 +52,5 @@ class TestSendMediaGroup: InputMediaVideo(media=BufferedInputFile(b"", "video.mp4")), ], ) - request: Request = bot.get_request() - assert request.method == "sendMediaGroup" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_message.py b/tests/test_api/test_methods/test_send_message.py index 5ebe604a..0210d73f 100644 --- a/tests/test_api/test_methods/test_send_message.py +++ b/tests/test_api/test_methods/test_send_message.py @@ -6,23 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendMessage, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - text="test", - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendMessage(chat_id=42, text="test") - request: Request = bot.get_request() - assert request.method == "sendMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendMessage, @@ -36,8 +19,7 @@ class TestSendMessage: ) response: Message = await bot.send_message(chat_id=42, text="test") - request: Request = bot.get_request() - assert request.method == "sendMessage" + request = bot.get_request() assert response == prepare_result.result async def test_force_reply(self): diff --git a/tests/test_api/test_methods/test_send_photo.py b/tests/test_api/test_methods/test_send_photo.py index 0e955dd1..528a04a1 100644 --- a/tests/test_api/test_methods/test_send_photo.py +++ b/tests/test_api/test_methods/test_send_photo.py @@ -6,25 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendPhoto: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendPhoto, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - photo=[ - PhotoSize(file_id="file id", width=42, height=42, file_unique_id="file id") - ], - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendPhoto(chat_id=42, photo="file id") - request: Request = bot.get_request() - assert request.method == "sendPhoto" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendPhoto, @@ -40,6 +21,5 @@ class TestSendPhoto: ) response: Message = await bot.send_photo(chat_id=42, photo="file id") - request: Request = bot.get_request() - assert request.method == "sendPhoto" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_poll.py b/tests/test_api/test_methods/test_send_poll.py index 9f67af14..4bc791fc 100644 --- a/tests/test_api/test_methods/test_send_poll.py +++ b/tests/test_api/test_methods/test_send_poll.py @@ -6,38 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendPoll: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendPoll, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - poll=Poll( - id="QA", - question="Q", - options=[ - PollOption(text="A", voter_count=0), - PollOption(text="B", voter_count=0), - ], - is_closed=False, - is_anonymous=False, - type="quiz", - allows_multiple_answers=False, - total_voter_count=0, - correct_option_id=0, - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendPoll( - chat_id=42, question="Q?", options=["A", "B"], correct_option_id=0, type="quiz" - ) - request: Request = bot.get_request() - assert request.method == "sendPoll" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendPoll, @@ -66,6 +34,5 @@ class TestSendPoll: response: Message = await bot.send_poll( chat_id=42, question="Q?", options=["A", "B"], correct_option_id=0, type="quiz" ) - request: Request = bot.get_request() - assert request.method == "sendPoll" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_sticker.py b/tests/test_api/test_methods/test_send_sticker.py index b19313fc..af847e08 100644 --- a/tests/test_api/test_methods/test_send_sticker.py +++ b/tests/test_api/test_methods/test_send_sticker.py @@ -6,31 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendSticker: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendSticker, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - sticker=Sticker( - file_id="file id", - width=42, - height=42, - is_animated=False, - is_video=False, - file_unique_id="file id", - type="regular", - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendSticker(chat_id=42, sticker="file id") - request: Request = bot.get_request() - assert request.method == "sendSticker" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendSticker, @@ -52,6 +27,5 @@ class TestSendSticker: ) response: Message = await bot.send_sticker(chat_id=42, sticker="file id") - request: Request = bot.get_request() - assert request.method == "sendSticker" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_venue.py b/tests/test_api/test_methods/test_send_venue.py index 6a529fcb..4234c7a5 100644 --- a/tests/test_api/test_methods/test_send_venue.py +++ b/tests/test_api/test_methods/test_send_venue.py @@ -6,35 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendVenue: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVenue, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - venue=Venue( - location=Location(latitude=3.14, longitude=3.14), - title="Cupboard Under the Stairs", - address="Under the stairs, 4 Privet Drive, " - "Little Whinging, Surrey, England, Great Britain", - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVenue( - chat_id=42, - latitude=3.14, - longitude=3.14, - title="Cupboard Under the Stairs", - address="Under the stairs, 4 Privet Drive, " - "Little Whinging, Surrey, England, Great Britain", - ) - request: Request = bot.get_request() - assert request.method == "sendVenue" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVenue, @@ -60,6 +31,5 @@ class TestSendVenue: address="Under the stairs, 4 Privet Drive, " "Little Whinging, Surrey, England, Great Britain", ) - request: Request = bot.get_request() - assert request.method == "sendVenue" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_video.py b/tests/test_api/test_methods/test_send_video.py index 86e3c413..16572b3e 100644 --- a/tests/test_api/test_methods/test_send_video.py +++ b/tests/test_api/test_methods/test_send_video.py @@ -6,25 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendVideo: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVideo, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - video=Video( - file_id="file id", width=42, height=42, duration=0, file_unique_id="file id" - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVideo(chat_id=42, video="file id") - request: Request = bot.get_request() - assert request.method == "sendVideo" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVideo, @@ -40,6 +21,5 @@ class TestSendVideo: ) response: Message = await bot.send_video(chat_id=42, video="file id") - request: Request = bot.get_request() - assert request.method == "sendVideo" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_video_note.py b/tests/test_api/test_methods/test_send_video_note.py index bec233c7..3da752f5 100644 --- a/tests/test_api/test_methods/test_send_video_note.py +++ b/tests/test_api/test_methods/test_send_video_note.py @@ -6,29 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendVideoNote: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVideoNote, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - video_note=VideoNote( - file_id="file id", length=0, duration=0, file_unique_id="file id" - ), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVideoNote( - chat_id=42, - video_note="file id", - thumbnail=BufferedInputFile(b"", "file.png"), - ) - request: Request = bot.get_request() - assert request.method == "sendVideoNote" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVideoNote, @@ -48,6 +25,5 @@ class TestSendVideoNote: video_note="file id", thumbnail=BufferedInputFile(b"", "file.png"), ) - request: Request = bot.get_request() - assert request.method == "sendVideoNote" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_send_voice.py b/tests/test_api/test_methods/test_send_voice.py index 917a645b..2c55b07d 100644 --- a/tests/test_api/test_methods/test_send_voice.py +++ b/tests/test_api/test_methods/test_send_voice.py @@ -6,23 +6,6 @@ from tests.mocked_bot import MockedBot class TestSendVoice: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SendVoice, - ok=True, - result=Message( - message_id=42, - date=datetime.datetime.now(), - voice=Voice(file_id="file id", duration=0, file_unique_id="file id"), - chat=Chat(id=42, type="private"), - ), - ) - - response: Message = await SendVoice(chat_id=42, voice="file id") - request: Request = bot.get_request() - assert request.method == "sendVoice" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SendVoice, @@ -36,6 +19,5 @@ class TestSendVoice: ) response: Message = await bot.send_voice(chat_id=42, voice="file id") - request: Request = bot.get_request() - assert request.method == "sendVoice" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py index 7581e37d..7a759618 100644 --- a/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py +++ b/tests/test_api/test_methods/test_set_chat_administrator_custom_title.py @@ -3,22 +3,11 @@ from tests.mocked_bot import MockedBot class TestSetChatTitle: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatAdministratorCustomTitle, ok=True, result=True) - - response: bool = await SetChatAdministratorCustomTitle( - chat_id=-42, user_id=42, custom_title="test chat" - ) - request: Request = bot.get_request() - assert request.method == "setChatAdministratorCustomTitle" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatAdministratorCustomTitle, ok=True, result=True) response: bool = await bot.set_chat_administrator_custom_title( chat_id=-42, user_id=42, custom_title="test chat" ) - request: Request = bot.get_request() - assert request.method == "setChatAdministratorCustomTitle" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_description.py b/tests/test_api/test_methods/test_set_chat_description.py index 0a11d7e3..eb9885d2 100644 --- a/tests/test_api/test_methods/test_set_chat_description.py +++ b/tests/test_api/test_methods/test_set_chat_description.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetChatDescription: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True) - - response: bool = await SetChatDescription(chat_id=-42, description="awesome chat") - request: Request = bot.get_request() - assert request.method == "setChatDescription" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True) response: bool = await bot.set_chat_description(chat_id=-42, description="awesome chat") - request: Request = bot.get_request() - assert request.method == "setChatDescription" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_menu_button.py b/tests/test_api/test_methods/test_set_chat_menu_button.py index 74923a5f..1cac7081 100644 --- a/tests/test_api/test_methods/test_set_chat_menu_button.py +++ b/tests/test_api/test_methods/test_set_chat_menu_button.py @@ -3,20 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetChatMenuButton: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) - - response: bool = await SetChatMenuButton() - request: Request = bot.get_request() - assert request.method == "setChatMenuButton" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) response: bool = await bot.set_chat_menu_button() - request: Request = bot.get_request() - assert request.method == "setChatMenuButton" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_permissions.py b/tests/test_api/test_methods/test_set_chat_permissions.py index 73f488c1..1dcd64b9 100644 --- a/tests/test_api/test_methods/test_set_chat_permissions.py +++ b/tests/test_api/test_methods/test_set_chat_permissions.py @@ -4,22 +4,11 @@ from tests.mocked_bot import MockedBot class TestSetChatPermissions: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatPermissions, ok=True, result=True) - - response: bool = await SetChatPermissions( - chat_id=-42, permissions=ChatPermissions(can_send_messages=False) - ) - request: Request = bot.get_request() - assert request.method == "setChatPermissions" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatPermissions, ok=True, result=True) response: bool = await bot.set_chat_permissions( chat_id=-42, permissions=ChatPermissions(can_send_messages=False) ) - request: Request = bot.get_request() - assert request.method == "setChatPermissions" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_photo.py b/tests/test_api/test_methods/test_set_chat_photo.py index e17126f6..68e0bbbc 100644 --- a/tests/test_api/test_methods/test_set_chat_photo.py +++ b/tests/test_api/test_methods/test_set_chat_photo.py @@ -4,22 +4,11 @@ from tests.mocked_bot import MockedBot class TestSetChatPhoto: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatPhoto, ok=True, result=True) - - response: bool = await SetChatPhoto( - chat_id=-42, photo=BufferedInputFile(b"", filename="file.png") - ) - request: Request = bot.get_request() - assert request.method == "setChatPhoto" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatPhoto, ok=True, result=True) response: bool = await bot.set_chat_photo( chat_id=-42, photo=BufferedInputFile(b"", filename="file.png") ) - request: Request = bot.get_request() - assert request.method == "setChatPhoto" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_sticker_set.py b/tests/test_api/test_methods/test_set_chat_sticker_set.py index cba3ba1f..c87be0cd 100644 --- a/tests/test_api/test_methods/test_set_chat_sticker_set.py +++ b/tests/test_api/test_methods/test_set_chat_sticker_set.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetChatStickerSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatStickerSet, ok=True, result=True) - - response: bool = await SetChatStickerSet(chat_id=-42, sticker_set_name="test") - request: Request = bot.get_request() - assert request.method == "setChatStickerSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatStickerSet, ok=True, result=True) response: bool = await bot.set_chat_sticker_set(chat_id=-42, sticker_set_name="test") - request: Request = bot.get_request() - assert request.method == "setChatStickerSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_chat_title.py b/tests/test_api/test_methods/test_set_chat_title.py index 03f37b15..e45d24f2 100644 --- a/tests/test_api/test_methods/test_set_chat_title.py +++ b/tests/test_api/test_methods/test_set_chat_title.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetChatTitle: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True) - - response: bool = await SetChatTitle(chat_id=-42, title="test chat") - request: Request = bot.get_request() - assert request.method == "setChatTitle" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True) response: bool = await bot.set_chat_title(chat_id=-42, title="test chat") - request: Request = bot.get_request() - assert request.method == "setChatTitle" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py b/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py index 20ad08c9..75d056df 100644 --- a/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py +++ b/tests/test_api/test_methods/test_set_custom_emoji_sticker_set_thumbnail.py @@ -3,18 +3,6 @@ from tests.mocked_bot import MockedBot class TestSetCustomEmojiStickerSetThumbnail: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - SetCustomEmojiStickerSetThumbnail, ok=True, result=True - ) - - response: bool = await SetCustomEmojiStickerSetThumbnail( - name="test", custom_emoji_id="custom id" - ) - request: Request = bot.get_request() - assert request.method == "setCustomEmojiStickerSetThumbnail" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( SetCustomEmojiStickerSetThumbnail, ok=True, result=True @@ -23,6 +11,5 @@ class TestSetCustomEmojiStickerSetThumbnail: response: bool = await bot.set_custom_emoji_sticker_set_thumbnail( name="test", custom_emoji_id="custom id" ) - request: Request = bot.get_request() - assert request.method == "setCustomEmojiStickerSetThumbnail" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_game_score.py b/tests/test_api/test_methods/test_set_game_score.py index 4e739a89..6da8e123 100644 --- a/tests/test_api/test_methods/test_set_game_score.py +++ b/tests/test_api/test_methods/test_set_game_score.py @@ -6,22 +6,11 @@ from tests.mocked_bot import MockedBot class TestSetGameScore: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetGameScore, ok=True, result=True) - - response: Union[Message, bool] = await SetGameScore( - user_id=42, score=100500, inline_message_id="inline message" - ) - request: Request = bot.get_request() - assert request.method == "setGameScore" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetGameScore, ok=True, result=True) response: Union[Message, bool] = await bot.set_game_score( user_id=42, score=100500, inline_message_id="inline message" ) - request: Request = bot.get_request() - assert request.method == "setGameScore" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_commands.py b/tests/test_api/test_methods/test_set_my_commands.py index 35f62e0c..16066b73 100644 --- a/tests/test_api/test_methods/test_set_my_commands.py +++ b/tests/test_api/test_methods/test_set_my_commands.py @@ -4,23 +4,11 @@ from tests.mocked_bot import MockedBot class TestSetMyCommands: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetMyCommands, ok=True, result=None) - - response: bool = await SetMyCommands( - commands=[BotCommand(command="command", description="Bot command")], - ) - request: Request = bot.get_request() - assert request.method == "setMyCommands" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyCommands, ok=True, result=None) response: bool = await bot.set_my_commands( commands=[], ) - request: Request = bot.get_request() - assert request.method == "setMyCommands" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py index eb24a531..ac8e5d42 100644 --- a/tests/test_api/test_methods/test_set_my_default_administrator_rights.py +++ b/tests/test_api/test_methods/test_set_my_default_administrator_rights.py @@ -3,20 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetMyDefaultAdministratorRights: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) - - response: bool = await SetMyDefaultAdministratorRights() - request: Request = bot.get_request() - assert request.method == "setMyDefaultAdministratorRights" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) response: bool = await bot.set_my_default_administrator_rights() - request: Request = bot.get_request() - assert request.method == "setMyDefaultAdministratorRights" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_description.py b/tests/test_api/test_methods/test_set_my_description.py index 843b66d2..05e9bd7c 100644 --- a/tests/test_api/test_methods/test_set_my_description.py +++ b/tests/test_api/test_methods/test_set_my_description.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetMyDescription: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetMyDescription, ok=True, result=True) - - response: bool = await SetMyDescription(description="Test") - request: Request = bot.get_request() - assert request.method == "setMyDescription" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyDescription, ok=True, result=True) response: bool = await bot.set_my_description(description="Test") - request: Request = bot.get_request() - assert request.method == "setMyDescription" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_my_short_description.py b/tests/test_api/test_methods/test_set_my_short_description.py index c985dee2..9b40721d 100644 --- a/tests/test_api/test_methods/test_set_my_short_description.py +++ b/tests/test_api/test_methods/test_set_my_short_description.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetMyShortDescription: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetMyShortDescription, ok=True, result=True) - - response: bool = await SetMyShortDescription(short_description="Test") - request: Request = bot.get_request() - assert request.method == "setMyShortDescription" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetMyShortDescription, ok=True, result=True) response: bool = await bot.set_my_short_description(short_description="Test") - request: Request = bot.get_request() - assert request.method == "setMyShortDescription" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_passport_data_errors.py b/tests/test_api/test_methods/test_set_passport_data_errors.py index cdc77778..ecc2425b 100644 --- a/tests/test_api/test_methods/test_set_passport_data_errors.py +++ b/tests/test_api/test_methods/test_set_passport_data_errors.py @@ -4,20 +4,11 @@ from tests.mocked_bot import MockedBot class TestSetPassportDataErrors: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetPassportDataErrors, ok=True, result=True) - - response: bool = await SetPassportDataErrors(user_id=42, errors=[PassportElementError()]) - request: Request = bot.get_request() - assert request.method == "setPassportDataErrors" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetPassportDataErrors, ok=True, result=True) response: bool = await bot.set_passport_data_errors( user_id=42, errors=[PassportElementError()] ) - request: Request = bot.get_request() - assert request.method == "setPassportDataErrors" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_emoji_list.py b/tests/test_api/test_methods/test_set_sticker_emoji_list.py index b5ae829c..76984264 100644 --- a/tests/test_api/test_methods/test_set_sticker_emoji_list.py +++ b/tests/test_api/test_methods/test_set_sticker_emoji_list.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetStickerEmojiList: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerEmojiList, ok=True, result=True) - - response: bool = await SetStickerEmojiList(sticker="sticker id", emoji_list=["X"]) - request: Request = bot.get_request() - assert request.method == "setStickerEmojiList" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetStickerEmojiList, ok=True, result=True) response: bool = await bot.set_sticker_emoji_list(sticker="sticker id", emoji_list=["X"]) - request: Request = bot.get_request() - assert request.method == "setStickerEmojiList" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_keywords.py b/tests/test_api/test_methods/test_set_sticker_keywords.py index 7cea6cae..ff9b31e4 100644 --- a/tests/test_api/test_methods/test_set_sticker_keywords.py +++ b/tests/test_api/test_methods/test_set_sticker_keywords.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetStickerKeywords: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerKeywords, ok=True, result=True) - - response: bool = await SetStickerKeywords(sticker="sticker id", keywords=["X"]) - request: Request = bot.get_request() - assert request.method == "setStickerKeywords" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetStickerKeywords, ok=True, result=True) response: bool = await bot.set_sticker_keywords(sticker="sticker id", keywords=["X"]) - request: Request = bot.get_request() - assert request.method == "setStickerKeywords" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_mask_position.py b/tests/test_api/test_methods/test_set_sticker_mask_position.py index dec92d19..fa041461 100644 --- a/tests/test_api/test_methods/test_set_sticker_mask_position.py +++ b/tests/test_api/test_methods/test_set_sticker_mask_position.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetStickerEmojiList: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerMaskPosition, ok=True, result=True) - - response: bool = await SetStickerMaskPosition(sticker="sticker id") - request: Request = bot.get_request() - assert request.method == "setStickerMaskPosition" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetStickerMaskPosition, ok=True, result=True) response: bool = await bot.set_sticker_mask_position(sticker="sticker id") - request: Request = bot.get_request() - assert request.method == "setStickerMaskPosition" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_position_in_set.py b/tests/test_api/test_methods/test_set_sticker_position_in_set.py index c67c7be5..ce06652c 100644 --- a/tests/test_api/test_methods/test_set_sticker_position_in_set.py +++ b/tests/test_api/test_methods/test_set_sticker_position_in_set.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetStickerPositionInSet: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True) - - response: bool = await SetStickerPositionInSet(sticker="sticker", position=42) - request: Request = bot.get_request() - assert request.method == "setStickerPositionInSet" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True) response: bool = await bot.set_sticker_position_in_set(sticker="sticker", position=42) - request: Request = bot.get_request() - assert request.method == "setStickerPositionInSet" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py b/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py index 41795be6..6c33f862 100644 --- a/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py +++ b/tests/test_api/test_methods/test_set_sticker_set_thumbnail.py @@ -3,20 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetStickerSetThumbnail: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerSetThumbnail, ok=True, result=None) - - response: bool = await SetStickerSetThumbnail(name="test", user_id=42) - request: Request = bot.get_request() - assert request.method == "setStickerSetThumbnail" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetStickerSetThumbnail, ok=True, result=None) response: bool = await bot.set_sticker_set_thumbnail(name="test", user_id=42) - request: Request = bot.get_request() - assert request.method == "setStickerSetThumbnail" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_sticker_set_title.py b/tests/test_api/test_methods/test_set_sticker_set_title.py index 1dc306bc..2a9645cb 100644 --- a/tests/test_api/test_methods/test_set_sticker_set_title.py +++ b/tests/test_api/test_methods/test_set_sticker_set_title.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetStickerSetTitle: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetStickerSetTitle, ok=True, result=True) - - response: bool = await SetStickerSetTitle(name="test", title="Test") - request: Request = bot.get_request() - assert request.method == "setStickerSetTitle" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetStickerSetTitle, ok=True, result=True) response: bool = await bot.set_sticker_set_title(name="test", title="Test") - request: Request = bot.get_request() - assert request.method == "setStickerSetTitle" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_set_webhook.py b/tests/test_api/test_methods/test_set_webhook.py index cfa291c3..c38a2bfa 100644 --- a/tests/test_api/test_methods/test_set_webhook.py +++ b/tests/test_api/test_methods/test_set_webhook.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestSetWebhook: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(SetWebhook, ok=True, result=True) - - response: bool = await SetWebhook(url="https://example.com") - request: Request = bot.get_request() - assert request.method == "setWebhook" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(SetWebhook, ok=True, result=True) response: bool = await bot.set_webhook(url="https://example.com") - request: Request = bot.get_request() - assert request.method == "setWebhook" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_stop_message_live_location.py b/tests/test_api/test_methods/test_stop_message_live_location.py index 2c1168f1..99c8b675 100644 --- a/tests/test_api/test_methods/test_stop_message_live_location.py +++ b/tests/test_api/test_methods/test_stop_message_live_location.py @@ -6,22 +6,11 @@ from tests.mocked_bot import MockedBot class TestStopMessageLiveLocation: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(StopMessageLiveLocation, ok=True, result=True) - - response: Union[Message, bool] = await StopMessageLiveLocation( - inline_message_id="inline message id" - ) - request: Request = bot.get_request() - assert request.method == "stopMessageLiveLocation" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(StopMessageLiveLocation, ok=True, result=True) response: Union[Message, bool] = await bot.stop_message_live_location( inline_message_id="inline message id" ) - request: Request = bot.get_request() - assert request.method == "stopMessageLiveLocation" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_stop_poll.py b/tests/test_api/test_methods/test_stop_poll.py index 7601c771..ef2d36d6 100644 --- a/tests/test_api/test_methods/test_stop_poll.py +++ b/tests/test_api/test_methods/test_stop_poll.py @@ -4,28 +4,6 @@ from tests.mocked_bot import MockedBot class TestStopPoll: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - StopPoll, - ok=True, - result=Poll( - id="QA", - question="Q", - options=[PollOption(text="A", voter_count=0), PollOption(text="B", voter_count=0)], - is_closed=False, - is_anonymous=False, - type="quiz", - allows_multiple_answers=False, - total_voter_count=0, - correct_option_id=0, - ), - ) - - response: Poll = await StopPoll(chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "stopPoll" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( StopPoll, @@ -44,6 +22,5 @@ class TestStopPoll: ) response: Poll = await bot.stop_poll(chat_id=42, message_id=42) - request: Request = bot.get_request() - assert request.method == "stopPoll" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unban_chat_member.py b/tests/test_api/test_methods/test_unban_chat_member.py index 72ba662c..291512fa 100644 --- a/tests/test_api/test_methods/test_unban_chat_member.py +++ b/tests/test_api/test_methods/test_unban_chat_member.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestUnbanChatMember: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnbanChatMember, ok=True, result=True) - - response: bool = await UnbanChatMember(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "unbanChatMember" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatMember, ok=True, result=True) response: bool = await bot.unban_chat_member(chat_id=-42, user_id=42) - request: Request = bot.get_request() - assert request.method == "unbanChatMember" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unban_chat_sender_chat.py b/tests/test_api/test_methods/test_unban_chat_sender_chat.py index 4a259c62..54c334ab 100755 --- a/tests/test_api/test_methods/test_unban_chat_sender_chat.py +++ b/tests/test_api/test_methods/test_unban_chat_sender_chat.py @@ -3,18 +3,6 @@ from tests.mocked_bot import MockedBot class TestUnbanChatSenderChat: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) - - response: bool = await UnbanChatSenderChat( - chat_id=-42, - sender_chat_id=-1337, - ) - request: Request = bot.get_request() - assert request.method == "unbanChatSenderChat" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) @@ -22,7 +10,5 @@ class TestUnbanChatSenderChat: chat_id=-42, sender_chat_id=-1337, ) - request: Request = bot.get_request() - assert request.method == "unbanChatSenderChat" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unhide_general_forum_topic.py b/tests/test_api/test_methods/test_unhide_general_forum_topic.py index 45fcb0c8..eb69223b 100644 --- a/tests/test_api/test_methods/test_unhide_general_forum_topic.py +++ b/tests/test_api/test_methods/test_unhide_general_forum_topic.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestUnhideGeneralForumTopic: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) - - response: bool = await bot(UnhideGeneralForumTopic(chat_id=42)) - request: Request = bot.get_request() - assert request.method == "unhideGeneralForumTopic" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnhideGeneralForumTopic, ok=True, result=True) response: bool = await bot.unhide_general_forum_topic(chat_id=42) - request: Request = bot.get_request() - assert request.method == "unhideGeneralForumTopic" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_all_chat_messages.py b/tests/test_api/test_methods/test_unpin_all_chat_messages.py index 82202742..173ce711 100644 --- a/tests/test_api/test_methods/test_unpin_all_chat_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_chat_messages.py @@ -3,24 +3,11 @@ from tests.mocked_bot import MockedBot class TestUnpinAllChatMessages: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnpinAllChatMessages, ok=True, result=True) - - response: bool = await UnpinAllChatMessages( - chat_id=42, - ) - request: Request = bot.get_request() - assert request.method == "unpinAllChatMessages" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllChatMessages, ok=True, result=True) response: bool = await bot.unpin_all_chat_messages( chat_id=42, ) - request: Request = bot.get_request() - assert request.method == "unpinAllChatMessages" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py index 445f2b4c..ac7b409c 100644 --- a/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py +++ b/tests/test_api/test_methods/test_unpin_all_forum_topic_messages.py @@ -3,18 +3,6 @@ from tests.mocked_bot import MockedBot class TestUnpinAllForumTopicMessages: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) - - response: bool = await UnpinAllForumTopicMessages( - chat_id=42, - message_thread_id=42, - ) - request: Request = bot.get_request() - assert request.method == "unpinAllForumTopicMessages" - # assert request.data == {} - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) @@ -22,7 +10,5 @@ class TestUnpinAllForumTopicMessages: chat_id=42, message_thread_id=42, ) - request: Request = bot.get_request() - assert request.method == "unpinAllForumTopicMessages" - # assert request.data == {} + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_unpin_chat_message.py b/tests/test_api/test_methods/test_unpin_chat_message.py index 52f8765a..804b3ae2 100644 --- a/tests/test_api/test_methods/test_unpin_chat_message.py +++ b/tests/test_api/test_methods/test_unpin_chat_message.py @@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot class TestUnpinChatMessage: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for(UnpinChatMessage, ok=True, result=True) - - response: bool = await UnpinChatMessage(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "unpinChatMessage" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for(UnpinChatMessage, ok=True, result=True) response: bool = await bot.unpin_chat_message(chat_id=-42) - request: Request = bot.get_request() - assert request.method == "unpinChatMessage" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_api/test_methods/test_upload_sticker_file.py b/tests/test_api/test_methods/test_upload_sticker_file.py index 7a6bded9..fda4c4d0 100644 --- a/tests/test_api/test_methods/test_upload_sticker_file.py +++ b/tests/test_api/test_methods/test_upload_sticker_file.py @@ -5,20 +5,6 @@ from tests.mocked_bot import MockedBot class TestUploadStickerFile: - async def test_method(self, bot: MockedBot): - prepare_result = bot.add_result_for( - UploadStickerFile, ok=True, result=File(file_id="file id", file_unique_id="file id") - ) - - response: File = await UploadStickerFile( - user_id=42, - sticker=BufferedInputFile(b"", "file.png"), - sticker_format=StickerFormat.STATIC, - ) - request: Request = bot.get_request() - assert request.method == "uploadStickerFile" - assert response == prepare_result.result - async def test_bot_method(self, bot: MockedBot): prepare_result = bot.add_result_for( UploadStickerFile, ok=True, result=File(file_id="file id", file_unique_id="file id") @@ -29,6 +15,5 @@ class TestUploadStickerFile: sticker=BufferedInputFile(b"", "file.png"), sticker_format=StickerFormat.STATIC, ) - request: Request = bot.get_request() - assert request.method == "uploadStickerFile" + request = bot.get_request() assert response == prepare_result.result diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 509bff35..4fb2b113 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -14,7 +14,7 @@ from aiogram import Bot from aiogram.dispatcher.dispatcher import Dispatcher from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler from aiogram.dispatcher.router import Router -from aiogram.methods import GetMe, GetUpdates, Request, SendMessage +from aiogram.methods import GetMe, GetUpdates, Request, SendMessage, TelegramMethod from aiogram.types import ( CallbackQuery, Chat, @@ -775,9 +775,7 @@ class TestDispatcher: dispatcher.message.register(simple_message_handler) response = await dispatcher.feed_webhook_update(bot, RAW_UPDATE, _timeout=0.3) - assert isinstance(response, Request) - assert response.method == "sendMessage" - assert response.data["text"] == "ok" + assert isinstance(response, TelegramMethod) async def test_feed_webhook_update_slow_process(self, bot: MockedBot, recwarn): warnings.simplefilter("always") diff --git a/tests/test_webhook/test_aiohtt_server.py b/tests/test_webhook/test_aiohtt_server.py index 8bd2cf2d..5be8f43e 100644 --- a/tests/test_webhook/test_aiohtt_server.py +++ b/tests/test_webhook/test_aiohtt_server.py @@ -102,7 +102,8 @@ class TestSimpleRequestHandler: result[part.name] = value.decode() assert result["method"] == "sendDocument" assert result["caption"] == "PASS" - assert result["document"] == "test" + assert result["document"].startswith("attach://") + assert result[result["document"][9:]] async def test_reply_into_webhook_text(self, bot: MockedBot, aiohttp_client): app = Application()