diff options
author | 2022-07-23 17:00:16 +0200 | |
---|---|---|
committer | 2022-07-23 17:10:52 +0200 | |
commit | 0e0b8933e4654bcfd80708c54a63c272bb5cbbd1 (patch) | |
tree | 6a93d9648d033a4e535424defe3eaa407eb41dc5 | |
parent | Clean Up Docker Configuration (diff) |
Document Sample Project Environment Variables
Co-authored-by: Chris Lovering <[email protected]>
Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r-- | dev/README.rst | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/dev/README.rst b/dev/README.rst index b1535962..afff6255 100644 --- a/dev/README.rst +++ b/dev/README.rst @@ -19,7 +19,7 @@ Option 1 1. Navigate to the project you want to install bot-core in, such as bot or sir-lancebot 2. Run ``pip install /path/to/botcore`` in the project's environment - - The path provided to install should be the root directory of this project on your maching. + - The path provided to install should be the root directory of this project on your machine. That is, the folder which contains the ``pyproject.toml`` file. - Make sure to install in the correct environment. Most Python Discord projects use poetry, so you can run ``poetry run pip install /path/to/botcore``. @@ -30,14 +30,22 @@ Option 1 Option 2 -------- -1. Copy the :repo-file:`bot template folder <dev/bot>` to the root of your project. +1. Copy the :repo-file:`bot template folder <dev/bot>` to the root of the bot-core project. This copy is going to be git-ignored, so you're free to modify it however you like. 2. Run the project - Locally: You can run it on your system using ``python -m bot`` - Docker: You can run on docker using ``docker compose up -d bot``. -3. You can now test your changes. You do not need to do anything to reinstall the +3. Configure the environment variables used by the program. + You can set them in an ``.env`` file in the project root directory. The variables are: + + - ``TOKEN`` (required): Discord bot token, with all intents enabled + - ``GUILD_ID`` (required): The guild the bot should monitor + - ``PREFIX``: The prefix to use for invoking bot commands. Defaults to mentions and ``!`` + - ``ALLOWED_ROLES``: A comma seperated list of role IDs which the bot is allowed to mention + +4. You can now test your changes. You do not need to do anything to reinstall the library if you modify your code. .. tip:: |