Issue present with Purge command

This commit is contained in:
2021-07-21 23:05:13 +01:00
parent f1d12691c0
commit 51513c89a0
13 changed files with 90 additions and 25 deletions

View File

@ -11,6 +11,7 @@ The first version I committed to the repository is version 2.1, and I previously
Version 3 was the second major upgrade, taking advantage of some of the recent changes to the Discord API.
## Setup
The Bot is dockerised and uses docker-compose for deployment, so it is fairly straightforward to deploy an instance of.
Clone the repository, install Docker and Docker Compose, navigate to the root directory (that contains the `docker-compose.yml` file), and use `docker-compose up -d` to set up and run the bot.
The bot runs on one Docker container with the instance of the app as well as storage for its data and configuration.
@ -47,6 +48,7 @@ client.run(os.getenv('BOT_TOKEN'))
in order for to authenticate as the correct bot.
## File Structure
```
|-- app
| |-- bot.py
@ -99,6 +101,7 @@ I was considering merging them into one file, but given how different the two co
I had initially condsiders a `.ini` file for the configuration settings and `.json` for the data, but I decided to use `.yml` for both just to avoid unnecessary complexity.
### `config.yml` Structure
This tree gives the list of various keys for the `.yml` dictionary as well as the types of different data expected.
The entire configuration file is essentially a dictionary with other dictionaries, strings, integers, and lists as values.
All values in the dictionary are referenced first by a string of the guild id integer.
@ -128,6 +131,7 @@ Remember to convert the guild ID to strings during several operations, and be ca
```
### `data.yml` Structure
Just like above, the `data.yml` file is also a dictionary of dictionaries that is indexed by a string of the guild id.
It stores only the relevant data necessary for the code to function.
It only holds, for instance, ID numbers rather than user handles, Discord discriminators, or names.