cdnURL
cdnURL(
path,hash,options?):string
Defined in: packages/structures/src/base.ts:168
Builds a Discord CDN asset URL from a directory path and asset hash, applying
animated-hash (a_) gif detection, extension and size options. Shared by all
hash-backed asset accessors (user/member/role/webhook) to avoid duplicating the logic.
Parameters
Section titled “Parameters”string
CDN directory path, e.g. /role-icons/{id}.
string
Asset hash.
options?
Section titled “options?”ImageURLOptions = {}
Image URL options.
Returns
Section titled “Returns”string