GuidesVariables

Variables

Variables can be used to customize the text used in embeds and discord webhook text. Variables allow allow certain modifiers, that modify their appearance.

Available Variables

Here is a list of all the variables you can use.

Info

Some variables may not work in some cases

User Variables

NotationTypeDescription
{user.id}intThe user's ID
{user.username}stringThe user's username
{user.token}stringThe user's token
{user.administrator}boolWhether the user is an administrator
{user.superAdmin}boolWhether the user is a super administrator
{user.systemTheme}stringThe user's system theme
{user.ratelimit}dateThe user's ratelimit, will return {unknown_property} if not ratelimited
{user.totpSecret}stringThe user's TOTP secret, will return {unknown_property} if none set. Unavailable in certain cirumstances

File Variables

NotationTypeDescription
{file.id}intThe file's ID
{file.name}stringThe file's name
{file.originalName}string?The file's original name. Returns {unknown_property} if no original name exists for this file.
{file.mimetype}stringThe file's mimetype
{file.createdAt}dateThe file's creation date
{file.expiresAt}dateThe file's expiration date
{file.maxViews}intThe file's maximum views
{file.views}intThe file's current views
{file.favorite}boolWhether the file is favorited
{file.embed}boolWhether the file will be embedded
{file.format}stringThe file's format (RANDOM, etc)
{file.userId}intThe file's owner's ID

Url Variables

NotationTypeDescription
{url.id}intThe URL's ID
{url.destination}stringThe URL's destination
{url.createdAt}dateThe URL's creation date
{url.vanity}stringThe URL's vanity
{url.maxViews}intThe URL's maximum views
{url.views}intThe URL's current views
{url.userId}intThe URL's owner's ID

Modifiers

Modifiers are noted by a :: after a variable, for example if you wanted to make a variable uppercase, you would use {user.id::upper}.

Info

Modifiers do not work on {link} and {raw_link}

date modifiers

NotationDescriptionExample Output
localeReturns the date in the systems locale12/11/2022, 3:07:42 PM
timeReturns the time in the systems locale3:07:42 PM
dateReturns the date in the systems locale12/11/2022
unixReturns the date in unix time1639129662
isoReturns the date in ISO 8601 format2022-12-11T15:07:42.000Z
utcReturns the date in UTCSun, 11 Dec 2022 23:08:57 GMT
yearReturns the year2022
monthReturns the month12
dayReturns the day11
hourReturns the hour15
minuteReturns the minute7
secondReturns the second42

string modifiers

NotationDescriptionExample Output
upperUppercasesHELLO
lowerLowercaseshello
titleCapitalizesHello
lengthReturns the length of the string5
reverseReverses the stringolleh
base64Encodes the string in base64aGVsbG8=
hexEncodes the string in hex68656c6c6f

int modifiers

NotationDescriptionExample Output
commaAdds commas to the number1,000
hexConverts the number to hex3e8
binaryConverts the number to binary1111101000
octalConverts the number to octal1750

bool modifiers

NotationDescriptionExample Output
yesnoConverts the bool to yes/noyes
onoffConverts the bool to on/offon
truefalseConverts the bool to true/falsetrue

Playground

Type in any variable below to test out the variables.

administrator (1) uploaded randomstuff.png (original name: originalNameWow.png) at 0:18 today
{
"user": {
"administrator": true,
"id": 1,
"username": "administrator",
"token": "qwertyuiopasdfghjkzxcvbnm",
"superAdmin": true,
"systemTheme": "default",
"ratelimit": "2023-05-21T00:18:45.983Z",
"totpSecret": "1234567890",
"domains": []
},
"file": {
"id": 1,
"mimetype": "image/png",
"name": "randomstuff.png",
"originalName": "originalNameWow.png",
"createdAt": "2023-05-21T00:18:45.983Z",
"expiresAt": "2023-05-21T00:38:45.983Z",
"maxViews": 100,
"views": 2,
"favorite": true,
"embed": true,
"format": "RANDOM",
"userId": 1
},
"url": {
"id": 2,
"destination": "https://google.com",
"vanity": "google",
"createdAt": "2023-05-21T00:18:45.983Z",
"maxViews": 100,
"views": 2,
"userId": 1
},
"link": "https://example.com/u/test.png",
"raw_link": "https://example.com/r/test.png"
}
Last updated: 3/23/2023
Edit this page on GitHub