Method ModifyRolePositionsAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
ModifyRolePositionsAsync(IDictionary<int, DiscordRole>, string?)
Batch modifies the role order in the guild.
public Task<IReadOnlyList<DiscordRole>> ModifyRolePositionsAsync(IDictionary<int, DiscordRole> roles, string? reason = null)
Parameters
roles
IDictionary<int, DiscordRole>A dictionary of guild roles indexed by their new role positions.
reason
stringAn optional Audit log reason on why this action was done.
Returns
- Task<IReadOnlyList<DiscordRole>>
A list of all the current guild roles ordered in their new role positions.