GrepoData Discord Bot was built using Discord.js library.
Required dependencies:
- Node >= 16.20.1
- Visual Studio C++ build tools
npm install
npm rebuild
If you made changes to the command definitions in commands/*.js, then you should redeploy the commands via the Discord API.
node deploy-commands.js
To run the bot you need to create .env file. To do so, simply run
cp .env.example .envthen in your .env file specify environment, which can be either production or development and bot token.
Install pm2
npm install --global pm2
Run prod using pm2 ecosystem file:
- Move pm2.config.js to the production root
- Run the following command
pm2 start pm2.config.js
Register PM2 to start on boot and save the current process list:
pm2 startup
pm2 saveIf pm2 startup prints an additional command, run that command once with the required privileges, then run pm2 save again.
Run acc using pm2:
pm2 start index.js --name grepodata-discord-acc --interpreter "node@16.20.1" --cwd active/
Run acc locally:
node index.js