Class CategoryOrderAction<T extends Channel>
- java.lang.Object
-
- net.dv8tion.jda.core.requests.RestAction<java.lang.Void>
-
- net.dv8tion.jda.core.requests.restaction.order.OrderAction<T,ChannelOrderAction<T>>
-
- net.dv8tion.jda.core.requests.restaction.order.ChannelOrderAction<T>
-
- net.dv8tion.jda.core.requests.restaction.order.CategoryOrderAction<T>
-
- Type Parameters:
T
- The type ofChannel
to move using this CategoryOrderAction, eitherTextChannel
, orVoiceChannel
.
public class CategoryOrderAction<T extends Channel> extends ChannelOrderAction<T>
An extension ofChannelOrderAction
with similar functionality, but constrained to the bounds of a singleCategory
.
To apply the changes you must finish theRestAction
.Before you can use any of the
move
methods you must use eitherselectPosition(Channel)
orOrderAction.selectPosition(int)
!- Author:
- Kaidan Gustave
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.dv8tion.jda.core.requests.RestAction
RestAction.EmptyRestAction<T>
-
-
Field Summary
-
Fields inherited from class net.dv8tion.jda.core.requests.RestAction
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
-
-
Constructor Summary
Constructors Constructor Description CategoryOrderAction(Category category, ChannelType type)
Creates a new CategoryOrderAction for the specifiedCategory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Category
getCategory()
Gets theCategory
controlled by this CategoryOrderAction.-
Methods inherited from class net.dv8tion.jda.core.requests.restaction.order.ChannelOrderAction
getChannelType, getGuild
-
Methods inherited from class net.dv8tion.jda.core.requests.restaction.order.OrderAction
getCurrentOrder, getSelectedEntity, getSelectedPosition, moveDown, moveTo, moveUp, reverseOrder, selectPosition, selectPosition, setCheck, shuffleOrder, sortOrder, swapPosition, swapPosition
-
Methods inherited from class net.dv8tion.jda.core.requests.RestAction
complete, complete, completeAfter, getJDA, isPassContext, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submit, submitAfter, submitAfter
-
-
-
-
Constructor Detail
-
CategoryOrderAction
public CategoryOrderAction(Category category, ChannelType type)
Creates a new CategoryOrderAction for the specifiedCategory
- Parameters:
category
- The targetCategory
which the new CategoryOrderAction will order channels from.type
- TheChannelType
that matches the returning value ofChannel#getType()
for the genericChannel
typeT
.- Throws:
java.lang.IllegalArgumentException
- If theChannelType
is not one that can be retrieved from aCategory
. Currently the only two allowed areChannelType.TEXT
andChannelType.VOICE
.
-
-