Telegram Reminder Bot is a user-friendly Java-based Telegram bot designed to create and manage personal reminders across multiple time zones relative to Moscow time (GMT+3).
-
π Time Zone Customization
- Set your local time offset relative to Moscow.
- Automatic time conversion.
-
π Reminder Management
- Create reminders quickly and easily.
- Reminders automatically delete upon completion.
-
π View Active Reminders
- Clearly view your reminders in local time.
- Interactive inline-button interface.
-
ποΈ Flexible Deletion
- Delete reminders individually or all at once.
Class/File | Description |
---|---|
App.java |
Main class; initializes and registers the bot. |
Bot.java |
Handles core bot logic: messages, reminders, callbacks. |
UserState |
Manages user-specific data (time offset, reminders). |
Reminder |
Represents reminders (content, timing, auto-deletion). |
- Users first enter their local time offset from Moscow (e.g.,
-1
,+2
). - The bot stores this offset for accurate reminder timing.
- Enter reminder text and local time (
HH:mm
). - Bot converts to Moscow time and schedules the reminder.
- If the chosen time has passed, it automatically schedules for the next day.
- Users get timely reminders via Telegram messages.
- Reminders remove themselves automatically after notification.
Command / Action | Description |
---|---|
/start |
Start interaction or set time offset. |
Create Reminder | Start creating a new reminder. |
List Reminders | View all your scheduled reminders. |
Delete All Reminders | Remove all active reminders. |
Delete Individual | Selectively delete individual reminders. |
- Java 17
- TelegramBots API
- Maven (Dependency Management)
User: /start Bot: π Hello, Alex! Please specify your time offset from Moscow. (e.g., -1, +2, +7)
User: +1 Bot: β Offset from Moscow (+1 hr) saved. [Create Reminder] [List Reminders] [Delete All] [Delete Individual]
User (creates reminder): Take medication at 21:00 Bot: β Reminder "Take medication" set for 21:00 β³
1. Clone the repository:
git clone <your_repository_url>
**2. Replace the bot token in Bot.java:
@Override
public String getBotToken() {
return "YOUR_BOT_TOKEN";
}
**3. Build and run via Maven:
mvn clean compile assembly:single
java -jar target/your-bot-name.jar
<!-- TelegramBots -->
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>6.9.7.0</version>
</dependency>