mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
Upgrade architecture + 5.0 Bot API (#469) * Moved `methods`, `types` and `client` to root package * Removed update handler from routers to dispatcher * Reworked events propagation mechanism to handlers * Reworked inner middlewares logic (very small change) * Updated to Bot API 5.0 * Initial migration from MkDocs to Sphinx + config for readthedocs
51 lines
No EOL
812 B
ReStructuredText
51 lines
No EOL
812 B
ReStructuredText
###########
|
|
sendMessage
|
|
###########
|
|
|
|
Returns: :obj:`Message`
|
|
|
|
.. automodule:: aiogram.methods.send_message
|
|
:members:
|
|
:member-order: bysource
|
|
:undoc-members: True
|
|
|
|
|
|
Usage
|
|
=====
|
|
|
|
As bot method
|
|
-------------
|
|
|
|
.. code-block::
|
|
|
|
result: Message = await bot.send_message(...)
|
|
|
|
|
|
Method as object
|
|
----------------
|
|
|
|
Imports:
|
|
|
|
- :code:`from aiogram.methods.send_message import SendMessage`
|
|
- alias: :code:`from aiogram.methods import SendMessage`
|
|
|
|
In handlers with current bot
|
|
----------------------------
|
|
|
|
.. code-block:: python
|
|
|
|
result: Message = await SendMessage(...)
|
|
|
|
With specific bot
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
.. code-block:: python
|
|
|
|
result: Message = await bot(SendMessage(...))
|
|
|
|
As reply into Webhook in handler
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. code-block:: python
|
|
|
|
return SendMessage(...) |