Skip to main content

Role-Nicknames

Simple module to edit user nicknames based on roles.

Role-Nicknames
Simple module to edit user nicknames based on roles!
This module is open-source.
This module is storing data in your bot's database.
This module has 2 configuration files.
This module is being actively used on over 5.1K other servers on SCNX.
This module is included for free in every plan. Learn more about prices.

Features

  • Automatically add prefixes and/or suffixes to member nicknames based on their roles.
  • Supports multiple roles with different prefixes and suffixes -- the highest role in the hierarchy takes priority.
  • Nicknames update automatically when a member's roles or nickname changes.
  • All existing members are renamed on bot startup.
  • Optionally force the use of display names instead of custom nicknames.

Setup

  1. Make sure the bot has the Manage Nicknames permission.
  2. Ensure the bot's role is positioned above the roles of members whose nicknames should be modified in the server's role hierarchy. Note that the server owner's nickname cannot be changed.
  3. Configure role prefixes and suffixes in the Roles configuration.

Usage

This module works automatically -- there are no commands. When a member's roles or nickname changes, the bot will automatically apply the appropriate prefix and/or suffix based on their highest matching role.

The module evaluates roles from highest to lowest position in the role hierarchy. The first matching role configuration found will be applied. If a member has no matching roles, their nickname will remain unchanged (though existing prefixes/suffixes from previously matching roles will be removed).

When the bot starts, it scans all existing members and applies the correct prefixes and suffixes.

Configuration

This module has multiple configuration files. Please review them below.

Module configuration

In this configuration file, you can configure the functionality of this module. Open it in your dashboard.

FieldDescription
Force display nameIf enabled, the bot will use the user's display name instead of their custom server nickname as the base name for applying prefixes and suffixes.

Roles

In this configuration file, you can define prefix and suffix rules for each role. Open it in your dashboard.

Each entry in this list represents a role rule with the following fields:

FieldDescription
RoleThe role for which the prefix and/or suffix should be applied.
PrefixThe text to prepend to the member's nickname.
SuffixThe text to append to the member's nickname.

Troubleshooting

Nicknames are not being updated
  • Make sure the bot has the Manage Nicknames permission.
  • Ensure the bot's role is positioned above the member's highest role in the role hierarchy.
  • The server owner's nickname cannot be changed by bots -- this is a Discord limitation.
The wrong prefix/suffix is being applied

The module uses the highest role in the server hierarchy that has a configured prefix/suffix. Make sure your role rules are configured for the correct roles and that the role positions in your server match your expectations.

Stored data

The following data is being stored about every member:

  • The Discord User ID
  • The member's base nickname (without any prefix or suffix applied)
  • Metadata about the entry (date when created and last updated)

To remove all data stored by this module, purge the module database.