public class RoleOrderAction extends OrderAction<Role,RoleOrderAction>
OrderAction
designed to modify the order of Roles
of the
specified Guild
.
RestAction
This uses descending order!
RestAction.EmptyRestAction<T>, RestAction.FailedRestAction<T>
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor and Description |
---|
RoleOrderAction(Guild guild,
boolean useDiscordOrder)
Creates a new RoleOrderAction instance
|
Modifier and Type | Method and Description |
---|---|
Guild |
getGuild()
The
Guild which holds
the roles from OrderAction.getCurrentOrder() |
getCurrentOrder, getJDA, getSelectedEntity, getSelectedPosition, moveDown, moveTo, moveUp, reverseOrder, selectPosition, selectPosition, shuffleOrder, sortOrder, swapPosition, swapPosition
complete, complete, completeAfter, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, 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