Class RoleOrderActionImpl
java.lang.Object
net.dv8tion.jda.internal.requests.RestActionImpl<Void>
net.dv8tion.jda.internal.requests.restaction.order.OrderActionImpl<Role,RoleOrderAction>
net.dv8tion.jda.internal.requests.restaction.order.RoleOrderActionImpl
- All Implemented Interfaces:
RestAction<Void>
,OrderAction<Role,
,RoleOrderAction> RoleOrderAction
public class RoleOrderActionImpl
extends OrderActionImpl<Role,RoleOrderAction>
implements RoleOrderAction
-
Field Summary
Fields inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
LOG
-
Constructor Summary
ConstructorsConstructorDescriptionRoleOrderActionImpl
(Guild guild, boolean useAscendingOrder) Creates a new RoleOrderAction instance -
Method Summary
Modifier and TypeMethodDescriptiongetGuild()
TheGuild
which holds the roles fromOrderAction.getCurrentOrder()
Methods inherited from class net.dv8tion.jda.internal.requests.restaction.order.OrderActionImpl
deadline, getCurrentOrder, getSelectedEntity, getSelectedPosition, isAscendingOrder, moveAbove, moveBelow, moveDown, moveTo, moveUp, reverseOrder, selectPosition, selectPosition, setCheck, shuffleOrder, sortOrder, swapPosition, swapPosition, timeout
Methods inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
complete, getCheck, getDefaultFailure, getDefaultSuccess, getDefaultTimeout, getJDA, handleResponse, isPassContext, priority, queue, setDefaultFailure, setDefaultSuccess, setDefaultTimeout, setErrorMapper, setPassContext, submit
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.requests.restaction.order.OrderAction
deadline, getCurrentOrder, getSelectedEntity, getSelectedPosition, isAscendingOrder, moveAbove, moveBelow, moveDown, moveTo, moveUp, reverseOrder, selectPosition, selectPosition, setCheck, shuffleOrder, sortOrder, swapPosition, swapPosition, timeout
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Constructor Details
-
RoleOrderActionImpl
Creates a new RoleOrderAction instance- Parameters:
guild
- The targetGuild
of which to change theRole
orderuseAscendingOrder
- Defines the ordering of the OrderAction. Iffalse
, the OrderAction will be in the ordering defined by Discord for roles, which is Descending. This means that the highest role appears at index0
and the lowest role at indexn - 1
. Providingtrue
will result in the ordering being in ascending order, with the lower role at index0
and the highest at indexn - 1
.
As a note:Member.getRoles()
andGuild.getRoles()
are both in descending order.
-
-
Method Details
-
getGuild
Description copied from interface:RoleOrderAction
TheGuild
which holds the roles fromOrderAction.getCurrentOrder()
- Specified by:
getGuild
in interfaceRoleOrderAction
- Returns:
- The corresponding
Guild
-