Update ConfigurationFile.rst
This commit is contained in:
parent
c17bf3c64c
commit
e4c8592616
@ -9,7 +9,7 @@ Introduction
|
||||
|
||||
The idea behind using a configuration file is to help keeping your code free of settings (private) information such as
|
||||
the API Key and Proxy without having you to even deal with how to load such settings. The configuration file, usually
|
||||
referred as ``config.ini` file, is automatically loaded from the root of your working directory; all you need to do is
|
||||
referred as ``config.ini`` file, is automatically loaded from the root of your working directory; all you need to do is
|
||||
fill in the necessary parts.
|
||||
|
||||
.. note::
|
||||
@ -25,9 +25,9 @@ fill in the necessary parts.
|
||||
The config.ini File
|
||||
-------------------
|
||||
|
||||
By default, Pyrogram will look for a file named ``config.ini`` placed at the root of your working directory, that is, in
|
||||
the same folder of your running script. You can change the name or location of your configuration file by specifying
|
||||
that in your Client's parameter *config_file*.
|
||||
By default, Pyrogram will look for a file named ``config.ini`` placed at the root of your working directory, that is,
|
||||
the same folder of your running script. You can change the name or location of your configuration file by specifying it
|
||||
in your Client's parameter *config_file*.
|
||||
|
||||
- Replace the default *config.ini* file with *my_configuration.ini*:
|
||||
|
||||
@ -41,13 +41,12 @@ that in your Client's parameter *config_file*.
|
||||
Configuration Sections
|
||||
----------------------
|
||||
|
||||
There are all the sections Pyrogram uses in its configuration file:
|
||||
These are all the sections Pyrogram uses in its configuration file:
|
||||
|
||||
Pyrogram
|
||||
^^^^^^^^
|
||||
|
||||
The ``pyrogram`` section is used to store Telegram credentials, namely the API Key, which consists of two parts:
|
||||
*api_id* and *api_hash*.
|
||||
The ``[pyrogram]`` section contains your Telegram API credentials *api_id* and *api_hash*.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
@ -55,12 +54,12 @@ The ``pyrogram`` section is used to store Telegram credentials, namely the API K
|
||||
api_id = 12345
|
||||
api_hash = 0123456789abcdef0123456789abcdef
|
||||
|
||||
`More info <../start/Setup.html#configuration>`_
|
||||
`More info about API Key. <../start/Setup.html#configuration>`_
|
||||
|
||||
Proxy
|
||||
^^^^^
|
||||
|
||||
The ``proxy`` section contains settings about your SOCKS5 proxy.
|
||||
The ``[proxy]`` section contains settings about your SOCKS5 proxy.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
@ -71,3 +70,21 @@ The ``proxy`` section contains settings about your SOCKS5 proxy.
|
||||
username = <your_username>
|
||||
password = <your_password>
|
||||
|
||||
`More info about SOCKS5 Proxy. <SOCKS5Proxy.html>`_
|
||||
|
||||
Plugins
|
||||
^^^^^^^
|
||||
|
||||
The ``[plugins]`` section contains settings about Smart Plugins.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[plugins]
|
||||
root = plugins
|
||||
include =
|
||||
module
|
||||
folder.module
|
||||
exclude =
|
||||
module fn2
|
||||
|
||||
`More info about Smart Plugins. <SmartPlugins.html>`_
|
||||
|
Loading…
Reference in New Issue
Block a user