A Telegram bot to import Sticker.ly packs and images as Telegram sticker sets, with emoji and title customization.
- 🗂️ Import Sticker.ly packs: Send a Sticker.ly pack link and the bot will create a Telegram sticker set for you.
- 😃 Custom emojis: Choose which emoji to assign to each sticker.
- 🏷️ Custom pack title: Choose the name of your new Telegram sticker set.
- 🖼️ Image to sticker: Send an image (PNG, JPEG, WEBP) and get it back as a Telegram sticker.
- ⏳ Progress feedback: The bot shows progress and error messages during the import process.
- ❌ Cancel anytime: Use
/cancelto abort the current operation.
-
Start the bot:
Send/startto see the welcome message. -
Import a Sticker.ly pack:
- Send
/stickerlyor just paste a Sticker.ly pack link (e.g.https://sticker.ly/s/BE9H2K). - The bot will ask for a title for your new sticker pack.
- Then, send a list of emojis (one for each sticker, in order). If you send fewer emojis, the default 😀 will be used for the rest.
- The bot will process the pack and send you the link to your new Telegram sticker set.
- Send
-
Convert an image to sticker:
- Send an image as a document (PNG, JPEG, or WEBP).
- The bot will convert and return it as a Telegram sticker.
-
Add a sticker to an existing pack:
- Send
/addsticker🆕. - Select a pack or enter its technical name.
- Send the image you want to add as a sticker.
- Send
-
Set a pack icon:
- Send
/setpackicon🖼️. - Select a pack or enter its technical name.
- Send the image to be used as the pack icon.
- Send
-
Rename a sticker pack:
- Send
/renamepack✏️. - Select a pack or enter its technical name.
- Enter the new title for your pack.
- Send
-
Delete a sticker pack:
- Send
/deletepack🗑️. - Select a pack or enter its technical name.
- Confirm the deletion when prompted.
- Send
-
Cancel an operation:
- Send
/cancel❌ at any time to abort the current import or emoji selection.
- Send
- 🏁
/start– Show welcome/help message. - 🔗
/stickerly– Instructions for importing a Sticker.ly pack. - ➕
/addsticker– Add a sticker to an existing pack. - 🖼️
/setpackicon– Set the icon for a sticker pack. - ✏️
/renamepack– Rename a sticker pack. - 🗑️
/deletepack– Delete a sticker pack. - ❌
/cancel– Cancel the current operation.
- Node.js 18+
- Telegram bot token (from @BotFather)
-
Clone the repository:
git clone <repo-url> cd zap-sticker-bot
-
Install dependencies:
npm install
-
Configure environment variables:
- Copy or rename
.env.exampleto.env:cp .env.example .env
- Edit the
.envfile and set your bot token:BOT_TOKEN=your_telegram_bot_token_here
- Copy or rename
-
Run the bot:
node index.js
- Sticker.ly packs:
The bot uses Puppeteer to scrape sticker images from Sticker.ly pack links. It downloads the PNGs, resizes them to 512x512, and uploads them as a new Telegram sticker set. - Telegram sticker API:
Uses the latest Telegram API for sticker set creation, supporting emoji lists and static format. - Session:
Uses grammY's session middleware to track user state between steps (title, emoji selection, etc).
- Bot says "can't parse stickers JSON object" or "invalid user_id specified":
Make sure you are using the latest version ofgrammyand@grammyjs/files, and that you are using the correct API call format (see code). - Bot says "Não consegui encontrar stickers nesse pack":
The Sticker.ly link may be invalid, private, or the pack is not available for scraping. - Bot does not respond:
Make sure your bot token is correct and the bot is running.
Pull requests and suggestions are welcome!
If you find a bug or want a new feature, open an issue or PR.
MIT