Skip to content

Repository files navigation

Introduction

GrepoData Discord Bot was built using Discord.js library.

Building

Required dependencies:

  • Node >= 16.20.1
  • Visual Studio C++ build tools

Installing

npm install

Rebuilding

npm rebuild

Deploying Discord commands

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

Running bot

To run the bot you need to create .env file. To do so, simply run

cp .env.example .env

then in your .env file specify environment, which can be either production or development and bot token.

Production

Install pm2

npm install --global pm2

Run prod using pm2 ecosystem file:

  1. Move pm2.config.js to the production root
  2. Run the following command
pm2 start pm2.config.js

Register PM2 to start on boot and save the current process list:

pm2 startup
pm2 save

If pm2 startup prints an additional command, run that command once with the required privileges, then run pm2 save again.

Acceptance

Run acc using pm2:

pm2 start index.js --name grepodata-discord-acc --interpreter "node@16.20.1" --cwd active/

Local

Run acc locally:

node index.js

About

Discord bot for grepodata.com

Topics

Resources

Contributing

Stars

5 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages