Skip to content

Automatic roles

Automatic roles let you link Tibia guilds with specific roles, to aid you in categorizing or controlling access to your server.

To see the related commands, check the Roles commands.

These features require the bot to have Manage Roles permission, as this is required to be able to add and remove roles.

Only users with Manage Roles permissions can edit and check rules, and they can't edit any rules for roles higher than theirs.

Adding rules

Automatic roles work based on rules. A rule consists of a role, and the rule's text.

The rule's text is similar to the syntax used in Tibia to invite guild members to a house. There are four valid rule syntaxes:

  • * - All users with characters in the tracked world.
  • *@GuildName - All users with characters in guild GuildName.
  • GuildName - The same as above will be converted to *@GuildName automatically.
  • RankName@GuildName - All users with characters in guild GuildName with rank RankName.

When a user has a registered character that matches the rules, the role is added. If that character leaves the guild or the user unregisters the character, their role will be removed unless they meet another rule for that role.

Rules can be added by using /autorole add. The command takes two parameters: A role and a rule.


  • /autorole add @Redd Alliance Redd Alliance – Members of Redd Alliance will receive the role @Redd Alliance.
  • /autorole add "Bald Dwarf Vice" Emperor@Bald Dwarfs - Members with rank Emperor of Bald Dwarfs, will receive the role @Bald Dwarfs Vice
  • /autorole add Identified * – Any user that has registered character will be given the @Identified role.

You can have as many rules as you want, for as many roles or guilds as needed, as long as they're not repeated.

It is also possible to have multiple rules for the same roles. In practice, this can be used to have a @Allies role. All the allied guilds would be added to the same role.

The list of rules can be checked using /autorole list.

Example rule list

Applying rules

Once the rules have been set, NabBot will start enforcing them whenever certain triggers are actioned:

  • A new member joins the server, with previously registered characters.
  • A member uses /im to register characters.
  • A member uses /imnot to unregister characters.
  • A registered character is checked using /whois and a guild change is detected.
  • A registered character is checked while online in the levels and deaths tracking process.


  • If a rule is removed, there's currently no way to "undo" that rule, e.g., if the rule for @Guildies is removed, NabBot won't remove the role from any users, unless there's another rule involving that rule that they don't meet.
  • Unless checked using /whois, there is no way to apply rules to characters that haven't been online in a while. Meaning that an old inactive member kicked from a guild won't have their role removed until they log in, or they are checked with /whois.
  • If an automatic role is assigned or removed manually by someone, the bot might remove/reassign it again when the character is checked.
  • Newly added rules are not applied for existing members until a character change is detected. Using /autorole refresh will check all members again. Note that this won't update characters that haven't been online in a while. The refresh and update of roles takes a long time due to Discord API limitations.

Suggested uses

Here are some examples uses for autoroles:

  • Automatically give access to a special channel to your guild members or allies.
  • Protect your server's channels by only allowing identified people or guilds.