Skip to content

Repository files navigation

Banner

Telegram Stock Alert Dialer 📞🟢

A zero-cost, automated Telegram "Userbot" that intercepts stock restock alerts and triggers instant VoIP calls to your phone.

License: MIT TypeScript Node.js Docker


📖 Overview

The Telegram Stock Alert Dialer is designed to solve a critical limitation with standard Telegram bots: Bots cannot read messages from other bots.

This project utilizes GramJS to run as a Userbot (acting on behalf of your personal account). It silently monitors a specific Telegram bot (e.g., Amul restock bot) for exact stock messages, extracts the product name and quantity, and leverages the free CallMeBot API to place a Text-to-Speech (TTS) voice call directly to your phone.

It features a remote-control interface built entirely inside your Telegram "Saved Messages", allowing you to snooze alerts or set strict quiet hours without ever touching code.

✨ Features

  • 📱 Userbot Architecture: Intercepts messages that standard bots cannot see.
  • 🎙️ Instant VoIP Calls: Triggers a free TTS phone call alerting you of the exact product and quantity.
  • 💬 In-Chat Dashboard: Control the bot remotely by sending commands to your Telegram "Saved Messages".
  • ⏳ Smart Scheduling: Set 24-hour time windows (in IST) to prevent the bot from waking you up at night.
  • 🐳 Cloud-Ready: Pre-configured Dockerfile and dummy web-server for easy deployment to 100% free hosting providers (like Render or Koyeb).

Saved Messages Interface

🚀 Quick Start

1. Prerequisites

You will need to gather a few free API keys and IDs before starting:

  • Telegram API ID & Hash: Get this by creating an application at my.telegram.org.
  • CallMeBot Authorization: Message @CallMeBot_API on Telegram or visit this link to authorize Voice Calls.
  • Target Bot ID: The exact username of the restock bot you want to monitor (e.g., @AmulAlertBot).

2. Local Setup

Clone the repository and install dependencies:

git clone https://github.com/kuanarshubham/AmulCallMe.git
cd AmulCallMe
npm install

3. Generate Session String

Because this uses a Userbot, you need to authenticate your account locally once to generate a session cookie.

npx ts-node scripts/generateSession.ts

Follow the interactive prompts. Once completed, it will output a long string. Copy it!

4. Environment Variables

Create a .env file in the root directory and populate it:

TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_SESSION=your_long_session_string
TARGET_BOT_ID=@target_restock_bot
CALLMEBOT_USERNAME=@your_telegram_username

5. Run the Bot

npm run build
npm start

Note: You can trigger a test call by sending /call to your Telegram "Saved Messages" chat.

🕹️ Commands

Send these commands to your own Saved Messages chat in Telegram to control the bot:

Command Description
/snooze Pauses all VoIP calls for exactly 20 days.
/resume Clears the snooze timer and resumes normal operation.
/call-timing HH:MM-HH:MM Sets a strict allowed calling window in IST (e.g., 09:00-22:00).
/call Triggers a test VoIP call immediately.
/help Displays the list of available commands.

☁️ Free Deployment (Render)

This project is perfectly optimized to run on Render's Free Tier without a credit card.

  1. Create a New Web Service on Render and connect this repository.
  2. Render will automatically detect the Dockerfile.
  3. Add your 5 .env variables in the Environment Variables section on the Render dashboard.
  4. Deploy!
  5. Important: Render spins down free web services after 15 minutes of inactivity. Use a free pinging service like UptimeRobot to ping your Render URL every 10 minutes to keep the bot alive 24/7.

🛠️ Tech Stack

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A zero-cost Telegram Userbot that intercepts stock restock alerts and triggers instant Text-to-Speech (TTS) VoIP calls to your phone.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages