RegexBot/docs/docs.md

27 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2017-11-20 00:54:39 +00:00
# Documentation
2018-01-13 20:02:48 +00:00
RegexBot has no default behavior of its own. It is up to the bot operator to define all aspects of its function, and this is all done by means of a configuration file.
2017-11-20 00:54:39 +00:00
2018-01-13 20:02:48 +00:00
Configuration takes the form of a [JSON](https://json.org/) file residing in the same directory as the executable, named `settings.json`. The sample provided below should give you an idea of how the file is structured. Additionally, the JSON parser used by RegexBot allows for comments within the file.
2017-11-20 00:54:39 +00:00
2018-01-13 20:02:48 +00:00
Sample configuration file:
2017-11-20 00:54:39 +00:00
```
{
"bot-token": "AbCDEf-gh1JKLmn0pqR$Tu.vwXyZ",
2018-01-13 20:02:48 +00:00
"playing": "with my preferred text editor", // not saying which!
2017-11-20 00:54:39 +00:00
"servers": [
{
2018-01-13 20:02:48 +00:00
// server definition(s) defined here
2017-11-20 00:54:39 +00:00
}
]
}
```
2018-01-13 20:02:48 +00:00
### Structure
The following is a list of all accepted members at the top level of the configuration file. Links given below and in subsequent pages will further explain additional values that are allowed within them.
Value names are **case sensitive**. Keep this in mind, as case is not consistent throughout the list of member names. This will be corrected in future updates.
2017-11-20 00:54:39 +00:00
2018-01-13 20:02:48 +00:00
* bot-token (*string*) - Discord token for connecting to the service. **Required.**
* playing (*string*) - Optional text to display for the bot's status message.
* database (*object*) - Holds optional [database configuration](database.html).
2018-01-13 20:02:48 +00:00
* servers (*array*) - Takes an array of unnamed [server definition](serverdef.html) objects.