The Telegram Calendar Bot allows users to create and manage events with other people, ensuring that all participants have the selected time available. The bot notifies all participants when a new event is created.
- Group Management: Create groups of users to plan events together.
- Event Scheduling: Schedule events for groups, ensuring no conflicts with existing events.
- Notifications: Automatically notify users of upcoming events 30 minutes in advance.
- Database Support: Persistent storage of users, groups, events, and schedules using SQLite.
- Python 3.9+
- Telegram Bot Token (replace in
bot_instance.py)
-
Clone the repository:
git clone https://github.com/your-repo/telegram-calendar-bot.git cd telegram-calendar-bot -
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up the SQLite database:
python >>> import dataBase.dataBase as db >>> db.create_dataBase() >>> exit()
-
Start the bot:
python main.py
├── main.py # Entry point for the bot
├── bot_instance.py # Bot initialization
├── handlers
│ ├── handlers.py # Bot handlers
│ └── keyboard.py # Inline keyboards for user interaction
├── dataBase
│ └── dataBase.py # Database operations
├── requirements.txt # Required Python packages
- Create Group: Users can create groups for event planning.
- Schedule Event: Users select a group, specify an event name, and choose a date and time.
- Conflict Check: The bot ensures no conflicts with existing events for participants.
- Notification: Participants are notified about the event.
- The bot uses APScheduler to send reminders 30 minutes before an event.
- Start the Bot: Send
/startto the bot. - Group Management:
- To create a group, navigate to "Группы" -> "Создать новую группу" -> Enter a name for the group.
- In the selected group, you can add participants using the provided buttons.
- Event Scheduling:
- To create an event, navigate to "События" -> "Добавить событие" -> Select a group -> Enter a name for the event.
- In the selected event within the chosen group, you can add or remove times by pressing the corresponding buttons.
- Receive Notifications: Get reminders before events.
Replace the placeholder in bot_instance.py with your Telegram bot token:
bot = Bot(token="YOUR_TELEGRAM_BOT_TOKEN")aiogram: Telegram Bot API framework.apscheduler: Task scheduling.sqlite3: Database management.
Install dependencies with:
pip install -r requirements.txtThis project is licensed under the MIT License.
Contributions are welcome! Feel free to fork this repository and submit a pull request.