public class RoleOrderAction extends OrderAction<Role,RoleOrderAction>
OrderAction
designed to modify the order of Roles
of the
specified Guild
.
RestAction
Before you can use any of the move
methods
you must use either selectPosition(Role)
or OrderAction.selectPosition(int)
!
This uses descending order!
RestAction.EmptyRestAction<T>
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor | Description |
---|---|
RoleOrderAction(Guild guild,
boolean useDiscordOrder) |
Creates a new RoleOrderAction instance
|
Modifier and Type | Method | Description |
---|---|---|
Guild |
getGuild() |
The
Guild which holds
the roles from OrderAction.getCurrentOrder() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentOrder, getSelectedEntity, getSelectedPosition, moveDown, moveTo, moveUp, reverseOrder, selectPosition, selectPosition, setCheck, shuffleOrder, sortOrder, swapPosition, swapPosition
complete, complete, completeAfter, getJDA, isPassContext, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submit, submitAfter, submitAfter
public RoleOrderAction(Guild guild, boolean useDiscordOrder)
guild
- The target Guild
of which
to change the Role
orderuseDiscordOrder
- Defines the ordering of the OrderAction. If true
, 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 false
will result in the ordering being
in ascending order, with the lower role at index 0
and the highest at index n - 1
.
Member.getRoles()
and Guild.getRoles()
are both in descending order.public Guild getGuild()
Guild
which holds
the roles from OrderAction.getCurrentOrder()
Guild