Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 036f9ad

Browse files
committed
Add details about bot configuration to readme
1 parent 5afa05a commit 036f9ad

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ You can run your own bot without writing any code.
99
You will need the following:
1010

1111
1. Your own [Discord Application](https://discordapp.com/developers/applications) with a bot token.
12-
2. A [configuration file](configuring-your-bot) for the bot.
12+
2. A [configuration file](#configuring-your-bot) for the bot.
1313
3. A Python 3.8+ environment with the `commanderbot` package installed.
14-
- It is recommended to use a [virtual environment](https://docs.python.org/3/tutorial/venv.html) for this.
15-
- Run `pip install commanderbot` to install the bot core package.
14+
- It is recommended to use a [virtual environment](https://docs.python.org/3/tutorial/venv.html) for this.
15+
- Run `pip install commanderbot` to install the bot core package.
1616
4. (Optional) The `commanderbot-ext` package; if you are using any of the provided extensions.
17-
- Run `pip install commanderbot-ext` to install the bot extensions package.
17+
- Run `pip install commanderbot-ext` to install the bot extensions package.
1818

1919
The first thing you should do is check the CLI help menu:
2020

@@ -23,6 +23,7 @@ python -m commanderbot --help
2323
```
2424

2525
There are three ways to provide your bot token:
26+
2627
1. (Recommended) As the `BOT_TOKEN` environment variable: `BOT_TOKEN=put_your_bot_token_here`
2728
2. As a CLI option: `--token put_your_bot_token_here`
2829
3. Manually, when prompted during start-up
@@ -32,3 +33,26 @@ Here's an example that provides the bot token as an argument:
3233
```bash
3334
python -m commanderbot bot.json --token put_your_bot_token_here
3435
```
36+
37+
## Configuring your bot
38+
39+
The current set of configuration options is limited. Following is an example configuration that sets the command prefix and loads the `status` and `faq` extensions.
40+
41+
> Note that with this configuration, the `faq` extension will require read-write access to `faq.json` in the working directory.
42+
43+
```json
44+
{
45+
"command_prefix": ">",
46+
"extensions": [
47+
"commanderbot_ext.status",
48+
{
49+
"name": "commanderbot_ext.faq",
50+
"enabled": true,
51+
"options": {
52+
"database": "faq.json",
53+
"prefix": "?"
54+
}
55+
}
56+
]
57+
}
58+
```

0 commit comments

Comments
 (0)