← projects
Node.js

Telegram Bot (QBot)

Telegram Bot (QBot)
Node.js
OVERVIEW

A versatile Telegram bot designed to enhance user interaction and automate tasks within Telegram groups or chats. Developed using Node.js and the Telegram Bot API, it provides functionalities like chat management and notifications.

TECH STACK
Node.jsTelegram Bot API
KEY FEATURES
  • Serverless deployment on AWS Lambda behind API Gateway for scalable, low-cost hosting
  • AI-powered fallback responses via OpenRouter's DeepSeek model when no dataset match is found
  • Pattern-matched replies from a customizable JSON dataset for fast, predictable answers
  • Conversation-context awareness so the AI keeps track of recent message history
HOW IT WORKS
  1. 01A message arrives in a Telegram chat and is routed to the bot via the Telegram Bot API
  2. 02The bot first checks the message against a curated JSON dataset for a pattern match
  3. 03If no match is found, the message is forwarded to OpenRouter's DeepSeek model for an AI-generated reply
  4. 04Recent conversation history is kept so the AI can respond with context
  5. 05The bot runs serverless on AWS Lambda behind API Gateway, scaling automatically with chat volume