Skip to content

Instantly share code, notes, and snippets.

@3top1a
Created September 2, 2025 10:01
Show Gist options
  • Select an option

  • Save 3top1a/4ffcd163914555b23db51b7500f1df7d to your computer and use it in GitHub Desktop.

Select an option

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
# 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