mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
14 lines
224 B
ReStructuredText
14 lines
224 B
ReStructuredText
|
|
Added context manager interface to Bot instance, from now you can use:
|
||
|
|
|
||
|
|
.. code-block:: python
|
||
|
|
|
||
|
|
async with Bot(...) as bot:
|
||
|
|
...
|
||
|
|
|
||
|
|
instead of
|
||
|
|
|
||
|
|
.. code-block:: python
|
||
|
|
|
||
|
|
async with Bot(...).context():
|
||
|
|
...
|