Alchemy.Client.create_role

You're seeing just the function create_role, go back to Alchemy.Client module for more information.
Link to this function

create_role(guild_id, options)

Specs

create_role(snowflake(),
  name: String.t(),
  permissions: Integer,
  color: Integer,
  hoist: Booean,
  mentionable: Boolean
) :: {:ok, Alchemy.Guild.role()} | {:error, term()}

Creates a new role in the guild.

Requires the :manage_roles permission.

Options

  • name The name of the new role. Defaults to "new role"
  • permissions The set of permissions for that role. Defaults to the @everyone permissions in that guild.
  • color The color of the role. Defaults to 0x000000
  • hoist When set to true, the role will be displayed seperately in the sidebar.
  • mentionable When set to true, allows the role to be mentioned.

    Examples

    Client.create_role(guild_id, name: "the best role", color: 0x4bd1be)