Created
September 2, 2025 10:01
-
-
Save 3top1a/4ffcd163914555b23db51b7500f1df7d to your computer and use it in GitHub Desktop.
Python script I made in 20 minutes to download emojis and stickers from a discord server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Discord Sticker and Emoji downloader | |
| # Run this command to dump info about the server into a file (required) | |
| # Replace :guild id: with guild id (right click on server and copy) and :user token: with user token | |
| # `curl https://discord.com/api/v10/guilds/:guild id: -H "Authorization: :user token:" > guild.json` | |
| # Files are dumped into the output/ folder | |
| import json | |
| import requests | |
| import os | |
| if not os.path.exists("output"): | |
| os.makedirs("output") | |
| guild = json.load(open("guild.json")) | |
| stickers = [(x['id'], x['name'], x['format_type']) for x in guild['stickers']] | |
| emojis = [(x['id'], x['name'], x['animated']) for x in guild['emojis']] | |
| for id, name, format_type in stickers: | |
| print("Downloading sticker", name) | |
| ext = "gif" if format_type == 4 else "webp" | |
| r = requests.get(f"https://media.discordapp.net/stickers/{id}.{ext}?size=240&quality=lossless") | |
| open(f"output/{name}.{ext}", 'wb').write(r.content) | |
| for id, name, animated in emojis: | |
| print("Downloading emoji", name) | |
| ext = "gif" if animated else "png" | |
| r = requests.get(f"https://cdn.discordapp.com/emojis/{id}.{ext}?size=240&quality=lossless") | |
| open(f"output/{name}.{ext}", 'wb').write(r.content) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment