Class RoleOrderActionImpl

All Implemented Interfaces:
RestAction<Void>, OrderAction<Role,RoleOrderAction>, RoleOrderAction

public class RoleOrderActionImpl extends OrderActionImpl<Role,RoleOrderAction> implements RoleOrderAction
  • Constructor Details

    • RoleOrderActionImpl

      public RoleOrderActionImpl(Guild guild, boolean useAscendingOrder)
      Creates a new RoleOrderAction instance
      Parameters:
      guild - The target Guild of which to change the Role order
      useAscendingOrder - Defines the ordering of the OrderAction. If false, the OrderAction will be in the ordering defined by Discord for roles, which is Descending. This means that the highest role appears at index 0 and the lowest role at index n - 1. Providing true will result in the ordering being in ascending order, with the lower role at index 0 and the highest at index n - 1.
      As a note: Member.getRoles() and Guild.getRoles() are both in descending order.
  • Method Details