2020-06-15 02:22:24 +03:00
|
|
|
#####
|
|
|
|
|
getMe
|
|
|
|
|
#####
|
|
|
|
|
|
|
|
|
|
A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.
|
|
|
|
|
|
|
|
|
|
Returns: :obj:`User`
|
|
|
|
|
|
|
|
|
|
.. automodule:: aiogram.api.methods.get_me
|
|
|
|
|
:members:
|
2020-06-27 19:46:01 +03:00
|
|
|
:member-order: bysource
|
|
|
|
|
:special-members: __init__
|
|
|
|
|
:undoc-members: True
|
2020-06-15 02:22:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
|
=====
|
|
|
|
|
|
|
|
|
|
As bot method
|
|
|
|
|
-------------
|
|
|
|
|
|
|
|
|
|
.. code-block::
|
|
|
|
|
|
|
|
|
|
result: User = await bot.get_me(...)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Method as object
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
Imports:
|
|
|
|
|
|
|
|
|
|
- :code:`from aiogram.methods import GetMe`
|
|
|
|
|
- :code:`from aiogram.api.methods import GetMe`
|
|
|
|
|
- :code:`from aiogram.api.methods.get_me import GetMe`
|
|
|
|
|
|
|
|
|
|
In handlers with current bot
|
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
|
|
.. code-block::
|
|
|
|
|
|
|
|
|
|
result: User = await GetMe(...)
|
|
|
|
|
|
|
|
|
|
With specific bot
|
|
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
.. code-block::
|
|
|
|
|
|
|
|
|
|
result: User = await bot(GetMe(...))
|
|
|
|
|
|