Taskmaster Telegram Bot: AI-Powered Deadline Manager for Telegram

Learn how to build a smart Telegram bot with deadline management, AI question answering, image generation, and automatic reminders. Complete guide to Taskmaster Telegram Bot with Node.js and SQLite.

Rafi
Written by Rafi
📅
Published January 5, 2025
⏱️
Read Time 2 min
📊
Difficulty Intermediate

Ever wished you had a personal assistant in Telegram to keep track of your deadlines and deadlines—and even help with AI-powered tasks? Whether you’re managing projects, studying, or just trying to stay organized, keeping track of deadlines can be overwhelming.

What if you had a bot that not only tracks your deadlines but also reminds you, questions, generates images, and answers translates text—all within Telegram?

Taskmaster Telegram Bot does exactly that. It’s a powerful Node.js bot that combines deadline management with AI capabilities, making it your ultimate productivity companion.

ℹ️ Info

Taskmaster Bot combines SQLite-powered deadline tracking with OpenAI Llama for Q&A, NVIDIA Bria for image generation, and automatic twice-daily reminders. Everything you need in one Telegram bot!

What You’ll Learn

  • How Taskmaster Bot works
  • How to set it up on your server
  • How to use all the commands
  • How AI features enhance productivity
  • How to customize for your needs

Key Features

📅 Deadline Management

Add, modify, delete, and list deadlines easily. Track both past and upcoming deadlines with a simple command system.

Automatic Reminders

The bot checks deadlines twice daily—at 12:00 AM and 12:00 PM—and sends reminders to keep you on track.

🤖 AI Question Answering

Ask any question and get answers powered by OpenAI’s Llama model. From general knowledge to complex explanations.

📖 🖼️ AI Image Generation

Generate images from text descriptions using NVIDIA’s Bria API. Describe what you want, and the bot creates it.

🌐 Translation

Quickly translate text to Russian. Just send the text and get the translation.

👥 Admin Controls

Configure admin IDs to control who can modify deadlines. Keep your task list secure.

📎 Multimedia Support

The bot handles images, documents, and audio files. Share files directly in the conversation.

Bot Commands Reference

CommandDescription
/add <title> <YYYY-MM-DD HH:MM>Add a new deadline
/modify <id> <new-title> <YYYY-MM-DD HH:MM>Update existing deadline
/rm <id>Delete a deadline
/ltList tasks from last 10 days
/utList upcoming tasks (next 10 days)
/ai <question>Ask AI a question
/bigai <question>Get detailed AI response
/translate <text>Translate text to Russian
/bria <description>Generate AI image
/delDelete a bot message
/helpShow help message

How It Works

The architecture is straightforward but powerful:

User Command → Telegram API → Bot Processing → SQLite/OpenAI/Bria → Response

The Technical Pipeline

  1. Command Received: Telegram’s Webhook delivers your message to the bot
  2. Parsing: The bot extracts the command and arguments
  3. Processing:
    • Deadlines → SQLite database operations
    • AI questions → OpenAI Llama API
    • Images → NVIDIA Bria API
    • Translation → Internal processing
  4. Response: Formatted message sent back to Telegram

Database Structure

The bot uses SQLite for simple, reliable storage:

deadlines.db
├── id (PRIMARY KEY)
├── title
├── deadline_date
├── created_at
└── updated_at
💡 Tip

SQLite requires no setup—it creates the database automatically on first run. Perfect for quick deployment!

Installation

Step 1: Prerequisites

Ensure you have:

  • Node.js (v14 or higher)
  • npm (v6 or higher)
  • SQLite3
  • A Telegram Bot Token

Step 2: Get Your Telegram Bot Token

  1. Open Telegram and search for @BotFather
  2. Send /newbot to create a new bot
  3. Follow the prompts to name your bot
  4. Copy your Bot Token

Step 3: Clone and Install

git clone https://gitlab.com/krafi/taskmastertelegrambot.git
cd taskmastertelegrambot
npm install

Step 4: Configure Environment

Create a .env file:

TELEGRAM_TOKEN=your_telegram_bot_token_here
OPENAI_API_KEY=your_openai_api_key_here
ADMIN_IDS=your_telegram_user_id
CHAT_ID=your_chat_id_here
# Optional:
PORT=3000

Step 5: Start the Bot

npm start
⚠️ Warning

Keep your API keys secure! Never commit them to version control. Add .env to your .gitignore.

Example Usage

Managing Deadlines

/add Project Presentation 2025-02-15 14:00
→ Deadline added: Project Presentation - Feb 15, 2025 at 2:00 PM

/ut
→ Upcoming tasks:
1. Project Presentation - Feb 15, 2025

/rm 1
→ Deadline deleted successfully

AI Questions

/ai What is quantum computing?
→ [AI response with explanation]

/bigai Explain machine learning in detail
→ [More comprehensive AI response]

Image Generation

/bria A sunset over mountains with purple sky
→ [Generated image]

Translation

/translate Hello, how are you today?
→ Привет, как вы сегодня?

Use Cases

1. Personal Task Management

Keep track of personal deadlines—bills, appointments, assignments. Get daily reminders so nothing slips through the cracks.

2. Team Project Tracking

Share the bot in a group chat. Team members can add deadlines, and everyone stays informed.

3. Study Companion

Track assignment deadlines, ask AI for explanations, and generate study visuals—all from Telegram.

4. Quick AI Assistant

Need a quick answer or image? Just ask the bot instead of switching apps.

5. Language Learning

Use translation feature to quickly look up Russian translations while chatting.

Why This Project is Useful

Taskmaster Bot brings together several powerful features:

  • All-in-One: Deadline tracking + AI Q&A + image generation + translation
  • No App Switching: Everything happens in Telegram where you already spend time
  • Automatic Reminders: Never miss a deadline again
  • AI-Powered: Get answers and generate images without leaving Telegram
  • Easy Setup: Node.js + SQLite = minimal dependencies, maximum reliability
💡 Tip

Combine this with other automation tools like PiperClipTTS (for text-to-speech) to build your ultimate productivity ecosystem!

Troubleshooting

📖 Bot not responding?
  1. Check your .env file has correct Telegram Token
  2. Verify the bot was started successfully
  3. Check console for error messages
  4. Make sure you started the bot with /start
📖 AI commands not working?
  1. Verify OPENAI_API_KEY is set correctly
  2. Check your OpenAI account has credits
  3. Try /ai with a simple question first
📖 Image generation failing?
  1. Verify NVIDIA Bria API key is configured
  2. Check API rate limits
  3. Try a simpler description
📖 Deadlines not saving?
  1. Check SQLite3 is installed
  2. Verify write permissions in the directory
  3. Check database file exists or can be created
📖 Reminders not arriving?

The bot must be running continuously for scheduled tasks. Use a process manager like PM2:

npm install -g pm2
pm2 start index.js
pm2 save

Conclusion

Taskmaster Telegram Bot is a versatile productivity tool that brings deadline management and AI capabilities directly into your Telegram workflow. Whether you’re managing personal tasks, working on team projects, or just want an AI assistant at your fingertips, this bot has you covered.

Set it up once, let it run, and enjoy automatic deadline tracking and AI superpowers in your favorite messaging app!

Source Code

View and contribute to the project: Taskmaster Telegram Bot on GitLab

Happy bot building!

Knowledge Check

Test your knowledge about Taskmaster Telegram Bot

Discussion

0 comments
Reading Progress
4 min left 0%
Welcome back! Sign in to join the discussion.

Please verify your email to sign in.

Enter the 6-digit code from your verification email.

Didn't receive the email?

Remember your password?

Create an account to comment and join the community.
Letters, numbers, and underscores only

Check your email! We've sent a verification code.

Enter the 6-digit code to complete your registration, or click the link in your email.

Didn't receive the email?

Wrong email?

Enter your email address and we'll send you a code to reset your password.

Remember your password?

Enter the 6-digit code from your email and create a new password.

Didn't receive code?

Welcome aboard!

Your account has been created successfully.

Welcome back! Sign in to join the discussion.

Please verify your email to sign in.

Enter the 6-digit code from your verification email.

Didn't receive the email?

Remember your password?

Create an account to comment and join the community.
Letters, numbers, and underscores only

Check your email! We've sent a verification code.

Enter the 6-digit code to complete your registration, or click the link in your email.

Didn't receive the email?

Wrong email?

Enter your email address and we'll send you a code to reset your password.

Remember your password?

Enter the 6-digit code from your email and create a new password.

Didn't receive code?

Welcome aboard!

Your account has been created successfully.