Package net.dv8tion.jda.api.entities
Interface ICopyableChannel
-
- All Superinterfaces:
Channel,Comparable<GuildChannel>,Formattable,GuildChannel,IMentionable,ISnowflake
- All Known Subinterfaces:
BaseGuildMessageChannel,Category,NewsChannel,StageChannel,TextChannel,VoiceChannel
public interface ICopyableChannel extends GuildChannel
Represents a GuildChannel that is capable of being copied. Please seecreateCopy()for information on what is copied.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChannelAction<? extends ICopyableChannel>createCopy()Creates a copy of the specifiedGuildChannel.ChannelAction<? extends ICopyableChannel>createCopy(Guild guild)Creates a copy of the specifiedGuildChannelin the specifiedGuild.-
Methods inherited from interface net.dv8tion.jda.api.entities.Channel
formatTo, getAsMention, getJDA, getName, getType
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface net.dv8tion.jda.api.entities.GuildChannel
delete, getGuild, getManager, getPermissionContainer
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
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_CHANNELPermission
-
createCopy
@Nonnull @CheckReturnValue ChannelAction<? extends ICopyableChannel> 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_CHANNELPermission
-
-