Custom Command
FunctionsVariables Functions

$userLeaderboard

Generates a leaderboard of a user variable and return it.

Usage

$userLeaderboard[variable;Sorting Type;{top}.- {username} - {value};limit per page (optional, default=10, max=40);page (optional, default=1)]

Sorting Type

  • highest-first (Default): Shows the list from the highest value to the lowest.
  • lowest-first: Shows the list from the lowest value to the highest.
  • desc Deprecated: Legacy alias for lowest-first.
  • asc Deprecated: Legacy alias for highest-first.

Available Variables

VariableDescription
{top}returns the rank number
{rank}same as {top}
{value}returns the numerical value of the variable
{raw_value}returns the raw value in case it's not number
{id}returns the user id
{mention}returns the user mention
{username}returns the username
{nickname}returns the nickname
{tag}returns the tag like Mido#1234
{discriminator}returns the discriminator like 1234

Pagination

Since the list can contain many entries, you can control which portion of the list is displayed using the limit per page and page values.

  • limit per page: The maximum number of entries to show on each page.
  • page: The page number to display.

Example:

Member
9/5/2026

!!exec Top 5
$userLeaderboard[money;highest-first;{top}. {username} - {value};5]

Custom Command
APP
9/5/2026

Top 5

  1. Mido - 350
  2. Rake - 201
  3. Zero - 121
  4. Red - 53
  5. Azz - 22
Member
9/5/2026

!!exec Top 3
$userLeaderboard[money;highest-first;{top}. {username} - {value};3]

Custom Command
APP
9/5/2026

Top 3

  1. Mido - 350
  2. Rake - 201
  3. Zero - 121

What if the value is not a valid number?

If a value is not a valid number, it will always be placed at the end of the list, regardless of the selected sorting type.

Related Functions

Check out: $uservarRank

Check out: $setUserVar

Check out: $getUserVar

Check out: $deleteUserVar

Check out: $resetUserVar

On this page