diff --git a/aiogram/bot/api.py b/aiogram/bot/api.py index 961e9d10..6544dace 100644 --- a/aiogram/bot/api.py +++ b/aiogram/bot/api.py @@ -44,9 +44,9 @@ async def check_result(method_name: str, content_type: str, status_code: int, bo """ Checks whether `result` is a valid API response. A result is considered invalid if: - - The server returned an HTTP response code other than 200 - - The content of the result is invalid JSON. - - The method call was unsuccessful (The JSON 'ok' field equals False) + - The server returned an HTTP response code other than 200 + - The content of the result is invalid JSON. + - The method call was unsuccessful (The JSON 'ok' field equals False) :param method_name: The name of the method called :param status_code: status code diff --git a/aiogram/bot/bot.py b/aiogram/bot/bot.py index 1b6d1451..d81ae052 100644 --- a/aiogram/bot/bot.py +++ b/aiogram/bot/bot.py @@ -29,6 +29,12 @@ class Bot(BaseBot): def me(self): """ Reset `me` + + .. code-block:: python3 + + await bot.me + + :return: :obj:`aiogram.types.User` """ if hasattr(self, '_me'): delattr(self, '_me') diff --git a/aiogram/types/auth_widget_data.py b/aiogram/types/auth_widget_data.py index c117c92e..6353e239 100644 --- a/aiogram/types/auth_widget_data.py +++ b/aiogram/types/auth_widget_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from aiohttp import web from . import base @@ -14,13 +16,13 @@ class AuthWidgetData(base.TelegramObject): hash: base.String = fields.Field() @classmethod - def parse(cls, request: web.Request) -> 'AuthWidgetData': + def parse(cls, request: web.Request) -> AuthWidgetData: """ Parse request as Telegram auth widget data. :param request: :return: :obj:`AuthWidgetData` - :raise :obj:`aiohttp.web.HTTPBadRequest` + :raise: :obj:`aiohttp.web.HTTPBadRequest` """ try: query = dict(request.query) diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 947add4d..26310e79 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -511,7 +511,7 @@ class ChatActions(helper.Helper): @classmethod async def _do(cls, action: str, sleep=None): from aiogram import Bot - await Bot.current().send_chat_action(Chat.current(), action) + await Bot.current().send_chat_action(Chat.current().id, action) if sleep: await asyncio.sleep(sleep) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 43e962db..2f8aecc9 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -13,6 +13,7 @@ from .chat import Chat from .contact import Contact from .document import Document from .game import Game +from .input_media import MediaGroup from .invoice import Invoice from .location import Location from .message_entity import MessageEntity @@ -263,7 +264,7 @@ class Message(base.TelegramObject): async def reply_photo(self, photo: typing.Union[base.InputFile, base.String], caption: typing.Union[base.String, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, - reply_markup=None, reply=True) -> 'Message': + reply_markup=None, reply=True) -> Message: """ Use this method to send photos. @@ -294,7 +295,7 @@ class Message(base.TelegramObject): title: typing.Union[base.String, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ 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 format. @@ -336,7 +337,7 @@ class Message(base.TelegramObject): caption: typing.Union[base.String, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ Use this method to send general files. @@ -371,7 +372,7 @@ class Message(base.TelegramObject): caption: typing.Union[base.String, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). @@ -412,7 +413,7 @@ class Message(base.TelegramObject): duration: typing.Union[base.Integer, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. @@ -450,7 +451,7 @@ class Message(base.TelegramObject): length: typing.Union[base.Integer, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. @@ -480,9 +481,9 @@ class Message(base.TelegramObject): reply_to_message_id=self.message_id if reply else None, reply_markup=reply_markup) - async def reply_media_group(self, media: typing.Union['MediaGroup', typing.List], + async def reply_media_group(self, media: typing.Union[MediaGroup, typing.List], disable_notification: typing.Union[base.Boolean, None] = None, - reply=True) -> typing.List['Message']: + reply=True) -> typing.List[Message]: """ Use this method to send a group of photos or videos as an album. @@ -505,7 +506,7 @@ class Message(base.TelegramObject): longitude: base.Float, live_period: typing.Union[base.Integer, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ Use this method to send point on the map. @@ -535,7 +536,7 @@ class Message(base.TelegramObject): reply_markup=reply_markup) async def edit_live_location(self, latitude: base.Float, longitude: base.Float, - reply_markup=None) -> 'Message' or base.Boolean: + reply_markup=None) -> typing.Union[Message, base.Boolean]: """ Use this method to edit live location messages sent by the bot or via the bot (for inline bots). A location can be edited until its live_period expires or editing is explicitly disabled by a call @@ -557,7 +558,7 @@ class Message(base.TelegramObject): chat_id=self.chat.id, message_id=self.message_id, reply_markup=reply_markup) - async def stop_live_location(self, reply_markup=None) -> 'Message' or base.Boolean: + async def stop_live_location(self, reply_markup=None) -> typing.Union[Message, base.Boolean]: """ Use this method to stop updating a live location message sent by the bot or via the bot (for inline bots) before live_period expires. @@ -577,7 +578,7 @@ class Message(base.TelegramObject): foursquare_id: typing.Union[base.String, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ Use this method to send information about a venue. @@ -616,7 +617,7 @@ class Message(base.TelegramObject): first_name: base.String, last_name: typing.Union[base.String, None] = None, disable_notification: typing.Union[base.Boolean, None] = None, reply_markup=None, - reply=True) -> 'Message': + reply=True) -> Message: """ Use this method to send phone contacts. @@ -644,7 +645,7 @@ class Message(base.TelegramObject): reply_to_message_id=self.message_id if reply else None, reply_markup=reply_markup) - async def forward(self, chat_id, disable_notification=None) -> 'Message': + async def forward(self, chat_id, disable_notification=None) -> Message: """ Forward this message @@ -692,7 +693,7 @@ class Message(base.TelegramObject): async def reply_sticker(self, sticker: typing.Union[base.InputFile, base.String], disable_notification: typing.Union[base.Boolean, None] = None, - reply_markup=None, reply=True) -> 'Message': + reply_markup=None, reply=True) -> Message: """ Use this method to send .webp stickers. diff --git a/docs/source/bot.rst b/docs/source/bot.rst deleted file mode 100644 index 62d1afca..00000000 --- a/docs/source/bot.rst +++ /dev/null @@ -1,9 +0,0 @@ -Bot object -========== - -For detailed information about parameters read the official `Telegram Bot API reference `_ - -.. toctree:: - - bot/base - bot/extended diff --git a/docs/source/bot/base.rst b/docs/source/bot/base.rst deleted file mode 100644 index 2c5943fd..00000000 --- a/docs/source/bot/base.rst +++ /dev/null @@ -1,8 +0,0 @@ -BaseBot -======= - -This class is the base class for bot. BaseBot implements only methods for interaction with Telegram Bot API. - -.. autoclass:: aiogram.bot.base.BaseBot - :members: - :show-inheritance: diff --git a/docs/source/bot/extended.rst b/docs/source/bot/extended.rst deleted file mode 100644 index b689f24f..00000000 --- a/docs/source/bot/extended.rst +++ /dev/null @@ -1,9 +0,0 @@ -Bot object -========== - -This is extended (and recommended for use) bot class based on BaseBot class. -You can use an instance of this bot in :obj:`aiogram.dispatcher.Dispatcher` - -.. autoclass:: aiogram.bot.bot.Bot - :members: - :show-inheritance: diff --git a/docs/source/contrib/contrib.rst b/docs/source/contrib/contrib.rst deleted file mode 100644 index 9157db4d..00000000 --- a/docs/source/contrib/contrib.rst +++ /dev/null @@ -1,5 +0,0 @@ -Contrib -======= - -.. toctree:: - storages diff --git a/docs/source/contrib/storages.rst b/docs/source/contrib/storages.rst deleted file mode 100644 index a4f17085..00000000 --- a/docs/source/contrib/storages.rst +++ /dev/null @@ -1,25 +0,0 @@ -Storages for FSM -================ - -You can create you own storage by extending :class:`aiogram.dispatcher.storage.BaseStorage` or use default storages: - -Simple in-memory storage ------------------------- - -.. automodule:: aiogram.contrib.fsm_storage.memory - :members: - :show-inheritance: - -Redis storage -------------- - -.. automodule:: aiogram.contrib.fsm_storage.redis - :members: - :show-inheritance: - -RethinkDB storage ------------------ - -.. automodule:: aiogram.contrib.fsm_storage.rethinkdb - :members: - :show-inheritance: diff --git a/docs/source/contribution.rst b/docs/source/contribution.rst new file mode 100644 index 00000000..dba243c9 --- /dev/null +++ b/docs/source/contribution.rst @@ -0,0 +1,4 @@ +Contribution +============ + +TODO diff --git a/docs/source/dispatcher.rst b/docs/source/dispatcher.rst deleted file mode 100644 index 4cf301c6..00000000 --- a/docs/source/dispatcher.rst +++ /dev/null @@ -1,11 +0,0 @@ -Dispatcher -========== - -With parts of this package you can manage bot updates. - -.. toctree:: - dispatcher/main - dispatcher/storage - dispatcher/webhook - dispatcher/filters - dispatcher/handler diff --git a/docs/source/dispatcher/filters.rst b/docs/source/dispatcher/filters.rst deleted file mode 100644 index f01965b3..00000000 --- a/docs/source/dispatcher/filters.rst +++ /dev/null @@ -1,8 +0,0 @@ -Filters -------- - -This module stores builtin filters for dispatcher. - -.. automodule:: aiogram.dispatcher.filters - :members: - :show-inheritance: diff --git a/docs/source/dispatcher/handler.rst b/docs/source/dispatcher/handler.rst deleted file mode 100644 index 322496d9..00000000 --- a/docs/source/dispatcher/handler.rst +++ /dev/null @@ -1,6 +0,0 @@ -Handler class -------------- - -.. automodule:: aiogram.dispatcher.handler - :members: - :show-inheritance: diff --git a/docs/source/dispatcher/index.rst b/docs/source/dispatcher/index.rst new file mode 100644 index 00000000..5535f4b1 --- /dev/null +++ b/docs/source/dispatcher/index.rst @@ -0,0 +1,4 @@ +Dispatcher +========== + +TODO diff --git a/docs/source/dispatcher/main.rst b/docs/source/dispatcher/main.rst deleted file mode 100644 index 93de08d2..00000000 --- a/docs/source/dispatcher/main.rst +++ /dev/null @@ -1,6 +0,0 @@ -Dispatcher class ----------------- - -.. automodule:: aiogram.dispatcher - :members: - :show-inheritance: diff --git a/docs/source/dispatcher/storage.rst b/docs/source/dispatcher/storage.rst deleted file mode 100644 index 7ab4b5c1..00000000 --- a/docs/source/dispatcher/storage.rst +++ /dev/null @@ -1,8 +0,0 @@ -Storages --------- - -This module stores storage base for finite-state machine. - -.. automodule:: aiogram.dispatcher.storage - :members: - :show-inheritance: diff --git a/docs/source/dispatcher/webhook.rst b/docs/source/dispatcher/webhook.rst deleted file mode 100644 index 371eec95..00000000 --- a/docs/source/dispatcher/webhook.rst +++ /dev/null @@ -1,6 +0,0 @@ -Webhook -------- - -.. automodule:: aiogram.dispatcher.webhook - :members: - :show-inheritance: diff --git a/docs/source/examples/echo_bot.rst b/docs/source/examples/echo_bot.rst new file mode 100644 index 00000000..4919f555 --- /dev/null +++ b/docs/source/examples/echo_bot.rst @@ -0,0 +1,4 @@ +Echo bot +======== + +example \ No newline at end of file diff --git a/docs/source/examples/index.rst b/docs/source/examples/index.rst new file mode 100644 index 00000000..f3c7e856 --- /dev/null +++ b/docs/source/examples/index.rst @@ -0,0 +1,5 @@ +Examples +======== + +.. toctree:: + echo_bot diff --git a/docs/source/features.rst b/docs/source/features.rst deleted file mode 100644 index 19a8b82c..00000000 --- a/docs/source/features.rst +++ /dev/null @@ -1,5 +0,0 @@ -Features -======== - -.. toctree:: - contrib/contrib diff --git a/docs/source/index.rst b/docs/source/index.rst index e3f1c8b5..40fb9ccb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -64,11 +64,13 @@ Contents .. toctree:: install quick_start - bot - dispatcher - types - features - + migration + telegram/index + dispatcher/index + utils/index + examples/index + contribution + links Indices and tables diff --git a/docs/source/install.rst b/docs/source/install.rst index 3191305f..de199af6 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -15,6 +15,15 @@ From sources $ cd aiogram $ python setup.py install + or if you want to install development version (maybe unstable): + + .. code-block:: bash + + $ git clone https://github.com/aiogram/aiogram.git + $ cd aiogram + $ git checkout dev-2.x + $ python setup.py install + Recommendations --------------- @@ -30,7 +39,6 @@ You can speedup your bots by following next instructions: $ pip install uvloop - - Use `ujson `_ instead of default json module. *UltraJSON* is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3. diff --git a/docs/source/links.rst b/docs/source/links.rst new file mode 100644 index 00000000..2632e335 --- /dev/null +++ b/docs/source/links.rst @@ -0,0 +1,4 @@ +Links +===== + +TODO diff --git a/docs/source/migration.rst b/docs/source/migration.rst new file mode 100644 index 00000000..8e539c30 --- /dev/null +++ b/docs/source/migration.rst @@ -0,0 +1,185 @@ +========================== +Migration FAQ (1.4 -> 2.0) +========================== + +This update make breaking changes in aiogram API and drop backward capability with previous versions of framework. + +From this point aiogram supports only Python 3.7 and newer. + +Changelog +========= + +- Used contextvars instead of `aiogram.utils.context`; +- Implemented filters factory; +- Implemented new filters mechanism; +- Allowed to customize command prefix in CommandsFilter; +- Implemented mechanism of passing results from filters (as dicts) as kwargs in handlers (like fixtures in pytest); +- Implemented states group feature; +- Changed files uploading mechanism; +- Implemented I18n Middleware; +- Errors handlers now should accept only two arguments (current update and exception); +- Used `aiohttp_socks` instead of `aiosocksy` for Socks4/5 proxy; + +- (**in process**) Implemented utils for Telegram Passport; +- (**in process**) Webhook security improvements; +- (**in process**) Updated examples. + + +Instructions +============ + +Contextvars +----------- +Context utility (`aiogram.utils.context`) now is removed due to new features of Python 3.7 and all subclasses of :obj:`aiogram.types.base.TelegramObject`, :obj:`aiogram.Bot` and :obj:`aiogram.Dispatcher` has `.get_current()` and `.set_current()` methods for getting/setting contextual instances of objects. + +Example: + +.. code-block:: python + + async def my_handler(message: types.Message): + bot = Bot.get_current() + user = types.User.get_current() + ... + +Filters +------- + +Custom filters +~~~~~~~~~~~~~~ + +Now `func` keyword argument can't be used for passing filters to the list of filters instead of that you can pass the filters as arguments: + +.. code-block:: python + + @dp.message_handler(lambda message: message.text == 'foo') + @dp.message_handler(types.ChatType.is_private, is_superuser) + async def ... + + +Filters factory +~~~~~~~~~~~~~~~ +Also you can bind your own filters for using as keyword arguments: + +.. code-block:: python + + from aiogram.dispatcher.filters import BoundFilter + + class MyFilter(BoundFilter): + key = 'is_admin' + + async def check(self, message: types.Message): + member = await bot.get_chat_member(message.chat.id, message.from_user.id) + return member.is_admin() + + dp.filters_factory.bind(MyFilter) + + @dp.message_handler(is_admin=True) + async def ... + + +Customize commands prefix +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Commands prefix can be changed by following one of two available methods: + +.. code-block:: python + + @dp.message_handler(commands=['admin'], commands_prefix='!/') + @dp.message_handler(Command('admin', prefixes='!/')) + async def ... + +Passing data from filters as keyword arguments to the handlers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can pass any data from any filter to the handler by returning :obj:`dict` +If any key from the received dictionary not in the handler specification the key will be skipped and and will be unavailable from the handler + +.. code-block:: python + + async def my_filter(message: types.Message): + # do something here + return {'foo': 'foo', 'bar': 42} + + @dp.message_handler(my_filter) + async def my_message_handler(message: types.Message, bar: int): + await message.reply(f'bar = {bar}') + +Other +~~~~~ +Filters can also be used as logical expressions: + +.. code-block:: python + + Text(equals='foo') | Text(endswith='Bar') | ~Text(contains='spam') + + +States group +------------ + +You can use States objects and States groups instead of string names of the states. +String values is still also be available. + +Writing states group: + +.. code-block:: python + + from aiogram.dispatcher.filters.state import State, StatesGroup + + class UserForm(StatesGroup): + name = State() # Will be represented in storage as 'Form:name' + age = State() # Will be represented in storage as 'Form:age' + gender = State() # Will be represented in storage as 'Form:gender' + +After that you can use states as `UserForm.name` and etc. + + +File uploading mechanism +------------------------ +Fixed uploading files. Removed `BaseBot.send_file` method. This allowed to send the `thumb` field. + +I18n Middleware +--------------- +You can internalize your bot by following next steps: + +First usage +~~~~~~~~~~~ +1. Extract texts + + .. code-block:: bash + + pybabel extract i18n_example.py -o locales/mybot.pot + +2. Create `*.po` files. For e.g. create `en`, `ru`, `uk` locales. +3. Translate texts +4. Compile translations + + .. code-block:: bash + + pybabel compile -d locales -D mybot + +Updating translations +~~~~~~~~~~~~~~~~~~~~~ +When you change the code of your bot you need to update `po` & `mo` files: + +1. Regenerate pot file: + + .. code-block:: bash + + pybabel extract i18n_example.py -o locales/mybot.pot + +2. Update po files + + .. code-block:: bash + + pybabel update -d locales -D mybot -i locales/mybot.pot + +3. Update your translations +4. Compile `mo` files + + .. code-block:: bash + + pybabel compile -d locales -D mybot + +Error handlers +-------------- +Previously errors handlers had to have three arguments `dispatcher`, `update` and `exception` now `dispatcher` argument is removed and will no longer be passed to the error handlers. diff --git a/docs/source/quick_start.rst b/docs/source/quick_start.rst index 6ce619be..428f336f 100644 --- a/docs/source/quick_start.rst +++ b/docs/source/quick_start.rst @@ -8,9 +8,7 @@ At first you have to import all necessary modules .. code-block:: python3 - from aiogram import Bot, types - from aiogram.dispatcher import Dispatcher - from aiogram.utils import executor + from aiogram import Bot, Dispatcher, executor, types Then you have to initialize bot and dispatcher instances. Bot token you can get from `@BotFather `_ @@ -29,6 +27,14 @@ Next step: interaction with bots starts with one command. Register your first co async def send_welcome(message: types.Message): await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.") +If you want to handle all messages in the chat simply add handler without filters: + +.. code-block:: python + + @dp.message_handler() + async def echo(message: types.Message): + await bot.send_message(message.chat.id, message.text) + Last step: run long polling. .. code-block:: python3 @@ -41,16 +47,21 @@ Summary .. code-block:: python3 - from aiogram import Bot, types - from aiogram.dispatcher import Dispatcher - from aiogram.utils import executor + from aiogram import Bot, Dispatcher, executor, types bot = Bot(token='BOT TOKEN HERE') dp = Dispatcher(bot) + @dp.message_handler(commands=['start', 'help']) async def send_welcome(message: types.Message): await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.") + + @dp.message_handler() + async def echo(message: types.Message): + await bot.send_message(message.chat.id, message.text) + + if __name__ == '__main__': executor.start_polling(dp) diff --git a/docs/source/telegram/bot.rst b/docs/source/telegram/bot.rst new file mode 100644 index 00000000..dce4853a --- /dev/null +++ b/docs/source/telegram/bot.rst @@ -0,0 +1,25 @@ +Bot object +========== + +Low level API +------------- +Subclass of this class used only for splitting network interface from all of API methods. + +.. autoclass:: aiogram.bot.base.BaseBot + :members: + :show-inheritance: + +Telegram Bot +------------ +This class based on :obj:`aiogram.bot.base.BaseBot` + +.. autoclass:: aiogram.bot.bot.Bot + :members: + :show-inheritance: + +API Helpers +----------- + +.. automodule:: aiogram.bot.api + :members: + :show-inheritance: diff --git a/docs/source/telegram/index.rst b/docs/source/telegram/index.rst new file mode 100644 index 00000000..a9ac96ef --- /dev/null +++ b/docs/source/telegram/index.rst @@ -0,0 +1,7 @@ +Telegram +======== + +.. toctree:: + + bot + types/index diff --git a/docs/source/types.rst b/docs/source/types.rst deleted file mode 100644 index 1afe64b1..00000000 --- a/docs/source/types.rst +++ /dev/null @@ -1,318 +0,0 @@ -Data types -========== - -Bases ------ - -.. automodule:: aiogram.types.base - :members: - :show-inheritance: - -Update ------- -:class:`aiogram.types.Update` - -.. automodule:: aiogram.types.update - :members: - :show-inheritance: - -WebhookInfo ------------ -:class:`aiogram.types.WebhookInfo` - -.. automodule:: aiogram.types.webhook_info - :members: - :show-inheritance: - -User ----- -:class:`aiogram.types.User` - -.. automodule:: aiogram.types.user - :members: - :show-inheritance: - -Chat ----- -:class:`aiogram.types.Chat` - -.. automodule:: aiogram.types.chat - :members: - :show-inheritance: - -Message -------- -:class:`aiogram.types.Message` - -.. automodule:: aiogram.types.message - :members: - :show-inheritance: - -MessageEntity -------------- -:class:`aiogram.types.MessageEntity` - -.. automodule:: aiogram.types.message_entity - :members: - :show-inheritance: - - -PhotoSize ---------- -:class:`aiogram.types.PhotoSize` - -.. automodule:: aiogram.types.photo_size - :members: - :show-inheritance: - -Audio ------ -:class:`aiogram.types.Audio` - -.. automodule:: aiogram.types.audio - :members: - :show-inheritance: - -Document --------- -:class:`aiogram.types.Document` - -.. automodule:: aiogram.types.document - :members: - :show-inheritance: - -Video ------ -:class:`aiogram.types.Video` - -.. automodule:: aiogram.types.video - :members: - :show-inheritance: - -Voice ------ -:class:`aiogram.types.Voice` - -.. automodule:: aiogram.types.voice - :members: - :show-inheritance: - -VideoNote ---------- -:class:`aiogram.types.VideoNote` - -.. automodule:: aiogram.types.video_note - :members: - :show-inheritance: - -Contact -------- -:class:`aiogram.types.Contact` - -.. automodule:: aiogram.types.contact - :members: - :show-inheritance: - -Location --------- -:class:`aiogram.types.Location` - -.. automodule:: aiogram.types.location - :members: - :show-inheritance: - -Venue ------ -:class:`aiogram.types.Venue` - -.. automodule:: aiogram.types.venue - :members: - :show-inheritance: - -UserProfilePhotos ------------------ -:class:`aiogram.types.UserProfilePhotos` - -.. automodule:: aiogram.types.user_profile_photos - :members: - :show-inheritance: - -File ----- -:class:`aiogram.types.File` - -.. automodule:: aiogram.types.file - :members: - :show-inheritance: - -ReplyKeyboardMarkup & KeyboardButton & ReplyKeyboardRemove ----------------------------------------------------------- -:class:`aiogram.types.ReplyKeyboardMarkup` - -:class:`aiogram.types.KeyboardButton` - -:class:`aiogram.types.ReplyKeyboardRemove` - -.. automodule:: aiogram.types.reply_keyboard - :members: - :show-inheritance: - -InlineKeyboardMarkup & InlineKeyboardButton -------------------------------------------- -:class:`aiogram.types.InlineKeyboardMarkup` - -:class:`aiogram.types.InlineKeyboardButton` - -.. automodule:: aiogram.types.inline_keyboard - :members: - :show-inheritance: - -CallbackQuery -------------- -:class:`aiogram.types.CallbackQuery` - -.. automodule:: aiogram.types.callback_query - :members: - :show-inheritance: - -ForceReply ----------- -:class:`aiogram.types.ForceReply` - -.. automodule:: aiogram.types.force_reply - :members: - :show-inheritance: - -ChatPhoto ---------- -:class:`aiogram.types.ChatPhoto` - -.. automodule:: aiogram.types.chat_photo - :members: - :show-inheritance: - -ChatMember ----------- -:class:`aiogram.types.ChatMember` - -.. automodule:: aiogram.types.chat_member - :members: - :show-inheritance: - -ResponseParameters ------------------- -:class:`aiogram.types.ResponseParameters` - -.. automodule:: aiogram.types.response_parameters - :members: - :show-inheritance: - -InputMedia ----------- -:class:`aiogram.types.InputMediaPhoto` -:class:`aiogram.types.InputMediaVideo` -:class:`aiogram.types.MediaGroup` - -.. automodule:: aiogram.types.input_media - :members: - :show-inheritance: - -Sticker -------- -:class:`aiogram.types.Sticker` - -.. automodule:: aiogram.types.sticker - :members: - :show-inheritance: - -StickerSet ------------ -:class:`aiogram.types.StickerSet` - -.. automodule:: aiogram.types.sticker_set - :members: - :show-inheritance: - -MaskPosition ------------- -:class:`aiogram.types.MaskPosition` - -.. automodule:: aiogram.types.mask_position - :members: - :show-inheritance: - -Inline mode objects -------------------- - -.. automodule:: aiogram.types.inline_query - :members: - :show-inheritance: - -.. automodule:: aiogram.types.chosen_inline_result - :members: - :show-inheritance: - -.. automodule:: aiogram.types.inline_query_result - :members: - :show-inheritance: - -Payments --------- - -.. automodule:: aiogram.types.labeled_price - :members: - :show-inheritance: - -.. automodule:: aiogram.types.invoice - :members: - :show-inheritance: - -.. automodule:: aiogram.types.shipping_address - :members: - :show-inheritance: - -.. automodule:: aiogram.types.order_info - :members: - :show-inheritance: - -.. automodule:: aiogram.types.shipping_option - :members: - :show-inheritance: - -.. automodule:: aiogram.types.successful_payment - :members: - :show-inheritance: - -.. automodule:: aiogram.types.shipping_query - :members: - :show-inheritance: - -.. automodule:: aiogram.types.pre_checkout_query - :members: - :show-inheritance: - - -Games ------ - -.. automodule:: aiogram.types.game - :members: - :show-inheritance: - -.. automodule:: aiogram.types.animation - :members: - :show-inheritance: - -.. automodule:: aiogram.types.game_high_score - :members: - :show-inheritance: - - -InputFile interface -------------------- - -:class:`aiogram.types.InputFile` - -.. automodule:: aiogram.types.input_file - :members: - :show-inheritance: diff --git a/docs/source/utils/index.rst b/docs/source/utils/index.rst new file mode 100644 index 00000000..76377aa5 --- /dev/null +++ b/docs/source/utils/index.rst @@ -0,0 +1,4 @@ +Utils +===== + +TODO \ No newline at end of file diff --git a/setup.py b/setup.py index 630325e0..11b03679 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ setup( license='MIT', author='Alex Root Junior', requires_python='>=3.7', - author_email='aiogram@illemius.xyz', + author_email='jroot.junior@gmail.com', description='Is a pretty simple and fully asynchronous library for Telegram Bot API', long_description=get_description(), classifiers=[