DankRPG has now been written in Discord.JS, visible here. There is no guarantee this repository will still work, as it will no longer be updated. It is kept public for historical purposes.
Please note that this project mainly for people who want to see the code of DankRPG, and learn from it. I have provided this guide for the people that wish to self host DankRPG, but you will most likely encounter errors. You will have to edit some of the code yourself.
If you wish to continue:
- First update the config.json file.
- Update some of the vars in variables.js
- Read through code and change what you'd like to.
- Take note of the license.
- Read the DankRPG docs for command info: https://docs.dankrpg.xyz
- Read the aoi.js docs: https://aoi.js.org/docs/
There are multiple providers out there, with some even offering free credit. Choose what suits you best.
You could also use an online IDE, like replit. Though these will usually not allow root access.
Just make sure the one you choose supports:
- Linux (I recommend Ubuntu/Debian distros. I will be mentioning Ubuntu commands below.)
- 24/7 hosting
- (optional) pay as you go.
You should skip this step when using an online IDE.
For Linux users (your personal machine), I recommend EasySSH + FileZilla or Termius for accessing the server.
For Windows users (your personal machine), I recommend Bitvise or Termius.
To use these applications, they will usually ask for a couple of things:
- The host/address: This is the ipv4 address provided by your hosting provider.
- The username: Usually "root" on linux servers.
- The password: Set by yourself through your hosting provider.
- The port: Usually "22", but check with your hosting provider.
Assuming you are using Ubuntu, run the following commands:
Installing Nodejs v18 (normal apt version is outdated):
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
Installing npm (if you do not have it included with Nodejs):
sudo apt install npm
-- Here you want to upload the bot's files to a new folder.
mkdir folder_name
(upload files here through your chosen program)
cd folder_name
npm init
npm install [email protected]
npm install pm2 -g
pm2 start index.js
Alternatively: run node index.js
to see any errors occuring (this will not host the bot 24/7!)
pm2 restart index.js - restarts the file
pm2 stop index.js - stops the file
pm2 ls - lists all processes running