![스크린샷 2023-08-01 오후 10 52 22](https://private-user-images.githubusercontent.com/58936172/257535446-12b05920-b39d-423a-9020-d0b440a9982e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAyNTQwNTEsIm5iZiI6MTcyMDI1Mzc1MSwicGF0aCI6Ii81ODkzNjE3Mi8yNTc1MzU0NDYtMTJiMDU5MjAtYjM5ZC00MjNhLTkwMjAtZDBiNDQwYTk5ODJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA2VDA4MTU1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk1NTM5ZjY2YjhjYjllYzY5ZTBmMjdmZWQ3YmQ1ZjM0YzllYTQ4NjZjYmE4N2FmMGI5ZjFkOTdkYTA2ZWM2YzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KINyeAUQkhWhtXKJZl3nLC3GyXtnp0DyObANThfwLYI)
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.