Nostrum.Api.modify_guild_role
You're seeing just the function
modify_guild_role
, go back to Nostrum.Api module for more information.
Specs
modify_guild_role( Nostrum.Struct.Guild.id(), Nostrum.Struct.Guild.Role.id(), options(), Nostrum.Struct.Guild.AuditLogEntry.reason() ) :: error() | {:ok, Nostrum.Struct.Guild.Role.t()}
Modifies a guild role.
This endpoint requires the MANAGE_ROLES
permission. It fires a
Nostrum.Consumer.guild_role_update/0
event.
An optional reason
can be specified for the audit log.
If successful, returns {:ok, role}
. Otherwise, returns a Nostrum.Api.error/0
.
Options
:name
(string) - name of the role:permissions
(integer) - bitwise of the enabled/disabled permissions:color
(integer) - RGB color value (default: 0):hoist
(boolean) - whether the role should be displayed separately in the sidebar:mentionable
(boolean) - whether the role should be mentionable
Examples
Nostrum.Api.modify_guild_role(41771983423143937, 392817238471936, hoist: false, name: "foo-bar")