aiogram/docs2/api/methods/send_invoice.rst
2020-11-18 02:05:52 +02:00

55 lines
No EOL
942 B
ReStructuredText

###########
sendInvoice
###########
Use this method to send invoices. On success, the sent Message is returned.
Returns: :obj:`Message`
.. automodule:: aiogram.methods.send_invoice
:members:
:member-order: bysource
:special-members: __init__
:undoc-members: True
Usage
=====
As bot method
-------------
.. code-block::
result: Message = await bot.send_invoice(...)
Method as object
----------------
Imports:
- :code:`from aiogram.methods import SendInvoice`
- :code:`from aiogram.methods import SendInvoice`
- :code:`from aiogram.methods.send_invoice import SendInvoice`
In handlers with current bot
----------------------------
.. code-block::
result: Message = await SendInvoice(...)
With specific bot
~~~~~~~~~~~~~~~~~
.. code-block::
result: Message = await bot(SendInvoice(...))
As reply into Webhook in handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block::
return SendInvoice(...)