Merge branch 'master' into dev-2.x

This commit is contained in:
Alex Root Junior 2019-01-13 00:49:15 +02:00
commit 640b0a72a8
16 changed files with 63 additions and 7 deletions

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -68,6 +68,9 @@ 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()

View file

@ -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 <https://t.me/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
-------

View file

@ -0,0 +1,4 @@
===========
Auth Widget
===========
Coming soon...

View file

@ -0,0 +1,4 @@
=======
Context
=======
Coming soon...

View file

@ -0,0 +1,4 @@
==========
Deprecated
==========
Coming soon...

View file

@ -0,0 +1,4 @@
=====
Emoji
=====
Coming soon...

View file

@ -0,0 +1,4 @@
==========
Exceptions
==========
Coming soon...

View file

@ -0,0 +1,4 @@
========
Executor
========
Coming soon...

View file

@ -0,0 +1,4 @@
======
Helper
======
Coming soon...

View file

@ -0,0 +1,4 @@
====
JSON
====
Coming soon...

View file

@ -0,0 +1,4 @@
========
Markdown
========
Coming soon...

View file

@ -0,0 +1,4 @@
=====
Parts
=====
Coming soon...

View file

@ -0,0 +1,4 @@
=======
Payload
=======
Coming soon...