Guardsman is Bunker Bravo's moderation and management suite. This component (guardsman-discord-extended) is responsible for providing a Discord management interface for partnered guilds and global Bunker Bravo moderators.
To install Guardsman Discord on your system, follow these steps:
NOTE: Guardsman Discord Extended has only been tested on linux and win32.
NOTE: Guardsman Discord Extended REQUIRES a working Guardsman Web installation. Please follow the installation instructions for Guardsman Web.
-
Clone the Guardsman Discord Extended repository. (ex:
git clone https://github.com/Sintaxytb/Guardsman-discord-extended/ -
Install NPM dependencies with your package manager of choice (
npm install,pnpm install,yarn install) -
Copy
.env.exampleto.env(cp .env.example .env) -
Database migrations can be found in the Guardsman Web repository. You MUST have a working Guardsman Web installation to run Guardsman Discord Extended.
The following configuration values MUST be set:
DISCORD_BOT_TOKENDISCORD_BOT_CLIENT_IDDB_HOSTDB_PORTDB_DATABASEDB_USERNAMEDB_PASSWORD
Default values that are already configured are acceptable for use.
For verification to work, the following values must be set:
ROBLOX_CLIENT_IDROBLOX_CLIENT_TOKENAPP_URLVERIFICATION_COMPLETE_URIGUARDSMAN_API_URLGUARDSMAN_API_TOKENAPI_PORT
To deploy the bot to production, run npm run start. This will generate the minified files and run the bot.
A good way to keep Guardsman up is to use a process manager like PM2. To install run the following commands:
-
npm install -g pm2(linux users, you may have to use sudo depending on how your node is installed) -
pm2 start "node build/src/index.js" --name "GuardsmanDiscord" -
pm2 startup(to start pm2 processes on boot) -
pm2 save(to save the current process list which will let Guardsman start on boot)
If you need to stop Guardsman, you can use pm2 stop GuardsmanDiscord. To restart, use pm2 reload GuardsmanDiscord. Make sure to build(npm run build) before restarting if you have made changes.
To run the bot in a development environment, run npm run dev.
