Interface Channel
- All Superinterfaces:
Formattable
,IMentionable
,ISnowflake
- All Known Subinterfaces:
AudioChannel
,AudioChannelUnion
,Category
,ChannelUnion
,DefaultGuildChannelUnion
,ForumChannel
,GroupChannel
,GuildChannel
,GuildChannelUnion
,GuildMessageChannel
,GuildMessageChannelUnion
,IAgeRestrictedChannel
,ICategorizableChannel
,ICopyableChannel
,IInviteContainer
,IMemberContainer
,IPermissionContainer
,IPermissionContainerUnion
,IPositionableChannel
,IPostContainer
,ISlowmodeChannel
,IThreadContainer
,IThreadContainerUnion
,IVoiceStatusChannel
,IWebhookContainer
,IWebhookContainerUnion
,MediaChannel
,MessageChannel
,MessageChannelUnion
,NewsChannel
,PrivateChannel
,StageChannel
,StandardGuildChannel
,StandardGuildMessageChannel
,TextChannel
,ThreadChannel
,VoiceChannel
Abstract Channel interface for all
ChannelTypes
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The maximum length a channel name can be. -
Method Summary
Modifier and TypeMethodDescriptiondelete()
Deletes this Channel.default void
default String
Retrieve a Mention for this Entity.default EnumSet
<ChannelFlag> getFlags()
The flags configured for this channel.getJDA()
Returns theJDA
instance of this channelgetName()
The human readable name of this channel.getType()
TheChannelType
for this channelMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Field Details
-
MAX_NAME_LENGTH
static final int MAX_NAME_LENGTHThe maximum length a channel name can be. (100)- See Also:
-
-
Method Details
-
getFlags
The flags configured for this channel.
This feature is currently primarily used forForumChannels
.- Returns:
EnumSet
of the configuredChannelFlags
, changes to this enum set are not reflected in the API.
-
getName
The human readable name of this channel.- Returns:
- The name of this channel
-
getType
TheChannelType
for this channel- Returns:
- The channel type
-
getJDA
Returns theJDA
instance of this channel- Returns:
- the corresponding JDA instance
-
delete
Deletes this Channel.Possible ErrorResponses include:
UNKNOWN_CHANNEL
If this channel was already deleted
- Returns:
RestAction
-
getAsMention
Description copied from interface:IMentionable
Retrieve a Mention for this Entity. For the publicRole
(@everyone), this will return the literal string"@everyone"
.- Specified by:
getAsMention
in interfaceIMentionable
- Returns:
- A resolvable mention.
-
formatTo
- Specified by:
formatTo
in interfaceFormattable
- Specified by:
formatTo
in interfaceIMentionable
-