Documentation

Leaderboard01 Docs

Everything you need to set up, configure, and use Leaderboard01 in your Discord server.

Introduction

Leaderboard01 is a universal Discord leaderboard bot. Unlike bots that only track XP or economy, Leaderboard01 lets you create leaderboards for anything — you define the name, you add the scores.

Key highlights:

  • Create unlimited leaderboards per server
  • Full Vietnamese and English language support
  • Custom emoji throughout the bot
  • Modern slash commands with autocomplete
  • Error IDs for easy support tracking
  • SQLite database — fast and zero-config

Setup Guide

1
Add the bot to your server
Click the "Add to Discord" button and authorize the bot with the required permissions.
2
Set your language (optional)
Run /lb lang and choose between Vietnamese or English. Default is Vietnamese.
3
Create your first leaderboard
Run /lb create name:fishing to create a leaderboard called "fishing".
4
Start adding scores
Use /lb add name:fishing user:@someone amount:10 to add points.

Configuration

Leaderboard01 is configured via a .env file. Copy .env.example to .env and fill in your values.

Required Variables

DISCORD_TOKENYour bot token from the Discord Developer Portal.
CLIENT_IDYour bot's application/client ID.
OWNER_IDYour Discord user ID. Mentioned in error messages so users can reach you.

Optional Variables

GUILD_IDSet this to deploy slash commands to a specific server (instant). Leave empty for global deployment (~1 hour).
Custom emoji variables like EMOJI_SUCCESS, EMOJI_ERROR, etc. are documented in the Custom Emoji section.

/lb create

Creates a new leaderboard in your server.

/lb create Create a new leaderboard
nameStringRequiredThe leaderboard name. Max 32 characters. Stored in lowercase.
descriptionStringOptionalA short description shown in the footer of the leaderboard embed.
Leaderboard names are unique per server. If a name already exists, the command will return an error.

/lb view

Displays the top entries for a leaderboard.

/lb view View a leaderboard
nameStringRequiredThe leaderboard to view. Supports autocomplete.
topIntegerOptionalNumber of entries to show. Min 1, max 25. Default 10.

/lb add

Adds points to a user on a leaderboard. If the user doesn't exist on the board yet, they are created with the given amount.

/lb add Add points to a user
nameStringRequiredThe leaderboard name. Supports autocomplete.
userUserRequiredThe Discord user to add points to.
amountNumberRequiredThe number of points to add. Can be negative to subtract.

/lb set

Sets a user's score to an exact value, overwriting their current score.

/lb set Set a user's score
nameStringRequiredThe leaderboard name. Supports autocomplete.
userUserRequiredThe Discord user whose score to set.
scoreNumberRequiredThe exact score value to set.

/lb rank

Shows a user's current rank and score on a leaderboard.

/lb rank Check rank of yourself or another user
nameStringRequiredThe leaderboard name. Supports autocomplete.
userUserOptionalThe user to check. Leave empty to check your own rank.

/lb list

Lists all leaderboards in the current server.

/lb list List all leaderboards
No parameters required.

/lb remove

Removes a user's entry from a leaderboard entirely. Their score is deleted.

/lb remove Remove a user from a leaderboard
nameStringRequiredThe leaderboard name. Supports autocomplete.
userUserRequiredThe user to remove from the leaderboard.

/lb delete

Deletes an entire leaderboard and all its entries.

/lb delete Delete a leaderboard
nameStringRequiredThe leaderboard to delete. Supports autocomplete.
Only the leaderboard creator or a server admin (Manage Server permission) can delete a leaderboard. This action is irreversible.

/lb lang

Sets the bot's language for your server.

/lb lang Set bot language
languageChoiceRequiredvi — Tiếng Việt (default)  |  en — English
Only users with the Manage Server permission can change the language.

Custom Emoji

You can replace the default bot emoji with your own custom server emoji by adding them to your .env file.

Getting an Emoji ID

In Discord, type \:your_emoji_name: and send the message. Discord will show the raw emoji format like <:name:123456789>. Copy the full string including angle brackets.

Available Emoji Variables

EMOJI_SUCCESSUsed for successful actions
EMOJI_ERRORUsed for errors and not-found messages
EMOJI_RANKUsed next to rank numbers
EMOJI_SCOREUsed next to score values
EMOJI_BOARDUsed for leaderboard references
EMOJI_ADDUsed when adding points
EMOJI_REMOVEUsed when removing entries
EMOJI_LISTUsed in the board list

Error Handling

When an unexpected error occurs, Leaderboard01 will reply with an ephemeral message containing a unique Error ID and a mention of the bot owner.

Example error message:

<:error:id> Có lỗi xảy ra.
`Error ID: X7K2PQ`
Liên hệ @Owner và cung cấp Error ID để được hỗ trợ.

As the bot owner, you can find the corresponding error stack trace in your console logs by searching for [ERROR X7K2PQ].

Set OWNER_ID in your .env to your Discord user ID so the bot can mention you in error messages.

Permissions

Leaderboard01 uses a simple permission model:

AnyoneCan use /lb view, /lb rank, /lb list
AnyoneCan create leaderboards with /lb create and add/set/remove scores
CreatorCan delete their own leaderboard with /lb delete
AdminCan delete any leaderboard, change language with /lb lang
"Admin" means any user with the Manage Server Discord permission.