TheelUtil (fork of DueUtil at https://github.com/MacDue/DueUtil)
(more detailed setup / install script later -- maybe)
Requirements:
- Python 3.8 + (may work on 3.5.4-3.7, but I haven't tried)
- The packages in requirements.txt (
pip install -r requirements.txt
) - MongoDB (https://docs.mongodb.com/manual/installation/)
- PHP & Apache (if you really want to run the site too)
- Install mongodb on your VPS: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
- Enter the mongo shell by typing
mongo
into the command line. - Create an account that can create & update databases (admin will do):
2a.
use admin
2b.
db.createUser(
{
user: "dueutil",
pwd: "<choose a secure one>",
roles: [ { role: "root", db: "admin" } ]
}
);
- Put the account details in
dbconfig.json
{
"host":"localhost",
"user": "dueutil",
"pwd": "<enter your password from 2b here>"
}
(the host will probably be localhost)
Create a file dueutil.json
in the same folder as run.py
(the root).
{
"botToken":"[DISCORD BOT TOKEN]",
"owner":"[OWNER DISCORD ID]",
"shardCount":1,
"shardNames":[
"Clone DueUtil: shard 1"
],
"logChannel": "[SERVER ID]/[CHANNEL ID]",
"errorChannel": "[SERVER ID]/[CHANNEL ID]",
"feedbackChannel": "[SERVER ID]/[CHANNEL ID]",
"bugChannel": "[SERVER ID]/[CHANNEL ID]",
"announcementsChannel":"[SERVER ID]/[CHANNEL ID]",
"carbonKey":"[https://www.carbonitex.net key you won't have]",
"discordBotsOrgKey":"https://discordbots.org/ key you also won't have",
"discordBotsKey": "https://bots.discord.pw/ key you also also won't have",
"discoinKey":"http://discoin.sidetrip.xyz/ you will never get",
"sentryAuth": "[SENTRY AUTH]"
}
The logging channels are currenly needed (the bot may not work properly without them), the bot probably can run without the other keys.
- Download the database dump from the last release (TheelUtil data coming soon)
- Extract that zip into folder called
database
Your file tree should look like thisdatabase `-- dueutil |-- award_stats.bson |-- award_stats.metadata.json |-- _CacheStats.bson ...
- Use mongorestore
mongorestore --username your_use --password "your_pass" --authenticationDatabase admin ./database
TheelUtil can be run from an open terminal with: python3 run.py
.
To run it in the background, do:
-
cd
(to get you to the home directory) -
cd /root/TheelUtil
(to put you inside the theelutil folder) -
chmod u+x ./start_fixed.sh
(the x lets you execute the start_fixed.sh file)` -
nohup /root/TheelUtil/start_fixed.sh &
(run it in the background, so you can close the terminal`
If you're having any difficulties, contact me at Theelx#4980 and I'll try and help you.
No need to contribute, not even to clean up code. I'll be cleaning up code over the next few months, and I hope to release a cleaner version by the 3rd anniversary of the original PyDue's death in January 2021.