$modifyRole

Modifies an existing role.

Syntax

$modifyRole[Role ID;(Role name;Color hex;Hoisted?;Mentionable?)]

🧙‍♂️ You can use !unchanged as an argument to leave the setting as-is.

Parameters

  • Role ID (Type: Snowflake || Flag: Required): The ID of the role to modify.
  • Role name (Type: String || Flag: Optional): The new role name.
  • Color hex (Type: Color || Flag: Optional): The new role color.
  • Hoisted? (Type: Bool || Flag: Optional): Whether the role should be displayed separately or not.
  • Mentionable? (Type: Bool || Flag: Optional): Whether the role should be mentionable by everyone or not.

Permissions

Required permissions that the bot must have for this function to work properly:

  • manageroles

Example

$nomention
$argsCheck[>2;❌ Please provide the needed arguments! Usage: `!role-name (role) (newRoleName)`]
$onlyPerms[manageroles;❌ You are missing the manage_roles permission!]
$modifyRole[$findRole[$message[1]];$replaceText[$message;$message[1];;1];!unchanged;!unchanged;!unchanged]
$description[✅ Changed role name of <@&$findRole[$message[1]]>]

example