Nostrum.Api.create_guild_role

You're seeing just the function create_guild_role, go back to Nostrum.Api module for more information.
Link to this function

create_guild_role(guild_id, options, reason \\ nil)

View Source

Specs

Creates a guild role.

An optional reason for the audit log can be provided via reason.

This endpoint requires the MANAGE_ROLES permission. It fires a Nostrum.Consumer.guild_role_create/0 event.

If successful, returns {:ok, role}. Otherwise, returns a Nostrum.Api.error/0.

Options

  • :name (string) - name of the role (default: "new role")
  • :permissions (integer) - bitwise of the enabled/disabled permissions (default: @everyone perms)
  • :color (integer) - RGB color value (default: 0)
  • :hoist (boolean) - whether the role should be displayed separately in the sidebar (default: false)
  • :mentionable (boolean) - whether the role should be mentionable (default: false)

Examples

Nostrum.Api.create_guild_role(41771983423143937, name: "nostrum-club", hoist: true)