This repository houses a bot that automatically synchronizes bans between multiple Discord servers.
This setup assumes you have Git, and Node.js setup on your machine. This project requires Node.js version 20.17.0 or higher, and uses the pnpm package manager, so you should have basic knowledge about how to use them.
git clone git@github.com:almeidx/discord-ban-sync.git
cd discord-ban-sync
corepack install
pnpm i
Note: If you don't have corepack enabled, you can do it with corepack enable
.
cp .env.example .env
- Fill out the variables in the .env file
The guild ids should be comma separated, e.g. GUILD_IDS=493351982887862283,513338222810497041
pnpm build
Then:
-
if you're using pm2, you can use:
pm2 start ecosystem.config.cjs
-
if your environment variables are stored on the .env file, you can use:
pnpm start:env
-
otherwise, use:
pnpm start
To check if the bot is working, you can run the /ping
slash command.
git pull
pnpm i
pnpm build
- Refer to Running the bot locally to run the bot again
discord-ban-sync © almeidx, released under the Apache 2.0 license.
GitHub @almeidx