diff --git a/README.md b/README.md index 208ce568..639a6ff9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![\[Telegram\] aiogram live](https://img.shields.io/badge/telegram-aiogram-blue.svg?style=flat-square)](https://t.me/aiogram_live) [![PyPi Package Version](https://img.shields.io/pypi/v/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram) [![PyPi status](https://img.shields.io/pypi/status/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram) +[![Downloads](https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram) [![Supported python versions](https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram) [![Documentation Status](https://img.shields.io/readthedocs/pip/stable.svg?style=flat-square)](http://aiogram.readthedocs.io/en/latest/?badge=latest) [![Github issues](https://img.shields.io/github/issues/aiogram/aiogram.svg?style=flat-square)](https://github.com/aiogram/aiogram/issues) diff --git a/README.rst b/README.rst index 3e10a3b9..fde5bc7f 100644 --- a/README.rst +++ b/README.rst @@ -13,6 +13,10 @@ AIOGramBot :target: https://pypi.python.org/pypi/aiogram :alt: PyPi status +.. image:: https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square + :target: https://pypi.python.org/pypi/aiogram + :alt: PyPi downloads + .. image:: https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square :target: https://pypi.python.org/pypi/aiogram :alt: Supported python versions diff --git a/docs/source/index.rst b/docs/source/index.rst index 537c4b9a..d9ad1ca4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -14,6 +14,10 @@ Welcome to aiogram's documentation! :target: https://pypi.python.org/pypi/aiogram :alt: Supported python versions + .. image:: https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square + :target: https://pypi.python.org/pypi/aiogram + :alt: PyPi downloads + .. image:: https://img.shields.io/readthedocs/pip/stable.svg?style=flat-square :target: http://aiogram.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status diff --git a/docs/source/migration_1_to_2.rst b/docs/source/migration_1_to_2.rst index eafc2561..67684831 100644 --- a/docs/source/migration_1_to_2.rst +++ b/docs/source/migration_1_to_2.rst @@ -67,7 +67,10 @@ Also you can bind your own filters for using as keyword arguments: class MyFilter(BoundFilter): key = 'is_admin' - + + def __init__(self, is_admin): + self.is_admin = 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() diff --git a/docs/source/quick_start.rst b/docs/source/quick_start.rst index a73640b4..07224d19 100644 --- a/docs/source/quick_start.rst +++ b/docs/source/quick_start.rst @@ -9,32 +9,32 @@ At first you have to import all necessary modules .. literalinclude:: ../../examples/echo_bot.py :language: python - :lines: 1-4 + :lines: 6-8 Then you have to initialize bot and dispatcher instances. Bot token you can get from `@BotFather `_ .. literalinclude:: ../../examples/echo_bot.py :language: python - :lines: 10-12 + :lines: 10-17 Next step: interaction with bots starts with one command. Register your first command handler: .. literalinclude:: ../../examples/echo_bot.py :language: python - :lines: 15-17 + :lines: 21-25 If you want to handle all messages in the chat simply add handler without filters: .. literalinclude:: ../../examples/echo_bot.py :language: python - :lines: 27-29 + :lines: 28-30 Last step: run long polling. .. literalinclude:: ../../examples/echo_bot.py :language: python - :lines: 32-33 + :lines: 33-34 Summary ------- @@ -42,4 +42,4 @@ Summary .. literalinclude:: ../../examples/echo_bot.py :language: python :linenos: - :lines: -19,27- \ No newline at end of file + :lines: -19,27- diff --git a/docs/source/utils/auth_widget.rst b/docs/source/utils/auth_widget.rst new file mode 100644 index 00000000..e3a90ef6 --- /dev/null +++ b/docs/source/utils/auth_widget.rst @@ -0,0 +1,4 @@ +=========== +Auth Widget +=========== +Coming soon... diff --git a/docs/source/utils/context.rst b/docs/source/utils/context.rst new file mode 100644 index 00000000..7a930a7e --- /dev/null +++ b/docs/source/utils/context.rst @@ -0,0 +1,4 @@ +======= +Context +======= +Coming soon... diff --git a/docs/source/utils/deprecated.rst b/docs/source/utils/deprecated.rst new file mode 100644 index 00000000..0a7b4089 --- /dev/null +++ b/docs/source/utils/deprecated.rst @@ -0,0 +1,4 @@ +========== +Deprecated +========== +Coming soon... diff --git a/docs/source/utils/emoji.rst b/docs/source/utils/emoji.rst new file mode 100644 index 00000000..27382dd6 --- /dev/null +++ b/docs/source/utils/emoji.rst @@ -0,0 +1,4 @@ +===== +Emoji +===== +Coming soon... diff --git a/docs/source/utils/exceptions.rst b/docs/source/utils/exceptions.rst new file mode 100644 index 00000000..199e67aa --- /dev/null +++ b/docs/source/utils/exceptions.rst @@ -0,0 +1,4 @@ +========== +Exceptions +========== +Coming soon... diff --git a/docs/source/utils/executor.rst b/docs/source/utils/executor.rst new file mode 100644 index 00000000..2cb8eaa1 --- /dev/null +++ b/docs/source/utils/executor.rst @@ -0,0 +1,4 @@ +======== +Executor +======== +Coming soon... diff --git a/docs/source/utils/helper.rst b/docs/source/utils/helper.rst new file mode 100644 index 00000000..4ffc74ab --- /dev/null +++ b/docs/source/utils/helper.rst @@ -0,0 +1,4 @@ +====== +Helper +====== +Coming soon... diff --git a/docs/source/utils/json.rst b/docs/source/utils/json.rst new file mode 100644 index 00000000..84833031 --- /dev/null +++ b/docs/source/utils/json.rst @@ -0,0 +1,4 @@ +==== +JSON +==== +Coming soon... diff --git a/docs/source/utils/markdown.rst b/docs/source/utils/markdown.rst new file mode 100644 index 00000000..ee32dfd4 --- /dev/null +++ b/docs/source/utils/markdown.rst @@ -0,0 +1,4 @@ +======== +Markdown +======== +Coming soon... diff --git a/docs/source/utils/parts.rst b/docs/source/utils/parts.rst new file mode 100644 index 00000000..845d017e --- /dev/null +++ b/docs/source/utils/parts.rst @@ -0,0 +1,4 @@ +===== +Parts +===== +Coming soon... diff --git a/docs/source/utils/payload.rst b/docs/source/utils/payload.rst new file mode 100644 index 00000000..b3427906 --- /dev/null +++ b/docs/source/utils/payload.rst @@ -0,0 +1,4 @@ +======= +Payload +======= +Coming soon...