Skip to content
Server Helpers copyRolePerms

$copyRolePerms — Makes the permissions of a role identical to those of another role

Makes the permissions of a role identical to those of another role. Only the differing permissions are changed.

Syntax

$copyRolePerms[sourceRoleID;targetRoleID;(reason)]

Parameters

  • sourceRoleID (ID, required) — The role to copy.
  • targetRoleID (ID, required) — The role to change. @everyone is refused.
  • reason (text, optional) — The reason recorded in the server’s audit log (up to 512 characters). Empty or absent: the reason set with $auditLogReason, if any.

Return Value

  • empty.

Usage

$copyRolePerms[111;222]

Important Notes

  • The bot needs Manage Roles and its role must be above the target role.

Example

$copyRolePerms[111;222]
$sendMessage[Permissions copied.]

Audit log reason

The last, optional argument reason is the reason shown next to this action in the server’s audit log (Discord’s X-Audit-Log-Reason). Without it, the reason set earlier in the script with $auditLogReason is used; with neither, no reason is recorded.

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.