mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Write docs and small fixes.
This commit is contained in:
parent
23fba99d93
commit
7a55c040ee
31 changed files with 306 additions and 458 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue