Discord bot for the FCSE Students
Discord server, powered by discord.js 14. Requires Node.js and PostgreSQL. It is recommended to use the latest LTS versions of both.
It's recommended, but not required to run this inside a Docker container.
This discord bot contains many features personalized for the above-mentioned Discord server. Some of the highlights include:
- Extensible FAQ and common links system
- Providing about courses: general information, participants, professors, and so on
- Providing information about other aspects, such as professors' contact information, classrooms, previous timetables of exam sessions, and so on
- Management of user content through commands
- Extensible permissions system
- Fully featured polls
- Automation of the entire management of the server, allowing members to vote in new admins and such
- Experience & leveling
- Moderation
- Ticketing system
- Miscellaneous functionalities, such as reminders, sending embeds for rules, role assignments
For development purposes, be sure to run npm run prepare
to install the Git pre-commit hooks.
Also, this project contains a dev container configuration for hot reloading. If you encounter issues in the dev container with Prisma, then run npm run generate
to regenerate the Prisma client.
The project is available as a Docker image on DockerHub as delemangi/finki-discord-bot
.
Using the provided production Docker Compose setup:
- Download the
docker-compose.prod.yaml
from the repository, put it in a folder and rename it todocker-compose.yaml
- Pull the images:
docker compose pull
Using the repository:
- Clone the repository:
git clone [email protected]:Delemangi/finki-discord-bot.git
- Build the images:
docker compose build
- Clone the repository:
git clone [email protected]:Delemangi/finki-discord-bot.git
- Install the dependencies:
npm i
- Build the project:
npm run build
Regardless of the Docker steps you have followed above for installation, run docker compose up
npm run start
The configuration is currently split into a .env
file which contains login information for the bot and for the database, and several json
configuration files for command output.
- Create a
.env
file in the root directory containing the environment variables as specified in the.env.sample
file in the repository - Create a
config
folder in the root directory containing:classrooms.json
- an array of all the classroomscourses.json
- an array of the names of all coursesinformation.json
- an array of all the course informationparticipants.json
- an array of all courses and their number of participantsprerequisites.json
- an array of course prerequisitesprofessors.json
- an array of all courses and their professors and assistantsroles.json
- roles for the scripts and for the embedssessions.json
- an object of all exam sessionsstaff.json
- an array of the staff
Create a sessions
folder in the root directory. All the session schedule files should go there. The files names should match the respective names in the sessions.json
config file.
The bot logs info
and above messages in the console, and logs debug
and above messages in bot.log
, which gets wiped on every bot restart.
Here is a list of features that are planned:
- Moving away from configuration files as much as possible, and keeping everything in the database
- Web application for configuring the bot
- Testing
- More moderation and lockdown functionalities
- Bundling, if there is an easy way to achieve it
This project is licensed under the MIT license.