Interface ChannelOrderAction
- All Superinterfaces:
OrderAction<GuildChannel,,ChannelOrderAction> RestAction<Void>
- All Known Subinterfaces:
CategoryOrderAction
Implementation of
To apply the changes you must finish the
OrderAction
to modify the order of Channels for a Guild.
To apply the changes you must finish the
RestAction.
Before you can use any of the move methods
you must use either selectPosition(GuildChannel) or OrderAction.selectPosition(int)!
- Since:
- 3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault EnumSet<ChannelType> TheChannelTypesfor thesorting bucket.getGuild()TheGuildwhich holds the channels fromOrderAction.getCurrentOrder()intThe sorting bucket for this order action.default ChannelOrderActionsetCategory(Category category) Set the parent category for the currently selected channel.setCategory(Category category, boolean syncPermissions) Set the parent category for the currently selected channel.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, timeoutMethods 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
-
Method Details
-
getGuild
TheGuildwhich holds the channels fromOrderAction.getCurrentOrder()- Returns:
- The corresponding
Guild
-
getSortBucket
int getSortBucket()The sorting bucket for this order action.
Multiple differentChannelTypescan share a common sorting bucket.- Returns:
- The sorting bucket
-
getChannelTypes
TheChannelTypesfor thesorting bucket.- Returns:
- The channel types
- See Also:
-
setCategory
@Nonnull @CheckReturnValue ChannelOrderAction setCategory(@Nullable Category category, boolean syncPermissions) Set the parent category for the currently selected channel.- Parameters:
category- The new parent category, or null to not have any categorysyncPermissions- Whether to sync the permissions of the channel to the new category- Returns:
- The current ChannelOrderAction
- Throws:
IllegalStateException- If no entity has been selected yet, useOrderAction.selectPosition(Object)IllegalArgumentException- If the provided category is not in the same guild as the channel
-
setCategory
Set the parent category for the currently selected channel.By default, this will not sync the permissions with the new category. You can use
setCategory(Category, boolean)to sync permissions.- Parameters:
category- The new parent category, or null to not have any category- Returns:
- The current ChannelOrderAction
- Throws:
IllegalStateException- If no entity has been selected yet, useOrderAction.selectPosition(Object)IllegalArgumentException- If the provided category is not in the same guild as the channel
-