Interface ICategorizableChannelManager<T extends ICategorizableChannel,M extends ICategorizableChannelManager<T,M>>
- All Superinterfaces:
AuditableRestAction<Void>
,ChannelManager<T,
,M> IPermissionContainerManager<T,
,M> Manager<M>
,RestAction<Void>
- All Known Subinterfaces:
BaseGuildMessageChannelManager<T,
,M> NewsChannelManager
,StageChannelManager
,StoreChannelManager
,TextChannelManager
,VoiceChannelManager
public interface ICategorizableChannelManager<T extends ICategorizableChannel,M extends ICategorizableChannelManager<T,M>>
extends ChannelManager<T,M>, IPermissionContainerManager<T,M>
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
ARCHIVED, AUTO_ARCHIVE_DURATION, BITRATE, INVITEABLE, LOCKED, NAME, NSFW, PARENT, PERMISSION, POSITION, REGION, SLOWMODE, TOPIC, TYPE, USERLIMIT
-
Method Summary
Modifier and TypeMethodDescriptionSets theParent Category
of the selectedGuildChannel
.default M
sync()
Syncs allPermissionOverrides
of this GuildChannel with its parent (Category
).sync
(IPermissionContainer syncSource) Syncs allPermissionOverrides
of this GuildChannel with the given (GuildChannel
).Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.managers.channel.ChannelManager
getChannel, getGuild, reset, reset, setName
Methods inherited from interface net.dv8tion.jda.api.managers.channel.attribute.IPermissionContainerManager
clearOverridesAdded, clearOverridesRemoved, putMemberPermissionOverride, putMemberPermissionOverride, putPermissionOverride, putPermissionOverride, putRolePermissionOverride, putRolePermissionOverride, removePermissionOverride, removePermissionOverride
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, 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, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Method Details
-
setParent
Sets theParent Category
of the selectedGuildChannel
.- Parameters:
category
- The new parent for the selectedGuildChannel
- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalStateException
- If the target is a category itselfIllegalArgumentException
- If the provided category is not from the same Guild- Since:
- 3.4.0
-
sync
Syncs allPermissionOverrides
of this GuildChannel with its parent (Category
).After this operation, all
PermissionOverrides
will be exactly the same as the ones from the parent.
That means that all current PermissionOverrides are lost!This behaves as if calling
sync(IPermissionContainer)
with this GuildChannel'sICategorizableChannel.getParentCategory()
Parent}.- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalStateException
- If this GuildChannel has no parentInsufficientPermissionException
- If the currently logged in account does not havePermission.MANAGE_PERMISSIONS
in this channel orIPermissionHolder.canSync(IPermissionContainer, IPermissionContainer)
is false for the self member.- See Also:
-
sync
Syncs allPermissionOverrides
of this GuildChannel with the given (GuildChannel
).After this operation, all
PermissionOverrides
will be exactly the same as the ones from the syncSource.
That means that all current PermissionOverrides are lost!This will only work for Channels of the same
Guild
!.- Parameters:
syncSource
- The GuildChannel from where all PermissionOverrides should be copied from- Returns:
- ChannelManager for chaining convenience
- Throws:
IllegalArgumentException
- If the given snySource isnull
, this GuildChannel or from a different Guild.InsufficientPermissionException
- If the currently logged in account does not havePermission.MANAGE_PERMISSIONS
in this channel orIPermissionHolder.canSync(IPermissionContainer, IPermissionContainer)
is false for the self member.- See Also:
-