![스크린샷 2023-08-01 오후 10 52 22](https://private-user-images.githubusercontent.com/58936172/257535446-12b05920-b39d-423a-9020-d0b440a9982e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NDcxNjksIm5iZiI6MTcyMDQ0Njg2OSwicGF0aCI6Ii81ODkzNjE3Mi8yNTc1MzU0NDYtMTJiMDU5MjAtYjM5ZC00MjNhLTkwMjAtZDBiNDQwYTk5ODJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDEzNTQyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxZmZjNWZjYmRjY2RhZTcyMTk0ZDVjZjg4NjZlZDFiN2FlMDQzYzYxODI2MTUwYTQ4MGVlYTc0MTkwYzYwM2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Uqs7GQbEry5F7-eCwoG3pqIAiqwg_eLpPaGyL5485JM)
This is a prototype of BOJ Bot with following features.
- Random Recommendation of BOJ problems via discord chat
- Daily notification with a single random BOJ problem
- Streak Guard
Will be further developed into "Baekjoon Bot" with BOAZ members.
Click the link below and grant permissions for the bot to join your server:
Clone this repository and run:
git clone https://github.com/synoti21/BOJ_Bot_Backend.git
npm install
- Make your application in the discord developer site
- Create .env and fill the value with your discord bot token, and AWS RDS info
DISCORD_TOKEN=
RDS_ENDPOINT=
RDS_USER=
RDS_PASSWORD=
RDS_DB=
- Type
npm test
to test the connection with your RDS - Type
npm start
to start the bot
For those who prefer using Docker container, follow the instruction:
- Fill the environment variable in the Dockerfile
ENV DISCORD_TOKEN <your discord bot token>
ENV RDS_ENDPOINT <your endpoint>
ENV RDS_USER <your username>
ENV RDS_PASSWORD <your password>
ENV RDS_DB <your db name>
ENV TZ <your region timezone>
- Build an image and run a container
docker build -t <image name> .
docker run -d <image name>
I recommend creating .env file before building an image as variables could be reset when restarting a container.