$createRole
Creates a role in the guild where the command is ran or in the guild of a valid defined guild ID.

FUNCTION USAGE

  • $createRole
  • $createRole[name]
  • $createRole[name;color]
  • $createRole[name;color;position]
  • $createRole[name;color;position;hoisted]
  • $createRole[name;color;position;hoisted;mentionable]
  • $createRole[name;color;position;hoisted;mentionable;guildID]

Properties:

name - The desired name of the newly created role.(Defaults to new role). color - The color of the role.(Defaults to the default role color 99AAB5). position - The position of the role. Defaults to 0. (bottom of the role list). hoisted - Whether the role is hoisted. (true or false) (defaults to false). mentionable - Whether the role is mentionable. (true or false) (defaults to false). guildID - If field is defined with a valid guild ID, the role will be created in that guild, otherwise the function will create the role in the guild where the command was executed.
Defaults name: "new role" color: "99AAB5" position: "0" (bottom of role list) hoisted: "false" mentionable: "false"

Example 1: Creates a default role.

bot.Command({
name: "create",
code: `
$createRole
`
})

Example 2: Define a specific role to create.

bot.Command({
name: "create",
code: `
$createRole[$message[1];$message[2];$message[3];$message[4];$message[5]]
`
})
Copy link