synoti21 / BOJ-Bot

A bot for Baekjoon online judge to get daily problem, and protect your streak (Prototype of "baekjoon-discord-bot")

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BOJ-Bot

스크린샷 2023-08-01 오후 10 52 22

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.

🚀 Getting Started

🤖 Adding the bot to your server

Click the link below and grant permissions for the bot to join your server:

Add bot to your server

💻 Running the server locally

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

📦 Using Docker

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.

About

A bot for Baekjoon online judge to get daily problem, and protect your streak (Prototype of "baekjoon-discord-bot")

License:MIT License


Languages

Language:JavaScript 98.6%Language:Dockerfile 1.4%