Nostrum.Api.modify_guild_role_positions
You're seeing just the function
modify_guild_role_positions
, go back to Nostrum.Api module for more information.
Specs
modify_guild_role_positions( Nostrum.Struct.Guild.id(), [%{id: Nostrum.Struct.Guild.Role.id(), position: integer()}], Nostrum.Struct.Guild.AuditLogEntry.reason() ) :: error() | {:ok, [Nostrum.Struct.Guild.Role.t()]}
Reorders a guild's roles.
This endpoint requires the MANAGE_ROLES
permission. It fires multiple
Nostrum.Consumer.guild_role_update/0
events.
If successful, returns {:ok, roles}
. Otherwise, returns a Nostrum.Api.error/0
.
positions
is a list of maps that each map a role id with a position.
Examples
Nostrum.Api.modify_guild_role_positions(41771983423143937, [%{id: 41771983423143936, position: 2}])