Skip to content

Instantly share code, notes, and snippets.

@dustinrouillard
Last active January 24, 2024 18:28
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dustinrouillard/04be36180ed80db144a4857408478854 to your computer and use it in GitHub Desktop.
Save dustinrouillard/04be36180ed80db144a4857408478854 to your computer and use it in GitHub Desktop.
Discord Assets CDN/API - Worker Features and Instructions

Discord Assets CDN/API

Basically used to get discord assets so you don't have to use their API beforehand, instead this worker does all the heavy lifting to get the information and translate to the asset/user data.

Base URL: dcdn.dstn.to

Routes

All of these support a file extension and or a size parameter, however not all of them actually have multiple sizes.

Guaranteed to always work routes

/avatars/:USER_ID

Returns the avatar file for the user

/banners/:USER_ID

Returns the banner file of the user if there is one, 404 if no banner, or user not found.

User Routes

(These are not 100% guaranteed to work as they're using a method that's not really favored, but it is available and I will do everything in my power to keep it working where possible)

/profile/:USER_ID

Returns the users profile along with their connections and nitro start date.

/app-icons/:APPLICATION_ID

Used for the Discord Verified Games that don't have assets keys attached to them in Lanyard


If you want to know more about how this works hit me up on discord or twitter and I'll be happy to show you.

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