Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Download all visible telegram stickers images
// How to download telegram sticker images
1. Go to Telegram Web;
2. Open console (F12);
3. Paste the code below in the console and press Enter;
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it).
5. At the console paste and run "downloadStickers()" any time you want to download a pack.
6. [Convert .webm to another format](;
7. Happy hacking.
If you close the tab or refresh it, you should do step 3 again.
// Main function
function downloadStickers() {
// Find all sticker sets
const sets = querySelectorAll('.composer_stickerset_wrap')
// We need it's title to prompt users
.map(set => {
const $title = querySelector('.composer_stickerset_title', set);
return {
key: $title.attributes['data-stickerset'].value,
title: $title.innerText,
node: set,
// Those without key aren't packs. "Frequently used" for example.
.filter(({key}) => key !== '');
// Ask which pack the user want to download
const selectedSet = prompt(
// Join them into a list of keys-titles
.map(({title}, i) => `[${i}]: ${title}`)
// Find all images
querySelectorAll('img', sets[+selectedSet].node)
// Only care about it's URL
.map(i => i.attributes.src.value)
// Filter those with `sticker` in the URL
// .filter(i => /sticker/.test(i)))
// Download all
// DOM query helpers
// These two do 90% of what you need JQuery for
const querySelector = (query, el = window.document) =>
const querySelectorAll = (query, el = window.document) =>
// Trigger a download
function download(image) {
// Create a dummy element
var a = document.createElement('a');
a.href = image;
// `download` attribute means that clicks trigger download = "";
Copy link

ehsan123456789 commented Apr 24, 2017

it doesn't work for me
i just copy whole codes
in telegram web i went to console
then send one of the sticker to my self and then click on it to open
and i paste the code and enter

but i see " undefined " down there

please help me

Copy link

broncotc commented Jun 14, 2017

@ehsan123456789 you need to execute the function after define them.

Copy link

satouriko commented Nov 20, 2017

To friends who would like to download stickers,
this bot can resolve high resolution images XD

Copy link

EXL commented Feb 17, 2018

@rikakomoe, thank you!

Copy link

GertSchepens commented Mar 26, 2018

Great work, thanks ^^

Copy link

telegramuser commented May 10, 2018

Great bot! Thanks a lot OP! I am looking for this for a while now to download some telegram stickers packs :)

Copy link

ishanSrt commented May 29, 2018

@rikakomoe that bot works great!! is there something by which i can download entire packs? whos project is that bot?

Copy link

nguyenlehai commented Aug 13, 2018

very thanks 👍

Copy link

phoenixlzx commented Oct 1, 2018

@rikakomoe @ishanSrt It's mine and it's open source.

I finally have some time to update the code. Now you may try with send this bot a sticker link (something like ) after /newpack
Or send individual sticker to get a PNG without /newpack

Both are new added features.

Copy link

Shesh93 commented Nov 13, 2018

It works for me

Copy link

jarvis3439 commented Jan 28, 2019

this bot is very good

Copy link

lubien commented Jun 4, 2019

Surprised to see there where people over here as GitHub doesn't notify at all about comments on gists.

Bot is the way to go :)

Copy link

qiyuhao7 commented Mar 16, 2022

To friends who would like to download stickers, this bot can resolve high resolution images XD

The bot does not work, I create another instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment