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

52 lines
No EOL
839 B
ReStructuredText

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