aiogram/docs/api/methods/send_poll.rst
Kostiantyn Kriuchkov 386fc44a98
Feature/aliases inaccessible message (#1575)
* feature: add aliases for InaccessibleMessage type

* add changelog

* fix changelog

* remove methods that may not be accessible for the InaccessibleMessage type, add tests

* apply black isort

* update docs with InaccessibleMessage aliases
2024-09-08 14:00:07 +03:00

57 lines
1.2 KiB
ReStructuredText

########
sendPoll
########
Returns: :obj:`Message`
.. automodule:: aiogram.methods.send_poll
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields
Usage
=====
As bot method
-------------
.. code-block::
result: Message = await bot.send_poll(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods.send_poll import SendPoll`
- alias: :code:`from aiogram.methods import SendPoll`
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block:: python
result: Message = await bot(SendPoll(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
return SendPoll(...)
As shortcut from received object
--------------------------------
- :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_poll`
- :meth:`aiogram.types.chat_join_request.ChatJoinRequest.answer_poll_pm`
- :meth:`aiogram.types.chat_member_updated.ChatMemberUpdated.answer_poll`
- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.answer_poll`
- :meth:`aiogram.types.inaccessible_message.InaccessibleMessage.reply_poll`
- :meth:`aiogram.types.message.Message.answer_poll`
- :meth:`aiogram.types.message.Message.reply_poll`