Package net.dv8tion.jda.api.entities
Interface ICopyableChannel
-
- All Superinterfaces:
Channel
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,IMentionable
,ISnowflake
- All Known Subinterfaces:
BaseGuildMessageChannel
,Category
,NewsChannel
,StageChannel
,StoreChannel
,TextChannel
,VoiceChannel
public interface ICopyableChannel extends GuildChannel
-
-
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 specifiedGuildChannel
in 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 specifiedGuildChannel
in 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
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNEL
permission was removed
- Parameters:
guild
- TheGuild
to 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 isnull
PermissionException
- If the currently logged in account does not have theMANAGE_CHANNEL
Permission
-
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
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNEL
permission 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_CHANNEL
Permission
-
-