mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Add autogenerated docs for examples. Will be changed soon.
This commit is contained in:
parent
06097fffa1
commit
f9c1ce35bb
17 changed files with 216 additions and 0 deletions
27
docs/source/examples/adwanced_executor_example.rst
Normal file
27
docs/source/examples/adwanced_executor_example.rst
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
.. Autogenerated file at 2018-09-08 02:07:37.572483
|
||||
|
||||
=========================
|
||||
Adwanced executor example
|
||||
=========================
|
||||
|
||||
!/usr/bin/env python3
|
||||
In this example used ArgumentParser for configuring Your bot.
|
||||
Provided to start bot with webhook:
|
||||
python adwanced_executor_example.py \
|
||||
--token TOKEN_HERE \
|
||||
--host 0.0.0.0 \
|
||||
--port 8084 \
|
||||
--host-name example.com \
|
||||
--webhook-port 443
|
||||
Or long polling:
|
||||
python adwanced_executor_example.py --token TOKEN_HERE
|
||||
So... In this example found small trouble:
|
||||
can't get bot instance in handlers.
|
||||
If you want to automatic change getting updates method use executor utils (from aiogram.utils.executor)
|
||||
TODO: Move token to environment variables.
|
||||
|
||||
.. literalinclude:: ../../../examples/adwanced_executor_example.py
|
||||
:caption: adwanced_executor_example.py
|
||||
:language: python
|
||||
:linenos:
|
||||
:lines: 24-
|
||||
Loading…
Add table
Add a link
Reference in a new issue