BDay_bot is a Telegram bot designed to manage birthdays within a group. It can store, update, and notify group members of upcoming birthdays using SQLite as its database and cron jobs for scheduled tasks.
- Add and remove birthdays.
- Automatically send birthday wishes to the group.
- Store birthdays in SQLite.
- Timezone-aware scheduling for birthday notifications.
- TypeScript: Core language for bot logic.
- grammY: Bot framework for handling Telegram interactions.
- SQLite: Database for storing birthday data.
- node-cron: For scheduling birthday notifications.
- moment-timezone: To handle dates and times across different timezones.
- Node.js (version 16 or higher)
- npm (Node Package Manager)
-
Clone this repository:
git clone https://github.com/77EnderGuy77/BDay_bot
-
Install the dependencies:
cd BDay_bot npm install
-
Compile the TypeScript files:
npm run build
-
Create a
.env
file in the root of the project with the following variables:BOT_TOKEN='your-telegram-bot-token' GROUP_ID='your-telegram-group-id'
-
Start the bot in development mode (auto-restart with file changes):
npm run dev
-
Or start the bot in production mode:
npm start
- /start: Initializes the bot and opens/creates the SQLite database.
- /addBday: Add a new birthday. Usage:
/addBday user_tag DD-MM-YYYY
or/addBday user_tag DD-MM
- /deleteBday: Remove a birthday. Usage:
/deleteBday user_tag
The bot automatically sends birthday messages to the group at 9 AM (Europe/Kiev timezone) using a cron job.
This project is licensed under the ISC License.
Created by 77EnderGuy77.
Feel free to fork this repository and make necessary changes.