mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Rename file to match example
This commit is contained in:
parent
1cdfa3e3c2
commit
384b5e5b9f
1 changed files with 0 additions and 0 deletions
28
docs/source/examples/advanced_executor_example.rst
Normal file
28
docs/source/examples/advanced_executor_example.rst
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
.. Autogenerated file at 2018-10-28 19:31:48.335963
|
||||
|
||||
=========================
|
||||
Advanced executor example
|
||||
=========================
|
||||
|
||||
!/usr/bin/env python3
|
||||
**This example is outdated**
|
||||
In this example used ArgumentParser for configuring Your bot.
|
||||
Provided to start bot with webhook:
|
||||
python advanced_executor_example.py \
|
||||
--token TOKEN_HERE \
|
||||
--host 0.0.0.0 \
|
||||
--port 8084 \
|
||||
--host-name example.com \
|
||||
--webhook-port 443
|
||||
Or long polling:
|
||||
python advanced_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/advanced_executor_example.py
|
||||
:caption: advanced_executor_example.py
|
||||
:language: python
|
||||
:linenos:
|
||||
:lines: 25-
|
||||
Loading…
Add table
Add a link
Reference in a new issue