← Projects
Side project
// Side project · Own initiative

Discord moderation bot

Context: Side project, outside the syllabus Team: Solo, fully self-directed Duration: 1 month Stack: JavaScript · Node.js · discord.js Status: Finished · in production

Context

A fully personal project, done alone and entirely self-directed over about a month: no set topic, no supervisor, no deadline other than the one I set myself. The need was concrete: moderate a Discord server properly without having to stay connected all the time.

None of this project was on the BUT syllabus: not JavaScript, not Node.js, not consuming an external API. It all came from the official documentation and my own trial and error. That makes it the project that best shows I can learn an unfamiliar technology on my own.

Goal

Deliver a tool actually used day to day, not a demo: a bot that can handle moderation on an active server by itself. So the goal was entirely about function and reliability: there is no graphical interface, the bot’s “interface” being its commands and its messages.

A second goal, just as important to me: properly understanding how a REST API, event-driven architecture and asynchronous programming work in JavaScript, things I did not want to have merely read about.

The Discord bot in action

Technical work

The bot is written in JavaScript with Node.js and the discord.js library. It is built on an event-driven architecture and slash commands. I implemented a full moderation module: ban, kick, temporary mute, warnings and role management. An auto-moderation system filters spam, unwanted links and banned words. Every action is written to a log channel, and the data (warnings, server configuration) is stored persistently.

Difficulties

The main challenges were handling asynchronous code (async/await, promises) to chain API calls without blocking the bot, respecting Discord’s rate limits, and handling permissions carefully to prevent abuse. I also had to structure the code into clean modules so it stayed maintainable as I added new commands.

What I take from it

This project taught me to consume a real REST API, to think in event-driven and asynchronous terms, and to organise a JavaScript project from start to finish. Beyond the technical side, I understood how much error handling and permissions matter in a tool used by real people. It is the project that got me interested in back-end development.

What I gained
  • A complete language and ecosystem, JavaScript and Node.js, learned entirely on my own, outside the syllabus.
  • A practical grasp of asynchronous code (async/await, promises) and of event-driven architecture.
  • The experience of a tool actually used by other people: bugs have visible consequences, which changes the way you write code.
  • The habit of structuring things into modules from the start so a project stays maintainable as it grows.
View the code on GitLab