Updates any old/expired Discord download links.

There are two ways to use the HTTP server
Simply paste the Discord URL at the end of your server URL
http://localhost/https://cdn.discordapp.com/attachments/763509665585561610/1216965708911480923/image.png
Replace the cdn.discord.app.com with your URL. Make sure to change HTTPS to HTTP unless you have configured HTTPS through something like CloudFlare.
http://localhost/attachments/763509665585561610/1216965708911480923/image.png
If you wish to use Discord CDN as a library, check the code example below.
You may also check src/server.ts to see how the HTTP server uses it.
import { Discord, getConfig } from "PATH_TO_DISCORD_CDN"
//getConfig will parse the config from .env
//if you wish to pass your own config object, check the `src/Types/IConfig.ts` interface
async function dev() {
try {
let config = await getConfig();
let discord = new Discord(config);
let link = await discord.fetchLatestLink("https://cdn.discordapp.com/attachments/763509665585561610/1216965708911480923/image.png?ex=")
console.log(link);
} catch (ex) {
console.error(ex);
}
}
dev();
git clone https://github.com/ShufflePerson/Discord_CDN.git
cd Discord_CDN
Download the repo as a zip and extract it to a folder.
Fill the values in the .env.example and rename .env.example to simply .env
TOKENFALLBACKPORTconsole.log((webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken());.env file. (e.g TOKEN=PASTE_TOKEN_HERE)yarn install
yarn pnpify tsc
yarn node ./dist/server.js
npm run setup
This will also recompile the code.
npm run start
You may contact me on my Discord: _.shuffle._
$ claude mcp add Discord_CDN \
-- python -m otcore.mcp_server <graph>