Discord Bot for Equilibrium, a Torn City faction.
git
command line (Windows|Linux|MacOS) installednpm
Version 6.0.0 or highernode
Version 12.0.0 or higher- The node-gyp build tools. This is a pre-requisite for Enmap, but also for a many other modules, so it's very good to have available. See The Enmap Guide for details and requirements for your OS. Just follow what's in the tabbed block only, then come back here!
Other bits needed:
- Your bot's secret token.
- At least one Torn API key.
- The Discord ID for each bot owner, admin, and moderator.
- In the parent directory where you want to clone this repo. run the following:
-
git clone https://github.com/TheCodeSinger/equibot
- In the folder from where you ran the git command, run
cd equibot
and then runnpm install
. - If you get any error about python or msibuild.exe or binding, review the requirements section
- Copy
auth.js.template
toauth.js
and fill out the required fields. - Copy
config.js.template
toconfig.js
and fill out the required fields.
To start the bot, run the following command:
npm start
If you want to run the bot in the background, you can use the pm2 process manager which is already installed as one of the dependencies. If you create an account online you can link to a web app dashboard monitor. If you choose to use a different method, you may remove the pm2 entry in package.json.
Start and Daemonize the application:
pm2 start index.js
Add this process to your OS startup script:
pm2 startup
To add the bot to your guild, you have to get an oauth link for it.
You can use this site to help you generate a full OAuth Link, which includes a calculator for the permissions: https://finitereality.github.io/permissions-calculator/?v=0
Or you can use the discord developer portal where you created your bot.