Liking cljdoc? Tell your friends :D

discljord.cdn

Namespace with functions to create cdn urls to image data from API entities such as users or guilds.

Namespace with functions to create [cdn urls](https://discord.com/developers/docs/reference#image-formatting) to image data from API entities such as users or guilds.
raw docstring

animated?clj

(animated? hash)

Takes an image data hash and returns whether it represents an animated image (gif) or not.

Takes an image data hash and returns whether it represents an animated image (gif) or not.
sourceraw docstring

application-iconclj

Takes an OAuth2 application info object and returns a url to its icon.

The current application info is obtainable via discljord.messaging/get-current-application-information!.

Takes an OAuth2 application info object and returns a url to its icon.

The current application info is obtainable via [[discljord.messaging/get-current-application-information!]].
sourceraw docstring

base-urlclj

source

custom-emojiclj

(custom-emoji emoji)

Takes a custom emoji object or id and returns a url to the image data.

Note that an id alone is not enough to determine whether the emoji is animated or not, so if you pass an id you will always get a url to a png.

Takes a custom emoji object or id and returns a url to the image data.

Note that an id alone is not enough to determine whether the emoji is animated or not,
so if you pass an id you will always get a url to a png.
sourceraw docstring

default-user-avatarclj

(default-user-avatar user-or-discrim)

Takes a user object or a discriminator and returns a url to the default avatar image of that user/discriminator.

Takes a user object or a discriminator and returns a url to the default avatar image of that user/discriminator.
sourceraw docstring

effective-user-avatarclj

(effective-user-avatar user)

Takes a user object and returns a url to the effective avatar of that user.

I.e., if the user has a custom avatar, it returns that, otherwise it returns the default avatar for that user.

Takes a user object and returns a url to the effective avatar of that user.

I.e., if the user has a custom avatar, it returns that, otherwise it returns the default avatar for that user.
sourceraw docstring

file-nameclj

(file-name hash)

Takes an image data hash and returns the file name it represents with the correct extension.

Takes an image data hash and returns the file name it represents with the correct extension.
sourceraw docstring

guild-bannerclj

Takes a guild and returns a url to the guild's banner or nil if the guild does not have a banner.

Takes a guild and returns a url to the guild's banner or `nil` if the guild does not have a banner.
sourceraw docstring

guild-discovery-splashclj

Takes a guild and returns a url to the guild's discovery splash or nil if the guild does not have a discovery splash.

Takes a guild and returns a url to the guild's discovery splash or `nil` if the guild does not have a discovery splash.
sourceraw docstring

guild-iconclj

Takes a guild and returns a url to the guild's icon or nil if the guild does not have an icon.

Takes a guild and returns a url to the guild's icon or `nil` if the guild does not have an icon.
sourceraw docstring

guild-splashclj

Takes a guild and returns a url to the guild's splash or nil if the guild does not have a splash.

Takes a guild and returns a url to the guild's splash or `nil` if the guild does not have a splash.
sourceraw docstring

image-url-generatorclj

(image-url-generator path hash-key)

Returns a function that, given an object with an id and an image data hash, returns a url to that image.

Returns a function that, given an object with an id and an image data hash, returns a url to that image.
sourceraw docstring

resizeclj

(resize url size)

Adds a size query parameter to the given image url, resulting in a resize of the image.

Any power of 2 between 16 and 4096 is a valid size.

Adds a size query parameter to the given image url, resulting in a resize of the image.

Any power of 2 between 16 and 4096 is a valid size.
sourceraw docstring

user-avatarclj

Takes a user object and returns a url to the avatar of that user or nil if the user does not have an avatar.

Takes a user object and returns a url to the avatar of that user or `nil` if the user does not have an avatar.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close