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.
(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.
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!]].
(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.
(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.
(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.
(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.
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.
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.
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.
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.
(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.
(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.
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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close