CelebrationBot is a Discord bot designed to manage and celebrate birthdays within your Discord server. It assigns a special birthday role to users on their birthday, sends a customized birthday message, and allows users to add their birthdays using a slash command.
- Assigns a "Birthday" role to users on their birthday.
- Sends a customized birthday message to a designated channel.
- Allows users to add their birthdays using a slash command in the format "Month Day Year".
- Administrators can add birthdays for other users.
Python 3.8
or higherdiscord.py
librarysqlite3
library (comes with Python)configparser
library
-
Clone the Repository:
git clone https://github.com/rfkgaming89/CelebrationBot.git
cd CelebrationBot
-
Create and Activate a Virtual Environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the Required Dependencies:
Create a
requirements.txt
file in the root directory with the following content:discord.py
Then, install the dependencies:
pip install -r requirements.txt
-
Create a
config.ini
File:Create a file named
config.ini
in the root directory with the following content:[DISCORD] TOKEN=your_discord_bot_token GUILD_ID=your_guild_id BIRTHDAY_CHANNEL_ID=your_channel_id
Replace
your_discord_bot_token
,your_guild_id
, andyour_channel_id
with the appropriate values.
-
Ensure the
config.ini
File is Correctly Configured:Make sure the
config.ini
file is in the same directory as your script and contains the correct values. -
Run the Bot:
python birthday_bot.py
-
/add_birthday
: Add a birthday for a user in "Month Day Year" format.Example:
/add_birthday @john_doe January 1 2000
The bot includes a list of predefined birthday messages. You can customize these messages by modifying the birthday_messages
list in the script:
birthday_messages = [
"Happy Birthday, {user}!",
"🎉🎂 Happy Birthday, {user}! 🎂🎉",
"Wishing you a fantastic birthday, {user}!",
"It's your special day, {user}! Happy Birthday!",
"Cheers to you on your birthday, {user}!"
]
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
- discord.py - An API wrapper for Discord written in Python.