Description
This module adds a community birthday management feature to your Discord server.
It provides a slash command that allows each user to register their birthday date in the application’s database.
Once the date is entered via the command, it is automatically validated, normalized and reliably stored for the calling user, whether it is an initial creation or a future update.
Every day at 08:00, the module checks for birthdays: if it is a user’s birthday, the bot will automatically send a birthday message in the configured server channel so the whole community can congratulate them.
This system enhances community spirit and prevents birthdays from being forgotten within your server.
❗ Important
Section titled “❗ Important”- The module is not functional by only downloading the files; it must be integrated into an already working Discord bot.
- We use Prisma as the ORM for database management; ensure your project also uses Prisma or adapt the code accordingly.
⚠️ Requirements
Section titled “⚠️ Requirements”- A working Discord bot with the necessary permissions to register slash commands.
- You should have knowledge in Discord bot development (JavaScript) and database management to use and adapt this script to your needs.
Files/Folders
Section titled “Files/Folders”Directorycommands
- birthday.js Implementation of the slash command
Directoryprisma
- schema.prisma Data model for the module (Prisma)
Directoryutils
- birthday.js Utility functions for managing and sending birthday messages
- index.js Entry point of the script
- .env Required environment variables
- package.json Required dependencies
Dependencies & Versions
Section titled “Dependencies & Versions”These are the versions used during development and testing of the script:
- @prisma/client@6.18.0
- discord.js@14.24.0
- dotenv@16.6.1
- node-schedule@2.1.1