Roles
Count all roles present in the server.
This counter shows how many roles the server has. It takes no options.
Availability: every bot. It needs no privileged intents and no paid plan, so the only difference between bots is how often the channel is refreshed.

What it returns
A number: every role in the server.
The total includes the @everyone role and every role managed by a bot or an integration, so it is normally higher than the number of roles you created by hand.
The counter cannot skip @everyone or bot roles on its own. To correct the number, wrap it in the Math counter and subtract the roles you do not want to count.
Formatting
Custom digits only reach text and announcement channel topics; voice and category channel names always show plain digits. See Format settings.
Refresh and caching
Roles are kept up to date by Discord events, so the counter is accurate as of the last channel update: every 10 minutes on the public bot and every 5 minutes on the other bots. See How counters update.
Examples
Template: Roles: {counter}. This is the channel /setup server creates for you.
Put the Roles counter inside a Math counter with Operation type set to Subtraction, then add 1 to the Number list to drop @everyone from the total. Subtract more if bot roles should not count either.
Order matters: every following entry is subtracted from the first one, so the Roles counter has to come first in the Number list and 1 second.
Errors
The only message this counter can produce comes from the channel name rule:
The result for the channel name is less than 2 characters long.
The finished voice or category channel name is a single character, which happens on a server with fewer than 10 roles and nothing but the counter in the template. Add some text around the counter, such as Roles: {counter}.
The channel shows ERROR! while this is the case, and the channel page shows the reason.
Last updated