Skip to content
Database channelLeaderboard

$channelLeaderboard — Builds a text leaderboard of a channel variable, one row per line, or one row per run of the code.

Builds a text leaderboard of a channel variable, one row per line, or one row per run of the code.

Syntax

$channelLeaderboard[name;(guildID);(sortType);(max);(page);(separator);(envValue);(envPosition);(code)]

Parameters

  • name (String, required) — Variable name
  • guildID (String, optional) — Server ID (default current)
  • sortType (String, optional) — asc or desc
  • max (Number, optional) — Rows per page (default 10)
  • page (Number, optional) — Page (default 1)
  • separator (String, optional) — Row separator (default new line)
  • envValue (String, optional) — $env name that holds {id, username, value} in the code
  • envPosition (String, optional) — $env name that holds the position in the code
  • code (String, optional) — Code run per row; its $return gives the row

Return Value

  • String.

Usage

$channelLeaderboard[name;guildID;sortType;max;page;separator;envValue;envPosition;code] → result

Example

$sendMessage[$channelLeaderboard[name;guildID;sortType;max;page;separator;envValue;envPosition;code]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.