Skip to content

NodeJS CLI tool for Telegram sticker pack management with batch processing and image optimization. Create, check, and delete sticker packs with ease.

License

Notifications You must be signed in to change notification settings

motebaya/sticker-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sticker-JS

Telegram Sticker Pack Manager

nodejs argparse chalk dotenv node-telegram-bot-api sharp winston License: MIT

NodeJS CLI tool for managing Telegram sticker packs. Create, verify, and delete sticker packs with ease using this powerful command-line interface.

Features:

  • Create new sticker packs from image directories
  • Verify local sticker packs
  • Delete existing sticker packs
  • Batch processing support
  • Image optimization with Sharp
  • Comprehensive logging with Winston
  • Telegram Bot API integration

Prerequisites:

  • Node.js 18.18.2 or higher (v22.14.0 recommended)
  • Telegram Bot Token
  • Sticker Pack Name and Title

Installation:

git clone https://github.com/yourusername/sticker-js
cd sticker-js
npm install

rename .env.example to .env file in the root directory with the following variables:

Important

Sticker Name Rules:

  • Pack name: No uppercase letters, no punctuation, no symbols, and no more than 64 characters.
  • Title: More flexible, but must not exceed 50 characters.
  • User Id: go to this bot to get your user id https://t.me/RawDataBot
  • Bot Token: go to this bot to get your token https://t.me/BotFather
  • Batch Size: i recommended 50-100
BOT_TOKEN=""
USER_ID="
BATCH_SIZE=5
STICKER_PACK_NAME="loremgod" # example title
STICKER_PACK_TITLE="sticker pack test lorem title" # example title

Usage (CLI):

$ node cli
usage: cli.js [-h] [-c] [-d] [-b] [-v]

         @github.com/motebaya - 2025
    Manage your TG Stickers with NodeJS

optional arguments:
  -h, --help      show this help message and exit
  -c, --create    create new pack based on specified images directory name
  -d, --delete    delete sticker pack (req: packname/all to delete all)
  -b, --batch     enable batch mode based on BATCH_SIZE (recommended)
  -v, --verify    verify your local stickers

Examples:

Note

before getting the user id, you need to start a chat with your bot using the account you want to get the user id from! otherwise, the user id won't be useful at all.

place all your folders — the ones containing the images to be processed — into the /storage folder at the root of the project. e.g: /storage/<fucking_images>

  1. Create a new sticker pack:
node cli --create ./my-stickers
  1. Create a sticker pack with batch processing (recommended):
node cli --create ./my-stickers --batch
  1. Verify local stickers:
node cli --verify
  1. Delete a sticker pack:
node cli --delete packname
  1. Delete all sticker packs:
node cli --delete all

Features in Detail:

  • Create Sticker Pack: Convert images from a directory into a Telegram sticker pack
  • Batch Processing: Process stickers in batches to avoid rate limits
  • Image Optimization: Automatically optimize images for Telegram's requirements
  • Verification: Verify local sticker packs for consistency
  • Deletion: Remove sticker packs from your Telegram bot

Dependencies:

  • argparse: Command-line argument parsing
  • chalk: Terminal string styling
  • dotenv: Environment variable management
  • node-telegram-bot-api: Telegram Bot API integration
  • sharp: Image processing
  • winston: Logging

License

This project is licensed under the MIT License.

About

NodeJS CLI tool for Telegram sticker pack management with batch processing and image optimization. Create, check, and delete sticker packs with ease.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published