aiogram/docs2/source/api/methods/send_location.rst
2020-06-15 02:22:24 +03:00

52 lines
No EOL
890 B
ReStructuredText

############
sendLocation
############
Use this method to send point on the map. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.api.methods.send_location
:members:
Usage
=====
As bot method
-------------
.. code-block::
result: Message = await bot.send_location(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods import SendLocation`
- :code:`from aiogram.api.methods import SendLocation`
- :code:`from aiogram.api.methods.send_location import SendLocation`
In handlers with current bot
----------------------------
.. code-block::
result: Message = await SendLocation(...)
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block::
result: Message = await bot(SendLocation(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block::
return SendLocation(...)