How do you set the permission for a role to nothing? When I try to set permission to []
, it doesn't work for me.
I wanna do something like this
role.edit({
data: {
name:"noRights",
permissions:[none], //No permissions to Write Messages, read...
color:"GRAY",
}, reason:"Cuz I want"})
Setting permissions
to an empty array will deny all the role permissions.
Your code is not working because you are defining the data in an existing Object.
As you can see in the documentation, data is an Object itself, passed as the first parameter.
role.edit({
name: "noRights",
permissions: [],
color: "GRAY"
}, "Cuz I want");