Documentación / Analytics / Comandos / /leaderboard
Info

/leaderboard

Show server activity leaderboard

Usage

Generated
/leaderboard [metric] [days]
OptionTipoObligatorioDescripción
metric text No What to rank by
MessagesVoice HoursVoice Sessions
days whole number No Time window in days (0 = all-time)

Who can run it

Generated
Discord defaultEvery member
Command Access presetEveryone
Always allowedThe server owner and, by default, Administrators
Change itDashboard, Services, Analytics, Commands

Open to every member unless you lock it to roles or channels in Command Access. How Command Access works.

What the bot needs

Generated

Analytics is granted these permissions by the invite link. A command that finds one missing replies privately with what it could not do and changes nothing.

View ChannelSend MessagesEmbed LinksManage Roles

Comportamiento

Checked against the code 2026-09-21

Posts a leaderboard card image with the server's most active members. The metric option ranks by Messages, Voice Hours or Voice Sessions. The days option is a whole number of days: 0 means all time, and anything above 365 is treated as 365. Leave either option out and the server's defaults apply.

Those defaults live on the Card Designer page, in its leaderboard section: the default metric (Messages until changed), the default window (30 days), how many entries the card lists (10 until changed, between 5 and 25), which time frames the dropdown offers (7, 30 and 90 days until changed), and whether avatars, medals, progress bars and your own rank line are shown, plus the colours and background image.

Two dropdowns sit under the card, "Metric..." and "Time frame...", and they redraw the card in place. Only the person who ran the command can use them; anyone else gets "Only the command user can switch views." They are removed after 5 minutes. A dropdown on an older card, after the bot restarts, is removed on the first click or answers "This card has expired. Use the command again for a new one."

If you are not among the listed entries, the card ends with a line of your own that starts "Your rank: #". That line shows your overall standing across everything stored, not your standing inside the chosen window.

The reply is public. The command only works in a server ("Server only." otherwise) and needs Analytics turned on there. If it is off, the private reply is "Analytics not enabled here. Use /yourbot to see how to turn it on."

Good to know

  • Bot accounts never appear on a leaderboard, whatever the Ignore bots setting says. Members currently holding an excluded role are left out too, including their earlier activity.
  • "All Time" covers everything the server still stores. Detail older than the Data retention window is removed every night.
  • Voice Hours and Voice Sessions count sessions with a recorded leave. A session the bot had to close on its own after missing the leave does not rank.
  • If the card cannot be drawn, a text list of the top 10 is posted instead, titled like "🏆 Leaderboard: Messages (30d)", or "No data yet." when there is nothing to rank. If even that fails, the private reply is "The leaderboard is not available right now. Try again in a moment."
  • /top adds channel rankings and an overview of four lists. The dashboard's Leaderboard page lists top members by activity.
YourBot docs Reference tables are generated from the code that is running. Ask in Discord Suggest a correction