Passa al contenuto principale

Massrole

Simple module to manage the roles of many members at once.

Massrole
Simple module to manage the roles of many members at once!
This module is open-source.
This module has 2 configuration files.
This module is being actively used on over 8300 other servers on SCNX.
This module is included for free in every plan. Learn more about prices.

Features

  • Add a role to all members, only bots, or only humans on your server with a single command.
  • Remove a role from all members, only bots, or only humans on your server.
  • Remove all non-managed roles from all members, only bots, or only humans.
  • Restrict usage to specific admin roles for security.

Setup

  1. Enable the module on your server.
  2. Open the module configuration and add the roles that should be allowed to use the /massrole command to the "Adminroles" field.
  3. Make sure the bot has the Manage Roles permission, and that the bot's highest role is above the roles you want to manage.
  4. In your Discord server settings, ensure that users with the configured admin roles are permitted to use the /massrole command (the command requires the Administrator permission by default).

Usage

  • Use /massrole add to add a role to members on your server. You can optionally specify a target to limit the action to all users, only bots, or only humans.
  • Use /massrole remove to remove a specific role from members.
  • Use /massrole remove-all to remove all non-managed roles from members. This is a destructive action - use with caution.
  • All commands will provide feedback on whether the action was executed successfully or if errors occurred (typically due to insufficient permissions for some members).

Commands

Understand the documentation
In these docs, name:<Type> is an option of a slash-command with name name and the type Type. Options that not required, are described as [name:<Type>]. If the action of a command is vastly different between required and not-required options, we might list them separately.
Examples
  • /moderate ban user:<Member>: This command (/moderate ban) has an required option with the name "user" that only accepts one member as a value.
  • /moderate ban victim:<Member> reason:<Text>: This command (/moderate ban) has an required option with the name "victim" that only accepts one member as a value and another required option with the name "reason" that accepts any text as an value.
  • /moderate ban victim:<Member> reason:<Text> [proof:<Attachment>]: This command (/moderate ban) has an required option with the name "victim" that only accepts one member as a value, another required option with the name "reason" that accepts any text as an value and a not-required option with the name "proof" which allows one attachment as its value.
CommandDescription
/massrole add role:<Role> [target:<Target>]Adds the specified role to the targeted members. Target can be "all", "bots", or "humans" (defaults to "all").
/massrole remove role:<Role> [target:<Target>]Removes the specified role from the targeted members. Target can be "all", "bots", or "humans" (defaults to "all").
/massrole remove-all [target:<Target>]Removes all non-managed roles from the targeted members. Target can be "all", "bots", or "humans" (defaults to "all").

Configuration

Configuration

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

FieldDescription
AdminrolesRoles that are allowed to use the /massrole command. Users need to have at least one of these roles.

Messages

In this configuration file, you can customize the messages sent by the module. Open it in your dashboard.

FieldDescription
Action executedMessage sent when a massrole action was executed successfully.
Action not executedMessage sent when a massrole action could not be fully executed, usually because the bot lacks sufficient permissions for some members.

Troubleshooting

  • The bot reports the action was not executed: Make sure the bot has the "Manage Roles" permission and that the bot's highest role is positioned above the roles it needs to manage. The bot cannot modify roles of members whose highest role is above the bot's highest role.
  • The command is not available: Ensure that the admin roles are configured in the module configuration and that the user running the command has one of those roles. Additionally, verify that the command permissions in your Discord server settings allow the appropriate users to execute /massrole.
  • The command takes a long time: On large servers, massrole operations may take several minutes as the bot processes each member individually. The bot will respond once the operation is complete.