Skip to content

@PackOwnerBot helps you find the owner or creator of any Telegram sticker pack. Simply send a sticker, and the bot will provide details about the sticker pack's creator.

License

Notifications You must be signed in to change notification settings

ankit-chaubey/PackOwnerBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PackOwnerBot

A minimal, protocol-level Telegram tool to extract internal sticker pack IDs using Telegram’s MTProto layer.


✨ Overview

PackOwnerBot inspects Telegram sticker packs and reveals their internal ID — a value not exposed by the standard Telegram Bot API.

This project is intentionally:

  • 🔍 Internal-focused (metadata & protocol internals)
  • 🧼 Minimal & clean (no UI clutter)
  • ⚙️ Tooling-oriented (research & inspection)

🚀 Live Bot Instance

A public running instance of this project is available on Telegram:

You can directly interact with the bot by sending a sticker.


🧩 Supported Clients

This repository supports both major MTProto clients, organized by directory:

telethon/
pyrogram/

Each implementation is standalone and functionally equivalent.


🔹 Telethon

  • Raw MTProto access
  • Uses messages.getStickerSet
  • Reads packed StickerSet.id
  • Ideal for low-level inspection & research

🔹 Pyrogram

  • MTProto-based client
  • Cleaner abstraction for some workflows
  • Same internal ID decoding logic
  • Suitable for hybrid Bot API + MTProto setups

🔐 MTProto & Bot API (Hybrid Model)

This project can operate in a two-layer architecture:

Telegram Bot API
↓
MTProto (Telethon / Pyrogram)
  • Bot API → receives updates & commands
  • MTProto → fetches internal sticker metadata

This hybrid approach enables access to data impossible to obtain via Bot API alone.


🧠 What the Bot Extracts

From a single sticker pack:

StickerSet.id  (64-bit integer)

Which internally contains:

[ creator_id (32 bits) ][ internal_id (32 bits) ]

🎯 Primary Focus

internal_id

The creator ID is shown only as derived metadata.


📤 Example Output

Sticker Pack Info

Creator ID : 93602376
Internal ID: 2

⚙️ How It Works

The packed ID is decoded using simple bit operations:

creator_id  = sid >> 32
internal_id = sid & 0xFFFFFFFF

📁 Directory Structure

PackOwnerBot/
├── telethon/
│   └── bot.py
├── pyrogram/
│   └── bot.py
└── README.md

📦 Requirements

  • Python 3.9+

  • One of the following:

    • Telethon
    • Pyrogram (+ tgcrypto)

Install dependencies:

pip install telethon
# or
pip install pyrogram tgcrypto

🔧 Configuration

Set your credentials inside the script:

API_ID = 12345678
API_HASH = "YOUR_API_HASH"
BOT_TOKEN = "YOUR_BOT_TOKEN"

Get API credentials from:

https://my.telegram.org

▶️ Run

python bot.py

⚠️ Limitations

  • Requires MTProto access

  • Cannot be implemented using Bot API alone

  • Some sticker packs may belong to:

    • Official Telegram accounts
    • Deleted users

👤 Author

Ankit Chaubey

Independent developer focused on Telegram internals, MTProto research, and building clean, minimal tooling for real-world use.


🔗 Source

https://github.com/ankit-chaubey/PackOwnerBot

📜 License

This project is released under the MIT License.

You are free to use, modify, and distribute this software with attribution.

If you found this tiny piece of information useful, please consider forking the repository and giving it a star.

Thank you for your support!


About

@PackOwnerBot helps you find the owner or creator of any Telegram sticker pack. Simply send a sticker, and the bot will provide details about the sticker pack's creator.

Topics

Resources

License

Stars

Watchers

Forks

Languages