Interface ICopyableChannel
- All Superinterfaces:
Channel, Comparable<GuildChannel>, Formattable, GuildChannel, IDetachableEntity, IMentionable, ISnowflake
- All Known Subinterfaces:
AudioChannel, AudioChannelUnion, Category, DefaultGuildChannelUnion, ForumChannel, MediaChannel, NewsChannel, StageChannel, StandardGuildChannel, StandardGuildMessageChannel, TextChannel, VoiceChannel
Represents a GuildChannel that is capable of being copied.
Please see createCopy() for information on what is copied.
-
Field Summary
Fields inherited from interface Channel
MAX_NAME_LENGTHFields inherited from interface GuildChannel
JUMP_URL -
Method Summary
Modifier and TypeMethodDescriptionChannelAction<? extends ICopyableChannel> Creates a copy of the specifiedGuildChannel.ChannelAction<? extends ICopyableChannel> createCopy(Guild guild) Creates a copy of the specifiedGuildChannelin the specifiedGuild.Methods inherited from interface Comparable
compareToMethods inherited from interface GuildChannel
delete, getGuild, getJumpUrl, getManager, getPermissionContainerMethods inherited from interface IDetachableEntity
isDetachedMethods inherited from interface ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
createCopy
@Nonnull @CheckReturnValue ChannelAction<? extends ICopyableChannel> createCopy(@Nonnull Guild guild) Creates a copy of the specifiedGuildChannelin the specifiedGuild.
If the provided target guild is not the same Guild this channel is in then the parent category and permissions will not be copied due to technical difficulty and ambiguity.This copies the following elements:
- Name
- Parent Category (if present)
- Voice Elements (Bitrate, Userlimit)
- Text Elements (Topic, NSFW, Slowmode)
- All permission overrides for Members/Roles
Possible
ErrorResponsescaused by the returnedRestActioninclude the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNELpermission was removed
- Parameters:
guild- TheGuildto create the channel in- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it! - Throws:
IllegalArgumentException- If the provided guild isnullPermissionException- If the currently logged in account does not have theMANAGE_CHANNELPermissionDetachedEntityException- If the guild the channel should be copied to isdetached
-
createCopy
Creates a copy of the specifiedGuildChannel.This copies the following elements:
- Name
- Parent Category (if present)
- Voice Elements (Bitrate, Userlimit)
- Text Elements (Topic, NSFW, Slowmode)
- All permission overrides for Members/Roles
Possible
ErrorResponsescaused by the returnedRestActioninclude the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNELpermission was removed
- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it! - Throws:
PermissionException- If the currently logged in account does not have theMANAGE_CHANNELPermissionDetachedEntityException- If this entity isdetached
-