Skip to content

Instantly share code, notes, and snippets.

@Blocksnmore
Last active January 17, 2025 20:21
Show Gist options
  • Save Blocksnmore/fac5197f353f97e2368980c22ef0b946 to your computer and use it in GitHub Desktop.
Save Blocksnmore/fac5197f353f97e2368980c22ef0b946 to your computer and use it in GitHub Desktop.
Discord emote exporter

Discord emote exporter

  1. Paste the contents of RunOnClient.js into your developer console once you're inside the specific server > settings > emojis
  2. Copy the long message sent in developer console formatted link - name

If you want to take those exported emojis into guilded:

  1. Create a emojis.txt file with those contents and an index.ts file with RunOnDesktop.js's content
  2. Run the file using Deno with the following command: deno run --allow-read --allow-write index.ts
  3. Upload all JSON files in the newly created exported folder to a file sharing site (or copy paste the contents onto a paste site)
  4. Paste those json links into guilded & import them
const emojis = document.querySelectorAll(".emojiRow-1aPaM-");
let emoteData = "";
for (const emote of emojis) {
const image = emote.querySelector(".emojiColumn-2P3Fj1 > div").style.backgroundImage;
const name = emote.querySelector(".emojiAliasPlaceholder-3oShSx > div").innerText;
emoteData += `${image.substring(4, image.lastIndexOf("?"))} - ${name}\n`
}
console.log(emoteData);
try {
await Deno.mkdir("./exported");
} catch {
// ignore
}
const emojis = (await Deno.readTextFile("./emojis.txt"))
.split("\n")
.map((e) => ({ url: `${e.split(" ")[0]}?size=512&quality=lossless`, name: e.split(" ")[2] }));
function chunk<T>(items: T[], size: number) {
const chunks: T[][] = [];
items = ([] as T[]).concat(...items);
while (items.length) {
chunks.push(items.splice(0, size));
}
return chunks;
}
const emotePacks = chunk(emojis, 30);
let packNumber = 0;
for (const emotePack of emotePacks) {
packNumber++;
const packData = {
name: "Discord2Guilded Exporter Emote pack " + packNumber,
author: "Blocks",
emotes: emotePack,
};
await Deno.writeTextFile(
"./exported/Emotes" + packNumber + ".json",
JSON.stringify(packData)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment