Skip to content

omnifaced/telegram-activity-tracker

Repository files navigation

Telegram Activity Tracker

A Telegram bot for tracking user activity in channels.

MVP Notice

This is a MVP built for quick deployment. Currently supports tracking a single channel only. The implementation is intentionally simplified to get the core functionality working.

Planned Features

  • Multi-channel support - ability to track multiple channels simultaneously
  • Enhanced configuration options
  • Improved logging and analytics
  • Database integration for activity history

Features

  • Track user joins and leaves in Telegram channels
  • Send notifications to a designated channel
  • Admin commands for user management
  • System notifications for bot lifecycle events

Prerequisites

  • A Telegram bot token from @BotFather
  • Admin rights in the target channel

Installation

pnpm install

Configuration

Copy the example environment file and fill in your values:

cp .example.env .env

Environment Variables

  • TOKEN - Your Telegram bot token
  • TARGET_CHANNEL - Channel ID to track (the one you want to monitor)
  • NOTIFY_CHANNEL - Channel ID for notifications (where the bot sends updates)
  • SYSTEM_CHANNEL - Channel ID for system messages
  • DEVELOPER_ID - Your Telegram user ID

Usage

Development

pnpm dev

Production

pnpm start

Docker

docker compose up -d

Scripts

  • pnpm format - Format code with Biome
  • pnpm lint - Lint code with Biome
  • pnpm type:check - Run TypeScript type checking
  • pnpm dev - Run in development mode with hot reload
  • pnpm start - Run in production mode

License

Copyright (c) 2025 Abbasov Ravan (omnifaced) All rights reserved.

About

A Telegram bot for tracking channel activity

Resources

License

Stars

Watchers

Forks