The bot is designed to simplify sending messages about created Merge Requests to a Discord chat.
- Create an application on the page https://discord.com/developers/applications
- Enter to your application and navigate to the
Bot
tab. - In the "Privileged Gateway Intents" section, enable "SERVER MEMBERS INTENT" and click "Save."
- Click on Reset Token, copy the token, and add an environment variable to your
.env
file in your application:BOT_OAUTH_KEY=#YOUR_TOKEN#
. - Go to the OAuth2 page.
- Copy the CLIENT ID and insert it into your
.env
file in your application:BOT_ID=#CLIENT ID#
. - In the
SCOPES
section, selectBot
. In theBot Permissions
section, choose the following permissions:Manage Roles
,Read Messages/View Channels
,Send Messages
,Create Public Threads
,Create Private Threads
,Send Messages In Threads
,Manage Threads
,Mention Everyone
,Use Slash Commands
. Alternatively, choose theAdministrator
permission. - Copy the URL from the
GENERATED URL
section, go to this link, and add the bot to your server.
- Setup all env variables according to the .env.dist file (create .env file with correct)
- Instal dependencies
bun install
- Start DB container:
docker-compose up mongo -d
- Register bot slash command
bun register
- Start project
bun dev
- Launch all containers
docker-compose up -d
- You rock!
- To stop containers fire
docker-compose down
- MONGO_DB_URL env variable for local host should be local launching, and mongo (equal to the container name) for launching in docker