Skip to content

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.

string

CDN directory path, e.g. /role-icons/{id}.

string

Asset hash.

ImageURLOptions = {}

Image URL options.

string