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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description M
setParent(Category category)
Sets theParent Category
of the selectedGuildChannel
.default M
sync()
Syncs allPermissionOverrides
of this GuildChannel with its parent (Category
).M
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 Detail
-
setParent
@Nonnull @CheckReturnValue M setParent(@Nullable Category category)
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
@Nonnull @CheckReturnValue default M 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:
- Discord Documentation - Permission Syncing
-
sync
@Nonnull @CheckReturnValue M sync(@Nonnull IPermissionContainer syncSource)
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:
- Discord Documentation - Permission Syncing
-
-