Skip to content

Commit

Permalink
Add more features, few bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
CreepNT committed May 16, 2021
1 parent 632cb71 commit b86c470
Show file tree
Hide file tree
Showing 7 changed files with 707 additions and 456 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
SECRETS.py
*.old
__pycache__
__pycache__/*
4 changes: 1 addition & 3 deletions CONFIG.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
REPO_URL = "https://github.com/CreepNT/test_repo" #URL of the GitHub repository where the database is stored.

REMOTE_DATABASE_PATH = "errors.json" #Path to the database file on the remote repository.
DATABASE_PATH = "errordb.json" #Path where the database file will be saved locally.

SHA1_SUM_STORAGE = "sha1sum.txt" #Path where the SHA-1 store file will be saved locally.
DATABASE_PATH = "errordb.json" #Path where the database file will be saved locally.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Rivet
A Discord bot

# Features
Resolves PSVita error codes from a JSON database.
A Discord bot to resolve PSVita error codes from a JSON database.

# Usage
You need the following Python modules : `json`, `requests`, `re` and `discord.py`.
You need the following Python modules : `hashlib`, `requests` and `discord.py`.
Create a file named `SECRETS.py` with the following content :
```py
TOKEN = 'your bot token here'
Expand All @@ -14,5 +11,12 @@ WHITELIST = [
]
```

Run `main.py`, ??, profit.
See `CONFIG.py` for more informations about the configuration.
Run `main.py`, wait for the bot to connect, profit.<br>
See `CONFIG.py` for more informations about the configuration.<br>
Run the `help` command for more information about the avaliable commands.<br>
Some commands can only be run by users in the whitelist.

# Known issues/bugs
* After saving a database with `save_db`, the SHA-1 sum of the local copy will be different from i.e. a `download_db`'ed file's SHA-1 sum.
* This is due to the fact the `json` library will return a compacted string when serializing, which may (and probably will) not match the original file's style.
* Not fixable
158 changes: 0 additions & 158 deletions constants_database.py

This file was deleted.

Loading

0 comments on commit b86c470

Please sign in to comment.